← All ideas
  • Published 13 Jun 2022

Get "Is Viewport" and "Switch" nodes in shader editor.

Hello community,

Here is a new idea, that came at some point while working on really large textures in udim format. I came to the point where the ui was really unusable due to the amount of ram that was needed to generate the shader for viewport visualisation. There's a way to get the "is viewport" attribute in order to use it in shaders (see screenshot), but the point is that the switch node would also be needed for computation optimization.

The way I see it would be that the shader wouldn't compute what is false in the shader switch node, so you could have an optimised version of your textures for viewport, that should help for tweaking the shader, and the full depth textures that would be only used for rendering. The shader node "Switch" should have a dropdown to choose between "Color", "Factor" and "Vector".

In fact, that's a kind of workaround to have proxy textures inside blender. Let me know what you think of the idea. is_viewport_in_shader_editor.jpg is_viewport.jpg

100%

Development Status: Open

Upvote 17 Downvote 0
Noki
13 Jun 2022

6 Comments

costa

That would so useful for complexe files when you use 16k textures on many objects, can save so much memory

2
semagnum

Bump. Definitely would be useful for scene and viewport management.

FreeMind

Geometry nodes have a lot of nodes, and designs useful to Shader editor, not just two nodes... There is a lot to port.

Noki Author

The attribute workflow is able to do that already, and it's fine for me as it is. Here the point is more focused on some viewport performance optimization. It's a specific case that won't work with attribute workflow as I tested it because shader nodes would need this switch node for it to work with best performance.

jakey1947

Having a bool data type would help with memory and performance as well In the mean time you could make a geometry nodes setup that just exports the "Is viewport" as an attribute and use that with a mix shader/rgb. not Ideal but it's something

Noki Author

that's exactly what I've made on the second screenshot, the is viewport of geometry nodes can be exported to be used in shader editor with a mix rgb node :) . But in terms of performance, it doesn't change anything because all the network is calculated, that's why the switch node could be usefull if it doesn't compute what is false.