PDA

View Full Version : Align to Normals


Almir
10-15-2008, 12:43 PM
Hi,
I'm sure I read this somewhere, but I couldn't find it.
Imagine you have a growing S shaped tube, you have alpha-mapped planes as particles to grow along with it.
Now everything is cool except I need the particles to be aligned (rotation wise) to the normal of the face kind of wrapping effect.
http://img72.imageshack.us/img72/3715/xxcc1.jpg
What I could accomplish so far, either completely random or algined to one but not the other 4 or whatever since this will be smoothed later to a tube.
thanks.
~sion

Bobo
10-15-2008, 01:47 PM
Hi,
I'm sure I read this somewhere, but I couldn't find it.


I found it for you:
http://forums.cgsociety.org/showthread.php?f=206&t=679623

Almir
10-15-2008, 02:25 PM
Hey Bobo, really glad you replied.
I checked these before, this work for a static object but this is what I have using speed "surface normals", rotation "Speed Space", speed = 0, it's aligned to some faces but quite perpindicular to others
http://img119.imageshack.us/img119/8611/ddkn1.gif
what I need for ALL of them to be like the first portion, you can notice that in the middle they're not.
thanks for the help.
~sion

Bobo
10-15-2008, 11:53 PM
I tried a cylinder animated by a Path Deform WSM to grow and emit particles on the surface.
The PFlow had a Position Object with "Lock On Emitter" enabled and "Animated Shape" checked. Then came a Krakatoa Geometry Lookup set to Use Normal Vector -->TM. Then I put a Shape Instance with a Plane reoriented via an XForm modifier.

The particles stuck to the surface and oriented themselves based on the changing surface.
Note that I did not alter the topology of the cylinder, only deformed it. Changing topology could confuse the Position Object operator. Using a Script Operator and the Krakatoa Geometry Lookup "Point Position" option, one could keep a particle more or less suck to the surface of changing topology. To do this, I disabled the "Lock On Emitter", enabled the "Point Position" to go to the Script Vector channel and then added a Script Operator with the following code which copies the closest point to the position channel, thus keeping the particle more or less on the surface.

on ChannelsUsed pCont do (
pCont.useVector = true
pCont.usePosition= true
)

on Init pCont do ( )

on Proceed pCont do (
count = pCont.NumParticles()
for i in 1 to count do (
pCont.particleIndex = i
pCont.particlePosition = pCont.particleVector
)
)

on Release pCont do ( )


Here is a ZIP file with three Max 9 scenes (both require the Krakatoa 1.1.2 Evaluation or Commercial version with Krakatoa Geometry Lookup operator installed).
http://www.scriptspot.com/bobo/krakatoa/KRA_AlignToAnimatedCylinder.zip
The one uses a cylinder with animated segments deformed by a spline.
The second uses a snapshot of that deformed cylinder sliced by a Slice modifier.
The third is like the first one, but with "Inherit Emitter Movement" checked, which makes some particles follow the growth of the cylinder.

Almir
10-22-2008, 09:41 AM
thanks a lot dude for this feedback, unfortunately I have no access to Krakatoa commercially at the moment, I had to revert to other schemes to get this to "look" done.
Shame that PF can't do this, and it seems the more cores you have the slower it updates, which is absurd if you ask me.
Thanks for the help dude once again :)
~sion

Bobo
10-22-2008, 04:33 PM
thanks a lot dude for this feedback, unfortunately I have no access to Krakatoa commercially at the moment, I had to revert to other schemes to get this to "look" done.
Shame that PF can't do this, and it seems the more cores you have the slower it updates, which is absurd if you ask me.
Thanks for the help dude once again :)
~sion

Once again, if I was not clear enough: You DON'T need a commercial version of Krakatoa to use the PFlow tools it provides. Unless you want to use them on a render farm (Krakatoa Evaluation does not support network rendering).
So if you want to get your particles oriented and rendered on your workstation, you can use the eval. version. For free.

Almir
10-29-2008, 09:36 AM
I thought it watermarked them, it's a commerical work can't have watermarks.
I'll give it a try, it's such a promising app.
thanks maxster bobo :)
~sion

CGTalk Moderation
10-29-2008, 09:36 AM
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.