How to switch Octane materials based on an attribute
Moderator: juanjgon
- rustyippolito
- Posts: 95
- Joined: Wed Mar 08, 2017 10:07 pm
Is there a way to switch between two Octane materials based on an integer (0 or 1) which is specified in an attribute promoted from a group which animates? I am using a group node with "Keep by Random Chance" enabled and animating the value down over time (turning off windows on a building facade). Having trouble trying to switch between two materials (ON and OFF) based on the attribute called "SWITCH". If anyone has any ideas i am all ears:)
Here you go. I've attached a file. You have to cast your attribute from int to float since integers don't work when using attributes inside shaders.
- Attachments
-
- switch.zip
- (52.24 KiB) Downloaded 78 times
Win 10 64bit // GTX 4090 + GTX 3090 // 5900x // 64GB // SideFX Houdini // C4D
- rustyippolito
- Posts: 95
- Joined: Wed Mar 08, 2017 10:07 pm
Sorry for not thanking you sooner, that was EXACTLY what I needed to get over this issue. My materials are quite complex and i had a workaround that involved blasting between two complete sets of geometry with two complete sets of materials (ON & OFF). Your solution allowed me to do it all in the shader with very little troubleshooting. Now i can easily iterate on the changing group animation without having to rebuild my setup each time i make a change! Many thanks for your help:)