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: 

Color tracer by user data

9 REPLIES 9
Reply
Message 1 of 10
JHåland
254 Views, 9 Replies

Color tracer by user data

Hi! I came across a problem with the tracer object. I want to color the generated strokes by the parent matrix object.

The parent matrix is colored by a shader effector.

I've tried "curve_id", but seem to only color every trace with one color.

Is there other "id" that can fetch "user data" from the matrix object?

 

- Jørgen

Labels (1)
9 REPLIES 9
Message 2 of 10
peter_horvath
in reply to: JHåland

Can you show your setup? If I understand correctly, you want to color the traces based on the Shader effector of the Matrix object, is that right? Don't think that's going to work, because the spline generated by the Tracer is missing the color information.


// Peter Horvath
// C4DtoA developer
Message 3 of 10
JHåland
in reply to: peter_horvath

hmm. I see that there are curve color in Redshift, picks the index, and hoped there something similar in Arnold.
Message 4 of 10
JHåland
in reply to: peter_horvath

I can share link to the setup. I guess I move the files in one or two days 🙂

https://www.dropbox.com/sh/q7g72zp7izyjjyx/AAAE-M6wRxVpDGPc35iGKL59a?dl=0
Message 5 of 10
peter_horvath
in reply to: JHåland

Does the RSCurveIDColor attribute return the color from the Matrix object? Because the documentation says it returns a random color:

The RSCurveIDColor attribute will create a random color value for each strand. 

You can generate a random color per strand using the curve_id user data and a random shader. But the color of a parent object is not translated to the Tracer curves currently.


// Peter Horvath
// C4DtoA developer
Message 6 of 10
JHåland
in reply to: peter_horvath

yes, that adds random color, so sounds about the same. So not picking up color form thee matrix
Message 7 of 10
peter_horvath
in reply to: JHåland

Alright, I think it's a limitation in Cinema 4D, since the generated splines does not have any color information or any connection to the parent object. You can try xptrails which has a color channel.

// Peter Horvath
// C4DtoA developer
Message 8 of 10
JHåland
in reply to: peter_horvath

hmm, don't seem to get random strands. I have added the arnold tag with export ids, and use user data rgb, and attribute color_id and connect that to a random node. Don't seem to pickup the color_id
Message 9 of 10
peter_horvath
in reply to: JHåland

The parameter is called curve_id and load it via a user_data_int shader. Connect it to the integer input of the random shader.


// Peter Horvath
// C4DtoA developer
Message 10 of 10
JHåland
in reply to: peter_horvath

aha, that works! now I have the index of all the tracer strokes. thanks 🙂 Now I just need to colorize them by the matrix object. hmm. thanks for your help so far 🙂

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

Post to forums