Switch Texture Node has no index pin, is it normal?

Sub forum for help and tutorials.

Moderators: aoktar, ChrisHekman

Post Reply
User avatar
Delizade
Licensed Customer
Posts: 179
Joined: Thu Oct 18, 2018 10:38 pm
Location: Istanbul

hi,
I want to assign different textures within a material based on Object ID. (Though I haven't yet figured out which node to use to get the Object ID...). The Switch Texture node seemed like it could work for this, but it shows texture inputs as pins, and we can't use the Input field as a pin. Is this normal?
ver. 2024-1-2-R2-0101
User avatar
bepeg4d
Octane Guru
Posts: 10275
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy
Contact:

Hi,
Switch Texture node is not what you need, it is used to show a specific texture based on Input number.

What you need is an Octane Gradient node in Complex mode and Constant interpolation, with an Instance Range node as Input Texture, and you need to create a number of knots in the Gradient equals to the ID Number in Instance Range node, in order to have all the necessary pins for connecting all the different textures:
IMG_4540.jpeg
ciao,
Beppe
User avatar
Delizade
Licensed Customer
Posts: 179
Joined: Thu Oct 18, 2018 10:38 pm
Location: Istanbul

Beppe thank you so much for this!
To fix this simple issue, I basically had to take the One Ring to Mordor and back. I finally did it, but deep inside, I can't stop wondering—why didn’t the eagles just take me there in the first place?😄
I hope one day Switch Texture can share that pin...
User avatar
Delizade
Licensed Customer
Posts: 179
Joined: Thu Oct 18, 2018 10:38 pm
Location: Istanbul

Hi again,
I solved one side of the repetitive material problem with your solution, but a problem occurred with translucent materials."
I added a sample scene.
nested translucent materials have a problem.

Front line uses single material with your solution
back like uses separated materials.
Cinema_4D_n2BWmj4SEB.jpg
NestedDielectric_problem.rar
(625.97 KiB) Downloaded 19 times
User avatar
bepeg4d
Octane Guru
Posts: 10275
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy
Contact:

Weird, if you set the Bottle Dielectric priority to -1, it works as expected:
IMG_4587.jpeg
ciao,
Beppe
User avatar
Delizade
Licensed Customer
Posts: 179
Joined: Thu Oct 18, 2018 10:38 pm
Location: Istanbul

I knew that the outer part should be higher than the inner part, but according to your response, is it enough for them to just be different for the correct visual result?
User avatar
Delizade
Licensed Customer
Posts: 179
Joined: Thu Oct 18, 2018 10:38 pm
Location: Istanbul

Beppe hi,
What should I do for more than 3 textures with this method could you help me about that please?
User avatar
bepeg4d
Octane Guru
Posts: 10275
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy
Contact:

Hi,
the issue with dielectric priority and multi texture is a core issue and will be fixed in next update.

About adding a texture/color to multi texture setup, just click on the gradient to create a new knot:
IMG_4606.jpeg
Then right click on the gradient to distribute evenly the knots:
IMG_4607.jpeg
Then correct the Instance IDs of the object, ed increase the number of Maximum IDs in thee Instance Range node:
IMG_4608.jpeg
Here is the scene:
NestedDielectric_problem_b.zip
(615.27 KiB) Downloaded 14 times
ciao,
Beppe
Post Reply

Return to “Help / Tutorials”