Page MenuHome

New Mapping Node -> Min and Max Vector Math Nodes don't work as they should compared to previous state
Closed, ResolvedPublic


In relation to this patch: D5541

This patch rewrites the Mapping node to support dynamic inputs. The
Max and Min options have been removed. They can be added as Min and
Max Vector Math nodes manually.

The problem is that Min and Max Vector Math Nodes don't really do the job as they should, instead all values are returned as Black.

Blender 2.80:

Blender 2.81.8:

OK so I dug poked a little tiny bit and wondered what if I flip to first maximum, then minimum, and voila, it works. But how is it possible that works? In any case, the way Blender 2.81.8 updates .blends right now is wrong. It puts Minimum first at 0 0 0, then Maximum at 1 1 1. Some math genius please inquire.

Event Timeline

Looks correct to me, this works like the following:

Max(a,b) will return the larger input
Min(a,b) will return the smaller input

So using max(value, 0.0) will always return a value bigger/equal to 0. likewise does min(value, 1.0) only return 1.0 or smaller. Chainig them can be used to clamp a value into a range.

Well it's not how it used to work in the old Mapping Node and also more importantly it's not how Blender 2.81.8 itself updates the files that are loaded with the old Min Max utility used.
It actually rearranges the nodes exactly as on the second screenshot where everything is black.

To me minimum seems to define the minimal values possible so minimum of 1,1,1 should only keep values above 1,1,1 and inverse for Maximum.

Looks like you are correct, I will create a patch to fix this.