Questions tagged [bump-mapping]

Bump mapping is a technique in computer graphics for simulating bumps and wrinkles on the surface of an object.

Bump mapping is a technique in computer graphics for simulating bumps and wrinkles on the surface of an object. This is achieved by perturbing the surface normals of the object and using the perturbed normal during lighting calculations. The result is an apparently bumpy surface rather than a smooth surface although the surface of the underlying object is not actually changed. Bump mapping was introduced by Blinn in 1978.

61 questions
18
votes
3 answers

What's wrong with my normal mapping? I think it's my tangents

edit: you might want to start at "Edit 3" because I've solved a lot of this Here's a screenshot of my normal cubemap applied to an icosphere: The tangents for my cubemapped icosphere are generated with the following code. m_indices in an…
NeomerArcana
  • 1,978
  • 3
  • 23
  • 50
8
votes
3 answers

Unity3D, round the edges of a box, cube?

What's the usual way to round the edges on a cube, a rectangular object as in the examples? The ideal result would look pretty much exactly like these images. (Naturally, you could literally use a mesh that has carefully rounded edges and corners,…
Fattie
  • 27,874
  • 70
  • 431
  • 719
7
votes
1 answer

Normal Mapping and translation disrupts my lighting

I got a normal mapping issue. I have a texture and a normal texture on each model loaded via the ASSIMP library. I am calculating the tangent vectors on each object with the help of the ASSIMP library so these should be fine. The objects work…
Joey Dewd
  • 1,804
  • 3
  • 20
  • 43
6
votes
0 answers

SKSpriteNode lighting doesn't work with textures from SKTextureAtlas

I ran into a problem with SpriteKit (tried Xcode 7 beta and Xcode 6.4 on OS X 10.11 beta) where normal-mapped lighting breaks down if I create a SKTextureAtlas from the image and normal files that work when used individually. See this example: From…
CodeSmile
  • 64,284
  • 20
  • 132
  • 217
4
votes
1 answer

Normal mapping: TBN matrix different result in vertex shader compared to fragment shader

I'm working on a normal mapping implementation for a tutorial and for teaching purposes I'd like to pass a TBN matrix to the fragment shader (from the vertex shader) so I can transform normal vectors in tangent space to world-space for lighting…
Joey Dewd
  • 1,804
  • 3
  • 20
  • 43
4
votes
2 answers

Normal mapping on flat water surface produces incorrect specular highlights

I have a flat water surface with a dudv and a normal map attached to it. The dudv map works correct and the normal map is attached correct as well (visualizing the normal map looks like it should). The specular highlights are always showing at the…
ABHAY
  • 221
  • 2
  • 12
4
votes
1 answer

Setting Up GLSL Ocean Water Shader Following Nvidia GPU Gems Chapter 1

I am following the Nvidia GPU Gems Chapter 1 regarding water simulation using shaders. I am trying to follow the chapter to create an ocean water shader using glsl in OpenGL es 2.0 (iOS). I am able to create the geometric waves as described in the…
LOP_Luke
  • 3,150
  • 3
  • 22
  • 25
3
votes
1 answer

Bump Mapping with javascript and glsl

/** * A class creating buffers for a textured box to render it with WebGL */ class RasterTextureBox { /** * Creates all WebGL buffers for the textured box * 6 ------- 7 …
Lisalein
  • 51
  • 3
3
votes
1 answer

Displacement map in three.js

I'm currently using a black and white image as a bump map for my model. The model is an .obj file with the associated .mtl file for UV mapping. This is the code I use: // Load material file var mtlLoader = new…
Andres
  • 6,080
  • 13
  • 60
  • 110
3
votes
1 answer

libgdx and pre-built shaders?

I am coming from an XNA background and it was really cool to re-use shaders that other people made. There was a really cool bloom shader that was available and easy to reuse. Is there an official or are there any unofficial collections of reusable…
smuggledPancakes
  • 9,881
  • 20
  • 74
  • 113
3
votes
2 answers

Normal mapping and lighting gone wrong, not displaying correctly

I'm working on an implementation of normal mapping, calculating the tangent vectors via the ASSIMP library. The normal mapping seems to work perfectly on objects that have a model matrix close to the identity matrix. As long as I start translating…
Joey Dewd
  • 1,804
  • 3
  • 20
  • 43
3
votes
1 answer

Repeating a bump map

I'm trying to apply a bump map to a plane to create a vaguely felt-like surface using Three.js r55. Here's my code: var mapHeight = THREE.ImageUtils.loadTexture("images/felt.png"); mapHeight.repeat.set(2, 2); mapHeight.wrapS = mapHeight.wrapT =…
Drew Noakes
  • 300,895
  • 165
  • 679
  • 742
2
votes
0 answers

How to create bump map using as little RAM as possible?

I am working with Python and NumPy. I have an image: Its heightmap: I want to combine them to create a bump map like: I need to use as little RAM as possible. The formula is: newColor = oldColor+(tint-oldColor)*abs(difference)*k difference is…
2
votes
1 answer

OpenGL Normal Mapping

I'm trying to implement Normal Mapping, using a simple cube that i created. I followed this tutorial https://learnopengl.com/Advanced-Lighting/Normal-Mapping but i can't really get how normal mapping should be done when drawing 3d objects, since the…
Fra
  • 45
  • 5
2
votes
1 answer

blender2.8 gltf export for three.js with bumpmap or normalmap or roughnessmap?

I saw some discussions saying gltf does not export bumpmap but if I look into my exported gltf file (separate files mode) there is a bumpmap file with a bumpscale (and also normal map). After loading into three.js I get a meshstandard material with…
user2758635
  • 127
  • 8
1
2 3 4 5