AWS Thinkbox Discussion Forums

PRT Hair Normalized Length

Hi, I’m using PRT hair on Ornatrix converted to splines. So I have about 100 splines in one object. I want to generate the radius channel based on normalized length along its spline. since the splines are all different lengths this proves to be challenging. Any ideas?

My initial thought is to use SPlineID and a maxscript node to query the numknots.

There are already two channels in the PRT Hair that give you that - the one is called HairLength, the other is called Distance. Distance divided by HairLength gives you a normalized value from 0.0 at the root to 1.0 at the tip.

You can see this in the Siggraph 2011 Krakatoa MX 2.0 Beta videos about PRT Hair…
thinkboxsoftware.com/news/20 … art-1.html

Alternatively, when the Density Falloff is set to 1.0, the Density channel will already contain a value of 1.0 at the root and 0.0 at the tip. You can set the Density Falloff to 1.0, and use the InputChannel:Density to control the Radius. If you need the Density to be 1.0 along the spline, another Magma could set that easily. The Density Falloff is simply an Exponent (Power Of) on the normalized value, so a 3.0 value for example means a cubic falloff…

Both approaches are equivalent, the Density->Radius will perform one less division operation in the Magma :wink:

Thanks, didn’t realize those were good on splines. Works great!

Privacy | Site terms | Cookie preferences