Page 3 of 3

Re: Putting .ASE models in the game...

Posted: Mon Mar 07, 2011 10:15 pm
by -JoFFa-
It does. I see the light above the ship and the ship is lit regardless the light sources even on D2 original levels. And its either a bug or its me - If its first i have to put a bug report on SF net if not - i have to save ASE file correctly.

Re: Putting .ASE models in the game...

Posted: Mon Mar 07, 2011 11:54 pm
by Pumo
You still have not made clear which lighting method are you using on D2X-XL. (from 'basic' to 'highest')

Re: Putting .ASE models in the game...

Posted: Tue Mar 08, 2011 4:01 am
by Sirius
What is this "light above the ship"? Is it some visible disembodied glow that seems to come from nowhere? Because that's probably not supposed to happen.

The fact that the ship is somewhat lit regardless of the presence of light sources, though, is by design - Diedel already explained this.

Re: Putting .ASE models in the game...

Posted: Tue Mar 08, 2011 9:20 am
by karx11erx
Well ... Joffa has finally seen the light.

Hallelujah!

Re: Putting .ASE models in the game...

Posted: Tue Mar 08, 2011 10:11 am
by Pumo
lol :rofl:
That was a good one!

Re: Putting .ASE models in the game...

Posted: Tue Mar 08, 2011 8:33 pm
by -JoFFa-
hahhahh..;) Seriously though - i'll provide screen here:

Image

Here you see the correct lighting. because the "light which follows" sometimes disables itself - therefore i think that its something related to a cube light or so. thats why i asked about light sources in the first place,

Image

And here i can see that the ship is lit by the light which is tied to a certain point of it. When light turned on. I dont understand due to what.

Ship moves and light does follow. And i got no idea why - i';m i the reason or its a bug and i hve to write it to the SF.

Re: Putting .ASE models in the game...

Posted: Tue Mar 08, 2011 8:35 pm
by -JoFFa-
Pumo wrote:You still have not made clear which lighting method are you using on D2X-XL. (from 'basic' to 'highest')


its seems its vertex lighting for ship in any case. shadowmaps work only for calculation of the level walls geometry i think.

Re: Putting .ASE models in the game...

Posted: Tue Mar 08, 2011 8:52 pm
by karx11erx
There is some average segment light computed based on the light sources around, and on the 2nd shot the ship is illuminated less by the green and more by the white lights around.

Re: Putting .ASE models in the game...

Posted: Tue Mar 08, 2011 11:15 pm
by -JoFFa-
Yup. But as you can see - there is no lamps above or near him. And while ship is near the green lamp - there is no white light from center of the model. and the green light directly influencing the shading of the ship without the intervention of the white lamp - which is off then. but as soon as pyro is gone farther from the green lamp allthough pyro is still in the same cube - the white light starts to turn itself on and off and i cant figure what is influencing on it.

Re: Putting .ASE models in the game...

Posted: Wed Mar 09, 2011 2:46 pm
by -JoFFa-
karx11erx wrote:There is some average segment light computed based on the light sources around, and on the 2nd shot the ship is illuminated less by the green and more by the white lights around.


Can you tell me how the falloff is computed? Is it plain sphere around the light - with certain radius - a or it depends on the size of the cube?

Image

Re: Putting .ASE models in the game...

Posted: Wed Mar 09, 2011 2:59 pm
by karx11erx
Why should I?

Re: Putting .ASE models in the game...

Posted: Wed Mar 09, 2011 4:24 pm
by -JoFFa-
Nevermind. Forget it.

Re: Putting .ASE models in the game...

Posted: Wed Mar 09, 2011 6:28 pm
by Sirius
Read the code maybe :mrgreen:

Re: Putting .ASE models in the game...

Posted: Wed Mar 09, 2011 6:32 pm
by karx11erx
Joffa,

google for the OpenGL lighting model. That's basically what I am using. Since in Descent, the entire face emits light when bearing a light texture, I am not using point lights for lightmap calculation, but area lights (distance of a pixel to the light is the distance to the closest point of the entire light face).

Depending on lighting model chosen, D2X-XL computes the average segment light using the nearest/strongest X light sources.

Re: Putting .ASE models in the game...

Posted: Thu Mar 10, 2011 9:48 am
by -JoFFa-
Thanks.