Skip to content
Snippets Groups Projects
Commit a771de18 authored by biwa's avatar biwa
Browse files

OBJ Exporter: once again trying to fix normals

parent 72ff5ecf
No related branches found
No related tags found
No related merge requests found
......@@ -653,8 +653,10 @@ namespace CodeImp.DoomBuilder.BuilderModes.IO
Dictionary<WorldVertex, VertexIndices> vertsData = new Dictionary<WorldVertex, VertexIndices>();
foreach(WorldVertex[] verts in group.Value)
{
//vertex normals. biwa not sure why I need to invert the normal, but it seems to be necessary
Vector3D n = new Vector3D(verts[0].nx, verts[0].ny, verts[0].nz).GetNormal() * -1;
//vertex normals. biwa not sure why I need to invert the normal's y component, but it seems to be necessary
Vector3D n = new Vector3D(verts[0].nx, verts[0].ny, verts[0].nz).GetNormal();
n.y *= -1;
int ni;
if(uniqueNormals.ContainsKey(n))
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment