# Tag Info

Accepted

### How does UV unwrapping work?

UV unwrapping is a difficult topic. They can be both combinatorial algorithms or variational methods but in general they're optimization based, i.e. you setup an optimization problem and you solve it ...
• 566
Accepted

### Perspective Correct Texture Mapping

You are on the right track but what you need to do is to calculate u/w and v/w, and also 1/w for each vertex, which you interpolate linearly in screen space in your rasterizer. Then for every pixel ...
• 3,636
Accepted

### Map a texture onto a hyperbolic triangle

My guess is that to get the texture to look right, you'll have to subdivide the interior of the triangle as well, and approximate the non-linear UV mapping within it. Currently, it looks like you're ...
• 25k
Accepted

### How do I convert a hit on an infinite plane to UV coordinates for texturing in a Raytracer?

If your plane has a normal of $\begin{pmatrix}0 & 0 & z\end{pmatrix}^T$, then your computation ...
Accepted

• 25k

### How to map texture pixels to the corresponding 3D positions?

Well, there is no 1:1 correspondence the pixel might be in many locations at once. What your asking is relatively easy. Just iterate through each triangle (f). Then get the texture coordinate of each ...
• 8,437
1 vote
Accepted

### Calculating UV coordinates for sampling texture atlas

Assuming normalized texture coordinates and a grid of 8x8 (which is 64 tiles not 16 like I said in the comments) then tileOffset will need to be a vec2 for the x and y offsets. Also, assuming texture ...
• 3,219
1 vote
Accepted

### How to paint onto 3d models

I can't give you a "better" approach here, but I think that the approach to project each individual brush image onto the surface of the object is not really a performance issue if you ...
• 1,251
1 vote

### How to paint onto 3d models

As long as no pixel on the texture is used twice, you can render the geometry and display the uv-coordinates (texture coordinates). Usually they are a combination of red and green (2d). When using a ...
• 1,265
1 vote

### Projective texturing from many images

Apologies in advance for the poor quality of this answer, but this sounds a little like what an ex-colleague was doing as part of his PhD. The "Free-Viewpoint video" papers listed at the bottom of ...
• 4,241
1 vote
Accepted

### Is there any free software to visualize a texture mapped to a sphere?

Although this is borderline "off-topic" for the site, there is perhaps a simple answer: Why not use a webgl approach such as this one? http://learningwebgl.com/lessons/lesson11/index.html (parent ...
• 4,241
1 vote

### Help with wireframe artifacts on mesh procedural UV texturing

This looks like a side effect of bilinear filtering where it can sample texels neighbouring those that are at the edges of the used areas of the texture - the red/green boundary in your case. One ...
• 2,322
1 vote

### Sphere Texture Mapping Algorithm

A few options: Make the 0-1 discontinuity explicit in the mesh. That is create a 2 sets of vertices that lie exactly on the line where the value would be 1 or 0 (one set gets 1 and one gets 0) then ...
• 5,950
1 vote
Accepted

### How to get the 3D position for the point with (0,0) UV coordinates?

I realize that the solution I'm giving further below is basically the one you mentioned in your question. So let's begin by addressing this: The solution in question assumes that M° is linear.. if ...
1 vote

### How does a GLSL Sampler2D read a Vec2 UV coordinate to determine UV range

It's hard to say without seeing the shader in question. My guess is that every animation frame in the atlas has the same size. This fixed size allows mapping any UV coordinates to the proper animation ...
• 830
1 vote

### Export Model Textures Per Face

Since UV coordinates are per a vertex this can be done by simply displaying the 2D UV coords in screen space and texture the resulting triangles using the same texture coords. Since UV coords are ...
• 3,219
1 vote
Accepted

### In texture mapping, should we set texture coordinate to every vertex or can I skip vertices in between?

Typically, texture coordinates are interpolated from the vertices of a triangle during rendering. This can be seen in two ways. evaluating your texture at vertices and the interpolating the result or ...
• 1,238
1 vote

### Full screen quad texture coordinates mapping

An alternative solution would be to avoid the vertex/geometry shader completely and draw your fullscreen quad with glRecti(-1, -1, 1, 1); then just compile a ...
• 59
1 vote
Accepted

### Full screen quad texture coordinates mapping

I may have misunderstood, but it sounds like the frame buffer you're rendering to is only 2×2 pixels? In that case, the fragment shader will be evaluated at each pixel center, which will be at 0.25 ...
• 25k
1 vote
Accepted

### How do you scale an image across planes while retaining perfect tiling?

One solution would be to use repeating texture wrapping, and then use a texture transformation matrix. So let's say you normally set the texture coordinates of your ...
• 3,411
1 vote
Accepted

### How do you interpolate UV mapping coords in a quad tessellation evaluation shader?

The problem was else-where, the same interpolation works for UV coords. ...
• 169

Only top scored, non community-wiki answers of a minimum length are eligible