View Full Version : Aim paticle instances out from surface.
Fronat 09-30-2006, 01:09 PM Hi
I have a extreuded surface and painted some particles on it.
how i have some instances for the particles and i want the instances
to aim out from the surface AND follow (no motion) the surface direction.
exemple: the instance should point out in Y-axis and follow the surface diraction in X or Z axis.
think of spikes on a rosestem.
i know i must have the "pointOnSurface,pointOnSurfaceInfo" nodes.
but i dont know exactly which antribute to query and to connect.
Tanx
|
|
Pyrokinesis
10-01-2006, 05:22 AM
I am confused as to what direction you want the instances to face, but here is how to address the problem.
First make sure when you create your instance that the geometry is facing positive X. after creation you can access many useful attributes under the particle shape node < Instancer (Geometry replacement).
under rotation options you should find what you need, if not you can create a custom PP attr, and connect it in this menu.
Aikiman
10-01-2006, 06:30 AM
I think this thread might be helpful for you...
http://forums.cgsociety.org/showthread.php?t=399170
I've been trying to get my head around it as well but still confused. I will be back for it again sometime soon, maybe you could shed some light when you achieve it :)
Fronat
10-01-2006, 04:10 PM
i looked on that thread many times and it helped my a lot.
all my particles are how pointing out from the surface.
the only thing i cant figure out is how to rotate each particle around its aimAxix (normal)
so its follows the V direction of the surface...
how its set to <<1,0,0>>.
i think it a simple thing to do but im a little confused on wich attributes to use.
i think i have to get and use the U-V tangenst fron the "pointOnSufaceInfo" node in some way.
But im indeed confused.
here is my exressions as it is for now.
______________________________________________________
float $pos[] = particleShape1.position;
setAttr "closestPointOnSurface1.inPosition" -type double3 $pos[0] $pos[1] $pos[2];
vector $normal = `getAttr pointOnSurfaceInfo1.normal`;
particleShape1.aimDirPP = $normal;
vector $aimAxisPP = <<1,0,0>>;
particleShape1.aimAxisPP = $aimAxisP
______________________________________________________
take a look att the image of my test to se whati mean.
CGTalk Moderation
10-01-2006, 04:10 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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.