Questions tagged [uv-mapping]

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

286 questions
3
votes
3 answers

How to change Sprite uv in Unity?

I wrote the following script: public class SpriteUV : MonoBehaviour { private SpriteRenderer _spriteRenderer; private Sprite _sprite; [SerializeField] public Vector2[] _uv = new Vector2 [4] { new Vector2(0.4f, 0.5f), …
Narek
  • 38,779
  • 79
  • 233
  • 389
3
votes
1 answer

threejs: how to render a texture with custom shaders INCLUDING the textures UV offsets

I want to render a texture to a plane using custom shaders. This texture has an 'offset' property set, that works correctly when I use a standard threejs material. However, I cannot figure out how to access these offsets in my custom fragment…
korrbit
  • 37
  • 1
  • 5
3
votes
1 answer

Per instance UV texture mapping in Three.js InstancedBufferGeometry

I have a InstancedBufferGeometry made up of a single Plane: const plane = new THREE.PlaneBufferGeometry(100, 100, 1, 1); const geometry = new THREE.InstancedBufferGeometry(); geometry.maxInstancedCount = 100; geometry.attributes.position =…
Jack Wild
  • 2,072
  • 6
  • 27
  • 39
3
votes
2 answers

UV Mapping issue artifact on Sphere OpenGl

I am UV mapping a 2D Texture on a 3d sphere X, Y, Z coordinates, by using the formula u = (0.5 + atan2(X, Y) / (2 * glm::pi())); v = (0.5 - asin(Z) / glm::pi()); in modern openGL C++. I dont know why there is this artifact in the…
abstractnature
  • 456
  • 2
  • 9
3
votes
2 answers

Three.js Multiple UV maps on a single object

I am trying to figure out how to use two different textures on the front and back of a box. Whenever I scale my box (ExtrudeGeometry), the UV maps do not seem to update. Therefore I am defining my own UV maps for the front and back of the box. To…
Yannickd
  • 55
  • 1
  • 6
3
votes
1 answer

Why are these UV mapping coordinates represented in 0-1 and pixels? Shouldn't they use only the 0-1 system?

Well, I've got many UV coordinates of a 3D model clearly in the range 0-1 and many coords in seemingly pixel values in the range 100-300. How do I know which one to interpret the coordinates as? Is there a standard or system for this? I notice that…
Robin Rodricks
  • 110,798
  • 141
  • 398
  • 607
3
votes
1 answer

How to modify UV coordinates with three.js

I want to modify a JSON model's unwrap (UV coordinates) during runtime in order to move the texture over the surface of the geometry. I found faceVertexUvs in the Geometry class documentation. It contains one array, which is correct. That array…
domsson
  • 4,553
  • 2
  • 22
  • 40
3
votes
1 answer

Determining uv coords for dynamically generated mesh in unity

I have a mesh that represents portion of the surface of a sphere and I am having some trouble figuring out the UV coordinates for the verts. Given the generation code for the verts could someone explain / provide an example of how I can determine…
War
  • 8,539
  • 4
  • 46
  • 98
3
votes
1 answer

Render scene onto custom mesh with three.js

After messing around with this demo of Three.js rendering a scene to a texture, I successfully replicated the essence of it in my project: amidst my main scene, there's a now sphere and a secondary scene is drawn on it via a THREE.WebGLRenderTarget…
avramov
  • 2,119
  • 2
  • 18
  • 41
3
votes
0 answers

ThreeJS pass uv coordinates to RawShaderMaterial?

I'm trying to create a shader with a texture map on it from scratch. Looking at the other materials (shaders) and their sources, it seems like they all have a "uv" attribute passed to them. I'm having a hard time figuring out where that uv attribute…
Andy Ray
  • 30,372
  • 14
  • 101
  • 138
3
votes
0 answers

Calculating uv texture coords for a procedurally generated polygon

I have a shape like this: and the coordinates of the points are available (Vertices have x and y components) My texture is: A simple planar UV mapping gives me: and what I desire is: How to calculate vertex positions to get the desired mapping?…
Aaron Azhari
  • 987
  • 1
  • 10
  • 24
3
votes
1 answer

Custom UVgenerator Three.js for extrudedgeometry

I want to use a texture on the surface of my extruded geometry. I have been researching custom UVgenerators for a while now, and have found these related questions: 1.) How to apply a texture to THREE.ExtrudeGeometry? 2.) Loaded texture appears…
Laura
  • 469
  • 1
  • 6
  • 12
3
votes
0 answers

Isolate a UV Island (aka Shell)

Alright, I'm in the middle of making a decal system that paints directly on textures. I also have it doing the legwork on the video card so there's no lag like using a Texture2D.Apply() approach. Anyway, essentially I'm just stamping the texture…
gord0
  • 111
  • 5
3
votes
1 answer

jme3 - UV map misplaced on model exported from Blender

I created a simple model of a barrel (.zip) in Blender 2.69. Then I created a UV map in Blender and made a UV mapped texture out of it (its in the archive, too). Then I imported my texture in Blender, now the mapping matches: In Blender the model…
maxdev
  • 2,491
  • 1
  • 25
  • 50
3
votes
2 answers

Avoiding seam in 3D cylinder model

I have this texture representing internal area of a pipe: I have created a simple cylinder model (GeometryModel3D) by dissecting the above texture to a grid of points and than wrapping this to form a cylinder, then mapping the above texture to it…
Libor
  • 3,285
  • 1
  • 33
  • 41
1 2
3
19 20