Node Preview - Rendered Thumbnails for Shader Nodes

I have released v1.3 of Node Preview with the following changes:

  • Improved performance in complex node trees. In a scene with 295 nodes, the update checks took around 200 milliseconds before, which resulted in 5 frames per second in the node editor. Now, they only take around 40 milliseconds for the 295 nodes (25 frames per second)
  • Fix UV Map output being black when using a UV map name that doesn’t exist on the preview mesh
  • New shortcut: Ctrl+Shift+P toggles the node preview thumbnail of selected nodes on/off
  • It is now possible to choose in the user preferences wether previews should be visible by default. You can set this to disabled if you only want a few nodes to show previews (use Ctrl+Shift+P to enable them)
  • New controls in the N-Panel of the node editor (right side), with options to disable/enable previews for the whole node tree or selected nodes.
5 Likes

I’ve been using Node preview for a while now, and I was wondering why the default value for Thumbnail Resolution in the add-on’s preferences section can no longer be set below 50.
So, I think it is better to set min=1.

Also, I personally feel that it would be easier to operate Thumbnail Resolution if the value can be adjusted in the N menu.

I thought 50px is already quite low resolution, I’m not sure why you would want to go lower?
1px would mean that all thumbnails are only one solid color.
But if you want to change the min. value, you can do so in the file __init__.py in the addon folder, in line 88:

thumb_resolution: IntProperty(name="Thumbnail Resolution", default=150, min=50, soft_max=300, max=500,
                              description="Higher resolutions preserve fine detail in textures better, but lead to slower updates")

Change the min=50 to what you need.

I didn’t think it would need to be changed often. 99% of users probably never need to change it.

Maybe you can describe your use case in more detail, why do you change the resolution often?

If you only use Blender, Node Preview doesn’t feel that heavy… If you’re using multiple GPU-intensive applications (Chrome, Photoshop, etc.) at the same time, you’ll need to make sure you don’t overload them.
In my case, I set the Thumbnail Resolution to about 16, because changing the Thumbnail Resolution reduces the load in that area considerably.

Also, in my case, I have to use software such as OBS at the same time when broadcasting, so I have to be careful about add-ons that put a constant load on my system.

Especially in the case of complex nodes, it took about 10 to 20 seconds for the preview to appear, so if you value speed of rendering, you will need to lower the Thumbnail Resolution setting.

What CPU do you have? The node previews are rendered on the CPU only.

That sounds very long. If you send me a .blend with such a complex node setup inside (I assume it is a node group?) I can check if the performance can be improved for it.

What CPU do you have?

The CPU is an Intel Core i7 Coffee Lake.
Also, the GPU is NVIDIA GeForce RTX 2080 SUPER (ZOTAC International).

The node previews are rendered on the CPU only.

Was it supposed to be rendered by the CPU…?

Just out of curiosity, why are you trying to render without using the GPU?
As you know, Blender these days is a software that emphasizes GPU rendering, and I personally feel that way.

If you send me a .blend with such a complex node

This is not a material that I created, but…
When I was researching procedural beef material, I loaded the node distributed in the video at the following URL, and I remember that it took a long time to preview.
I hope this will be helpful.

Shader compilation is done on the CPU even in blender because you don’t compile code on GPU, you execute it on the GPU. As for this addon it more then likely is capturing a preview of the node output so to some degree it probably is using a GPU to capture the output but the compilation still has to be done on CPU and that is where most the performance time is spent.

1 Like

Well, I had no idea about the relationship between shader compilation and CPU performance.
Thank you very much for the useful discussion, Lamia.

As long as I’m tied to the development environment, I can’t use anything but the CPU…
I guess there’s nothing I can do about it. This is a difficult problem. :thinking:

1 Like

The GPU is not beneficial for the workload of this addon.
Here’s a test done with the scene used to render the preview thumbnails:
(150x150 px output size)

  • CPU (Ryzen 7 2700x), 1 thread: 0.06 seconds
  • CPU (Ryzen 7 2700x), 4 threads: 0.08 seconds
  • GPU (RTX 2080): 0.37 seconds

You can see that even using more CPU threads leads to a longer rendertime (creating threads is not free).
Having to transfer data from CPU to GPU and back makes the rendertime much longer again.
The GPU’s higher latency outweighs its other benefits when used to render such small images.

Thanks for the scene, I can reproduce that it takes very long until the previews in this node tree are rendered. I’ll investigate what’s going on there.

1 Like

Looks like a really handy addon, but $35 is insanely overpriced don’t you think? :slight_smile:

1 Like

Chuckle, he and several others of us think not. :wink:

Compared to the average add-on price range, I think the price is reasonable.
I also feel that it is worth it.

I think it would be difficult and not easy to produce such an add-on with Blender’s specifications.

It’s worth what ever people are willing to pay for it and people seem fine with $35 i also think it’s fine but if you are like me and get kicked in the head by currency conversion might be better to wait for a sale that is what im currently doing.

