Forum

change texture in material dynamically

20 June 2016 20:19
I would like to change a texture in a specific material in the scene without reloading the scene. Is that possible ? I use node materials in blender and specify misc textures (for noise/bump/height etc)

Thx
21 June 2016 09:59
Hello.

Take a look at this demo please. You can find the source files in the SDK.
Blend4Web developer
30 March 2017 14:12
Hi,
is that also possible to do it thru logic nodes, without scripting?

Thank you
www.mo-systeme.com
30 March 2017 14:47
Hi,
is that also possible to do it thru logic nodes, without scripting?

Thank you
Hi! Just want to specify how many textures you want to change? From one to another from time to time or you want to load a multiple/unlimited amount? Or you will need to use a pack of textures to load different texture set for one object?
Blend4web and that kind of thing.
31 March 2017 16:50
Hi Mikhail,
thank you for your fast answer!

I didn't notice the node "inherit material" at the first look . But finaly I do, and I managed to do what I wanted to. Great, it is actually pretty easy. If it can help somebody with the same question as mine, please have a look in my attached blend file.
texture-change.blend

One last thing to pay attention to, the transparency of the material has to be turned on "opaque" like this. If not, the textured material (and your object) won't be displayed (at least for me).
www.mo-systeme.com
31 March 2017 17:32
Hi Mikhail,
thank you for your fast answer!
Glad that you found the solution.
One last thing to pay attention to, the transparency of the material has to be turned on "opaque" like this. If not, the textured material (and your object) won't be displayed (at least for me).
If you need a transparent object you always need to change this parameter to something else than Opaque.
Blend4web and that kind of thing.
31 March 2017 17:37
Hi,
me again. I try an other way to change the textured material by clicking many times on the textured object itself, incrementing variable. Also quite easy thanks Blend4web logic nodes .

You can test my blend file:
texture-change2.blend
www.mo-systeme.com
31 March 2017 17:38
If you need a transparent object you always need to change this parameter to something else than Opaque.
All right, thank you for this advice
www.mo-systeme.com
 
Please register or log in to leave a reply.