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.
Questions tagged [texture-mapping]
971 questions
5
votes
1 answer
How to send non-normalized/unclamped values to GLSL shader using opengl textures?
I am trying to send an array of float values(height map) to GLSL as a GL_TEXTURE_2D. While I have the samplers set right, the issue comes from the clamping that happens when I upload the texture using glTexImage2D().
glGenTextures(1,…

Rathnavel
- 85
- 1
- 15
5
votes
1 answer
Can a Vulkan sampler's maxLod be too high?
Suppose I'm making a VkSampler, or possibly a set of VkSamplers, that I'm planning on using with several textures. Each texture has multiple mip levels, and the number of mip levels varies from texture to texture. I want all sampler options to be…

mjwach
- 1,174
- 2
- 9
- 25
5
votes
1 answer
How to convert a colored point cloud into a textured mesh?
I have a .ply file which contains a colored point cloud:
I need to convert it as a textured mesh. I can create a blank mesh doing:
Filters -> Point Set -> Surface Reconstruction: Poisson
But the result is a white mesh
It seems that all the…

Simone Colnaghi
- 123
- 2
- 10
5
votes
2 answers
Texture Mapping C++ OpenGL
I have read around on this, including Nehe and here for solutions, but I cant find a specific answer.
I am trying to load a a photo, called stars.jpg. I want to make this my background of the scene, by mapping it using uv coordinates, doing it…

Jim
- 3,236
- 8
- 33
- 43
5
votes
1 answer
OpenGL loading binds the last loaded texture to all textureID's
So my problem is that I try to load multiple textures at start up and then store all of the ID's so that I can bind them to use them. Now I know that the ID's are being stored correctly because I can debug it and see in both assigning and usage that…

Hewiiitt
- 306
- 1
- 12
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
5
votes
2 answers
How to normalize image coordinates for texture space in OpenGL?
Say I have an image of size 320x240. Now, sampling from an sampler2D with integer image coordinates ux, uy I must normalize for texture coordinates in range [0, size] (size may be width or height).
Now, I wonder if I should normalize like…

Armen Avetisyan
- 1,140
- 10
- 29
5
votes
0 answers
Applying a texture material to custom objects in SceneKit
SceneKit beginner here, doing an iOS project.
I have been wrapping textures around SCN geometry (spheres, so far) like this:
let scene = SCNScene()
var planet : SCNGeometry
planet = SCNSphere(radius: 1.0)
let material =…

Brandon Slaght
- 1,025
- 1
- 12
- 34
5
votes
5 answers
"sphere in a bag" plane to sphere projection
I'm looking for the mathematical transformation to transform points on a 2D plane [0,1]x[0,1] onto the unitsphere.
The most common projection would latitude-longitude mapping by interpreting u and v as the angles for the spherical coordinates (map u…

Mat
- 51
- 1
- 3
5
votes
1 answer
MeshBasicMaterial color tints texture map three.js
I'm working with a MeshBasicMaterial to which I have applied a color.
var material = new THREE.MeshBasicMaterial({color: myColor});
at some point I need to add a texture to the material
material.map = new THREE.ImageUtils.loadTexture(...);
this…

netpraxis
- 146
- 2
- 9
5
votes
2 answers
(Py)SDL2: Drawing a textured polygon
PySDL2 version: 0.9.3
SDL2 version: 2.0.3
I am trying to render this image as a texture on a polygon in PySDL2 using sdl_gfx
but its display is completely distorted, as can be seen at the bottom-right corner in the SDL window:
I have this python…

Daniel Schreij
- 773
- 1
- 10
- 26
5
votes
1 answer
Mapping Wavefront .obj texture vertex on OpenGL
An artist gave me all 3D models for me exporting to .obj and .mtl in order that I can render it using OpenGL.
But I can't figure out why the texture vertex are greater than 1 and sometimes negative.
Take a look at this example:
(...)
vn -0.000717425…

rodrigogq
- 1,943
- 1
- 16
- 25
5
votes
3 answers
Mapping texture to 3D objects in a batch process on the server
we have the following use case:
the user uploads her picture on a web server
at a later time - on the server - the picture(s) are mapped on predefined 3D objects and stored as normal images (png, jpeg, ...). For now just the front-view. The files…

Memical
- 51
- 1
5
votes
0 answers
How to map texture on a custom non square quad in THREE JS
playing around with ThreeJS, i encoutered a classic problem of non square quad texturing :
http://www.xyzw.us/~cass/qcoord/
Problem is ThreeJS only let you set texture coordinates with a vec2 (for what i know ..)
And after spending hours on this,…

PBV
- 89
- 10
5
votes
2 answers
Assimp model has Textures but no Texture Coordinates
I'm using Assimp to load 3D models into my program. Everything has gone dandy so far, except I've come across a Lightwave object that doesn't seem to make sense. Of course it renders nicely in Lightwave, but in Assimp there are no texture…

GraphicsMuncher
- 4,583
- 4
- 35
- 50