|
![](/i/fill.gif) |
> Thanks for working on this. The results in p.b-t.b look great! Your
> contribution is appreciated and I will work to incorporate this fix into
POV
> 3.5.
Glad to have done it. Just wanted to get it right.
> You completely rewrote MTransUVPoint. Really, what you've created is a
new
> function, not a new version of MTransUVPoint. Your function takes
> completely different inputs and yeilds a different output. This new
> function deserves a new name. Do you have a suggestion?
I thought about this. The 'M' in the name stands for matrix so that can go.
It is still a transform of the uv point into the parametric space of the
texture quadrilateral as it exists in 2d texture space. To avoid confusion,
it might be a good idea to keep the name TransUVPoint or at least keep some
indication that it is a 2D tranformation of a point. I'm not really sure
what the appropriate name for the mapping would be but it seems to be a
bilinear mapping. The function uses the parametric form of the edges of the
quadrilateral and inserts the u and v parameters into the equation. It
first finds the two U intersections along sides and then uses the line
defined by those two point to find the V intersection. The parametric
representation of a line is:
x = x1 + t(x2-x1)
y = y1 + t(y2-y1)
where t is the parameter.
the input is
p - uv parameters
st - four corners of quadrilateral (texture coords)
output
t - intersection
> Also, since MSquareQuad does not need to be called, we'll probably remove
> the call, but leave the function. It is part of the general collection of
> matrix functions, so it will probably stay in case sombody needs to use it
> in the future. Also, if Shape->Mapping is no longer used, we should
remove
> it completely. I'm not sure if it is used anywhere else - do you know?
If you keep MSquareQuad, it might be a good idea to add a note to the effect
that it finds the projective mapping matrix and infers a perspective
mapping. The Shape->Mapping isn't used anywhere else so yes it can be
removed completely.
> One more question: Do you have a simple test scene that I could use for
> testing? (Maybe with two patches with a pattern-based texture.)
Thanks!!!
Scroll to the bottom of my original post. I included a small test scene
there with two patches and a pattern for the texture.
Post a reply to this message
|
![](/i/fill.gif) |