Source Code Project Mantis - FSSCP
View Issue Details
0000792FSSCPOpenGLpublic2006-02-09 22:132007-01-02 14:03
ReporterMuriac 
Assigned Totaylor 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version3.6.9 
Summary0000792: Lighting really whacked on OS X builds (unless you set -ambient_factor)
DescriptionI know I mentioned this on the forum, but I figured I'd put a ticket up here because it hasn't gone away with the 20060206 build. I've found that lighting is non-existant when I don't set ambient_factor. Once I do that, the lighting looks really weird until I set noibx.
Additional InformationThis problem existed in the first OS X build, and is different now (the spots of light and dark are all much much brighter). Attached is a picture of a fighter while ambient_factor is set, but noibx is not.
TagsNo tags attached.
Attached Filespng Picture 1.png (207,590) 2006-02-09 22:13
http://scp.indiegames.us/mantis/file_download.php?file_id=450&type=bug
png

? fighter2t-03.ibx (656,714) 2006-02-10 08:59
http://scp.indiegames.us/mantis/file_download.php?file_id=451&type=bug
log fs2_open.log (13,508) 2006-03-07 17:26
http://scp.indiegames.us/mantis/file_download.php?file_id=473&type=bug
png HerculesNoCMDoptions.png (47,867) 2006-03-07 17:26
http://scp.indiegames.us/mantis/file_download.php?file_id=474&type=bug
png

Notes
(0004708)
taylor   
2006-02-09 23:27   
Can you attach one of the IBX files for the fighter as well ("figher2t-03.ibx" for the pictured fighter)?

I'm not really sure why the IBX files would affect this, they shouldn't be.
(0004709)
Muriac   
2006-02-10 08:59   
Here it is.
(0005089)
taylor   
2006-03-07 12:58   
Try as I may, I just can't reproduce this with current code. Even using your IBX file works perfectly for me. Is this still an issue for you in the newer builds?
(0005093)
Muriac   
2006-03-07 13:31   
Same as always, unfortunately. 20060228: no lighting without -ambient_factor, horrible lighting without -noibx.
(0005094)
Muriac   
2006-03-07 13:38   
Oh, I just realized I should mention this: if I enable -spec but not -ambient_factor or -noibx, I get exactly the same random lighting pattern applied to the spec map. Because I haven't set -ambient_factor, there is no other lighting.

So: omitting -noibx causes both regular lighting and specular highlights to screw up in the same way. This is why the lighter parts in the image I posted are so bright (because both specular maps and lighting are being applied to the same spots).

Omitting -ambient_factor eliminates shaded lighting.

I'm guessing these might be separate bugs.
(0005099)
taylor   
2006-03-07 17:02   
Strange. I'm not using -ambient_factor or -noibx, but I am using -spec and -glow, and it's working perfectly for me. If you don't use any special cmdline options (other than something like -window and -nograb) does it still do the lighting wrong? Were you able to get a debug log that you can attach here?

And -ambient_factor is always used, specifying it only uses a different value than the default (which is set to better match retail).
(0005100)
Muriac   
2006-03-07 17:25   
Ok, maybe the default value for ambient_factor is just too high for me to notice any lighting, so it appears flat. In which case, this is just one bug relating to IBX somehow.

I've attached my debug log from opening the tech room with an empty cmdline file. The lighting appeared flat (due to the standard value of ambient_factor). I've attached a picture too.
(0005101)
taylor   
2006-03-07 18:32   
Does it make a difference if you use 32-bit color instead of 16-bit?
(0005104)
Muriac   
2006-03-07 21:39   
Nope, same deal.
(0005444)
phreak   
2006-05-01 13:31   
still an issue?
(0005446)
taylor   
2006-05-01 13:55   
Yup. Still don't know why it happens though. It's by no means an isolated issue, but I haven't been able to replicate it yet.
(0007134)
taylor   
2006-11-15 06:15   
Hmm, I still can't reproduce this and no one else has come forward to tell me that they can. It's either fixed, or just plain no longer an issue. Will reopen at a later time if needed.
(0007371)
taylor   
2007-01-02 14:03   
Found it ... fixed it! It was some issue (still not sure what exactly) where reading info out of an existing IBX file would get incorrect data for the vertex normals. All other info was reading correctly, but with the normals messing up it screwed up all lighting.

I changed the way in which is saves and reads this information to the IBX files and that seems to have fixed it. Or at least I was getting 100% of the time, and now I can't get it to happen at all. The fix doesn't break the IBX format, so everything is still compatible.


Fixered.

Issue History
2006-02-09 22:13MuriacNew Issue
2006-02-09 22:13MuriacFile Added: Picture 1.png
2006-02-09 23:27taylorNote Added: 0004708
2006-02-09 23:27taylorStatusnew => assigned
2006-02-09 23:27taylorAssigned To => taylor
2006-02-09 23:27taylorCategorygraphics => OpenGL
2006-02-10 08:59MuriacFile Added: fighter2t-03.ibx
2006-02-10 08:59MuriacNote Added: 0004709
2006-03-07 12:58taylorNote Added: 0005089
2006-03-07 13:31MuriacNote Added: 0005093
2006-03-07 13:38MuriacNote Added: 0005094
2006-03-07 17:02taylorNote Added: 0005099
2006-03-07 17:25MuriacNote Added: 0005100
2006-03-07 17:26MuriacFile Added: fs2_open.log
2006-03-07 17:26MuriacFile Added: HerculesNoCMDoptions.png
2006-03-07 18:32taylorNote Added: 0005101
2006-03-07 21:39MuriacNote Added: 0005104
2006-05-01 13:31phreakNote Added: 0005444
2006-05-01 13:55taylorNote Added: 0005446
2006-11-15 06:15taylorStatusassigned => resolved
2006-11-15 06:15taylorResolutionopen => unable to reproduce
2006-11-15 06:15taylorNote Added: 0007134
2007-01-02 14:03taylorNote Added: 0007371
2007-01-02 14:03taylorResolutionunable to reproduce => fixed
2007-01-02 14:03taylorFixed in Version => 3.6.9