Page 1 of 1

Null-normals and Spring 101

Posted: 05 Mar 2016, 01:42
by azaremoth
I am trying to get the cursed fit-for-101. But lately there is any error spam in the infolog when starting the game.

What is this error spam trying to tell me? What exactly are null-normals? Why is there nothing black visible ingame?

Code: Select all

[f=-000001] Warning: [CheckPieceNormals] piece "chest" of model "objects3d/tc_bonebeast.s3o" has 16 (of 588) null-normals! It will either be rendered fully black or with black splotches!
[f=-000001] Warning: [CheckPieceNormals] piece "chest" of model "objects3d/tc_dragon.s3o" has 14 (of 210) null-normals! It will either be rendered fully black or with black splotches!
[f=-000001] Warning: [CheckPieceNormals] piece "teeth" of model "objects3d/tc_dragon.s3o" has 4 (of 44) null-normals! It will either be rendered fully black or with black splotches!
[f=-000001] Warning: [CheckPieceNormals] piece "tail9" of model "objects3d/tc_dragonqueen.s3o" has 4 (of 181) null-normals! It will either be rendered fully black or with black splotches!
[f=-000001] Warning: [CheckPieceNormals] piece "chest" of model "objects3d/tc_dragonqueen.s3o" has 18 (of 210) null-normals! It will either be rendered fully black or with black splotches!
[f=-000001] Warning: [CheckPieceNormals] piece "teeth" of model "objects3d/tc_dragonqueen.s3o" has 2 (of 44) null-normals! It will either be rendered fully black or with black splotches!
[f=-000001] Warning: [CheckPieceNormals] piece "tail10" of model "objects3d/tc_dragonqueen.s3o" has 6 (of 181) null-normals! It will either be rendered fully black or with black splotches!
[f=-000001] Warning: [CheckPieceNormals] piece "tail11" of model "objects3d/tc_dragonqueen.s3o" has 6 (of 181) null-normals! It will either be rendered fully black or with black splotches!
[f=-000001] Warning: [CheckPieceNormals] piece "chest" of model "objects3d/tc_ghoul.s3o" has 10 (of 360) null-normals! It will either be rendered fully black or with black splotches!
[f=-000001] Warning: [CheckPieceNormals] piece "chest" of model "objects3d/tc_gunner.s3o" has 6 (of 450) null-normals! It will either be rendered fully black or with black splotches!
[f=-000001] Warning: [CheckPieceNormals] piece "theeth" of model "objects3d/tc_pitt.s3o" has 4 (of 2440) null-normals! It will either be rendered fully black or with black splotches!
[f=-000001] Warning: [CheckPieceNormals] piece "chest" of model "objects3d/tc_rictus.s3o" has 4 (of 564) null-normals! It will either be rendered fully black or with black splotches!

Re: Null-normals and Spring 101

Posted: 05 Mar 2016, 02:34
by Kloot
It just means some of your models contain pieces whose normals are not unit length (the warning will fire for any with magnitude < sqrt(0.5)), which can affect lighting. You might see black splotches on them, but only in the worst case.

Re: Null-normals and Spring 101

Posted: 05 Mar 2016, 12:07
by FLOZi
I thought engine normalised to unit length?

viewtopic.php?f=14&t=23294&p=438083&hil ... er#p438083

Re: Null-normals and Spring 101

Posted: 05 Mar 2016, 12:26
by Kloot
It does, but that won't fix actual null (0,0,0) normals.

However, those might still not cause artifacts if a game uses normal mapping, in which case the raw model normals obviously don't matter for rendering.

Re: Null-normals and Spring 101

Posted: 05 Mar 2016, 14:50
by Beherith
Flozi, you cant normalize 0 length vectors.

Azaremoth, use my obj2s3o converter. http://imolarpg.dyndns.org/trac/balates ... _Converter

Use the optimize s3o option. This will get rid of your null normals correctly. You can select multiple units in the dialog (windows file dialog is like max 200 or something though).

Re: Null-normals and Spring 101

Posted: 05 Mar 2016, 15:27
by FLOZi
I know that, I was thrown by the < 0.5, misread the sqrt.

Re: Null-normals and Spring 101

Posted: 05 Mar 2016, 19:57
by Forboding Angel
I had that happening for like 2 or 3 units and a couple of projectile models. I just pulled them into upspring and recalculated the normals 3do style. I know a lot of you bristle at the thought of that, but it is an easy way to fix the issue.

Re: Null-normals and Spring 101

Posted: 05 Mar 2016, 20:07
by gajop
May want to take a look at SF then Forb. Last I checked it would get a lot of warnings for that.

Re: Null-normals and Spring 101

Posted: 23 Mar 2016, 23:08
by azaremoth
Forboding Angel wrote:I had that happening for like 2 or 3 units and a couple of projectile models. I just pulled them into upspring and recalculated the normals 3do style. I know a lot of you bristle at the thought of that, but it is an easy way to fix the issue.
That actually did the trick. As I am completely useless with/in phyton, this was the easiest way to eliminate the error spam.

Re: Null-normals and Spring 101

Posted: 24 Mar 2016, 06:06
by Forboding Angel
gajop wrote:May want to take a look at SF then Forb. Last I checked it would get a lot of warnings for that.
Yeah, a lot of the older 4+ years features never even had normals defined I don't think. Lathan's, smoth, 0ad, behe and sirarturi's should be a good, but other than those it's probably a bit of a tossup. They don't render as black though.

Re: Null-normals and Spring 101

Posted: 24 Mar 2016, 06:08
by Forboding Angel
azaremoth wrote:
Forboding Angel wrote:I had that happening for like 2 or 3 units and a couple of projectile models. I just pulled them into upspring and recalculated the normals 3do style. I know a lot of you bristle at the thought of that, but it is an easy way to fix the issue.
That actually did the trick. As I am completely useless with/in phyton, this was the easiest way to eliminate the error spam.
Python is boss, but on windows it's a pain in the ass because you have to hunt down all the needed dependencies for the program you're trying to use, which is decidedly un-fun.

Re: Null-normals and Spring 101

Posted: 24 Mar 2016, 10:35
by Beherith
Its really easy to use, GUI supplied, 1-click fix null normal solution http://imolarpg.dyndns.org/trac/balates ... gObjModels

Re: Null-normals and Spring 101

Posted: 06 Oct 2016, 05:34
by smoth
azaremoth wrote:
Forboding Angel wrote:I had that happening for like 2 or 3 units and a couple of projectile models. I just pulled them into upspring and recalculated the normals 3do style. I know a lot of you bristle at the thought of that, but it is an easy way to fix the issue.
That actually did the trick. As I am completely useless with/in phyton, this was the easiest way to eliminate the error spam.
this is a garbage fix for any part that happens to have one and you bothered to properly set your normals in your tool and to have to do it to shutup this error for all my firepoints is days of work.

can we not just turn this warning off unless you set the warning level for higher than default? because this is really not something that affects any of my models negatively.