Offset Texture with Vertex Color Attribute

Houdini Integrated Plugin

Moderator: juanjgon

Post Reply
User avatar
Ferdinand13
Licensed Customer
Posts: 154
Joined: Sun Apr 03, 2016 4:21 pm
Location: United Kingdom

Hey Juanjo,

I've got the following issue: I would like to use the colour attribute of the underlying geometry, to drive the offset for a texture I intend to use in the material for this geometry. In my case, I'd like these colour values to affect the texture offset for each little bar of wood.

In both Redshift and even Unreal Engine, piping a colour value into a transform/translate input means that it will use the red and green channels for X and Y, therefore giving me a different texture offset for each piece of wood.

In Octane, I've tried piping the Color Vertex Attribute node into the translation input of a Transform 2D node (that controls the albedo texture), but unfortunately it doesn't work.
Screenshot 2022-05-02 092124.png
I then tried to find any utility nodes that would let me turn the Color Vertex Attribute node's colour output somehow into the 3float input the Transform 2D node expects, but there doesn't seem to be any combination that can do that either.

Would you have any idea, how I would be able to use those colour values I've got on my geometry to drive the texture offset as described? That'd be great!
Custom PC, Intel Core i7-6800K, 48GB RAM, 3x MSI GeForce RTX 2080 Super Seahawk EK, Windows 10
Razer Blade Pro 17, Intel Core i7-10875H, 32GB RAM, 1x NVIDIA GeForce RTX 3080, 1x EVGA GeForce GTX 1080 Ti Hybrid (eGPU), Windows 10
Meet
Licensed Customer
Posts: 49
Joined: Thu Jan 07, 2021 10:59 am

I have tried the same thing before and realized that octane transform can't take any input. This might be helpful to you though viewtopic.php?f=73&t=69211
Random tiling using OSL driven by a texture
User avatar
Ferdinand13
Licensed Customer
Posts: 154
Joined: Sun Apr 03, 2016 4:21 pm
Location: United Kingdom

Meet wrote:I have tried the same thing before and realized that octane transform can't take any input. This might be helpful to you though viewtopic.php?f=73&t=69211
Random tiling using OSL driven by a texture
Thanks a lot! I checked out the other post and there's a lot in there that I haven't tried yet. Will do that now :D

However, the main issue would probably be that this is based around instancing, but in my case I'm dealing with full geometry, no instances no nothing. Just lots of polygons that each have a different colour (which I would like to use to drive the offset).

Let's see what the other post offers, but if it's still based on the instancing workflow, it probably won't help in my case (unless I turn the setup around completely ;) ).

@Juanjo, is there any way for Octane to support these types of variables in the material context? Seems like pretty basic functionality, but of course I might be wrong.
Custom PC, Intel Core i7-6800K, 48GB RAM, 3x MSI GeForce RTX 2080 Super Seahawk EK, Windows 10
Razer Blade Pro 17, Intel Core i7-10875H, 32GB RAM, 1x NVIDIA GeForce RTX 3080, 1x EVGA GeForce GTX 1080 Ti Hybrid (eGPU), Windows 10
User avatar
Ferdinand13
Licensed Customer
Posts: 154
Joined: Sun Apr 03, 2016 4:21 pm
Location: United Kingdom

Meet wrote:I have tried the same thing before and realized that octane transform can't take any input. This might be helpful to you though viewtopic.php?f=73&t=69211
Random tiling using OSL driven by a texture
OK, so reading through the other post, it seems like this should work a) within the Solaris context (which is how my current setup works) and b) using non-instanced geo as well.

I've tried, using this setup, which - at least in my mind - should work:
Screenshot 2022-05-03 190323.png
But what I get when doing that (and then firing up Octane) are the following console messages:

Code: Select all

unknown Octane pin or attribute ID: HO_OSL_rawCode type: string
unknown Octane material node PinId: rndm
Any idea what's going wrong here? Thanks for letting me know :)
Custom PC, Intel Core i7-6800K, 48GB RAM, 3x MSI GeForce RTX 2080 Super Seahawk EK, Windows 10
Razer Blade Pro 17, Intel Core i7-10875H, 32GB RAM, 1x NVIDIA GeForce RTX 3080, 1x EVGA GeForce GTX 1080 Ti Hybrid (eGPU), Windows 10
User avatar
juanjgon
Octane Plugin Developer
Posts: 8867
Joined: Tue Jan 19, 2010 12:01 pm
Location: Spain

Do you know if this setup works in the main Houdini plugin to check if this is an Octane limitation? Sorry, if you have a Solaris related question, you should open a topic in the Hydra/Solaris subforum.

Thanks,
-Juanjo
User avatar
Ferdinand13
Licensed Customer
Posts: 154
Joined: Sun Apr 03, 2016 4:21 pm
Location: United Kingdom

juanjgon wrote:Do you know if this setup works in the main Houdini plugin to check if this is an Octane limitation? Sorry, if you have a Solaris related question, you should open a topic in the Hydra/Solaris subforum.

Thanks,
-Juanjo
Thanks Juanjo. Already did that, but replies on the Hydra/Solaris forum are slim pickings unfortunately (and there's no documentation whatsoever).

Either way, I dug a little deeper in the /obj context and actually managed to make this setup work, by declaring the "Cd" variable under "Vertex Vector Attrs." in the Octane Parms as you can see here:
Screenshot 2022-05-03 190323.png
So this works, offsetting the texture as expected. Hooray! :D

Unfortunately this same setup throws up the error as discussed, when using it inside Hydra/Solaris :cry:
Custom PC, Intel Core i7-6800K, 48GB RAM, 3x MSI GeForce RTX 2080 Super Seahawk EK, Windows 10
Razer Blade Pro 17, Intel Core i7-10875H, 32GB RAM, 1x NVIDIA GeForce RTX 3080, 1x EVGA GeForce GTX 1080 Ti Hybrid (eGPU), Windows 10
Post Reply

Return to “Houdini”