• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Changing textures in E3D by using a Checkbox controller

Participant ,
Sep 17, 2017 Sep 17, 2017

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.

que1.jpg

Views

283

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , Sep 20, 2017 Sep 20, 2017

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.

Votes

Translate

Translate
LEGEND ,
Sep 17, 2017 Sep 17, 2017

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 17, 2017 Sep 17, 2017

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 20, 2017 Sep 20, 2017

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines