# Tag Info

## Hot answers tagged normal-mapping

16 votes
Accepted

### Programmatically generating vertex normals

Computing the normal from vertex positions is quite simple using the vector cross product. The cross product of two vectors $u$ and $v$ (noted $u \times v$, or sometimes $u \wedge v$) is a vector ...
• 4,240
7 votes
Accepted

### Correct way to set normal strength

Assuming that the normal was created by differentiating some height field f(u,v): N = normalize(df_du, df_dv, 1) What you ...
• 231
6 votes
Accepted

### Minimum requirements to uniquely represent a 3D object in space

A rigid body has 6 degrees of freedom, in 3D- space. So that means you need 6 values to represent the object. The common way to do this is to store a position vector for position and 3 rotations. But ...
• 8,169
5 votes
Accepted

### Compute sphere tangent for normal mapping

You can do this a little bit more efficiently and accurately by calculating derivatives of $P$ with respect to $u, v$—or the derivatives with respect to $\phi, \theta$, equivalently (up to a scalar ...
• 23.7k
5 votes
Accepted

### How are Normal Maps created?

"decent" is quite subjective and if you are restricting the capture to certain types of surfaces and controlled lighting conditions. For example normals and other SVBRDF parameters for shiny metallic ...
• 3,566
5 votes
Accepted

### Derivative maps vs. Tangent Space Normal maps

After some researches and some answers from professionals here is my conclusion. Pros Don’t require tangents or binormals. Less interpolators. Only need two channels. less texture memory. Don’t ...
• 1,169
4 votes

### Sampling against geometry normals

That is, to my knowledge, a problem without a proper solution. You're seeing the discrepancy between shading normal and geometry normal and it becomes obvious, that the shading normal is just a trick. ...
4 votes
Accepted

### Image based lighting, tangent space coordinates, and optimization

Yes, you do need to transform the fetch direction into the space of the cubemap. If you could somehow figure out the fetch direction in the vertex shader, then you could do the transformation there ...
• 3,852
4 votes

### Screenspace Normals - Creation, Normal Maps, and Unpacking

How are screenspace normals created, and is this step before or after using normal maps or bump maps? They are created after using normal maps. In deferred rendering, you write to the various buffers ...
• 1,323
4 votes

### Does normal mapping make sense for a view of earth from space?

In my opinion, yes, it does. I've heard it claimed that in reality, the ratio of the tallest mountain on Earth to the Earth's diameter is smaller than the variations in height of an apple's skin to ...
• 3,331
4 votes
Accepted

### Normal Map Storage (Not Unit Length)

Maps with z = 1.0 everywhere are likely partial derivative maps. This is a variant on normal maps that's become fairly widespread. There are a few reasons to prefer it, but probably the most important ...
• 23.7k
4 votes
Accepted

### Inconsistent shading in pathtraced image

I have managed to fix the error. It turns out the error was never situated in the normal calulation it was the shading algorith. The floating point precision error caused the new ray to be slightly ...
4 votes
Accepted

### Extract visible vertices from a 3D geometry model

Idea A: Draw an invisible mesh that will occlude the points we don't want. Create a mesh from the point cloud. Render that mesh to a depth buffer but not to the color buffer. Render the point cloud ...
• 4,240
3 votes
Accepted

### How to compute normal of surface from implicit equation for ray-marching?

The usual way of doing this with raymarching is to define your surface as a signed-distance field and use finite differences to get the gradient of the distance function at the point you’re sampling. ...
• 2,022
3 votes
Accepted

### What is the difference between world coordinate, viewing coordinate and device coordinate in computer graphics?

The 2D pipeline involves ... [coordinate transformation terms] Can someone give me the detail differentiation among these? This is something I very recently learned while trying to understand how ...
3 votes

### Extract visible vertices from a 3D geometry model

Conceptually simplest would be to treat it as a ray-casting problem, representing each point as a small sphere. It should work like the shadow rays in a conventional raytracer: iterate over all of ...
• 6,490
3 votes

### Screenspace Normals - Creation, Normal Maps, and Unpacking

I'm trying to condense my Deferred Rendering G-Buffer. So I have some questions about getting 2-component Screenspace Normals. I know Frostbite and Killzone (the only two AAA company's G-Buffers I ...
• 166
3 votes
Accepted

### Calculate normals from vertices

You are not too far off with your second averaging approach. The problem is, that the area is the wrong weighting factor for what you want to achieve. You want each of the 3 sides of the cube to ...
• 1,175
3 votes

### How do you apply a normal map to a 3d mesh?

There are numerous approaches to setting up tangent bases on a mesh, and unfortunately, no totally universal standard for how they are calculated. Tangents are based on the mesh's UV mapping, so that ...
• 23.7k
3 votes
Accepted

### How to draw surface normals from surface normal maps?

Typically the normal vector, which has XYZ components in [−1, 1] is linearly mapped to the RGB range [0, 255]. You can retrieve the normal vector by reversing this mapping. For completeness, the ...
• 23.7k
3 votes
Accepted

### Why do normal maps perturb existing normals as opposed to 'overwriting' them?

By "perturb the existing surface normal", I think what you mean is that we use normal maps defined in tangent space, so that when the normal map is applied it acts as a displacement (loosely ...
• 23.7k
2 votes
Accepted

### How to blend World Space Normals

Huge thanks to @MJP who answered this. The aim is to avoid the simplification made when using tangent space normals. Here is the paper : Blending in detail But only implement equation (4) which gives ...
• 1,169
2 votes
Accepted

### Rotation matrix for a 3D object in space

Skimming the math. Starting with a quaternion $Q=w+\left(x,y,z\right)$ then we can rotate $\mathbf{v}$ by: $$\mathbf{v}' = Q\mathbf{v}Q^{-1}$$ and if $Q$ is unit magnitude this reduces to: \...
• 154
2 votes

### NormalMap problems: bumps work, but shade does not

Silly me, posting all of this hoping to get someone to solve it for me, I managed to find the solution tho, but perhaps more as a result of trial and error, than of actual understanding. Either way, ...
• 203
2 votes
Accepted

### Finding the normals of a tileable 2D surface extracted from 4D space

Since the question was somewhat clarified I will formalize both the question and the answer for future readers. Having a differentiable scalar field $f : \mathbb{R}^4 \rightarrow \mathbb{R}$ we want ...
• 1,837
2 votes
Accepted

### Is orthonormal tangent space an industry standard for use of tangent space normal maps?

The Orthonormal TBN tends to be the most popular. I can't speak to every piece of software out there, that question is better asked on sites specific to the software. One reason for its popularity is ...
• 2,132
1 vote

### What is a 0 "null" normal map? Or Unlit shader

In the most common normal map encoding, an RGB value of (0.5,0.5,1) would be uniformly flat. If the shader is meant to be unlit, you should be able to remove anything in the code that’s using the ...
• 2,022
1 vote
Accepted

### Wrapping normals around a sphere

Turns out I needed to be looking at the former normal as a unit vector $(\hat{r}, \hat{\theta},\hat{\varphi})$, and then use a rotation matrix as outlined here to find $(\hat{x},\hat{y},\hat{z})$.
1 vote

### How is this normals map supposed to work?

Yeah, that doesn’t look like any bump, height, or normal map I’ve ever seen—as you’ve identified, there’s only information about the surface contour along a single axis. If anything, it looks like it’...
• 2,022

Only top scored, non community-wiki answers of a minimum length are eligible