PDA

View Full Version : Thinking Particles - Leaves


JayCox
01-28-2013, 10:59 AM
Hey guys,

I am trying to set up a TP construct for leaves falling on the ground. I have a mesh with a leaf texture on it and want it to fly through the air.

Therefore I have created a set up as follows:
Null --> Position and Matrix go to PStorm Emitter Position and Allignment
PStorm --> PGroup
Ppass --> PShape
PPass --> pAlignment
PPass --> pGravity
PPass --> pDeflector


Now gravity and Shape work, Deflector does also. What I want is to randomly vary the allignment of the leaves. Therefore I have set the pAllignment to Type Random, XYZ stays 0, Source is Y and Laziness 5. Now they are random (yay) but now we get to the base of my problem.
Once they hit the deflector they get stuck there. But i want them to "lie down" with Y facing upwards.

Now how the heck do I achieve this? Do I have to change something within the allignment? Or the pDeflector? I just tried
pDeflector Event --> pAlignment 2 On and then set it to Y and Type World Y (and also connected pPass with pAlignment 2) but nothing really changed... they still stick in the floor and do not lie as I wish...

EDIT:// I forgot to turn of the Laziness of the pAlignment2 so now they align as to Y up. But if the particles are faced for example Y down when they hit the floor they do an ugly flip... Can I make them stay -Y if they arrive like this?

Please help! Thank you very much :)

Greetz,
JayCox

littledevil
01-28-2013, 03:57 PM
given that you are talking about a flat plane as the ground :

1. create a second particle group and a second alignment node
2. on the collision event switch the particle group for the given particles
3. adjust the aligment of these particles as wanted with the new alignment node
4. this will result in some sort of snapping behaviour - won't look good

if you have non planaer floor/surface/whatever, you could do the following
(or as an alternative to the ugly snapping) :

1. also switch the particle group on the collsion event, but let the collison
occur with a large offset and then animate the last frames with mograph/
dynamics solution.

or

2. get the collsion position and sample the nearest surface point of your
floor object, get the surface normal of the connected polygon and align
your particle to it. you could use the system preset GetNearetestPoint for
this, but it only calculates the nearest vertex despite its name. however,
this will be enough for your task.

i do not really understand why you do not use mograph for this :)

teleliq
01-28-2013, 05:48 PM
You could also try to set up a second alignment. Then you can use a mix node to blend in the second alignment, when the leaves come closer to the surface.

Cheers
Simon

fuat
01-29-2013, 10:39 AM
you could also set up your own alignment matrix with an upvector.
then you wont have that gimbal lock problem.
ciao
fuat

JayCox
01-29-2013, 01:52 PM
Thank you guys for your reply :)

@Little_Devil : Thanks for your input, but what you are suggesting will not work for a movie. I have a camera watching this happen and I cannot animate it with mograph because I would have to animate each leaf seperatly and then I can just keyframe the entire thing...

@fuat : I do not really have a gimbal lock problem I mainly have a problem with it snapping...

@Teleliq/Simon: That sounds like a good idea... Could you tell me how to set it up because I kinda got stuck once I created the mix node^^
What do I connect with what?

I am attaching a screenshot of my current set up which works well until it hits the floor... at the moment it just sticks in the floor
or
if I connect the pDeflector event with second pAlignment on and of course pPass to pAlignm. Particle it snaps...


Thank you very much!

fuat
01-29-2013, 03:58 PM
in order to mix data you have to get data (PGet Data), output the channel you want (Alignment), mix it, and then set the data back (-> PSet Data into Alignment Port).
hope that helps.
fuat

littledevil
01-29-2013, 04:05 PM
Thank you guys for your reply :)
@Little_Devil : Thanks for your input, but what you are suggesting will not work for a movie. I have a camera watching this happen and I cannot animate it with mograph because I would have to animate each leaf seperatly and then I can just keyframe the entire thing...


not sure how this is meant, but you just drag the new particle group into a mograph
cloner object. it will inherit the particle data. i also not unerstand why you would have
to animate each object seperatly. it would be a one mograph object and one leaf object
an you particle group/cloud as the starting point. you won't have to do any keyframing at
all, mograph /dynamcis are just another particle system.

JayCox
01-29-2013, 04:49 PM
@fuat : Thanks ! Will try that tomorrow :)

@little_Devil : Ok then I probably misunderstood you or don't quite get how mograph and TP work together :) Will try it tomorrow too!

Thanks alot :)

CGTalk Moderation
01-29-2013, 04:49 PM
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.