Hi there ! I got a Xparticles simple setup that generates a bunch of trails/splines and I wanted to know it was possible to export le splines/trails length to the arnold material in order to color each trails according to its length (ie using a gradient) ?
Solved! Go to Solution.
Solved by lee_griggs. Go to Solution.
Hi ! thanks Peter for the answer ! this method to add gradient to splines works perfectly, so I'll keep it in mind 😉
however I didn't express my self clearly, I'm looking for a method to color each splines uniformly (not a ramp mapped along each ones) with one color picked from a gradient according to the length of each one
ie : I create a ramp from yellow to red and I want the shortest splines to be yellow and as they get longer they get closer to red (but one color per splines, not the gradient mapped over it)
is this possible with arnold (it's possible with cycle 4d but I prefer to keep everything in arnold 😉 )
Hi ! thanks for your answers ! i'll try that this afternoon !
about user data i was close to solution with xpresso (the spline node is actually able to compute a spline length, unfortunately if you give a flock of trails, which are considered segments of the same spline, you can only output one length at a time with a provided segment index, I didn't manage to export a matrix of indexed length)
anyway i'll play around with lee griggs suggestions 😉 !