1 Like

Hello there! I just invested in the addon from the Blender Market. But I realised my custom builds of Blender are built of the master branch of Blender, meaning I’m in 3.0.0 days. Meaning I’m also 2 official versions off the last listed compatible release of your addon - meaning the majority of my pipeline is incompatible with older versions of Blender and thus also the addon. I have the VC Redistributable installed - but it still triggers the error. But it doesn’t error in 2.92 builds, works fine with 2.92. But 2.93 and 3.0 builds error despite having the VC 2017 dependencies installed. I would need the addon to work with more recent branches and master builds (current 3.0).

What is the timeline to use this addon to work with the master? How can the code of the addon change to register to work with the Blender master and work as a rolling release instead of stuck to former branches? What is needed for it to work for the Blender master?

This kinda throws a spanner into custom pipelines and the addon, as I can’t merge my builds into and from branches then back to master to stay relevant with most fixes due to… the extra work and merge conflicts between branches, then our own changes on top! So we only merge from master to work about 2 weeks behind for stability.

I had a look at the code, and the error is glitching with this *.PYD file when trying to import it, which might be doing a python version check on the blender version or uses DLL dependencies not compatible with the master builds? It’s a binary, so not sure how to edit it or check the code to see how I could make it work for newer versions of Blender, or to even debug. It clearly is needed as py-bassing it breaks also.

image

Specs.
Windows 10 Tech Insider slow ring x64bit
GTX 1060
Intel i7-2600K CPU
16 gig Ram

Do you have any tips to update or will you update to master eventually? Will I always be destined to use older branches or tags of blender to use your addon? Hope to get it going with the Master branch! My local currency is weak by nearly 5x, so it was a bit of a save up to get it, logically being a long term and better investment than Substance Designer rentals. Now here we are learning that I can’t use it in the pipeline because it’s not built for the Blender master - it is a little deflating! Your addon is one of the best UX improvements I’ve seen in a while.

Hi,

The reason for the incompatibility is that this addon contains a C++ module (.pyd file), which can only be imported in the Python version it was compiled for. Blender 2.92 uses Python 3.7, while Blender 2.93 and later uses Python 3.9.

I will make the addon compatible with 2.93 soon because it is not far from release.

In general, I can not officially support unstable versions of Blender, so 3.0 will remain unsupported until it is stable. This is because the API and Python version might change at any time, so I can’t guarantee that the addon works with an under development version.
However, as long as the Blender developers don’t change the Python version again, the builds for 2.93 should also work in 3.0.

If you know how to compile software, you can also download the source code zip archive of Node Preview and compile it yourself agains Python 3.9. Check the readme.md file in the Worker folder for instructions.

2 Likes

Ah nice, so it’s a python versioning issue - wasn’t too far off. Great. I’ll take a look at the documentation and source. Hopefully the dev gods of Blender decide to maintain python versioning till the next LTS in the 4.0 days. Future proofing is so hard here.


Got it going! Thanks.

Yeah, the way Blender Foundation handles development and gitflow by doing development in the master which should be an LTS release kinda creates too much overhead, I get it. But thanks for showing the way. A very exciting addon.

1 Like

Just to mention, there has been an update to FX Nodes, and they no-longer are compatible with the latest release when using Python 3.9+. The previews hide when using them.

NFfXi6tI14

Error.

This doesn’t happen with Blender 2.92 though, so might be due to another issue than the python dependencies from the generated *.PYD.

Another bug: group nodes with 3.9.2 python also doesn’t work, unknown.

Also! Just a quick recommendation for quality of life:

Feature Requests:

  • For a future release: allow to toggle all the previews with a button or hotkey instead of a prop toggle. It would be nice to have it as a button or something I can use in the quick menu or assign a hotkey from GUI- as performance is taxing when on - so toggling all could have a quicker UX, with view overlays toggle when needed - and have the preview toggle UX more intentional (instead of only in panel as a setting).

  • Another request for a future release: add a refresh poll option for mouse release, refresh once from button, or with a longer poll - so I can slow it down so resoures are free when using sliders or manipulating nodes. Often, I overshoot sliders when previews are on from performance hog on thumbnail generation. Example UX: refresh on mouse release, or when pressing a refresh button in header/quick menu or hotkey, or poll preview update every 200ms or 400ms or other user defined poll.

Regardless of what Blender version I’m using… I’m not seeing images above the nodes.
When I try to remove the addon, It shows me the error.


This is Blender 2.92

Are you using a custom scripts path?
I’m aware that it’s a problem when a scripts path is set, but the addon is not installed in that path (there’ll be a fix soon). In the meantime, I’d recommend to move the addon to the custom scripts path location to make it work.

If this is not the cause of your problem, please contact me via the Blender Market messaging system so we can go into more detail to check what’s wrong.

See the section “Updating or Removing the Addon on Windows” here: https://blendermarket.com/products/node-preview/docs