# How to visualize a value resulted from math node?

How to visualize a value resulted from math node,or just to know it. I tried the way of scaling this value to the scene size and then pick the color and get the value but I want more effective way to do this.

• See @gandalf3's comments on this answer: blender.stackexchange.com/a/10675/241 Jan 22, 2015 at 11:20
• this will work but this is not a handy way,I want a quick way like viewing it like an image.or get it in a panel or something. Jan 22, 2015 at 16:09
• Just connect it to an output node; if you're working with materials, connect it to a diffuse BSDF, if you're in the compositor, use a viewer node Mar 19, 2015 at 12:53

## 5 Answers

Just plug the value directly into compositor output:

Check the Auto Render option in the header to have your composite update.

In the Image Editor see the value with right-clicking on the grey rectangle:

You will see values less than 0 or more than 1 also. No need to scale them.

But you can't see it always, you have to fiddle with the nodes then right-click and check value, can't change node while seeing the output. Blender lacks this functionality.

Theoretically one could make some value visualizer from translating and cropping a picture of numbers with some math involved..or something similar..so here you go:

Image (no need to download its packed in blend):

Blend File with node group:

It will replace your composite with numbers on black background:

This node-group for every decimal of input crops that number from the number-strip (image texture inside the group) and then translates it onto its position.

Due to some rounding artifacts sometimes you might get weird result but its good enough. Its a floating-point limitation.

• This is pretty awesome, but what if I need to view the values from a node in the material node tree, not the scene node tree as in your example? I tried copy the material node into the scene node panel and use your method, but the nodes are incompatible, forbidding my copy. Thanks! Aug 16, 2018 at 16:20
• @SibbsGambling The nodes that crop and translate the numbers from the texture are missing in the material nodes as you point out, yes. It's more complicated to do this, but not impossible. The translate is just a Mapping node to offset texture coordinates and the cropping needs to be done with a custom node group with less-than and more-than math nodes inside to do the cropping (this might be helpful how to do math on mapping).The resulting texture is all these offset textures mixed together with add. Aug 16, 2018 at 19:21
• Thanks a lot for your prompt reply! I'm actually looking for something simpler than the fancy digit visualizer. Your "displaying as RGB values" trick in the first half of the answer will work for me. Is that possible in the context of material node trees? Thanks again! Aug 16, 2018 at 21:17
• @SibbsGambling Yes, that's a feature inherent to the image editor. Render the value through an Emission shader with strength 1.0 and righ-click the area in the image editor. Checking the values will work the same as with Compositor output. Aug 16, 2018 at 21:21
• Ah, right. What if I need to visualize a 2D array (i.e., a gray-scale image), instead of a single value? There will be texture mapping involved -- very confusing. :-( Aug 16, 2018 at 21:32

I have just created easy to use Math Viewer (XY graph). Posted on Blendswap, find there description and howto.

Unfortunately this isn't possible without the clumsy tricks already mentioned in the question.

You might consider asking the devs if this can be changed. See Best Place to put Feature Requests?

Value to String and String to Curves are your friends.

I made a node group called Interrogator you can find on Blendswap. To use it: 1) Temporarily insert a Mix Shader after your final shader output (lower socket) and tie the other Mix Shader input (upper socket) to the Shader output of Interrogator. 2) Tie the Display value of Interrogator to the Fac socket on the Mix Shader. 2) Set the Interrogator OFF-ON socket to 1.0 to turn it on, which will over-ride your regular shader with a black-and-white shader. 3) Now just move Interrogator to wherever you want, tie its Input socket to your questionable noodle, and slide the Number socket value around. The render will show a black and/or white coloring. The border between the two colors is where the pixel has your Compare value. This is like having a print statement for your entire render at once, impossible with a console printout. 4) If you want to change your noodle somewhere and see the result just set the OFF-ON socket to 0. 5) I rarely need to use this more than described, but I can also tie the Number socket to another noodle point somewhere to get a rendered output of everywhere that one value is larger than the other. Wherever the border renders between black and white is where the value of your Number slider matches the Input socket.

I set it up this way because, although I have to insert a temporary Mix Shader as the final output, I can now move my testing node wherever I want and use the OFF-ON control to switch back and forth from full render to test render without re-connecting anything (except the one connection to the Input socket).

This is a guess, but I assume that if I delete Interrogator and set the Mix Shader Factor to show only your noodle output, the optimizer will ignore the Mix Shader and you can just leave it in without any overhead. Make it a habit to put it in every noodle you expect to get messy.

Yes, you have to hunt for the value, but that itself can be very revealing and you can't get lost because black means Number>Input and white means Number