# Questions tagged [uv-mapping]

The tag has no usage guidance.

50 questions
Filter by
Sorted by
Tagged with
1answer
10k views

### How to map square texture to triangle?

I want to find the texture coordinates for point P. I have the vertices of the triangle and their corresponding uv coordinates. The numbers in the little squares in the texture represent color ...
1answer
366 views

### Map a texture onto a hyperbolic triangle

I've been stuck on how to approach this for a while, so any suggestions would be gratefully appreciated! I want to map a texture in the form of a lower right euclidean triangle to a hyperbolic ...
2answers
317 views

### Does UV-mapping generate for some points of the 3D model several points in the 2D projection?

Assume my 3D model is a pyramid with a rectangular base and I numerate four corners of the base with 1, 2, 3, 4 and give 5 to the top point. If I project this pyramid into a 2D star-shaped object, ...
1answer
4k views

### Perspective Correct Texture Mapping

So I'm trying to correctly map my textures in my software renderer using the u, v coordinates but I can't seem to get it working. I got affine texture mapping working. This is what I can produce using ...
1answer
2k views

### Automatic generation of UV maps

Given an arbitrary triangle mesh, is it possible to automatically generate a UV mapping for it, and if so, how is it done?
1answer
1k views

### How does UV unwrapping work?

I would like to project the triangles of my mesh to a 2D surface. I would like to minimalize the distorion, avoid breaking connected polygons if possible, and also maximalize the used space on the 2D ...
2answers
1k views

### How is texture baking implemented?

Suppose we already have UV coordinates assigned for mesh vertices, how is texture baking implemented? I guess it will be something like this: ...
1answer
2k views

### UV Coordinate Interpolation in Compute Shader

I am trying to get the screen space position of each pixel in a texture on a mesh and write it into a texture. I was hoping to use a compute shader to do this: ...
0answers
531 views

### Perspective-Correct Texture Mapping

I am working on a small rendering engine for a personal project and I am having issues with the texture mapping part of it. It seems to work for some cases, but not for others. For example, when one ...
1answer
336 views

### The Process of Spherical Harmonics

I have read about spherical harmonics from Here about the usage of SH for generating Irradiance Environment Maps and how it can make the process of generating EM faster than the regular operations. ...
1answer
236 views

### Jagged texture's edge on perfectly straight UV of sphere mesh

I unwrap UV from sphere mesh to grid and put texture to align with UV grid too. When white and black border of texture fall between UV columns, I get jagged edge like in the picture. This only happens ...
2answers
561 views

### Fast approximation of spherical texture coordinates

I'm working on a Software Rasterizer on a sub-30 MHz RISC CPU My current focus is on zooming-in on a slowly rotating planet. For maximum quality, no 3D polygons are involved with the planet - the ...
1answer
375 views

### Special Texture Stretching without deformation

I am trying to achieve a special texture stretching effect in my shader. Here is how I define my uv before sampling my texture, nothing really special. ...
3answers
506 views

### Texture coordinates projection

I have some classic texture coordinates and as a normal behaviour they follow the mesh's transformations. I am trying to use the same texture coordinates behaviour but without being affected by the ...
1answer
985 views

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

I am trying to convert a ray hit on an infinite plane, defined by an origin and a normal vector, into UV coordinates, so I can find the appropriate texel at that point. Code I have is close to ...
3answers
86 views

### How to paint onto 3d models

I have searched this topic for very long time and have found basically no information on it. If we have a 3d model with a uv layout. What is the basic technique for 3d painting on said model with a ...
1answer
37 views

### Does automatic UV unwrapping work with an indexed face set model?

When working with Graphics APIs like OpenGL its common to use an index face set model. That is, multiple faces share adjacent / overlapping vertices by using a list of indices. Most game engines like ...
1answer
1k views

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

I am working with an atlas shader that steps through various sprite tiles within a single png atlas page to playback an animation with sampler2D. Looking at the shader code, I would expect to have to ...
2answers
111 views

### Projective texturing from many images

Problem: I'm trying to dynamically texture a mesh of the real world generated by the Hololens over time using photos also captured from the Hololens, perhaps one photo per second. Each of the photos ...
0answers
43 views

### Per-object screen space uv issue

I am currently trying to sample a texture in screen space. This works well : ...
0answers
179 views

### Triplanar UV unwrapping - overlapping triangles

For some time I have been working on UV unwrapper for radiosity computation. The information online about it is very sparse, except how to do it in some high end software. So far I have used triplanar ...
0answers
112 views

### Algorithm for 3D mesh model segmentation to chart

I'm trying to implement a segmentation model which will divide a 3d mesh model into charts. But I'm having really hard time to find resources in the web. The papers and some other places these ...
1answer
361 views

### Algorithm to map a triangular mesh onto plane preserving angles and distances from one vertex

