2
$\begingroup$

I created a model in blender and wrapped it with two custom images, I want to be able to toggle between each wrap. Is there an easy way to have two inputs for the wraps and then turn one off/on? I used uv mapping in order to wrap the model.

enter image description here enter image description here

$\endgroup$
2
  • $\begingroup$ Hello :). You can plug both into a Mix RGB node - and then toggle between 0 or 1. $\endgroup$ Mar 3, 2021 at 17:59
  • $\begingroup$ Sweet! Thank you :) $\endgroup$ Mar 3, 2021 at 17:59

1 Answer 1

4
$\begingroup$

In Object Properties tab add a custom property:

Right-click its value and choose Copy As New Driver:

Go to your shader and put a Mix RGB node as a switch between the two textures, right-click its Factor input and choose Paste Driver:

In 3D Viewport select your object (in Object Mode), press N to open the Numbers panel, expand Properties section and change the property.

$\endgroup$
4
  • $\begingroup$ If I want to export the model to three.js or another 3d rendering engine for my website, will I be able to toggle between the two wraps? Or do I need to do something special when exporting? Thank you for the awesome step-by-step for my last question! That was super helpful :) $\endgroup$ Mar 3, 2021 at 18:19
  • $\begingroup$ I found this article that seems helpful medium.com/@matthewmain/… $\endgroup$ Mar 3, 2021 at 18:22
  • $\begingroup$ I think GLTF format is limited to a single texture as base color. This problem seems to be more relevant to the framework you're using and people with expertise in three.js might have a solution ready for swapping a material or a single node (texture) in the node setup generated by the GLTF importer of three.js. $\endgroup$ Mar 3, 2021 at 18:58
  • $\begingroup$ If this was "super helpful", please consider to accept the answer @JuliaKaiser blender.stackexchange.com/help/someone-answers, thanks. $\endgroup$
    – brockmann
    Mar 31, 2021 at 18:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .