Game Development Community

Lighting problem with 'player

by intangir · in Torque Game Engine · 07/05/2008 (3:05 am) · 9 replies

I just got up and running with 1.5.2 after a long break

its nice to see the lighting pack is built in now but im noticing a weirdity

on windows the player model (the orc) is being nicely lit by the environment dynamically (he walks near lights, that side of him is light more than the other.. etc)

but on linux (and im pretty sure i had this working before) the player isnt being dynamically lit at all
hes just brightly lit all the time no matter what, as if hes standing in a fully brightened room even in the dark, and it never varies

the lighting of his CROSSBOW DOES vary though, so it would certainly seem its perfectly capable of dynamically lighting things, but its not doing it for the player (only his crossbow)

its not doing it for other player objects either, like the bot, not even for static player objects that i add, the static ORC object isnt being lit right, (non animating static)

#1
07/05/2008 (3:06 am)
Oh also i built the linux version myself

the windows version i just used the precompiled exe the installer gives
#2
07/05/2008 (3:15 am)
And to even further confuse the situation, i tried running the binary that was included in 1.5.2 for linux

it actually DOES dynamically light the character based on his position near lights in the map
issue here is that it seems to be the exact opposite of correct
the side of him facing away from the light is brightest, and the side facing toward the lights is darkest..

at least it works though.. not sure what to make of it but if i could get my own personal builds of the engine to at least work like this thats a start
#3
07/05/2008 (3:26 am)
One more thing, it works perfectly when i run the windows version on linux using wine...
#4
07/05/2008 (9:27 am)
...
#5
07/05/2008 (10:31 am)
Its gcc 4.2.3 thats doing it

gcc 4.1.2 works where its reversed (the shadowy side is light, the side facing the light is dark..)

gcc 4.2.3 is the one thats having the problem, when it first loads up it looks fine, but the second i move it just shows full bright..

so its apparently a compiler issue (both dont work 100% right, but 4.1.2 works better)
#6
07/05/2008 (10:55 am)
...
#7
07/05/2008 (11:15 am)
Im trying with -fno-strict-aliasing if thats the part you meant

i didnt read the whole thread cause its talking about all older versions so i dont know if thats the same issue

trying the -fno-strict-aliasing thing though (compiling)
#8
07/05/2008 (11:22 am)
...
#9
07/05/2008 (11:23 am)
OMG! it totally fixed in every way!!!!!

not only does it now light the guy when using 4.2.3
but it also LIGHTS HIM CORRECTLY :)
im getting the exact same effect as on windows :)

thanks a ton joseph that totally worked!

(why does it work? im not sure)

i only changed the -fno-strict-aliasing part though