*

Author Topic: [News] D2X-XL: Lightmaps improved  (Read 6481 times)

Offline karx-elf-erx

  • Gold
  • ***
  • Posts: 383
  • D2X-XL & DLE-XP maintainer
    • D2X-XL and DLE-XP
[News] D2X-XL: Lightmaps improved
« on: May 27, 2011, 04:22:51 AM »
After quite some effort, I have managed to significantly improve lightmap calculation in D2X-XL, producing pretty realisting static light and shadows. The backside of this is that lightmap calculation may now take significantly longer than before and the data size has been increased.

Offline Darkflamewolf

  • Gold
  • ***
  • Posts: 186
Re: [News] D2X-XL: Lightmaps improved
« Reply #1 on: May 27, 2011, 07:20:42 AM »
any hope of a legacy lightmap option? :P

Offline SaladBadger

  • Gold
  • ***
  • Posts: 602
Re: [News] D2X-XL: Lightmaps improved
« Reply #2 on: May 27, 2011, 07:36:14 AM »
you mean vertex lighting? :P

Offline karx-elf-erx

  • Gold
  • ***
  • Posts: 383
  • D2X-XL & DLE-XP maintainer
    • D2X-XL and DLE-XP
Re: [News] D2X-XL: Lightmaps improved
« Reply #3 on: May 27, 2011, 09:26:42 AM »
any hope of a legacy lightmap option? :P
What should that be?

Offline Foil

  • Gold
  • ***
  • Posts: 642
  • "I've never seen its equal."
Re: [News] D2X-XL: Lightmaps improved
« Reply #4 on: May 27, 2011, 09:41:32 AM »
I'm guessing DFW wants an option for the old lightmap calc method, since it sounds like the new/better one is more time-intensive.  <shrug>

------

Now this has me wondering: Why not store lightmap in the level (or even in a separate file somewhere), rather than regenerating it every time?  [I assume there's a reason, but I'm not sure what it would be...]

Offline Kaiaatzl

  • An unusual choice for ship's cat
  • Platinum
  • ****
  • Posts: 1918
  • beware of ounce
Re: [News] D2X-XL: Lightmaps improved
« Reply #5 on: May 27, 2011, 09:50:05 AM »
D2X-XL level authors have the option of distributing already-computed lightmaps with their levels, but no one does (well, except for Sirius with Anthology, and Karx with Boiling Point).  Would be useful for huge levels like Pumo Mines.

Offline Foil

  • Gold
  • ***
  • Posts: 642
  • "I've never seen its equal."
Re: [News] D2X-XL: Lightmaps improved
« Reply #6 on: May 27, 2011, 09:56:32 AM »
D2X-XL level authors have the option of distributing already-computed lightmaps with their levels...

Ah, didn't know this.  Thanks!

Offline karx-elf-erx

  • Gold
  • ***
  • Posts: 383
  • D2X-XL & DLE-XP maintainer
    • D2X-XL and DLE-XP
Re: [News] D2X-XL: Lightmaps improved
« Reply #7 on: May 27, 2011, 01:02:32 PM »
To have the level editor (DLE-XP) pre-compute lightmaps, it would need to be significantly expanded. D2X-XL already has all the required code. That's why lightmaps are created by D2X-XL. Since there are so many levels out there already without lightmaps, having D2X-XL compute lightmaps allows to have lightmaps for these levels, too. Once D2X-XL has computed lightmaps for a level, they are stored in the D2X-XL installation's cache folder and do not need to be recomputed (that's how level authors can distribute precomputed lightmaps together with their levels).

D2X-XL will automatically detect whether a level has changed since its lightmaps have been computed and recompute its lightmaps.

If DFW wants the old method back, she should rather use the "standard" lighting option, giving here per vertex lighting which looks better than the old lightmaps (which were, as I now know, plain broken).
« Last Edit: May 27, 2011, 01:34:21 PM by karx-elf-erx »

Offline karx-elf-erx

  • Gold
  • ***
  • Posts: 383
  • D2X-XL & DLE-XP maintainer
    • D2X-XL and DLE-XP
Re: [News] D2X-XL: Lightmaps improved
« Reply #8 on: June 01, 2011, 05:55:34 AM »
After a time and effort much greater than anticipated, the lightmap code improvements seem to have finally reached their end. The last step in the process was to add blur to lightmaps. See the result here:



Offline Foil

  • Gold
  • ***
  • Posts: 642
  • "I've never seen its equal."
Re: [News] D2X-XL: Lightmaps improved
« Reply #9 on: June 01, 2011, 06:39:27 AM »
Very nice... lighting makes such a huge difference in the feel of a given level.

Offline Kaiaatzl

  • An unusual choice for ship's cat
  • Platinum
  • ****
  • Posts: 1918
  • beware of ounce
Re: [News] D2X-XL: Lightmaps improved
« Reply #10 on: June 01, 2011, 10:16:59 AM »
@Karx - that looks awesome :o !
Now I really need to find that windows 7 cd so I can get D2X-XL running again.

Lighting, ambient sounds, and music (in that order) tend to dictate the feel of a level.

Dark and spooky... or bright and scary?  Or bright and unspooky? Try playing D1 level 2 with the regular level 2 midi, then play it with... I'll say game17... and notice the difference.  Then try level 17 with game02.

This is why game music is so important (or that's what I say).

Offline karx-elf-erx

  • Gold
  • ***
  • Posts: 383
  • D2X-XL & DLE-XP maintainer
    • D2X-XL and DLE-XP
Re: [News] D2X-XL: Lightmaps improved
« Reply #11 on: June 01, 2011, 01:39:28 PM »
D2X-XL supports placing custom ambient sounds in levels, too ... many of my levels and also some D2X-XL levels made by other authors utilize that feature. ;)

Offline karx-elf-erx

  • Gold
  • ***
  • Posts: 383
  • D2X-XL & DLE-XP maintainer
    • D2X-XL and DLE-XP
Re: [News] D2X-XL: Lightmaps improved
« Reply #12 on: June 21, 2011, 01:05:22 PM »
I have written a new worklog article about D2X-XL's improved lightmaps, featuring a lot of "sexy" screenshots.

 

An Error Has Occurred!

Cannot create references to/from string offsets