3dcheapskate opened this issue on Aug 12, 2019 ยท 24 posts
bagginsbill posted Fri, 16 August 2019 at 6:25 PM
The image x coordinate is U / U_Scale - U_Offset. The image y coordinate is V / V_Scale - V_Offset.
When you set U_Scale = 1 and U_Offset to 0 this simplifies to x = U. Similarly y simplifies to y = V.
"hang on ! I thought it was a constant in that situation"
What "it" are you asking about here, the image coordinate or the offset parameter?
The offset can be constant, but the coordinate (x, y) is not - it varies with U and V, because the expression defining the coordinate (x, y) is more than just the offset, it is (U / U_Scale - U_Offset, V / V_Scale - V_Offset). The coordinate is not the offset, unless you do something special.
When you set V_Offset to a constant, C, the image is shifted uniformly by y = V - C. The coordinates still change as you move about the surface. Visually in preview the scaled image appears to move up.
When you set V_Offset to an expression of the form V - p, the image coordinate is
y = V - (V - p)
{ get rid of parentheses } y = V - V + p
{ V - V is 0 } y = 0 + p
{ 0 + p is p } y = p
Magic. Letting p be any value you want the y coordinate to be, directly under your control, you connect V - p into V_Offset and set V_Scale = 1. A similar argument goes for x.
If you decide that p = C (a constant), and wire up the offset as (V - C) then the coordinate becomes
y = V - (V - C)
y = V - V + C
y = 0 + C
y = C
And NOW you have a constant coordinate. If you draw this, the entire surface will be colored ONLY by the color at that C coordinate.
Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)