# How to rotate Pflow particles around local axis

 02 February 2014 ArtOfSoulburn Artist   portfolio Neil Blevins San Francisco, United States How to rotate Pflow particles around local axis So if I set up a pflow with mesh geometry using shape instance, I want to be able to randomly rotate each particle around my geometry's local Z axis. However, there doesn't seem to be an option for that in the Rotation Operator. I can rotate it in world space. I can rotate it around the direction the particle is moving. But not around the local axis of the instanced geometry. Any ideas? - Neil share quote
 02 February 2014 MatteoM life is easy... :)   portfolio Matteo -MatEvil- Migliorini Job Manager - CG Artist Freelance Florence, Italy Neil, I can't test now, but I can give you an idea... Can you try with "The Advanced Data Manipulation" ? http://docs.autodesk.com/3DSMAX/15/...mber=d30e206177 http://docs.autodesk.com/3DSMAX/15/...mber=d30e206212 I hope that link can help you Matteo __________________ VFX | CG Artist available for freelance jobs www.art2upz.com RnD | Simulation Reel July 2014 3D Generalist Reel Winter 2012 share quote
 02 February 2014 d4rk3lf Expert   portfolio Boban Krsmanovic Nis, Serbia Try this: 1) Make group of all your fragments 2) In "shape instance", pick that group, and select "group members" That way, shape instance should randomly choose objects from the group, and rotation should be local. Hope that helps Neil, and I'll use this opportunity to thank you for all awesome tutorials on your site, that I re-reading them very often all these years. __________________ Now it's the time to be extreme! Demoreel website share quote
02 February 2014
Spin or Rotation? I assume you are talking about Rotation, as the Spin op has a local Particle Space spin axis.

Rotation around the particles local axis is pretty easy with a data op.

EDIT: I did misunderstand but this should correct it. You need to grab the objects rotation, set the particle rotation to match, then add your random local particle Z.
Attached Images
 tilt.png (71.0 KB, 39 views)
Attached Files
 max2014_PF_RndmZrotation02.zip (31.1 KB, 37 views)
__________________
poof ~>Vimeo<~

Last edited by JohnnyRandom : 02 February 2014 at 11:36 PM.

 02 February 2014 ArtOfSoulburn Artist   portfolio Neil Blevins San Francisco, United States Thanks everyone for the ideas. I've never played with the Data operators before, looks like they're basically a way to write your own nodes with simple math functions. John, if I include the operator you wrote on my website, would that be ok? I'll give you credit for writing it. - Neil share quote
 02 February 2014 ArtOfSoulburn Artist   portfolio Neil Blevins San Francisco, United States Another quick question, what would I have to change in the Data Operator in order to have the teapots aligned to the normals of the cylinder, so their z axis was in the same direction as the normal? Thanks. - Neil share quote
 02 February 2014 JohnnyRandom Configurator   portfolio John Rand still wandering the binary void salt lake city, USA Originally Posted by soulburn3d: I've never played with the Data operators before, looks like they're basically a way to write your own nodes with simple math functions. You often don't even need the math function per se, there are a lot of built functions that will do heavy lifting for you. Originally Posted by soulburn3d: John, if I include the operator you wrote on my website, would that be ok? I'll give you credit for writing it. Go for it Originally Posted by soulburn3d: Another quick question, what would I have to change in the Data Operator in order to have the teapots aligned to the normals of the cylinder, so their z axis was in the same direction as the normal? Thanks. That would be a little more difficult, I would have to work on that one. __________________ poof ~>Vimeo<~ share quote
02 February 2014
So I messed around a little with an old Align To Normal preset I had scrounged together. This will one will take into account local rotation of the base object. The old preset would fail if the base objects local rotation was offset. You can save this preset out of the scene.

NOTE: You have to open the Data Op to assign the base object, the Select Object sub-op UI exposure doesn't seem to be working correctly.
Attached Files
 max2014_PF_AlignToNormal.zip (25.5 KB, 26 views)
__________________
poof ~>Vimeo<~

 02 February 2014 ArtOfSoulburn Artist   portfolio Neil Blevins San Francisco, United States Thanks John. Another idea, maybe instead of doing the align to normal in the data op, could the Speed By Surface operator be used to align the teapots to the cylinder, and then your operator rotates it around their current axis? That way you don't have to enter the data op in order to specify the cylinder as the base object. - Neil share quote
 02 February 2014 JohnnyRandom Configurator   portfolio John Rand still wandering the binary void salt lake city, USA Hmm, not sure. The base particle orientation grab comes from the objects normal. If there is no object then the particle doesn't have a base to align too. Speed by Surface won't affect orientation at all, only Lock & Bond will respect it. At that point you might as well L&B to the object but you still need to orient. I hacked this op together originally so as to use this way, to set original orientation for L&B to do its thing. Without resorting to cheats like adding 0.01 Speed By Surface op with a Rotation + Speed Space to New Event. It was just a little bit cleaner user friendly. Max 2014 ADM ops should respect the Select Object sub-op, in fact I just tried it and it seems to work just fine. You'll have to draw me a picture to help me understand better __________________ poof ~>Vimeo<~ share quote
 02 February 2014 ArtOfSoulburn Artist   portfolio Neil Blevins San Francisco, United States I can do one better, I can give you a tutorial : http://www.neilblevins.com/cg_educa...low_scatter.htm You can see my current stack of operators. This does work, but the particles are oriented completely randomly, and what I'd like is for user control to define just how much randomness to give the rotation, and confine it to a user specified local particle axis. - Neil share quote
 02 February 2014 JohnnyRandom Configurator   portfolio John Rand still wandering the binary void salt lake city, USA LOL brutal, I can get it to work UNTIL a particles lies on a down facing normal then it blows up, need to work on it still. __________________ poof ~>Vimeo<~ share quote
 02 February 2014 CGTalk Moderation Expert Thread automatically closed This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum. __________________ CGTalk Policy/Legalities Note that as CGTalk Members, you agree to the terms and conditions of using this website. share quote

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts vB code is On Smilies are On [IMG] code is On HTML code is Off CGSociety Society of Digital Artists www.cgsociety.org Powered by vBulletinCopyright ©2000 - 2006, Jelsoft Enterprises Ltd.