Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / problem with lights

Author
Message
Sephnroth
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 20th Apr 2005 07:10
hey there

I have been trying to add lights to my little engine to give it a bit more feel. But my custom made .x models do not seem to be effected by it.. well, not in the way i expect. There is some shading on the terrain objects that have a multi sided cube object on them (which i use as a pillar) and zero shading that i can make out on one sided textured faces.

There appears to be sod all going on with the main player model too x.x
I have set object lighting to 1 for all models. The terrain is all instances of parent models, but i have set object lighting to 1 for the parents AND the seperate instances just incase they dont share that data. (i have tried with just parents too). The light is a directional light. I have coloured it red in this screen shot so you can see clearly what is going on.

http://www.melted.com/spectural/storage/Shisaku/lightprob.jpg

you can see a little bit of red on the pillar as i commented before. the player model appears to have zero shading and always has. ambiant light is on 30. if i set it to zero she just goes black.
the walls and hedges never appear to be effected. The ceiling and floors are made in code with planes and they get effected fine.

im lost as to what i can do about this, any suggestions?

[07:16:59-pm] « Sephnroth » you were dreaming about lee...
[07:17:13-pm] « Mouse » stfu
[07:17:22-pm] « Mouse » he was hanging himself lol
Sephnroth
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 20th Apr 2005 07:14
ok scrap that, fixed it by trying a command at random. dbSetNormalizationOn() was the key.

[07:16:59-pm] « Sephnroth » you were dreaming about lee...
[07:17:13-pm] « Mouse » stfu
[07:17:22-pm] « Mouse » he was hanging himself lol
Sephnroth
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 20th Apr 2005 07:24
sigh scrap that, set normalization made my player model get effected by lights, but my terrain models havnt changed at all.

*weeps*

[07:16:59-pm] « Sephnroth » you were dreaming about lee...
[07:17:13-pm] « Mouse » stfu
[07:17:22-pm] « Mouse » he was hanging himself lol
Sephnroth
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 20th Apr 2005 08:07 Edited at: 20th Apr 2005 08:18
okay, get this. The terrain models are effected by a light. Light 0. I colour 0 red, they go completly red. However they are hardly being touched by the other lights.
I would shrug and give in, having two lights for everything. 0 for my terrain, 1 for everything else. but everything except the terrain is effected by all the lights so they get doubly illuminated if i do that and everything just looks silly.

Why would the terrain models only be effected by light 0 and not the others? X_X

EDIT

as im talking to myself decided to start editing >>

Anyway this gets weirder. it breaks down like this:

light 0 effects my terrain walls and hedges, it doesnt effect the floors and ceilings.

if i set it to a directional light or make a new light (light 1) a directional light then it doesnt effect my walls and hedges but does effect the floors and ceilings.

both lights effect my players, monsters and doodads (rocks etc). That prevents me from simply making one of each light to code around the problem because then my players and rocks are stupidly illuminated.

Only one conclusion i can think up is this. My walls and the floors/ceilings are all made out of flat objects. the floors and ceilings plains (which at least can be viewed from both sides but not the middle) and my walls flat one-direction faces. Now, they are both rotated 90 degrees oposit on the x axis. Is this somehow whats causing the problem?

Im totally out of ideas and tired so im giving up for the night. if anyone comes up with any ideas please chip in, im so lost right now.

[07:16:59-pm] « Sephnroth » you were dreaming about lee...
[07:17:13-pm] « Mouse » stfu
[07:17:22-pm] « Mouse » he was hanging himself lol
Sephnroth
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 20th Apr 2005 08:27
haha, a last minute thing fixed it thanks to the suggestion of kentaree on irc. Flipping the plains over. it appears plains will only illuminate one side, so instead of rotating them 90 to make them a floor i had to rotate them 270. *rolls eyes*

got there in the end XD i'll leave this topic here incase someone else runs into the same problem.

[07:16:59-pm] « Sephnroth » you were dreaming about lee...
[07:17:13-pm] « Mouse » stfu
[07:17:22-pm] « Mouse » he was hanging himself lol

Login to post a reply

Server time is: 2024-04-25 18:00:03
Your offset time is: 2024-04-25 18:00:03