I am trying to have the particles getting smaller when they come towards the camera, but I still have some quite big, not sure where i am going wrong.

DistRadiusMulti is an extra attribute and the number go quite small but nevertheless the particles are not so they must be something I am not connected properly.

Thanks

JoshM

09-21-2009, 05:56 PM

What particleRenderType are you using for the particles? Also, how are you setting the DistRadiusMulti to the particles? This would only work if the particles are instances and the ScalePP attr is set to DistRadiusMulti.

Josh

flore33

09-21-2009, 06:28 PM

I'm using blobbysurface.
the distRaduis mult is an extra attribute, which I thought will be connected to the radius pp by stating
$radiusPP=particleShape8.radiusPP;
particleShape8.DistRadiusMulti =$radiusPP*$fadeMultiplier;, but may be I'm wrong.

JoshM

09-21-2009, 08:05 PM

Ahh, ok. Basically, $radiusPP is just a user defined variable that will just hold the value of whatever radiusPP is. So nothing is really updating / changing the per-particle attr radiusPP, which is needed for controlling the size of the blobby surface. It sounds like you don't even need the DistRadiusMulti being that the blobby surface can't use it for size. I think the following lines will fix the expression and control the blobby surface radius as desired:

//note that there is no $ before radiusPP
//Otherwise mel will create it as a user-defined variable
radiusPP = radiusPP * $fadeMultiplier;

//this is also equivalent
//radiusPP *= $fadeMultiplier;

HTH,
Josh

flore33

09-21-2009, 08:19 PM

ok, I'll try this. the thing also is that the raduisPP is also connected to a ramp, that why there was an other attribute but I'll see, this might fix the problem. thanks.

JoshM

09-21-2009, 09:04 PM

if radiusPP is already connected to the ramp you are going to need to adjust the per-particle attrs.

First, break the connection of the ramp to the radiusPP attr. What you should try to do now is create another per-particle (float) attr named 'radiusScalePP' or something. Then create apply your ramp to this attr (you can use your already existing ramp through the options box Map To attr). Now right click on the radiusScalePP attr and go to arrayMapper1.outValuePP -> Edit Array Mapper and rename the array mapper to something unique like 'scaleArrayMapper'. Then you can access the values of the ramp through the following lines of code:

Follow Us On:

The CGSociety

The CGSociety is the most respected and accessible global organization for creative digital artists. The CGS supports artists at every level by offering a range of services to connect, inform, educate and promote digital artists worldwide. More about us on TheArtSociety.com