Hi,
I am trying to perform a simple task but unfortunately finding it more complex than I originally anticipated.
I am creating an Amplify Shader Editor shader that uses the vertex position node (same as the ‘position node’ in Shader Graph), which I understand to represent the position of vertices in object space. However, I do not understand how to identify the actual coordinate system used for my game objects. My ultimate goal is to map each axis (x,y,z) of the vertex position coordinate system from 0 to 1. For example, after doing this operation and plugging the result for x into the color node, it should transition from black to white across the object in the x direction.
Different objects appear to have different magnitudes for object space coordinates. For example, a Unity plane appears to have object coordinates (-5,5) in x and y axis. I have to add 5 then divide by 10 to map them to 0,1. For a Unity sphere, quad, or cylinder, the coordinate system is (-0.5,0.5) and for objects imported into Unity I have no clue what the coordinates are.
Since I need to do math with these values, how can I tell the max and min in object space for a given object? I thought they would be the same for all objects (ie -0.5,0.5)… This way I can properly use the vertex position node.
Please let me know if I need to clarify further with pictures.
Thanks!