Page 1 of 2

Variation texture @ component level

Posted: Mon Oct 12, 2020 5:38 pm
by Dingbat
in MODO the variation texture can be set up so that individual meshes in the same item can be varied - so e.g. if i have a tree with leaves, i can vary the colour of each leaf.

is there an equivalent Octane node or does the existing Octane variation node support multiple meshes in the same way?

AFAICT the Octane node only supports variation if the meshes are in separate items - is that the case?

Re: Varition texture @ component level

Posted: Wed Oct 14, 2020 2:57 am
by face_off
Hi

For Replicators (and potentially Instances), the plugin will assign an "Id" to each transform, so you should be able to use the Octane textures "Instance Color" and "Instance Range" to vary the texture of each instance/replication. You need to set the . I don't think these nodes will work with single Modo Mesh items.

3.07.0.125
- Added Instance Color and Instance Range textures
- Added an instance id to each Scatter transform (ie. each Replicator particle source will have a unqiue instance id). The Instance ID is sourced from the Modo Replicator source IDs. The new Texture node types Instance Range and Instance Color can be used with these id's. Refer to viewtopic.php?f=33&t=62395 for for details.

Paul

Re: Varition texture @ component level

Posted: Wed Oct 14, 2020 10:48 am
by funk
The Octane core doesnt support anything like this (yet), so you have to use workarounds.

One way could be to use weight maps, and manually/procedurally/script the assignment of different weights per mesh "island". Then use the "greyscale vertex attribute" node as an input to a gradient for your colors.

Re: Varition texture @ component level

Posted: Wed Oct 14, 2020 11:39 am
by funk
I have attached an example scene of 1 possible way to assign the random weight map values with meshops. It uses a "falloff operator" which has a confusingly named "Polygon Parts" output, which is actually MESH ISLANDS!

I then used Octanes greyscale vertex attribute node to get the weight map values and input to a gradient for the colors.
funk_random_colors_per_mesh_island.png
EDIT: If this is slow on heavy meshes like trees, you could just FREEZE the meshop, which will apply the weights to the mesh permanently.

Re: Varition texture @ component level

Posted: Sat Oct 17, 2020 9:10 pm
by funk
Someone posted some questions about this setup on the modo forums:
https://community.foundry.com/discuss/t ... nent-level

Regarding the falloff operator:
Its just a single falloff split into 2 to make the schematic more readable.
In modo, you can add the "Polygon Part" channel by right clicking the falloff operator > add channel > Polygon Part.
You can then right click the Polygon part channel on the node > separate channel

Re: Varition texture @ component level

Posted: Tue Oct 20, 2020 11:15 am
by funk
Greg made a video about this on Pixelfondue


Re: Varition texture @ component level

Posted: Fri Oct 23, 2020 3:38 pm
by Dingbat
fantastic! thanks so much to both of you.

just need to figure out how to save efficiently for repeat use.

Re: Varition texture @ component level

Posted: Fri Oct 23, 2020 4:01 pm
by Dingbat
icing on the cake would be a way to output the weight map as a render pass. is this possible?

Re: Variation texture @ component level

Posted: Sat Oct 24, 2020 2:16 am
by funk
You could do a separate render, plugging the greyscale vertex attribute node into the diffuse channel of a material, then enable render passes > info passes > material diffuse filter.

Re: Variation texture @ component level

Posted: Mon Oct 26, 2020 10:36 am
by Dingbat
thanks - did something similar and it seems to work really well.

it also works on multiple items using the same name for the weight map so only needs one additional render with all the items plugged into the variation set up. easy enough to just unplug them when done.