Hello everyone,
Currently I am working on building a new node editor in which I would make textures (base, specular, metallic, normal, roughness, bump…).
I have made about ten new nodes:
I have a problem. The saving and loading of blender file doesn’t work. I looked inside files readfile.c and writefile.c, but I am losing too much time on that - I can’t figure it out. In the structure Scene I have added a new field - struct PBRTexture *pbr_texture. How can I save and load this structure from blender file?
Thanks in advance.
OMG seeing displayed textures in the node editor and more procedurals is like a dream come true! Hope you’ll solve the problem and get this implemented as soon as possible!
Out of curiosity, is it meant to be implemented in the Shader Editor or to be a substitute of the Texture Node Editor?
Good job!
Hi,
In PBR node editor there is a node “PBR output” that has created textures (base, specular, metallic, normal, roughness, bump…). In shader editor there is a new node “PBR texture” that has those maps as output, which we connect later to the node “Principled BSDF”. I have already done all of this.
An additional “PBR texture” node system doesn’t fit in with that design, we want to avoid having multiple texture systems.
As for file/saving loading, look at how a similar data structure is implemented and copy it? For example the compositor nodes that are also stored in the scene. Storing textures in a scene is not ideal though.
No, that’s a new editor.
It is not possible to implement this into shader editor. Nodes in shader editor use glsl functions, instructions are sent directly to the graphic card. Because of that I cannot see the preview. This new editor uses processor as composite editor.
@dandy025 Seeing your displayed thumbnails and noise textures could this actually be something that you can contribute to the shader editor? These belong to very popular Right Click Select topics.
An additional node system just for PBR textures seems to be way to much in my opinion.
/* nodetree is integral part of pbrtexture, no libdata */
if (tex->nodetree) {
writestruct(wd, DATA, bNodeTree, 1, tex->nodetree);
write_nodetree_nolib(wd, tex->nodetree);
}
write_previews(wd, tex->preview);
Update on this:
This project is basically a copy of Texture datablock. I have opened a new one only for developing new nodes, because I didn’t want to change the code from source datablock. All of this would be later transferred to texture node editor.