I have a 3D triangular mesh representing cortical surface of a brain. I also have one vertex of interest. I would like to unfold a neighborhood of this vertex in such a way that both the angles (their ...
1answer
59 views

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

I have a mesh stored in .obj format with a texture image in .png format. For any "defined" pixel in the texture image, I'd like to compute the corresponding 3D coordinates when the texture ...
1answer
161 views

### Transfer the texture between two different sets of uv

Say I have a mesh with two sets of uvs. And I have a texture made for the first set of uvs. I would like to create a second texture that has the same relationship between its pixels and the second set ...
1answer
68 views

### UV partial derivatives of a cylinder shape primitive

I am new to rendering and I would like to calcualte UV partial derivatives of a cylinder shape, which is parameterized by radius $R$ and length $L$. Using cylindrical coordinate mapping, for a surface ...
2answers
2k views

### Full screen quad texture coordinates mapping

I'm rendering a full screen quad using gl_VertexID as GL_TRIANGLE_STRIP ...
2answers
52 views

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

My goal in my project is to render a procedural texture for a given mesh based on a predefined camera projection. The way I choose to accomplish it is by creating tex coords based on only the visible ...
2answers
1k views

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

I have a 3D triangular mesh(vertices, indices, uv coords) that I'm rendering to the screen. Let's assume that the UV mapping is one-to-one. I'm trying to find a way to find the 3D position of the ...
1answer
144 views

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

I am working on a texture mapping problem. I use vtk C++ library for my work. I have a very dense mesh with lots of vertices. I want to apply image texture to this mesh. Should I set texture ...
1answer
261 views

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

Scaling up or down a texture is quite simple, modify the UVs. In my particular scenario though, I have multiple "quads" (it is a patch tessellation shader) each with a tiling texture. Does anyone ...
1answer
64 views

### Finding a texture pixel (X,Y) on a Sphere

I'm using three.js combined with face recognition, I want to rotate a sphere that displays my input video according to the detected eye location, the face recognition gives me a X,Y on the texture ...
0answers
20 views

### What algorithms are needed to map displacement to base mesh?

By given belows, Base mesh(vertices, faces, texture coordinates - UV map), Normal map(1024x1024 image), Displacement map(1024x1024 image), I want to make a mesh which reflects the displacement map. ...
0answers
427 views

### UV mapping on triangles

After watching some Youtube tutorials I thought I had understood the concept of UV mapping: I have a net of triangles, and I have an image representing my texture. Now I tell the GPU which point of ...
0answers
38 views

### How can I detect if an edge has flipped during the UV unfold process?

I'm writing my own UV Unfold operation (similar to Maya's Optimize UV tool or 3DS Max's Relax Tool). My code works great 90% of the time but in some instances, I'm getting faces and edges that flip ...
1answer
104 views

### Export Model Textures Per Face

(Note that as far as attempts go, I can't find anything that helps me) I have a 3D polygon, and for simplicity's sake it's going to be the one below: It is textured using the UV map below: Side ...
0answers
60 views

### Handling varying texture sizes in an array texture

Say we've idetified that we have a varying number of textures that are upper capped by 2 parametrs. thus we allocate the maximum amount of memory needed to store all textures as follows: ...
0answers
386 views

### Texture mapping on a quad strip [closed]

I have just started learning OpenGL and I am trying to map a texture on a Quad Strip. Basically, I am trying to create a parametric surface and I don't know how to map the coordinates. What can I do? ...
0answers
121 views

### Model UVs optimization

This is related to question on SO (but the purpose of this question is different). I have model with UVs (3DS max UVW editor screenshot) I have grouped some unused parts of UVs on the top right ...
1answer
169 views

### Extract 3D seam coordinates from

I have a .obj file with accompanying .mtl file and texture files. I want to extract the coordinates of the seams on my mesh. I then want to plot these seams in a 3D matrix in Python. Is there a fast ...
1answer
100 views

### Calculating UV coordinates for sampling texture atlas

I have an 8192x8192 texture atlas that contains 1024x1024 shadow maps aligned side by side. I'm trying to calculate the uv coordinates so that I can sample each shadow map appropriately based on the '...
1answer
626 views

### Sphere Texture Mapping Algorithm

I am trying to generate UV coordinates automatically to map a texture on a sphere. The problem is with seams when going from 0.8 to 0.2 there is a discontinuity and interpolation in fragment shader ...
1answer
65 views

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

I am trying to study the texture deformations caused when mapping a rectangle to a sphere, if I had a software that took an image as an input and displayed how it looks like when texture mapped to a ...
1answer
850 views

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

Does anyone know who to interpolate UVs in a quad tessellation evaluation shader? I can interpolate the position easily like so : ...
0answers
13 views

### How to get the surface alignment

How can I get the surface alignment of a 3D object in screen space? I found this example which, I believe, is aligning the UV coordinates to the 3D vectors (which are determined by their current ...
0answers
34 views

### Character Creation. Cartoon look, Eyes and Extra Parts. What advantages are the combining to one mesh?

I am fairly new to CG and 3d art. I'm trying to learn to make good game assets (ie. Low poly count, clean looking) in a cartoon style. I'm making this character as pictured. But his eye is a separate ...
0answers
47 views

### UV coordinates calculation broken

I've tried using the classic formula of calculating barycentric coordinates. When the plane on which you are projecting the texture is collinear to any of the base vectors it crashes with a division ...
0answers
61 views

### Compute UV Normals and World Position from a given texture coordinate

I'm turning to you as a newbie in CG, with a question that might easily be answerable for pros. What I need to do is the following: I have a (rather simple) quad mesh in a 3D modelling software, say, ...
0answers
38 views

### How to "preserve texture" when transforming vertices

Maya has a feature called preserve texture. It allows you to transform vertices of an object and basically have the texture "stay in place" in object space. Say I have a plane with unwrapped ...
1answer
537 views

### How to scale and offset a cubemap using sphere mapping

I am trying to scale and repeat a Cubemap with Latitude-Longitude mapping layout just as you would do with classical UV mapping but without any interesting result. This should be used as a skybox. ...