Missing nodes and other questions

Hello!

This is a long text with a lot of questions that I had during the last week regarding vray nodes, so I thought about compiling everything under a single post rather than posting many separate questions. Hope this is the best approach.

Missing nodes/properties

I frequently use an add-on to import chemical structures into Blender (Molecular Nodes), which comes with a default material that basically uses the Color attribute from the Geometry Nodes setup.

When using the tool “Convert to V-Ray Material” a lot of nodes are created, but some of these nodes have extra properties that I can’t access.

Below are some examples, and I’ll attach the blend file. These nodes are generated when converting the material:

This one below comes with a material downloaded from Cosmos:

When I noticed this, I also checked the Documentation for additional information and would like to share other questions here regarding the nodes in Blender.

Some general questions related to nodes

1. Related to these nodes, it looks like there’s no node to separate/combine the RGB / HSV / XYZ components (colors and vectors). How do I access the components? Any plans to add a separate node for thi s?

2. There’s a node “RGB to HSV” that has no properties. What is the benefit of this conversion if one cannot access the HSV componen ts?

3. In the documentation, the “Float” utility node has a defined range “Input – Allows the input of a float value between 0 and 64.”, but this range is a soft limit, and after a quick test, I could type any number, and it worked. Are there any recommendations h ere?

4. How does the ‘Color to Float’ node convert the color to float? What should I expect as an output?

5. How to get access to Ambient Occlusion inside the shader ed itor?

Currently, I can export the AO as an ExtraTex render channel, but it is also really useful with the shading, for example, when working with emissive material to adjust its intensity while preserving some depth of the object.

6. It might be my lack of experience, but I find it quite hard to understand what is happening when using colors as input values, like with the “Set Range” node or the “Clamp” node.

For example, if I have a node tree with the following gradient, how do the OldMin and OldMax relate to the inpu t color?

If I use the default black and white Old values, does it mean the node will only work with the Value component (of t he HSV)?

If I set different colors for OldMin and Max, how to correlate these colors to the New ones and finally to the output? I feel a bit lo st here.

And I think this is all for the moment (at least related to nodes)

Thanks again! :slight_smile:

Some of the nodes used for conversion are indeed not freely available and that’s mostly on purpose. Most have an alternative or we have something else for the use-case planned. Now about your specific questions.

We can add a way to add and remove outputs from the Color Arithmetic node in a similar way we did for the Sampler Info, however, it was done this way because we were in a bit of a hurry back then, but made sense for conversion purposes.

Condtion2 also didn’t seem that useful for users and could be implemented as an additional mode in an existing node(like the Color/Float arithmetic) the same way it is in Cycles.

  1. The separate node to channels/float 3 to color nods… You can separate channels with the Color Arithmetic node. I thought we had a way of combining channels exposed but I guess we don’t so I logged it.

  2. The RGB to HSV has no properties on purpose. It does just that - converts RGB to HSV.

  3. Not sure what you mean about this one. They are just soft limits, you can put any value you want.

  4. The Color to Float node does simply (R+G+B)/3. Blender’s color to float conversion is a bit different. Blender underneath does perceived intensity, so our TexLuminance node is closer to that(but still the formula we and Blender use slightly differs mathematically, not so much visually)

  5. Have you tried our Dirt texture? Or do you need something different?

  6. The Clamp node with just restrict the values in the provided range. Anything lower/higher than the limits will be clamped to those limits. The Set Range formula is output = NewMin + (input - OldMin) * (NewMax - NewMin) / (OldMax - OldMin).

Example: Your texture gives you values from 0 to 1 (black to white). You want it to only go from 0.2 to 0.8 (dark gray to light gray) so the image has less contrast.

  • OldMin = 0, OldMax = 1 (the input range)

  • NewMin = 0.2, NewMax = 0.8 (the output range)

Thanks, bozhidar!

I’m still a bit confused here. (using V-Ray 7.20.01 and Blender 5.0.1.)

  1. I can’t find a way to separate the channels with the Color Arithmetic. Is it available somewhere?

  2. I think I’m missing something here. Shouldn’t both RGB and HSV give the same result? Is it possible to expose the H, S and V channels here too?

  3. I copied the text from the Documentation because I didn’t understand why there are limits, but I think I should ignore this part, right?

  4. Thanks!

  5. Ouch! My bad… I missed this node :sweat_smile: Thanks again!

  6. After a while of thinking here I had an epiphany. Thanks for the explanation. It was a bit confusing when I read the documentation.

Comparing the nodes to Cycles, now everything makes more sense to me.

  • V-Ray Remap - similar to the Float Curve and RGB Curve

Here I can plug any image texture or value and use the curves to control the interpolation in the properties.

  • V-Ray Set Range - similar to the Map Range node
  • V-Ray Clamp - similar to the Clamp node

One thing yet not clear is how these two nodes interpolate/remap the colors if I change the Min and Max colors.

See below. At first, I thought I would take the red channel (because the Old Min and Max are only mapped to the Red channel), but it is not the case. What is the node doing?

Sorry if this is a dumb question.

Thanks again!

  1. So in other DCCs you can use Color Arithmethic with the Red/Green/Blue outputs but I just realized you can’t do that here. I think we will expose a separate channels and combine color nodes that allows you to do this more easily.

  2. The RGB to HSV node just does the conversion as it can be seen for example here Convert RGB to HSV - colordesigner.io . So after your corrections you would need a RGB to HSV node so the resulting color will contain usable RGB values. Our Color Correction nodes(although the one we have exposed is a bit hard to use but that’s a separate problem…) can do the conversion internally so you can directly apply H/S/V corrections similarly to the Cycles node.

  3. Yes you can ignore the limits

  4. V-Ray Set Range works per-channel (R, G, B independently). So if your OldMin and OldMax colors only have a non-zero Red component (e.g. OldMin = (0.5, 0, 0), OldMax = (1.0, 0, 0)) you will only get corrections for that channel, then if we got back to the formula output = NewMin + ((TexValue - OldMin) / (OldMax - OldMin)) * (NewMax - NewMin):

Only the red channel will be remapped in a meaningful way. In your case, the formula behaves somewhat undefined for the green and blue channels. For example with your color values, in the green channel the expression effectively becomes:

output = NewMin + (TexValue / 0.00001) * (-0.342)

This happens because your NewMax is greater than NewMin, and we also slightly offset OldMax to avoid division by zero (hence the 0.00001). It’s not easy to describe cleanly, but the general rule is that for predictable results, NewMin values should be lower than the corresponding NewMax values in all RGB channels. The same applies to OldMin and OldMax. Otherwise you end with either negative calculations or close to zero divisions which result in color value blow-up.

Thanks, bozhidar!

Things are now much clearer :slight_smile: