Community
Arnold for Cinema 4D Forum
Rendering with Arnold in CINEMA 4D using the C4DtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

XPtrail random color per spline

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
verysame
429 Views, 5 Replies

XPtrail random color per spline

Hi there,

I know there are a few ways to get random colors on XPemitter. But what about an XPtrail?

I'm trying to get different colors per spline but I'm struggling with the UV mapping. I can get something when the projection type is, for instance, V, but is not quite exactly what I'm looking for. In fact, right now the gradient applies to the whole chunk, vertically so each trail has the same gradient applied to it.

What I need is each trail with a different color. Maybe I shouldn't use a ramp at all?

732-clipboard01.jpg

5 REPLIES 5
Message 2 of 6

If you just need random colors, you can use a utility shader with 'uniform ID' color mode.

Another option is to enable 'Export IDs' in the Arnold Tag of the trail and use a random shader with a user_data_int (Attribute: curve_id) as input.

Message 3 of 6
verysame
in reply to: verysame

Awesome!

Thank you, Peter, they both work great.

Message 4 of 6
steve.stone35
in reply to: verysame

@Peter Horvath thanks for answer, what if we want the particles and trails have the same random colors? i mean each particle color will be random while particle and its trail will have same color. When i tried your method i got random colors for particle and trails but they are not in sync. Thanks in advance.

Message 5 of 6

It's not possible at the moment because of an SDK limitation, which hopefully will be addressed soon.

Message 6 of 6

Great to hear that. Thank u for quick reply ♥

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report