2

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

Julia Kaiser
  • 75
  • 1
  • 6

1 Answers1

4

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.

Markus von Broady
  • 36,563
  • 3
  • 30
  • 99
  • 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 :) – Julia Kaiser Mar 03 '21 at 18:19
  • I found this article that seems helpful https://medium.com/@matthewmain/how-to-import-a-3d-blender-object-into-a-three-js-project-as-a-gltf-file-5a67290f65f2 – Julia Kaiser Mar 03 '21 at 18:22
  • 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. – Markus von Broady Mar 03 '21 at 18:58
  • If this was "super helpful", please consider to accept the answer @JuliaKaiser https://blender.stackexchange.com/help/someone-answers, thanks. – brockmann Mar 31 '21 at 18:07