Questions tagged [texture-mapping]

Texture mapping is a method for adding detail, surface texture (a bitmap or raster image), or color to a computer-generated graphic or 3D model.

971 questions
4
votes
3 answers

How to plot a surface with a texture map

I want to plot a surface with a texture map on it, but the conditions are not the "ideal" ones. first lets explain what I have. I have a set of points (~7000) that are image coordinates, in a grid. This points do NOT define perfect squares. IT IS…
Ander Biguri
  • 35,140
  • 11
  • 74
  • 120
4
votes
2 answers

how do I do "reverse" texture mapping from texture image x,y to 3d space?

I am using WPF 3D, but I think this question should apply to any 3d texture mapping. Suppose I have a model of a cow, and I want to draw a circular spot on the cow (and I want to do this dynamically -- supposed I don't know the location of the spot…
M Katz
  • 5,098
  • 3
  • 44
  • 66
4
votes
4 answers

Texture map for a 2D grid

I have a set of points [x,y]=meshgrid(1:N,1:M) defined on a regular 2D, N x M grid. I have another set of points [u,v] that are some deformation of the original grid, i.e [u,v]=f(x,y)' (however I do not have the actual f that caused the…
olamundo
  • 23,991
  • 34
  • 108
  • 149
4
votes
0 answers

How to implement texturing over a model using pycollada?

I am developing a python script which will be able to generate .DAE (COLLADA) files along with the associated KML files for developing 3D models of buildings. I have the street images of the buildings. By street images, I mean the front face image…
Abhinav Vatsa
  • 59
  • 1
  • 10
4
votes
1 answer

2D Texture gets distorted when making a sub-pixel translation

I would like to know a theoretical reasoning why is this even possible: how translation of the geometry is related to the texture mapping. I can only notice this effect when making a sub-pixel translation, texture looks fine if translated by…
Kimi
  • 13,621
  • 9
  • 55
  • 84
4
votes
1 answer

Why does my object not render if the Vertices are generated manually (malloc'd then initialized) but will render if statically assigned?

Ultimately I am trying to use a single image to texture a number of objects (hexagons) by supplying different texture co-ordinates to each object. Using OpenGL ES 2.0 and GLKit I came up with a method of doing so only to discover that for some…
hobwell
  • 538
  • 1
  • 8
  • 26
4
votes
2 answers

Quad Strip Texturing Distortion

I have a GL_QUAD_STRIP that I am texture mapping. The quad strip folds back on itself to form a UV sphere. Essentially, the quad strip is not generally made of rectangles--instead, trapezoids. I am getting texture distortion issues. The texture…
geometrian
  • 14,775
  • 10
  • 56
  • 132
3
votes
1 answer

GLSL texture coordinate to absolute pixel?

my question regards how a texturecoordinate exactly maps to texel in a texture (not taking into consideration filtering). does (0,0) for example refere to the top left corner of the top left pixel or does it refere to the center of the top left…
matthias_buehlmann
  • 4,641
  • 6
  • 34
  • 76
3
votes
1 answer

Create contour plot in opengl using grid data and a 1D texture map

I have a set of X,Y,Z values on a regular spaced grid from which I need to create a color-filled contour plot using C++. I've been googling on this for days and the consensus appears to be that this is achievable using a 1D texture map in openGL. …
TheOx
  • 2,208
  • 25
  • 28
3
votes
1 answer

How to draw a textured torus in OpenGL without using GLUT?

I need to render a torus in OpenGL, without using GLUT. I'm using C# and Tao Framework bindings. I have the following code, which I got from here. private void DrawTorus() { int numc = 100, numt = 100; double TWOPI = 2 * Math.PI; …
brozo
  • 585
  • 2
  • 13
  • 29
3
votes
1 answer

Python for USD – Map a texture on a cube so every face have the same image

I have a simple mesh cube, and I want the same image to be applied on each face of the cube : Here is what I have so far (front face is ok but not the others) # create mesh with texture coordinates stage.DefinePrim('/' + assetName + '/Geom',…
glemoulant
  • 517
  • 7
  • 18
3
votes
1 answer

Why character's face automatically converts into green in Xcode?

I am using Autodesk Maya for creating models and animations of this character. This character appears and animates perfectly on all other platforms like Unity, 3dsMax, etc. but when I import .dae file in Xcode the face of the character appears green…
3
votes
1 answer

How to draw plain colored surfaces in OpenGL ES?

I have a curved surface defined by a number of triangular faces. The entire surface has single color. So far I was drawing each triangle separately. For each triangle I was passing 3 vertices, 3 indices, 3 color values (of same color) and 3 normal…
Jayesh
  • 51,787
  • 22
  • 76
  • 99
3
votes
2 answers

OpenGL ES 1.1 Texel to Pixel mapping using texture coordinates not working, what am I doing wrong?

EDIT OK, this question is old. What I found out after learning some OpenGL ES and testing is my iPhone 4 was actually using double the resolution image. If I remember correctly, I had to set my OpenGL context scale point to 2. Then the image…
Zhang
  • 11,549
  • 7
  • 57
  • 87
3
votes
1 answer

How to add env map onto gltf object

Im having quite a bit of trouble adding an environment map to a loaded GLTF / GLB file, as of now I get some sort of reflection instead of a black dot with a light point on it, I was reading a bit of the document for three js and think I can pull it…