# Tag Info

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,420
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 ...
• 241
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 ...
• 25.1k
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,437
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,222
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,646
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,229

### 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,421

### 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,353

### 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. ...
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,420
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 ...
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 ...
• 25.1k
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 ...
• 25.1k
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 ...

### 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,840

### 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 ...
• 176
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,251

### 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 ...
• 25.1k
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 ...
• 25.1k

### Derivative maps vs. Tangent Space Normal maps

I assume that you're using precomputed height map derivatives rather than calculating them on the fly (for details see this post on Mikkelsen's blog). If we need to supply pre-computed height ...
• 163