UV Map View Plane: Calculate 2D Position?

In summary: The y-coordinate is the distance from the origin (0,0) to the point in space represented by the uv coordinates.z = r * cos(πΦ) * cos(2πθ)The z-coordinate is the distance from the origin to the point in space represented by the uv coordinates.
  • #1
ADDA
67
2
Would there be a way to take a uv map and compute the 2 dimensional position of a viewing plane or eye or camera, without the need to expand the parametric equation into three dimensions?



In the above video the uv map in the background yellow is calculated first. Then only the bright portions are translated to the foreground by means of expansion into three dimensions then direct projection onto a viewing plane.
 
Technology news on Phys.org
  • #2
That video is no longer available. I'm completely confused by your question, are you just trying to project an object without actually sending it to the GPU? UV mapping is usually handled by a shader on the graphics card by dedicated hardware, which would probably be faster than trying to calculate it on the processor.
 
  • #3
Yeah, I guess I need to explain my thoughts better. The background was the inner product of the the camera's direction with the computed normal of the surface. The normal of the surface is computed by the cross product of the partial derivative of with respect to u and the partial derivative with respect to v. So take for instance the parametric equation for a sphere:

EDIT: that symbol is meant to be phi, I think that it is omega?

x = r * sin(πΦ) * cos(2πθ)
y = r * sin(πΦ) * sin(2πθ)
z = r * cos(πΦ)

θ = u, range [0.0,1.0]
Φ = v, range [0.0,1.0]

The partial I've used is for du:

x = r * sin(πΦ) * -1.0 * sin(2πθ) * 2π
y = r * sin(πΦ) * cos(2πθ) * 2π
z = r * cos(πΦ)

for dv:

x = r * cos(πΦ) * π * cos(2πθ)
y = r * cos(πΦ) * π * sin(2πθ)
z = r * -1.0 * sin(πΦ) * π

With the above video, I'm referring to uv in terms of points in 2 space, then translated to a vertex of point in 3 space via a parametric equation. I just did a bit of on-line research, and found that a uv map is a texture. I was confused, newjersyrunner, I apologize. I rely mostly on textbooks. So my main question is if I could just calculate the normal, form the inner product or dot product [if the arc cosine of the dot product of normal vectors is the angle between them; a dot product of the direction of viewing plane and the normal of the surface would yield a negative value because the angle is obtuse;]

The foreground in the above video was a three dimensional representation of the uv region mapped through a parametric equation. To do this, I took the 3 Space vector and projected it onto the orthonormal basis of the viewing plane. I call it simple the up and right vectors. So if we project the point in three space onto the right vector of the viewing plane, we are given an x value for plotting to the screen. vis a vi, y.

Now, after further explanation, I would like to prevent the extra steps for mapping to the view plane. So my question involves mapping one uv region to the viewing plane; another uv region. How would it be possible to calculate the x,y variables of the viewing plane, given the two parametric equations and a surface's uv region.

As far as GPU and CPU calculations go, I am calculating on the CPU right now, to right glsl later to optimize the rendering. I'm thinking that my idea would optimize the rendering pipeline of gl, if 3 space calculations are omitted.
 
Last edited:
  • #4
Seems like google would be your best bet for the math, you just don’t know the terminology that you want to look for.

All that calculation of normals is handled by something called the “shader.” The exact normal you get depends on the algorithm of the shader. From what it sounds like, you are using an algorithm similar to a ”gourand shader.” You can find lots of examples of that. “Phong shader” is slightly more complex, but is what OpenGL uses by default so it’s a good starting point.

This assumes that your texture itself is perfectly flat. Bump mapping also affects normal calculation.
 
  • #5
newjersyrunner, thanks for the reply, seems like you are as lost as I am as to how to accomplish this.
 
  • #6
ADDA said:
EDIT: that symbol is meant to be phi, I think that it is omega?

x = r * sin(πΦ) * cos(2πθ)
The Greek letter in the sine factor is phi (upper case).
Omega (upper case): ##\Omega## and lower case: ##\omega##
Phi (upper case): ##\Phi## and lower case: ##\phi##
##\theta## and ##\phi## (both in lower case) are commonly used in spherical coordinates and trignonometry in general.
 

1. What is a UV map view plane?

A UV map view plane is a 2D representation of a 3D model's surface, used for creating textures and applying them to the model.

2. How is the 2D position calculated on a UV map view plane?

The 2D position on a UV map view plane is calculated by mapping the 3D coordinates of the model's surface onto a 2D plane, using a UV mapping algorithm.

3. Why is a UV map view plane important in 3D modeling?

A UV map view plane is important in 3D modeling because it allows for precise placement and manipulation of textures on a 3D model's surface, resulting in a more realistic and visually appealing final product.

4. Can the 2D position on a UV map view plane be altered?

Yes, the 2D position on a UV map view plane can be altered by adjusting the UV coordinates of the model's surface. This can be done manually or with the help of UV mapping tools in 3D modeling software.

5. Are there any specific techniques for calculating 2D position on a UV map view plane?

There are various techniques for calculating 2D position on a UV map view plane, including planar, cylindrical, and spherical mapping. The choice of technique depends on the shape and complexity of the 3D model's surface.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
1
Views
996
Replies
1
Views
1K
  • Sci-Fi Writing and World Building
Replies
31
Views
2K
Replies
14
Views
2K
  • Programming and Computer Science
Replies
1
Views
1K
  • Programming and Computer Science
Replies
5
Views
1K
Replies
2
Views
2K
  • Linear and Abstract Algebra
Replies
13
Views
2K
  • Astronomy and Astrophysics
Replies
4
Views
6K
Back
Top