Page 1 of 1

Question about models under 3D floors

Posted: Tue Jun 19, 2012 9:50
by Enjay
A model under a 3D floor takes its light level from the containing sector rather than the light level under the 3D floor. That is known behaviour. I made a simple building that used a 3D floor as its roof. Outside the building, the light level was 176. Under the roof (inside the building) the light level was 128. I placed some models inside the building and they appeared too bright (ie they were lit by the 176 value and stood out in the 128 room). This was expected.

Front elevation of the building
Image

So, I devised what I thought would be a cunning plan. I would light the containing sector with a value of 128, put an invisible 3D floor just below the sky and set the value below the floor to 176 and then have the roof of the building set the area below the roof to 128 again. That way, everything below the sky but above the roof would be lit to 176 and everything below the roof would be at 128. I thought that this would mean that any models in the building would be lit by the 128 of the containing sector.

However, it didn't work out quite as I expected. For some reason, models on one side of the building were lit in the way I wanted (ie they were lit with a value of 128) but models on the other side were lit too brightly (176) taking their light value from the value just under the sky floor (checked by making the sky floor model sector a strobing one and the models flashed bright/dark). Everything else (walls etc) was lit as expected.

Image

I tried all sorts of heights, flags and opacity combinations but this odd situation persisted. The building itself was very simple (pretty much as the above pictures illustrate), there were no errors flagged up by the DeePsea error checker and all the models were in the same sector (ie there was only 1 sector in the building).


I no longer have the file and my attempts to recreate the situation have failed. However, and finally here comes the question:

Is it just that making such a construct is unreliable and effectively undefined behaviour or is there something more to investigate here?

Re: Question about models under 3D floors

Posted: Tue Jun 19, 2012 14:39
by Graf Zahl
Sounds like a bug. The code is supposed to get the light level from the actor's center if I remember correctly.

Re: Question about models under 3D floors

Posted: Tue Jun 19, 2012 15:34
by Enjay
OK, well if I can manage to make it happen again, I'll post an example WAD.

[edit] I wonder, would map coordinates have anything to do with it? The map in question had the models showing the problem at an X coordinate of around -8000 and Y was around 0. The map as a whole extends from X -101000 to 5000 and Y -5400 to 5200. That doesn't seem particularly big though. [/edit]

Re: Question about models under 3D floors

Posted: Tue Jun 19, 2012 17:59
by ibm5155
3D models really have a kind of problens with sector like, just comparing, do alot of 3D floors one up the other, change the lowest light to 0 and the higher floor in 255.
If you put a sprite there you can see the light change, but with a 3D model, you just see only one light change,