How to rotate Pflow particles around local axis

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 02 February 2014   #1
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
 
Old 02 February 2014   #2
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
 
Old 02 February 2014   #3
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
 
Old 02 February 2014   #4
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
File Type: png tilt.png (71.0 KB, 37 views)
Attached Files
File Type: zip max2014_PF_RndmZrotation02.zip (31.1 KB, 35 views)
__________________
poof ~>Vimeo<~

Last edited by JohnnyRandom : 02 February 2014 at 11:36 PM.
 
Old 02 February 2014   #5
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
 
Old 02 February 2014   #6
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
 
Old 02 February 2014   #7
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<~
 
Old 02 February 2014   #8
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
File Type: zip max2014_PF_AlignToNormal.zip (25.5 KB, 26 views)
__________________
poof ~>Vimeo<~
 
Old 02 February 2014   #9
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
 
Old 02 February 2014   #10
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<~
 
Old 02 February 2014   #11
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
 
Old 02 February 2014   #12
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<~
 
Old 02 February 2014   #13
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.
 
Thread Closed share thread



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 vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 06:58 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.