PDA

View Full Version : 42,13 - very small normal 0,0,0

.kju [PvPscene]
Sep 8 2007, 16:30
g&#39;day http://forums.bistudio.com/oldsmileys/smile_o.gif

do you have a clue how to fix the problem so that
ArmA won&#39;t longer complain about it?

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> Warnings in ca&#92;plants&#92;palm_02.p3d&#58;4.5
Warning&#58; ca&#92;plants&#92;bolsevnik_group.p3d&#58;0 Face 13, point 42, face points 40,
42,13 - very small normal 0,0,0[/QUOTE]

As background info.
The problem happens with OFP models (vegetation to be precise).

Sample model:
bolsevnik_group.p3d (http://mihd.net/ba8y96)

Every help is appreciated a lot&#33;

mchide
Sep 8 2007, 19:05
Select all > Points> Merge near> set 0.0001 > Ok

.kju [PvPscene]
Sep 8 2007, 21:49
Thanks mchide&#33;

We will try it http://forums.bistudio.com/oldsmileys/smile_o.gif

.kju [PvPscene]
Sep 9 2007, 11:14
Doesn&#39;t seem to help. My bro applied it for all LODs. http://forums.bistudio.com/oldsmileys/confused_o.gif

vektorboson
Sep 9 2007, 11:25
I hope you understand how normals are calculated.

There are two edge types: Smooth edges and sharp edges. The normals are calculated, depending on what edges a Quad/Triangle has. Basically: The normals for the vertices that are on a smooth edge are the average of the normals in case of sharp edges.

Let&#39;s assume you have a _double sided_ quad, that has smooth edges. Now a double sided Quad has the normal (1,0,0) on one side, and the normal (-1,0,0) on the other side. Now the average of (1,0,0) and (-1,0,0) is? Right, it&#39;s (0,0,0).

So the solution is either: Detach all vertices for double sided faces, so that both sides are independent of each other; or make sharp edges for double sided faces.

.kju [PvPscene]
Sep 9 2007, 17:07
Hello, vektorboson http://forums.bistudio.com/oldsmileys/smile_o.gif

Good to see you buddy&#33;

Quote[/b] ]I hope you understand how normals are calculated.
Well thats the basic problem. No we do not.
Models aren&#39;t our business. We just want to help certain people that they are finally able to play ArmA with decent FPS.

A short step by step guide in O2 should work though..

If anyone feels to be so kind to make it, thank you so much&#33;

vektorboson
Sep 9 2007, 19:34
1. Solution:
Take all double sided faces and remove one side. Then copy and paste those and reverse normals.
DO NOT MERGE VERTICES&#33;

2. Solution:
I don&#39;t know if this works 100%: Select all Vertices that make up the double sided faces. Press &#39;U&#39; for sharp edges, then F5 for recalculate normals.

Of course the 2. solution is easier, and you may test this, before you try the first.

Quote[/b] ]I hope you understand how normals are calculated.
Well thats the basic problem. No we do not.

A normal for a triangle is calculated that way: Take one of the vertices as the base. From this base calculate the two vectors to the other two vertices.
Now calculate the cross product of those two vectors and you have the &#39;sharp&#39; normal (of course you have to normalize that vector).

If the base vertex is shared between more faces, and you have smooth edges around that vertex, then you calculate the average of all those &#39;sharp&#39; normals.

And in case of two exactly opposing normals, you get a (0/0/0) normal for smooth edges.

Armored_Sheep
Sep 12 2007, 09:57
Any way WARRNING is not an ERROR. It will not brake the game. Most important on this warrning is to check if you see any maping or lighting distorsion on the reported part of the model http://forums.bistudio.com/oldsmileys/wink_o.gif