0

Blender export settings

ShaderGraph

when object origin is object centre in Blender, Object position in shader graph works correctly

same object with above, but bigger size, same export settings, (Scale is also same as 1)

When object origin is 0 worldposition, Object position in shader graph works weirdly

Hi,

I'm having an issue with my shader using object position. basically lerping two colours based on object Y axis.

My expected result is having blended two colours between top to bottom of an object no matter how how big or small its size is. and preferably the objects should have pivot at theirs feet (0,0,0)

I assume the object space in my shadergraph only count 1x1x1 and anything exceeding this area will have the sharp dividing line. wonder if there's any way I can set them as literally object size (scale 1)?

Any input from you would be very helpful Thanks. Cheers!

1 Answers1

0

Not sure I understood everything, but :

  • For every vertex, the object space value is the coordinates of the vertex relative to the pivot of the object, as a absolute value (not proportional), so the range is -inf,+inf for x,y and z.
  • If you want to have a proportional (between 0 and 1) value, you can use the remap with an input (the length of the object).

Small tip that you may already now : You can give default values to your input nodes, including the colors (For Color1 and Color2). That way, you can have a preview in the graph :)

Eyap
  • 754
  • 1
  • 7
  • 22