View Full Version : radiusPP into density
baran 10-31-2008, 10:14 AM Hi,
I need to connect my cloud particleshape's radiusPP into density of its shader. When radiusPP increases, the density has to reduce.
Any help is much appriciated
Thanks.
|
|
Aikiman
11-01-2008, 09:06 PM
Hi,
I need to connect my cloud particleshape's radiusPP into density of its shader. When radiusPP increases, the density has to reduce.
Any help is much appriciated
Thanks.
Try this...create a new per particle attr from the attribute list userScalar1PP and in the expression editor write this code in runtime
particleShape1.userScalar1PP=1-particleShape1.radiusPP;
this assumes your maximum radius is 1. Now hook the particle sampler info node particleShape1.userScalar1PP to density in hypershade.
If your radiusPP max is greater than 1 then you gunna have to normalise your expression with linstep because density is 0-1 so...
particleShape1.userScalar1PP=1-linstep(0,5,particleShape1.radiusPP);
for example.
Another way is to use the utility nodes, (I think this works?!) Hook the particle sampler Info Node up to a setRange with the new min max 0-1 and old min max 0-5 for example. Then pipe that into a reverse node then into density. Probably a lot quicker than the expression to evaluate.
Hope that works. ;)
CGTalk Moderation
11-01-2008, 09:06 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.