some material nodes cleanup for better viewing

Issue #1337 resolved
Alessandro Padovani created an issue

The material nodes can become cluttered soon enough so some cleanup may help.

1. uv texture coordinate. The uv output of the texture coordinate node is not necessary for textures because it is the default for unconnected sockets. The texture coordinate node is necessary only for outputs different from uv. If we disconnect the uv output from the textures the material is much less cluttered.

https://docs.blender.org/manual/en/latest/render/shader_nodes/textures/image.html

2. close the texture nodes. In general the texture nodes can be closed, the texture name is already in the title. Closing the textures reduces the clutter and leave space to more important nodes.

3. hide unused sockets. For some nodes as the texture coordinate node and the geometry node, the unused sockets can be hidden, that’s “node > toggle hidden sockets“ in the blender interface.

Below an example of “uncluttered“ material.

Comments (11)

  1. Thomas Larsson repo owner

    Implemented in latest commit, although it is probably not the final word. I was a bit worried that removing the texture coordinate nodes might affect geograft merging, but everything seems ok as far as I can see.

    Node trees are only simplified if the global option Prune Node Trees is enabled. The Advanced Materials > Prune Node Tree button has new options so one can choose more precisely what types of cleanup is made.

    All nodes are left in their original positions, so the node tree becomes quite sparse.

  2. Thomas Larsson repo owner

    Two changes:

    1. Node trees inside node groups are simplified too.
    2. The two hide options (hide texture nodes and hide output sockets) now unhide if they are disabled.

  3. Alessandro Padovani reporter

    As for commit ce4e162 here’s a couple notes.

    1. uv map. If there’s mapping nodes the uv map is still connected to all the textures, it only needs to be connected to the mapping nodes. For example import Victoria 8.1.

    note. More precisely, as explained in the blender docs the active uv is used for unconnected sockets. In this case Victoria 8.1 has a single uv map that’s the active uv. If we use shells with multiple uv maps then yes it’s necessary to connect them, apart the active uv.

    https://docs.blender.org/manual/en/latest/render/shader_nodes/textures/image.html

    Texture coordinate for texture look-up. If this socket is left unconnected, UV coordinates from the active UV render layer are used.

    note. When possible it would be better to avoid the uv map node because it’s not visible in the material preview. When there’s a single uv map we can use the texture coordinate.

    2. geometry node. In the geometry node we can hide unused sockets too.

    3. tinted effect. Tinted effect and color effect could be merged since it makes little sense to have two groups making the same thing. We can use a tinted white instead of color. Then as group name I’ll keep “daz color effect“ since it’s the daz uber name.

    note. I remember “arguing” about the tint input when we added the color effect but I did mean to leave the tint out, not to make a separate group. If this is not possible then it’s better to have a single group with the tint.

  4. Alessandro Padovani reporter

    4. group textures. I don’t know if it’s hard to do this, but if possible then we may at least group the textures at the start of the chain instead of having them spread everywhere at random.

  5. Thomas Larsson repo owner

    The three first issues have been fixed. I’m not sure about grouping textures. Another philosophy is to put them near the node where they are used. Today they are placed two columns before the node that uses them, which leaves space for a multiply node inbetween.

  6. Alessandro Padovani reporter

    Commit d2994be is excellent. The material preview also works fine now.

    As for grouping textures I’m not sure what you mean. Below there’s the body material for Victoria 8.1 doesn’t seem to me that the textures are close to connected nodes. In most cases they’re very far away. Grouping them at the start at least would make it easy to get a specific texture. Unless you find something better or a way to really make them close to connected nodes of course.

  7. Alessandro Padovani reporter

    note. grouping textures and solid mode. Grouping the textures may also come in handy for the solid mode, where the user could easily switch among textures to display them in the viewport. Instead of navigating the node graph to search for them.

    note. about uv map. I see commit d2994be stills using the uv map node for mapping. This works fine but it’s not necessary to use the uv map node if there’s only one uv map, we can use texture coordinate instead, where the uv output is the active uv map.

    The uv map node is only needed if there’s multiple uv maps and we want to reference any but the active one. The active one is referenced by default for textures of via the texture coordinate uv output. Note that the user can change the active uv map on the uv maps list, so it is his/her responsibility to set it back.

  8. Alessandro Padovani reporter

    @Thomas As for commit acbbd69 textures are much better organized and there are no more far aways. In my opinion it would be useful to have an option to group textures for quick access though, especially for the solid mode.

    Please let me know if grouping textures is doable, or I’ll mark as resolved since the current improvement is good anyway.

  9. Thomas Larsson repo owner

    No, it is not straightforward. The nodes are laid out in a grid in the order that they are generated in the code, so nodes are only close if they were generated directly after each other, and placed in the same column. Of course one could think of better ways of doing the layout, but not without lots of work.

  10. Log in to comment