The normals tag has no wiki summary.
1
vote
2answers
138 views
Why are normal maps in tangent space but not in normal space?
I want to implement normal mapping in my little game engine. When getting into normal mapping, I wonder why normal maps are typically in tangent space but not in normal space? That normal maps in ...
5
votes
1answer
366 views
How to do simple bump mapping
I'm trying to do bump mapping, and I'm getting fairly close at achieving my goal. I miss one crucial piece of my puzzle to have bump mapped effect in my scene; I need to transform the normals from my ...
0
votes
0answers
78 views
Efficiency of normal calculation
I've loaded a model into my program from a file. I have it rendering just fine in opengl(Using vbos, in case anyone is wondering). I have the normals loaded and applied as well, however my program is ...
8
votes
4answers
512 views
OpenGL: why do I have to set a normal with glNormal?
I'm learning some basics of OpenGL but I'm wondering why there is a call glNormal to set the normal of vertices.
If I create a simple triangle like this:
glBegin(GL_TRIANGLES);
...
2
votes
1answer
84 views
Pixelated Normal Generation
I am generating normals for each vertex in a standard 512*512 quad. Yet when I do using the following code:
public Vector3f[] normals(Vector3f[] surface){
Vector3f[] normals = new ...
3
votes
1answer
123 views
Can't get normals to work correctly with lighting in OpenGL [closed]
I'm trying to light up a simple 2d triangle with my cursor as a diffuse light source but can't seem to set the normal correctly for the lighting to look right. The function that calculates the normal ...
1
vote
1answer
402 views
Blender mesh mirroring screws up normals when importing in Unity
My issue is as follows:
I've modeled a robot in Blender 2.6. It's a mech-like biped or if you prefer, it kindda looks like a chicken. Since it's symmetrical on the XZ plane, I've decided to mirror ...
1
vote
0answers
134 views
Vertex Normals, Loading Mesh Data
My test FBX mesh is a cube. From what I surmise, it seems that the cube is on the extreme end of this issue, but I believe that the same issue would be able to occur in any mesh:
Each vertex has 3 ...
3
votes
5answers
703 views
Normalization of Vectors: Return a copy of the result or alter the object itself?
When calculating the normal of a vector, which is considered canon:
Returning a copy:
Vector2D Vector2D::Normalize() const {
double a1 = GetX();
double a2 = GetY();
double a3 = GetZ();
...
1
vote
1answer
268 views
Why isn't my lighting working properly? Are my normals messed up?
I'm relatively new to OpenGL and I am trying to draw a 3D model (loaded from a 3ds file using lib3ds) using OpenGL with lighting, but about half of it is drawn in black.
I set up the light as such:
...
5
votes
3answers
837 views
2D AABB vs AABB Sweep : How to calculate hit normal?
I've implemented a 2D AABBvsAABB sweep cast into my game, however, I'm having difficulty calculating the hit normal of the sweep cast.
I have the sweep direction, both a and b AABB positions and xy ...
0
votes
3answers
934 views
Fastest solution to compute normal
A physics engine return a deformed mesh (only geometry vertices).
I take this mesh to render the geometry (~500000 vertices).
What is the fastest solution and the least expensive to compute normal ...
5
votes
1answer
1k views
How do I calculate the normal of a plane defined using homogeneous coordinates?
I can define a plane in 3D space using three 3D points (p0, p1, p2) that all lie in the plane and that form a non-degenerate triangle. Calculating the normal of the plane is as simple as calculating ...
1
vote
2answers
997 views
Calculating the 2D edge normals of a triangle
What's a reliable way to calculate a 2D normal vector for each edge of a triangle, so that each normal is pointing outwards from the triangle?
To clarify, given any triangle - for each edge (e.g ...
5
votes
1answer
393 views
How can I calculate a vertex normal for a hard edge?
Here is a picture of a lovely polygon:
Circled is a vertex, and numbered are its adjacent faces. I have calculated the normals of those faces as such (not yet normalized, 0-indexed):
Vertex 1 ...
2
votes
3answers
481 views
3Ds Max is exporting model with more normals than vertices
I made a simple teapot with the "Create Standard Primitives" option and exported it as a collada file, ended up with this:
< float_array id="Teapot001-POSITION-array" count="1590">
< ...
2
votes
2answers
538 views
How to interpolate a height-map with normals
My Task
I want to interpolate a heightmap by using the normal of each nearby point of the heightmap which is calculated before. When having 4 Points before i gonna have 9 points after it. ( See this ...
0
votes
0answers
96 views
directx 10 shadowing weirdness
I'm getting some really weird shadowing on this directx 10 sdkmesh model.
http://jacobsgriffith.com/directx10/weirdshadows.png
Where do I look in my code to fix this issue, is it an issue with the ...
3
votes
1answer
392 views
Unusual Lighting Effects - Random Polygons Coloured
I am working on creating an object loader for use with iOS, I have managed to load the vertices, normals and face data from and OBJ file, and then place this data into arrays for reconstructing the ...
3
votes
1answer
956 views
Normal transformation and homogeneous coordinates
I'm very confused about the math behind the model/affine transformation expressed in homogeneous coordinates.
Reading this article, I understood that a generic vector is transformed by multiplying it ...
1
vote
1answer
700 views
Calculating vertex normals on the GPU
I have some height-map sampled on a regular grid stored in an array. Now, I want to use the normals on the sampled vertices for some smoothing algorithm. The way I'm currently doing it is as follows:
...
1
vote
2answers
210 views
A little bit confused on how to set normals in this case
I'm learning how to use VBOs and I'm following up on the tutorial at the bottom of this page.
So I went ahead and created a structure Vertex to hold vertex data.(coordinates and normals).
struct ...
2
votes
1answer
763 views
How do I determine the collision normal in an axis aligned bounding box collision?
I have a 3d moving box and a stationary box. I can detect collisions ok but now I would like to slide the moving box against the stationary box as a collision response. For this I need the normal of ...
6
votes
1answer
1k views
Given a plane and a point, how can I determine which side of the plane the point is on?
Given the point
Vector pos = new Vector(0.0, 0.20156815648078918, -78.30000305175781, 1.0);
and the plane (triangle)
Vector a = new Vector(-6.599999904632568, 0.0, -78.5, 1.0);
Vector b = new ...
3
votes
1answer
693 views
Triangle Strips and Tangent Space Normal Mapping
Short:
Do triangle strips and Tangent Space Normal mapping go together?
According to quite a lot of tutorials on bump mapping, it seems common practice to derive tangent space matrices in a vertex ...
7
votes
6answers
778 views
Does one need normals for a strictly 2d Game?
I'm starting to learn OpenGL by creating a pure 2D game.
I have to decide on the format of the Vertices. Do I need a normal component? Or is this for a 2d component not needed?
My gut feeling says I ...
2
votes
3answers
3k views
best way to compute vertex normals from a Triangle's list
hi
i'm a complete newbie in computergraphics so sorry if it's a stupid answer.
i'm trying to make a simple 3d engine from scratch, more for educational purpose than for real use.
for now i compute ...
3
votes
2answers
949 views
How to create per-vertex normals when reusing vertex data?
I am displaying a cube using a vertex buffer object (gl.ELEMENT_ARRAY_BUFFER). This allows me to specify vertex indicies, rather than having duplicate vertexes. In the case of displaying a simple ...
4
votes
5answers
4k views
Any reliable polygon normal calculation code?
Do you have any reliable 3d polygonal face normal calculation code?
Any language will do, I'll port it to make it work. Even if you find some code in a 3d game engine and post it here I'll be more ...
2
votes
2answers
654 views
C# XNA Normals Question
I have been working on some simple XNA proof of concept for a game idea I have as well as just to further my learning in XNA. However, i seem to be stuck on these dreaded normals, and using the ...
4
votes
4answers
1k views
How to find two perpendicular lines given a single plane
Hey guys, i was wondering how i would go about finding the perpendicular lines relative to a surface normal.
For instance say i have (0,0,1) the expected output would be (1,0,0) and (0,1,0). What ...
7
votes
2answers
547 views
How do I generate surface normals?
I have quite a few debug drawing methods in my engine that can generate geometry useful for debugging, like spheres and cubes.
At the moment I do not generate any normals for these shapes. Is there ...
