Author Topic: Detecting if a map is lit?  (Read 2282 times)

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Detecting if a map is lit?
« on: December 10, 2007, 12:51:00 AM »
Is it possible to detect if a map is lit?

Eiii

  • Autococker
  • Posts: 4595
Re: Detecting if a map is lit?
« Reply #1 on: December 10, 2007, 01: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.

KiLo

  • Autococker
  • Posts: 2086
Re: Detecting if a map is lit?
« Reply #2 on: December 10, 2007, 05:02:05 AM »
Mapping section.

Eiii

  • Autococker
  • Posts: 4595
Re: Detecting if a map is lit?
« Reply #3 on: December 10, 2007, 09: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.
« Last Edit: December 10, 2007, 10:20:32 AM by Eiii »

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Re: Detecting if a map is lit?
« Reply #4 on: December 10, 2007, 11:10:24 AM »
Quote
Mapping
Anything related to level design. New map releases go here as well.

y00tz

  • Autococker
  • Posts: 2742
Re: Detecting if a map is lit?
« Reply #5 on: December 10, 2007, 11:26:25 AM »
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...


sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Re: Detecting if a map is lit?
« Reply #6 on: December 10, 2007, 12: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.

Eiii

  • Autococker
  • Posts: 4595
Re: Detecting if a map is lit?
« Reply #7 on: December 10, 2007, 03:22:51 PM »
Pph. The map format doesn't have anything to do with mapping itself.

Anyway, potential solution to problem. According to this, says something about 'lightmap' being -1 if there's no lightmap, so it's totally detectable.
« Last Edit: December 10, 2007, 10:54:54 PM by Eiii »

James

  • 68 Carbine
  • Posts: 336
Re: Detecting if a map is lit?
« Reply #8 on: December 10, 2007, 06:04:07 PM »
Just look at it. If there are changes in the lights and shadows anywhere on the map, then it's lit.

Cobo

  • Autococker
  • Posts: 1362
Re: Detecting if a map is lit?
« Reply #9 on: December 10, 2007, 06:43:23 PM »
He needs it to be analysed automatically by reading the BSP file.

Zorchenhimer

  • Autococker
  • Posts: 2614
Re: Detecting if a map is lit?
« Reply #10 on: December 10, 2007, 10:44:30 PM »
Pph. The map format doesn't have anything to do with mapping itself.

Anyway, potential solution to problem. According to this, 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

Eiii

  • Autococker
  • Posts: 4595
Re: Detecting if a map is lit?
« Reply #11 on: December 10, 2007, 10:55:01 PM »
Fixed.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Detecting if a map is lit?
« Reply #12 on: December 20, 2007, 12:18:37 AM »
I should put lightmap detection in the game code and not allow any unlit maps in rotation. :P

Eiii

  • Autococker
  • Posts: 4595
Re: Detecting if a map is lit?
« Reply #13 on: December 20, 2007, 12:26:47 AM »
That would be just about the best thing ever. Do it for VISing, as well!

y00tz

  • Autococker
  • Posts: 2742
Re: Detecting if a map is lit?
« Reply #14 on: December 20, 2007, 12:27:35 AM »
Haha do it :P