I'm working with Nic to try to get this figured out. I didn't know it was possible to get object-space! Am I correct that object-space in the sense of Spine (or Sprites) would basically be the the space relative to the Mesh? If so (and testing seems to be pointing in that direction) that opens up a lot of cool shader ideas!
(Edit: Quick note - the issue in Nic's post just before this one is that it is using UV instead of a Position node set to Object Space)
I am testing it out, and trying to figure out how the value-range on the Object-Space position works. I was expecting it to be something standardized like 0 to 1, or -1 to 1, or -0.5 to 0.5. What I am finding is that the total value-range varies, but I don't know why. This happens with both Sprites and Spine characters.
Things I tested:
-A basic "Circle Sprite" created by right-clicking -> 2D Objects -> Sprite -> Circle. The origin/pivot of the sprite is at the default center of it. With this default sprite, the Object-Space coordinates range from -0.5 to 0.5 on the X and Y axes. This is what I would expect, and matches up with the 'preview' in Shader Graph.
-My own sprite that is an image of a Tent. This sprite also has its pivot set to its center. The Object-Space range on this appears to be around -10 to 10. Scaling the gameobject transform does not affect the Object-Space range. Changing the pivot point however DOES affect it. When the pivot point is set to "bottom" (causing the sprite to move upwards such that the bottom of the sprite is now at the gameobject's transform position), its as though the pivot point is considered the 'center' of the Object-Space range, meaning that the actual object-space-y-axis-values in the shader are now starting at 0 at the bottom of the Tent, and increase as you move upward (AKA instead of being in a -X to +X range, the range is now 0 to 2X).
-Testing out a SkeletonAnimation seems to be acting the same way as my Tent sprite. The Object-Space range seems to have some arbitrary -X to +X range, and it also is affected by where the origin is (which appears to be the origin point in the actual spine project).
So TL;DR, I think I have two questions:
1) Is there any way to get the Object Space range to be a standardized range (without having to manually figure out and pass in some material property block values like the Bottom and Top position for each individual character)?
2) Is there a way to account for the Origin/Pivot position without manually passing in a material property block value for it?
Thanks for any help, and if we can get this figured out we can definitely share the shaders for others to check out :grinteeth: π