Forum

Inherit from Node-Material

08 November 2016 12:06
Thanks a lot.. i was almost there.. got stuck with the ["Material", "Value"] array.. which i didnt/dont understand…
08 November 2016 12:12
No problem . This pair just consists of the material name and the name of a certain "Value" node specified in Blender.
13 January 2017 13:44
Hello!

I know this is an old thread, but the first/main question is exactly what I have been trying to achieve, so I wanted to ask.

The material I want to copy or reuse has a node-tree. The target object has a simple/other material as default. I observed that the inherit_material() function only copies the standard material params to the new object.

Is there anything (or plans to do it) for that?
My main objective is to have a library of objects/scenes to load dynamically, and instead of reexporting them with new materials (kind of heavy work and useless duplication), just export the main environment with a material container, so the rest of the objects can inherit different materials from it.
Exploring the current "inherit_material" function, still copies only simple properties and some fixed textures, nothing about nodes.
It would be nice to have the material container with, for instance, Copper and Velvet, then transfer to new objects as needed.
Any ideas?
13 January 2017 18:28
Hi!

The inheritance of node materials is the one of the most demanded features, but also difficult to implement. I think it's time to see what we can do about it. So, we're planning to take it up in the near future.

As for now there are some ways to achieve similar results, that are generally not very satisfying:
1) use dynamic loading to load the same object with different materials (that heavy work, which you mentioned )
2) use "Value" and "RGB" nodes to change simple properties via API in the current material (for example, color or alpha)
3) combine 2 or more node trees into the single material and switch between them through the aforementioned "Value" node
16 January 2017 11:04
Hi!

Indeed, I use the API to change values and RGBs, but we developers always want more
Glad to hear you are planning to work on it, I hope it doesn't cause you guys so much pain as it looks!
 
Please register or log in to leave a reply.