POV-Ray : Newsgroups : povray.advanced-users : 3D uv mapping of bezier patches : Re: 3D uv mapping of bezier patches Server Time
2 May 2024 22:03:39 EDT (-0400)
  Re: 3D uv mapping of bezier patches  
From: Bald Eagle
Date: 22 Jun 2016 16:10:00
Message: <web.576aefabe975129580403a200@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:

> It seems that although the `uv_vectors` keyword did make it into
> POV-Ray's `bicubic_patch` implementation it never made it into the
> documentation.

Right, I understand that, and know from experience how difficult it can be to
properly document something, especially when it's official, for public
consumption, and technical.   Things can be misread 100 ways.

> Given that the feature first appeared in MegaPOV, it would be logical to
> search through old MegaPOV docs for a precise description of what it does.

I'll see what I can do on that front.

> Contrary to what Jerome posted, the UV coordinates are not interpolated
> between 3 points, but between all 4 of them.

Interesting.   The ways docs are written, it strongly suggests that Bezier
patches are subdivided into triangles, which would lead one to assume that it
was interpolated in the same manner.

I understand the general concept of the uv-mapping.  It's a projection of sorts.
  What I was trying to get to the heart of, was how the uv vectors themselves
determine HOW that mapping is executed.  Are they interpreted by the engine in a
certain order to do something analogous to determining the normal of a triangle?
 I'm sure it's something like that, though with 4 corners, one can probably take
the "rubber sheet", leave 2 corners anchored, and flip the remaining 2 over -
essentially giving the patch a twist.  Switching the opposite corners transposes
the uv matrix which probably flips the whole orientation around 180 degrees.

What happens when a single patch gets fractional coordinates?  Not like
stitching 4 or 9 patches together, but just "random" greater-than-zero and
less-than-1 values?   Greater than 1?

My real present interest is to use 6 patches for the face of a cube and uv-map
the cube.  They're not "uvw" vectors, so I'm struggling to understand what
programmers of modelers do in order to get all of the uv-mapping of 3D objects
to map "smoothly", or "as expected".

I'm wondering if I need to do something / think about it like a SkyBox:
http://www.f-lohmueller.de/pov_tut/skyboxer/skyboxer_1.htm

Thanks for all the responses - maybe the section of POV source code that deals
with using the uv vectors to do what it does might help me.   Or I may drop to
the floor gurgling blood as my flesh smolders and blackens.

I'd say the rewards are worth the risks.   ;)


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.