Questions tagged [uv-mapping]

UV mapping is the 3D modeling process of making a 2D image representation of a 3D model.

286 questions
42
votes
5 answers

THREE.js generate UV coordinate

I am working on importing a model into a scene using the THREE.js OBJ loader. I know that I am able to import the geometry fine, because when I assign a MeshNormalMaterial to it, it shows up great. However, if I use anything that requires UV…
Cabbibo
  • 1,371
  • 3
  • 17
  • 30
17
votes
3 answers

Automatically generating UV coordinates algorithms

I'm writing my own uv editor for a tool of mine, and I'm trying to incorporate as many algorithms as I can for projections. I need to take an arbitrary mesh, and make uv coordinates for each vertex. So far, I have planar, and Least Squares…
Mary Ellen Bench
  • 589
  • 1
  • 8
  • 28
10
votes
2 answers

Placing 2D shapes in a rectangle efficiently. How to approach it?

I've been searching far and wide on the seven internets, and have come to no avail. The closest to what I need seems to be The cutting stock problem, only in 2D (which is disappointing since Wikipedia doesn't provide any directions on how to solve…
LWolf
  • 188
  • 1
  • 2
  • 7
10
votes
1 answer

How to make a texture always face the camera ..?

Update 5 Created another fiddle to show what is expected would look like. An invisible skydome and a cubecamera are added and environment map is used; in my case, none of these technique should be used for the reasons already mentioned. var…
Ken Kin
  • 4,503
  • 3
  • 38
  • 76
9
votes
1 answer

Programmatically generate simple UV Mapping for models

Coming from this question I'm trying to generate UV Mappings programmatically with Three.js for some models, I need this because my models are being generated programmatically too and I need to apply a simple texture to them. I have read here and…
Andres
  • 6,080
  • 13
  • 60
  • 110
9
votes
2 answers

In Unity3D, I am following a tilemap tutorial. However, the UV layout is coming out strange. How can I fix this?

I'm following this tutorial set: https://www.youtube.com/watch?v=owBt9SNKXCI&index=6&list=PLbghT7MmckI4qGA0Wm_TZS8LVrqS47I9R to dynamically build a tile map layout. It works to a point, but it generates a very strange layout with 128 x 128 sized…
Merlin
  • 929
  • 12
  • 33
8
votes
1 answer

Put a Cinema 4D model and Texture into an iPhone App

Im an iPhone developer and i'm trying to get a 3D model that I create in Cinema 4D into an app im making. I have actually found a way to get the model in (by exporting it as a .dae or obj and using a python script) which works really well however I…
Roksalt
  • 481
  • 6
  • 19
8
votes
5 answers

Multiple UVs/textures for single mesh in THREE.js

I have an OBJ that uses four textures. The UVs defined in the file range from (0, 0) to (2, 2), such that (0.5, 0.5) refers to a coordinate in the first texture, (0.5, 1.5) is a UV coordinate in the second texture, (1.5, 0.5) is a coordinate in the…
The Obscure Question
  • 1,134
  • 11
  • 26
7
votes
1 answer

Calculating planar UV coordinates for arbitrary meshes

I have code that generates triangle mesh from 2d shapes. Because those shapes in most cases have uneven vertex distribution on the surface I have an issue with generation of UVs so that it wouldn't cause texture distortion. Anybody can suggest some…
Michael IV
  • 11,016
  • 12
  • 92
  • 223
6
votes
1 answer

Why does TextureCoordinates work as expected for a Viewport2DVisual3D, but not for a GeometryModel3D?

I have a model that I created in 3ds Max. The model is a simple rectangle. Its texture has overlapping texture coordinates--the model should display the right half of the image file twice, side-by-side. I exported this model as an .obj, and…
Matthew
  • 28,056
  • 26
  • 104
  • 170
6
votes
1 answer

Extracting Blender Original Coordinates (ORCO)

I've made an exporter (in Python) from Blender (2.5+) to a custom format. What bothers me is that most models I download contain no UV layers but instead are using auto-generated texture coordinates. The question is: how can I access…
kvark
  • 5,291
  • 2
  • 24
  • 33
6
votes
2 answers

UV mapping not working on imported obj file

I have exported an .obj file (along with .mtl and a .png) from Blender to import into a libgdx project. The file contains both UV and normal data. I am pulling the file into the app like this: ModelLoader loader = new ObjLoader(); model =…
andypaxo
  • 6,171
  • 3
  • 38
  • 53
5
votes
4 answers

Troubles parsing Wavefront .obj texture coordinates

I'm coding my own .obj parser in objc for OpenGL ES 2.0 to get a better understanding on how this OpenGLES thing works. Loading the vertices and showing a model with vertex colors on it works like a charm. Just a small note: I'm using an index…
polyclick
  • 2,704
  • 4
  • 32
  • 58
5
votes
1 answer

Normalizing UV Coordinates From OpenGL To Vulkan

I'm writing a Vulkan Renderer for GWEN (GUI Without Extravagant Nonsense) and having issues getting texture coordinates to match up. Here's what I should see: And this is what is currently happening: The texture displayed in the center is the…
KKlouzal
  • 732
  • 9
  • 32
5
votes
2 answers

OpenGL Texture Mapping

I am new to game programming and graphics programming. However, I eagerly wish to learn, so I have begun building a game engine with OpenGL. I have implemented all of the basic graphical features, and now I want to add texture support for my…
user434565
  • 909
  • 1
  • 10
  • 21
1
2 3
19 20