Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
54 views

Separating Axis Theorem contactNormal

I implemented the separating axes theorem as described in "Real time collision detection" by Ericson for my OBB vs OBB collision. Got that working. To continue with my collision response I need more ...
0
votes
1answer
104 views

The math of normal mapping without a dot product

As far as I understand the technical details about a good normal mapping they go like this: everything gravitates around the concept of vertex the artist provides an RGB image and an UV map, the UV ...
0
votes
1answer
106 views

What is wrong with my normals?

I am trying to build a cube as a composition of many quads, with each quad being composed of two triangles. All the triangles have the same size. I am dong this (instead of drawing a single cube with ...
2
votes
1answer
79 views

When using deferred rendering technique, what space should my normals be? Why?

I'm implementing a deferred shading technique and the following question arose: When storing the normals, should I transform to view space, or may I keep them in world space? Why? Will any of the ...
6
votes
1answer
214 views

Unity: Why do my normals flip during an animation?

This problem boggles my mind. I have an animation running on a face object (imported from Blender). At a few points in the animation, the normals switch direction! It causes the mesh to blink. Of ...
0
votes
2answers
177 views

How many normals are needed to have a smooth surface?

I'm trying to draw a smooth cloth surface and I have a per-pixel shader. I expect to have a smooth surface but it's not the case. I think the problem comes from my normals. The image show the surface ...
0
votes
1answer
82 views

Blender exported model has reduced quality in Unity when normals applied

I know this topic comes up a lot in forums, however I have spent the last 2 hours googling it and can not find a solution for my specific problem... I have exported this model from Blender, but when ...
8
votes
0answers
243 views

Specular banding with high specular power

We're having some issues with our ray tracing in DirectX, especially with some serious banding issues with specular. With high specular power (above 8) banding starts. I'm wondering if this is an ...
1
vote
2answers
177 views

Normals in my skinned model are not animated

I have a blender skinned mode with animation. Normals look like they are messed up. This is how it looks in Unity3D before and after animation. As you can see, my model should be lit up just like ...
2
votes
1answer
71 views

Calculating the winding and normal when programatically adding triangles to a mesh

I'm writing a program that takes a 2D planar polygon and extrudes it to a 3D mesh with a given height. I identify triangle edges that are borders of the polygon and now I'm trying to automatically ...
-1
votes
2answers
61 views

GLSL Normals not transforming propertly

I've been stuck on this problem for two days. I've read many articles about transforming normals, but I'm just totaly stuck. I understand choping off W component for "turning off" translation, and ...
0
votes
1answer
120 views

What is wrong with my specular phong shading

I'm sorry if this should be placed on stackoverflow instead however seeing as this is graphics related I was hoping you guys could help me: I'm attempting to write a phong shader and currently working ...
1
vote
0answers
48 views

Normal map lighting bug in bottom right quadrant [closed]

I am currently working on getting normal maps working in my project, and have run into a problem with lighting. As you can see, the normals in the bottom right quadrant of the lighting isn't ...
6
votes
1answer
255 views

Transforming Normals in Bump Maps

Question I have a noise texture (perlin noise, to be precise) with its value in the alpha channel and the normal components in rgb. I now wish to, on the fly, apply some function to the alpha part ...
0
votes
1answer
144 views

Transforming normal vector in GLSL

I'm looking at a basic diffuse light shader here http://en.wikibooks.org/wiki/GLSL_Programming/Unity/Diffuse_Reflection. Diffuse light needs the normal vector in eye-space, so that it can dot it with ...
0
votes
0answers
22 views

How to fix surface normal for mesh

I am developing an application that has to take STL files from users. However, some modeling programs seem to invert some of the surface normals. Basically some surface normals will be facing inward ...
1
vote
1answer
140 views

XNA Diffuse Shader Issue. Edge lighting problem. Image Attached

As you can see in this image the diffuse shading is working correctly in some places but in other places such as the the bottom of the sphere you can see the squares/triangles of the mesh. Any ...
1
vote
1answer
61 views

Why isn't the bitangent calculated?

In teh tangent space vertex attributes why is the bitangent (aka binormal) provided as an attribute instead of calculated? If the three vectors of the tangent space must be perpendicular then the ...
0
votes
1answer
140 views

Normal Map Issues

I'm experiencing a very strange result in my very simple normal map implementation on iOS 7 - OpenGL ES 2.0. I'm only using the bare parameters necessary and I'm also skipping on all the tangent and ...
3
votes
1answer
126 views

Using normals in DirectX 10

I've got a working OBJ loader that loads vertices, indices, texture coordinates, and normals. As of right now it doesn't process texture coordinates or normals but it stores them in arrays and creates ...
1
vote
1answer
93 views

Given face normal and vertices of a triangle, how to find the acyclic order of vertices?

I'm in the process of constructing a custom 3D triangle mesh. I found the vertices of the triangle in the 3D space and it's face normal. How do I find the acyclic order of vertices? If I draw the ...
1
vote
1answer
257 views

Problem calculating normals for heightmaps

So far I have been using normal avering to calculate the normals for my vertices in my heightmap, with good graphical result (see picture), however it is terribly slow. With a incresing image size the ...
0
votes
1answer
101 views

Tangent plane vectors smoothing with vertex normals [closed]

I'm trying to find a way to smooth out normals obtained from cross product of tangent and bitangent vectors calculated per face basis. I've already asked a similar question on SO, however with no ...
0
votes
0answers
32 views

Calculation of Normals in OpenGL [duplicate]

I have constructed a house in OpenGL. Here is the code from a plane that surround the house: glColor3f(1,1,0.5); glVertex3f( 0, 11.160254, 10); glVertex3f( 0, 11.160254, -10); glVertex3f(-5, 5, ...
1
vote
0answers
1k views

How can I get this Shader for Unity working with Normal maps? [closed]

So I'm by no mean a shader coder, but I've been hacking around the last few days trying to get working a shader for the sprites of the skeletal animation tool Spine in Unity that can properly use ...
1
vote
1answer
447 views

How can I calculate a terrain's normals?

Im trying to implement basic lighting in Opengl 3+ (a sun) with this tutorial : http://www.mbsoftworks.sk/index.php?page=tutorials&series=1&tutorial=11 Im building a basic terrain and its ...
0
votes
1answer
131 views

Why are some of my normals facing away from the camera?

I'm trying to use WebGL to render some simple models, and I'm running into issues where pixels near the edge of my model are passing normals to my fragment shader that point away from the camera. This ...
1
vote
1answer
147 views

How do I draw an isoline in a shader with a triangle topology?

I have some problems with my displacment. So I would like to have a simple little isoline starting in every triangles face center of the mash pointing in the direction of the corresponding faces ...
1
vote
3answers
196 views

Is it possible to gain performance by omitting vertex normals in the GPU pipe?

I am working on a rendering problem where I want to render as many raw triangles to the screen as I can with either OpenGL or DirectX with the absolute fastest performance possible. I wondered about ...
-1
votes
1answer
235 views

Make Gameobject Stand On Surface Facing Certain Direction

I want to make a biped character stand on any surface I click on. Surfaces have up vectors of any of positive or negative X,Y,Z. So imagine a cube with each face being a gameobject whose up vector ...
2
votes
1answer
173 views

XNA calculate normals for linesegment

I am quite new to 3D graphical programming and thus far only understand that normal somehow define the direction in which a vertex faces and therefore the direction in which light is reflected. I have ...
13
votes
1answer
1k views

Normals vs Normal maps

I am using Assimp asset importer (http://assimp.sourceforge.net/lib_html/index.html) to parse 3d models. So far, I've simply pulled out the normal vectors which are defined for each vertex in my ...
1
vote
1answer
135 views

XNA Strange Lighting, Shader

Hey guys, i have strange lighting problem. I've written my own "deferred lighting" shader and this happend: Pic: Normal-Map Pic: Light-Map As long as i only use one big mesh everything seems ...
2
votes
2answers
165 views

.md5mesh normals are not smooth

I'm currently working on a project that requires me to load .md5mesh format and draw it. Following this link I've managed to load the mesh into the engine successfully, but a problem arises when ...
5
votes
1answer
214 views

Coloring Terrain By Steepness Issue

Also I am attempting to implement some simple coloring by "slope" onto my planet and to do this I take the normal mapped normal "y" component and subtract it from one. Yet I am getting some strange ...
3
votes
1answer
118 views

Surface normal to screen angle

I've been struggling to get this working. I simply wish to take a surface normal and convert it to a screen angle. As an example, assuming we're working with the highlighted surface on the sphere ...
0
votes
1answer
82 views

Normals not rotated correctly

While rendering a cube to the gbuffer (diffuse, normal, depth) I noticed something odd when applying rotations. I build a world matrix for the cube as follows: Yaw = Yaw % MathUtil.PI2; Pitch = Pitch ...
1
vote
2answers
230 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
2k 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 ...
11
votes
4answers
7k 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
124 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
230 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 ...
2
votes
1answer
1k 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 ...
2
votes
0answers
209 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
2k 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
331 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
1k 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 ...
-1
votes
3answers
2k 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
2k 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
2k 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 ...