Copy link to clipboard
Copied
Hello.
I am working on an Element 3D project where I want to be able to change the floor texture of my scene by turning on and off different checkbox controllers on an adjustment layer(when a specific controller is checked a specific texture is loaded). I have a solid layer named Element3D with Element effect applied to it. The exact thing I want is to change the value of property "Sampling Layer 8"(this is for the diffuse channel of my Plane object inside Element) from one layer index to another(my textures of different jpg images).
There is an expression for the Sampling Layer because I've seen this work in a preview video of a template. I tried some if else statements but all I got is errors.
What is the code like?
Thank you in advance.
I found a way. I made a new comp(texture comp) and put an if else statement on the opacity of every texture. Then, linked every texture to slider controller.
Copy link to clipboard
Copied
Pop-up control values are arrays and you address them by their array index, e.g. effect("Element 3D")("Sampling Layer 4")[0] for the first layer listed inside the pop-up. no need for conditionals at all, though it's worth noting that some effects crash right away with this kind of stuff due to the internal lists not always refreshing correctly.
Mylenium
Copy link to clipboard
Copied
Alright. But how do I link my adjustment layer with checkbox controllers to the pop up of the Sampling Layer? How does the code look like?
Copy link to clipboard
Copied
I found a way. I made a new comp(texture comp) and put an if else statement on the opacity of every texture. Then, linked every texture to slider controller.