offset vs. scale #534
Replies: 2 comments 2 replies
-
The scale functions are what you're looking for, and should be equivalent to scaling sprites (although they're continuous, rather than discrete, so you won't get the same pixelation that you'd see with sprites). I'd recommend skipping offset, since there's no good analogy from 2D graphics. Under the hood, offset is changing the setpoint of the distance field. For example, a sphere is
where the sphere is solid at points where The offset functions are sliding that setpoint up or down, i.e. doing
The exact behavior depends on the shape of the underlying distance field, so it's not at all equivalent to scaling. |
Beta Was this translation helpful? Give feedback.
-
The short answer is, the new surface is that many units (inches, whatever) out from where the old surface was. Like sticking pins into the surface, and then papering over them. (The slightly more technical answer is that you're offsetting all the values in the distance field by the offset amount, which amounts to basically the same thing as just drawing the boundary at a different value in the field.) |
Beta Was this translation helpful? Give feedback.
-
I'm a little confused about exactly how offset is being calculated -- and in particular how to describe it to students with a somewhat rudimentary understanding of 3d geometry. In 2d graphics we've been scaling sprites, so they're used to the idea that a scale factor of two makes a sprite twice as big (doubles both the x and y axis).
offset is clearly meant to do something different... how is it calculated?
Beta Was this translation helpful? Give feedback.
All reactions