Questions tagged [normals]

In geometry, an object such as a line or vector is called a normal to another object if they are orthogonal to each other.

In geometry, an object such as a line or vector is called a normal to another object if they are orthogonal to each other.

References

485 questions
56
votes
6 answers

Calculating normals in a triangle mesh

I have drawn a triangle mesh with 10000 vertices(100x100) and it will be a grass ground. I used gldrawelements() for it. I have looked all day and still can't understand how to calculate the normals for this. Does each vertex have its own normals or…
Vince
  • 613
  • 1
  • 7
  • 8
28
votes
2 answers

Calculate surface normals from depth image using neighboring pixels cross product

As the title says I want to calculate the surface normals of a given depth image by using the cross product of neighboring pixels. I would like to use Opencv for that and avoid using PCL however, I do not really understand the procedure, since my…
ttsesm
  • 917
  • 5
  • 14
  • 28
23
votes
1 answer

OpenGL - How to calculate normals in a terrain height grid?

My approach is to calculate two tangent vectors parallel to axis X and Y respectively. Then calculate the cross product to find the normal vector. The tangent vector is given by the line that crosses the middle point on the two nearest segments as…
rraallvv
  • 2,875
  • 6
  • 30
  • 67
22
votes
3 answers

What is a normal in OpenGL?

I heard that I should use normals instead of colors, because colors are deprecated. (Is that true?) Normals have something to do with the reflection of light, but I can't find a clear and intuitive explanation. What is a normal?
mk.
  • 11,360
  • 6
  • 40
  • 54
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
13
votes
1 answer

General method for calculating Smooth vertex normals with 100% smoothness

I've looked online for quite some time and can't find an answer to this. For simplicity, let's just assume I need to fully smooth out the normals of a group of cojoined faces. I want to find the actual geometric bisector between a group of vectors,…
Banderi
  • 656
  • 3
  • 7
  • 29
12
votes
1 answer

Calculating normals between 2 meshes ending up in seams

My Task I currently creating a terrain for Unity3D which is specialized for mobile-devices with low memory for a running app. Allowing a terrain with a size of 15.000 x 15.000 kilometers and a height from -1.000 meters to 10.000 meters and it's only…
Felix K.
  • 6,201
  • 2
  • 38
  • 71
11
votes
3 answers

Per-Vertex Normals from perlin noise?

I'm generating terrain in Opengl geometry shader and am having trouble calculating normals for lighting. I'm generating the terrain dynamically each frame with a perlin noise function implemented in the geometry shader. Because of this, I need an…
Nitrex88
  • 2,158
  • 2
  • 21
  • 23
10
votes
1 answer

Can I specify per face normal in OpenGL ES and achieve non-smooth/flat shading?

I want to display mesh models in OpenGL ES 2.0, where it clearly shows the actual mesh, so I don't want smooth shading across each primitive/triangle. The only two options I can think about are Each triangle has its own set of normals, all…
ChrHansen
  • 1,502
  • 1
  • 14
  • 22
10
votes
3 answers

transform world space normals to screen space normals

What is the proper way to transform surface normals defined in world space to normals in screen space? I don't think they can simply be multiplied by the projection matrix, because perspective division transforms things into clip space and as far as…
matthias_buehlmann
  • 4,641
  • 6
  • 34
  • 76
9
votes
1 answer

FbxSDK breaks normals

I am trying to export a skinned mesh. For some reasones FbxSDK breaks normals on edges of segments if I add a skin cluster to a mesh. Without a skin everything looks totally fine. Example: Code: FbxLayerElementNormal *layerElementNormal =…
VenoMKO
  • 3,294
  • 32
  • 38
9
votes
1 answer

LibGDX mesh heightmap normals and lights

I am trying to get mesh normals and lights working in LibGDX project. I already have textured mesh generated from heightmap texture pixels. The problem is I cannot get normals lighted up correctly. Also Im not 100% sure I have normal vertices…
dek_vault
  • 151
  • 1
  • 5
8
votes
5 answers

Tangent, binormal and other shader-related things

Many of the mapping techniques including normal bump mapping, parallax mapping and others require the special per-vertex tangent-space basis (tangent, normal, binormal / bitangent). This obviously means that my models should not only export vertex…
Yippie-Ki-Yay
  • 22,026
  • 26
  • 90
  • 148
8
votes
1 answer

Getting consistent normals from a 3D cubic bezier path

I'm writing a BezierPath class that contains a list of BezierPoints. Each BezierPoint has a position, an inTangent and an outTangent: BezierPath contains functions for getting linear positions and tangents from the path. My next step is to provide…
Vesuvian
  • 697
  • 1
  • 7
  • 22
8
votes
1 answer

Using quaternions for tangent space normal mapping - Problems I'm having

Inspired by crytek's presentation on using quaternions to store tangent space in quaternions for smaller vertices, I came to the logical conclusion that if you can use quaternions to store tangent space, then you could also lerp quaternions between…
Haydn V. Harach
  • 1,265
  • 1
  • 18
  • 36
1
2 3
32 33