Isotropix Forums

Scatter instance colour driven by surface geometry color

General Discussion about Isotropix and CG related topics

Scatter instance colour driven by surface geometry color

Unread postby pjenness » Mon Apr 24, 2017 2:22 pm

Hi

I have a situation where I want to drive the colour (or multiplier/hue) based on the surface that my grass/plants are scattered on.

Ive seen a few examples where the scatterer samples the UV coordinates of the surface and uses a map/texture at those UVs coordinates.

However Im not sure this would work with a complex colour setup (combinations of tileable/Cubics/procedurals/noises and also photo based projections).

So basically I need the final colour of the surface object at the scatter's seed point to be the sampled colour, and then use that as a mult/mix/hue shift input etc.

Is that possible?
Thanks

-Paul
pjenness
 
Posts: 6
Joined: Sun Sep 06, 2015 10:30 pm

Re: Scatter instance colour driven by surface geometry color

Unread postby isoyann » Mon Apr 24, 2017 4:21 pm

Hi,

Yes, it is fully supported, even with complex camera mapping /UVs / tiles / procedural etc.. Some complex setups may not be supported (like nested scatters used as a support to drive the color of other scatterers, and I'm not even sure this doesn't work), but in this case you can render to texture using the Uvs of the support , and dynamically use the result to drive your instances color.

Thanks,

Yann
User avatar
isoyann
 
Posts: 635
Joined: Mon Jan 28, 2013 11:11 am

Re: Scatter instance colour driven by surface geometry color

Unread postby square01 » Fri Jan 11, 2019 8:09 pm

If we bake the pointcloud , is there anyway to keep the support colour?
Currently if I press bake it gets rid of the colour pulled by support colour .
Thank you
Johnny
square01
 
Posts: 49
Joined: Fri Jan 25, 2013 11:33 pm

Re: Scatter instance colour driven by surface geometry color

Unread postby sam » Fri Jan 11, 2019 8:15 pm

Hi,

Short answer nothing out of the box.
Long one, it's actually tricky but possible. You need to bake each support color node in a new property of the point cloud. Then you need to readjust the shader to use these property instead of the support color(s). There's a example in Python in the documentation on how to evaluate a texture and bake its result in a property.
Sam Assadian
Isotropix
CEO/Founder
User avatar
sam
 
Posts: 1281
Joined: Fri Jan 25, 2013 11:33 pm

Re: Scatter instance colour driven by surface geometry color

Unread postby square01 » Fri Jan 11, 2019 8:57 pm

That sounds nice, I was thinking of doing was adding a Cd attribute in houdini and do the same thing, but if I can do it in phyton that will be pretty good, I will check .
Thank you
Johnny
square01
 
Posts: 49
Joined: Fri Jan 25, 2013 11:33 pm

Re: Scatter instance colour driven by surface geometry color

Unread postby square01 » Fri Jan 18, 2019 7:24 pm

Hi Sam, thank you for pointing to that, it works really well.
Cheers
Johnny
square01
 
Posts: 49
Joined: Fri Jan 25, 2013 11:33 pm

Re: Scatter instance colour driven by surface geometry color

Unread postby sam » Fri Jan 18, 2019 7:29 pm

Hi Johnny
Glad it helped. The only drawback is that it could tend to create huge project files depending on the number of instance color you bake because the point cloud container is stored in the project file.

However thanks to the new point cloud property support of the alembic exporter, you can now externalize the container in an alembic cache and reference it back into Clarisse!
Sam Assadian
Isotropix
CEO/Founder
User avatar
sam
 
Posts: 1281
Joined: Fri Jan 25, 2013 11:33 pm


Return to General Discussion