Questions tagged [normals]
A vector that is perpendicular to an object's surface.
164
questions
0
votes
0
answers
65
views
Normals deformation with FFD
I am developing an FFD tool in Unity for the needs of a level designer. It works similarly to FFD box in 3DS Max. I used the implementation described by Sederberg and Parry with a lattice and ...
0
votes
1
answer
47
views
Mesh normals create square pattern on surface
Whether I import a smooth shaded mesh from Blender or I generate a mesh in Unity manually using Unity's built in normal calculation function, I get a square grid pattern showing for the shading of my ...
2
votes
0
answers
80
views
How to choose the normal for collision?
Here two objects collide and I use impulse to calculate the velocity after the collision.
But because there are two objects, there are two normals. Calculating impulse only requires one normal.
My ...
0
votes
0
answers
33
views
tangents and bitangents or larger textures?
This is more of a performance question than anything, but some time ago I learned that to put normal maps in OpenGL 3D rendering, I could do it in two ways... The first is generally what most people ...
2
votes
0
answers
94
views
Calculate Up Vector of Object on Surface Given Points and Normals
Context
I want to find the up vector an object would have if it were leaning on a surface, given a large amount of points on that surface and their associated surface normals (i.e., an equation that ...
0
votes
0
answers
37
views
Surface Lit on Wrong Side (UE 5.3)
I have a triangular mesh and a directional light in UE 5.3.2. The directional light is facing in +Z direction (up). Can anyone explain to me why the top surface is lit instead of being in a shadow (i....
0
votes
1
answer
37
views
Dark spot glitch in normal mapping shader - WebGPU
I'm implementing a normal mapping PBR shader using WebGPU, but I'm getting a strange dark spot and visual glitches. My scene consists of a cube with a brick texture which has a normal map, as well as ...
21
votes
2
answers
8k
views
What is a "normal" in game development
I'm new in Game development and probably this is a silly question.
I had a look online but haven't found a clear answer, I did it bit quick but enough to evaluate that this is a confusing topic ...
0
votes
2
answers
127
views
How does unity refer a to a normal when there are so many?
When an object collides with another object, does unity calculate the normal, or return it from the list of normals?
10
votes
3
answers
9k
views
How do game engines avoid recalculating normals upon mesh rotation?
Assume that a face of a mesh is defined by vertices A, B, C and that the normal of the face ...
1
vote
1
answer
3k
views
How To Convert World Space Normal To Tangent Space?
This question is a continuation of this post on How To Make Seamless Custom CubeMap?
The idea is to create a cube map with procedurally generated noise, extract the noise and a normal map of the noise ...
0
votes
0
answers
177
views
How I can compute normals vectors for a tessellated terrain?
I would like compute normals vectors for a tessellated terrain generated procedurally, in order to use them for a basic lighting. I don't know how I could do it. I can do it in the Tessellation ...
0
votes
0
answers
550
views
How I can compute normals in a tesellated terrain?
I'm trying to generate a terrain using tessellation. I tesselate patches, so the amount of data passed to the GPU is 4 * numberOfPatch * numberOfPatch.
My problem ...
1
vote
3
answers
1k
views
Explain how Inigo Quilez calculates SDF box normals
Inigo Quilez's website has a page of 3D ray-surface intersectors, one of which is for a basic 3D box:
...
1
vote
1
answer
166
views
Given a quad in 3D space with two diagonally opposite points and normal, how would I find the other two points?
Image attached below for clarification:
So here we have a plane with a random rotation in 3D space, and we have the values for P1, P2, and the plane normal. How do I find the points X1 and X2?
This ...
2
votes
0
answers
212
views
Object reshaped by morph target retains shading from its original shape
I created an asset with a morph target in Blender. I captured GIFs of manipulating morph targets from 0 to 1 in both applications. When the morph target is 0, the mesh is serrated. It is correct to ...
0
votes
0
answers
434
views
Prevent the vertex normals from being recalculated when a skeletal mesh is deformed?
I am trying to create a game with stylized shading like Arc System Works Style, which requires the normals to be edited by hand (I do so in Blender). However, after importing to Unreal Engine, these ...
0
votes
1
answer
197
views
Why would some assets require a transposed TBN matrix?
I'm writing an OpenGL/DX11 Windows/Linux "engine" and I've encountered a confusing behavior in DX, specifically. For math, I'm using GLM, which means all of my HLSL ...
2
votes
0
answers
17
views
Create a quad that faces a given normal [duplicate]
Let's imagine that we have a given normal, (it could be done with source and destination points but let's say that source is 0 0 0 and the destination has been already normalized)
What could be the ...
0
votes
1
answer
24
views
Math function equivalence for deferred transparency blending
if one consider the following blending operation:
color1*src_alpha blended with color2*(1-src_alpha)
Where ...
0
votes
1
answer
290
views
Broken back face culling
I have an issue with back face culling in my engine on the monkey model from Blender exported as .obj format. However, with the box model from Blender exported the ...
0
votes
1
answer
324
views
Storage of surface and vertex normals
I am writing a program that displays a bunch of 3D objects in a room with lighting. I am doing that from scratch, so I have to implement normals calculation myself.
Say I have a set of 3D points ...
0
votes
2
answers
84
views
Convert a dot product scalar for a triangle's slope, into a translation ratio?
Struggling with accurate terminology; I've got a 3D app with triangulated terrain, where it looks like a checkerboard from the top view, where every cell is two tris, and every cell is equal size (1 ...
0
votes
0
answers
178
views
Godot some faces of imported from Blender model are darker then other
I tried to export some scene from Blender to Godot as .fbx, .dae and .glb, but every time it ...
2
votes
0
answers
27
views
Where is this quad pattern coming from? [duplicate]
I'm rendering a map generated from noise. For debugging purposes, I'm just using the normals as color. I'm not sure how good/correct my calculated normals are, either way, I'd expect a smooth colored ...
3
votes
1
answer
944
views
Why is this back-facing texture showing through?
I have a mesh of some walls and a floor that I want to be visible from both sides. I duplicated the faces and flipped their normals in Blender, then exported it as an FBX to import in Unity. I've set ...
0
votes
0
answers
236
views
python open .obj file that doesn't have normal information stored
I want to open an .obj file using retcave. Here is the code I am using:
...
14
votes
2
answers
5k
views
What are some good examples of the practical usages of cross product in game development?
I know how to calculate cross product, and know that the cross product of 2 vectors is a third vector that is perpendicular to a plane created by the first 2 vectors.
However, I have not seen any good ...
0
votes
2
answers
749
views
How to get normals from volume density grid?
I am meshing my volume density data with marching cubes. The density data is a flat array and it's elements contain a) distance from surface, b) a normal (xyz). However this normal is for the density ...
1
vote
1
answer
1k
views
Calculated surface normals for Perlin-noise are weird
I'm trying to use simplex Perlin-noise to create topography of a planet (procedurally generated). The basic sphere consists of 6 sided cube with normalized vertices.
Before adding noise the first ...
1
vote
0
answers
57
views
Trouble with Normal Matrix and Point Lighting
I'm having issues with lighting in my game. For some reason, no matter what I try, point lights appear to cut off halfway through the center of the light. I'm trying to render this light on a quad.
...
0
votes
1
answer
645
views
Calculate mesh normals with added noise
I'm creating a procedurally generated planet object in Unity. I start with a cube which is created from 6 meshes (6 sides) and normalize the vertices to get a standard sphere. The problem is that ...
1
vote
1
answer
105
views
How to handle normal vector when duplicating vertex?
I'm currently developing a UV mapping, such as the UVW Map Modifier in 3ds Max (Not Unwrap UVW Modifier).
I split the vertices of the model in the form of a primitive shape (Box, Plane, etc.) and set ...
2
votes
0
answers
81
views
Rendering smooth ground
I'm attempting to render terrain made out of a triangle mesh. The problem is that whenever I have a northwest -> southeast ramp in the terrain, I get this diamond pattern:
The issue is that at the ...
0
votes
2
answers
1k
views
How to check if two normals/directions "look at" each other?
I need to flip polygons in my application. How do I determine if two vectors face each other, like in the second image below? Note that the origin of the vectors is also important, in addition to the ...
1
vote
1
answer
171
views
Is there a way to normalize for both ways in Unity?
I have a building, built in blender, that has been imported to Unity. And I flipped every necessary piece and calculated the normals inside in blender. However, since I made the rooms inside the ...
1
vote
0
answers
87
views
If I flip the normal on a backface, do I need to flip tangent and bitangent
I have a mesh that is just a plane and need to be seen front and back.
In order to do light computation, on the back face I have to flip the normal, do I have to flip the Tangent and Bitangent?
It ...
-1
votes
1
answer
508
views
collision detection and normals from rigidbody
Until now I've been developing my player character using a Character Controller, but have since decided to switch to rigidbody due to the controller's limitations. In order for my movement code to run ...
0
votes
1
answer
441
views
Pseudocode for calculating per vertex normals for a trianglestrip mesh
I have a terrain that is defined as a trianglestrip mesh. Now I'm trying to calculate the normals of each vertex but I've realised that my normal way of calculating vertex normals only works with ...
1
vote
0
answers
731
views
Fragment shader for lighting in isometric perspective
What I'm trying to do is to achieve basic lighting in 2D from an isometric perspective.
Here I have 2 textures that are used as tiles for the ground:
Color:
Normal map:
I have a fragment ...
-1
votes
1
answer
1k
views
Generating normals from terrain heightmap
I am drawing my terrain by rendering a static quad mesh several times and then displacing vertices using a heightmap.
As such I need to generate normals. I am primarily interested in quality over ...
0
votes
0
answers
29
views
Calculate normals given vertices and indices [duplicate]
Can I calculate normals given vertices and indices? Can't figure out the code. Any help appreciated.
Edit: Could be it as simple as?:
...
0
votes
1
answer
253
views
Recalculating normals on a tesselated cubed sphere with heightmap applied
I'm learning about the graphics pipeline using C++, HLSL and DirectX 11 for my course. I'm currently tesselating a cubed sphere with an applied height map.
My issue is figuring out how to recalculate ...
0
votes
0
answers
106
views
Compute normal based on Voronoi pattern
I am applying a 3D Voronoi pattern on a mesh. Using those loops, I am able to compute the cell position, an id and the distance.
But I would like to compute a normal based on the generated pattern.
...
0
votes
0
answers
81
views
Zooming into generated map
I have generated a 1024 X 1024 heightmap using Open simplex noise. Now i want to zoom into a 64X64 area. Every pixel in the 64X64 is not 16X16 on the larger scale.
I tried just generating the area, ...
1
vote
1
answer
225
views
How to know if two surface are in the same direction?
In my code I creat a Mesh that are composed by multiple tile. those tile can have edge that are shared, and I need to know if the normal of the tile that have shared edge have the same direction, ...
1
vote
1
answer
103
views
Unity - Blender models/animations showing gaps
As part of a college project, a member of my group has made some simple chests with an open animation. Importing these into Unity though, I instantly noticed there were gaps where the faces should be. ...
0
votes
1
answer
290
views
Calculating surface normal numerically
Say I have a 2D surface defined with the use of bitmap.
I want to use this bitmap for collision detection (white color is where object can move freely, with black I mark the walls).
How can I ...
0
votes
1
answer
2k
views
Normal Matrix in plain English
I'm into shader language with Webgl and GLSL.
I've seen some tutorial about normal matrix and I don't really understand it.
I mean, I think I'm ok with the math such as:
...
0
votes
1
answer
581
views
TBN matrix for normal and parallax mapping
I'd like to refer to this question because I didn't completely answer to my problem.
I've implemented normal and parallax mapping but because of some assumptions I have to use two different TBN ...