Planet Descent

Community => Mess Hall => Topic started by: karx-elf-erx on May 27, 2011, 04:22:51 AM

Title: [News] D2X-XL: Lightmaps improved
Post by: karx-elf-erx 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.
Title: Re: [News] D2X-XL: Lightmaps improved
Post by: Darkflamewolf on May 27, 2011, 07:20:42 AM
any hope of a legacy lightmap option? :P
Title: Re: [News] D2X-XL: Lightmaps improved
Post by: SaladBadger on May 27, 2011, 07:36:14 AM
you mean vertex lighting? :P
Title: Re: [News] D2X-XL: Lightmaps improved
Post by: karx-elf-erx on May 27, 2011, 09:26:42 AM
any hope of a legacy lightmap option? :P
What should that be?
Title: Re: [News] D2X-XL: Lightmaps improved
Post by: Foil 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...]
Title: Re: [News] D2X-XL: Lightmaps improved
Post by: Kaiaatzl 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.
Title: Re: [News] D2X-XL: Lightmaps improved
Post by: Foil 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!
Title: Re: [News] D2X-XL: Lightmaps improved
Post by: karx-elf-erx 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).
Title: Re: [News] D2X-XL: Lightmaps improved
Post by: karx-elf-erx 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:

(http://www.descent2.de/images/worklog/new-lightmaps-1.jpg)
Title: Re: [News] D2X-XL: Lightmaps improved
Post by: Foil on June 01, 2011, 06:39:27 AM
Very nice... lighting makes such a huge difference in the feel of a given level.
Title: Re: [News] D2X-XL: Lightmaps improved
Post by: Kaiaatzl 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).
Title: Re: [News] D2X-XL: Lightmaps improved
Post by: karx-elf-erx 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. ;)
Title: Re: [News] D2X-XL: Lightmaps improved
Post by: karx-elf-erx 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.