Digital Paint Discussion Board

Development => Mapping => Topic started by: sk89q on December 10, 2007, 01:51:00 AM

Title: Detecting if a map is lit?
Post by: sk89q on December 10, 2007, 01:51:00 AM
Is it possible to detect if a map is lit?
Title: Re: Detecting if a map is lit?
Post by: Eiii on December 10, 2007, 02:05:53 AM
I would think so- the lightmap is stored in the BSP file, and it would be silly to create an all-fullbright lightmap if the map isn't RAD'd. Or, you should be able to detect the fullbrightnes, at the very least.

But how to do that? I have no clue.
Title: Re: Detecting if a map is lit?
Post by: KiLo on December 10, 2007, 06:02:05 AM
Mapping section.
Title: Re: Detecting if a map is lit?
Post by: Eiii on December 10, 2007, 10:26:04 AM
General Development section. This has very little to do with mapping, just maps themselves.

EDIT: Oh, okay. Whatever. Don't listen to me.
Title: Re: Detecting if a map is lit?
Post by: sk89q on December 10, 2007, 12:10:24 PM
Quote
Mapping
Anything related to level design. New map releases go here as well.
Title: Re: Detecting if a map is lit?
Post by: y00tz on December 10, 2007, 12:26:25 PM
I was going to move this to GD...

On topic: I'm looking into it, but if this is for your sexy database, in the meantime  you could decompile the maps and check for the value field (last on line for faces), and maybe make a "possibly lit" or "not lit" depending on whether or not it has those values...

Title: Re: Detecting if a map is lit?
Post by: sk89q on December 10, 2007, 01:23:42 PM
I'm not sure how this fits into the map database at the moment -- there are too few unlit maps to matter. Of course, it could just be put on another 'analysis' page.

By decompiling, do you mean using an external map decompiler? That's not *too* feasible.
Title: Re: Detecting if a map is lit?
Post by: Eiii on December 10, 2007, 04:22:51 PM
Pph. The map format doesn't have anything to do with mapping itself.

Anyway, potential solution to problem. According to this (http://www.gamers.org/dEngine/quake/spec/quake-spec31.html#BL7), says something about 'lightmap' being -1 if there's no lightmap, so it's totally detectable.
Title: Re: Detecting if a map is lit?
Post by: James on December 10, 2007, 07:04:07 PM
Just look at it. If there are changes in the lights and shadows anywhere on the map, then it's lit.
Title: Re: Detecting if a map is lit?
Post by: Cobo on December 10, 2007, 07:43:23 PM
He needs it to be analysed automatically by reading the BSP file.
Title: Re: Detecting if a map is lit?
Post by: Zorchenhimer on December 10, 2007, 11:44:30 PM
Pph. The map format doesn't have anything to do with mapping itself.

Anyway, potential solution to problem. According to this (http://"http://www.gamers.org/dEngine/quake/spec/quake-spec31.html#BL7"), says something about 'lightmap' being -1 if there's no lightmap, so it's totally detectable.

That link is screwed up:
http://www.gamers.org/dEngine/quake/spec/quake-spec31.html#BL7%22
Title: Re: Detecting if a map is lit?
Post by: Eiii on December 10, 2007, 11:55:01 PM
Fixed.
Title: Re: Detecting if a map is lit?
Post by: jitspoe on December 20, 2007, 01:18:37 AM
I should put lightmap detection in the game code and not allow any unlit maps in rotation. :P
Title: Re: Detecting if a map is lit?
Post by: Eiii on December 20, 2007, 01:26:47 AM
That would be just about the best thing ever. Do it for VISing, as well!
Title: Re: Detecting if a map is lit?
Post by: y00tz on December 20, 2007, 01:27:35 AM
Haha do it :P