Get color from texture for Arnold scatter

pacox21
Contributor
Contributor

Get color from texture for Arnold scatter

pacox21
Contributor
Contributor

Hello,

 

I'm scattering planes onto a surface to act as brush strokes.

 

I'm using Arnold scatter that scatters point onto said surface.

 

I would like to create a shader that takes the color of the texture of the object used as surface, and transfers it to the clones. Like hair if I'm using a tiger texture to drive my hair color, but for a regular object.

 

So if one point is scattered on a pink area of the model, the clone is pink, etc.

 

How would you do that in directly in Arnold ?

 

Thanks

 

Francis

 

0 Likes
Reply
Accepted solutions (1)
400 Views
4 Replies
Replies (4)

peter_horvath
Autodesk
Autodesk
Accepted solution

Scattering is executed in the plugin code, before rendering. That means you can not use Arnold shaders for this, only native Cinema 4D nodes.

But it's doable with Effectors. For instance you can load a texture in the Shader Effector that sets the Display Color of the scattered instances based on the UVs of the surface. Then you can use a user_data_rgb shader to read that display_color attribute of the instances.

peter_horvath_0-1720028263440.png

 


// Peter Horvath
// C4DtoA developer

pacox21
Contributor
Contributor

Thank you Peter, it works. Produces interesting results coupled with a facing ratio.

Would that work with mash in Maya too ?

 

I would like to have a shader setup that's procedural and produces a brush stroke effect ... I just found this super interesting page about that : http://zenopelgrims.com/project-arnold-brushstroke-shader-quantize.html

I understand the principle but I'm unable to understand / modify the code to suit my needs :')

 

I can probably do it in Houdini but wanted to avoid software back and forth. 
And now I'm rambling alone 😛 Oh well ...

 

Thanks again !

0 Likes

peter_horvath
Autodesk
Autodesk

> Would that work with mash in Maya too?

 

Maya does not have a dedicated Arnold Scatter object. You have to use Bifrost for instancing, but I'm not very familiar with what you can do with it, sorry.


// Peter Horvath
// C4DtoA developer
0 Likes

pacox21
Contributor
Contributor

Yes I know and I was surprised to see that, I thought the features were the same in every app.

 

I think that would work with mash though.

0 Likes