Menu

#2868 Regenerating lightmaps of unchanged level - again in 1.18.42

Windows
closed-fixed
nobody
5
2015-06-16
2015-06-14
No

Version 1.18.42 introduced unnecessary lightmap recalculating again (version 1.18.40 was OK).
I ran the new version of game, waited for recalculation, then played. After loading saved game - oops... calculating lightmap again. :-\

Discussion

  • karx11erx

    karx11erx - 2015-06-14

    Level changes are not the only criterion that trigger a lightmap recalculation. Unless 1.18.42 recomputes a lightmap that has been computed with 1.18.42, and the lightmap's level has not changed, this is not a bug!

    The proof of this bug is to take a level, have D2X-XL load the level and compute its lightmaps, quit D2X-XL, restart D2X-XL, load that level again and watch D2X-XL compute the lightmaps again!

    Lightmap recalculations between program versions can happen, once per level.

     
  • karx11erx

    karx11erx - 2015-06-14
    • status: open --> closed-invalid
     
  • Jaroslav Mazurak

    Again (as I wrote above):
    - I run the new version of the game (1.18.42);
    - load saved game from menu;
    - D2X-XL recomputes the lightmap;
    - the game begins;
    - I load the saved game again;
    - lightmap recomputing starts again.
    As I see in the CACHE directory the lightmap is updated.
    Restarting D2X-XL and loading saved game starts recomputing lightmap again.

     
  • karx11erx

    karx11erx - 2015-06-15

    Which map? Player profile? d2x.ini?

     
  • karx11erx

    karx11erx - 2015-06-15

    Did you use an old savegame, or did you load the map, had the lightmaps computed, saved the game, quit the game, loaded the (just made) save game, and lightmaps got computed again?

     
  • Jaroslav Mazurak

    I had lightmap computed by 1.18.40 and game saved by 1.18.40.
    Then 1.18.42 did recalculate lightmap.
    I have waited to end of computing lightmap and started a game. Now the lightmap should be updated (the timestamp of lightmap is updated)!
    Then I've load a saved game again and got computing lightmap again. I've interrupted them.
    After quit and run again I got computing lightmap again. I've interrupted them and wrote a ticket. :)

     
  • karx11erx

    karx11erx - 2015-06-15

    Please try again with v1.18.43.

     
  • Jaroslav Mazurak

    Still recomputing lightmaps.
    Run D2X-XL 1.18.43.
    Load game saved in previous version (level 12).
    Computing lightmaps.
    Start game.
    Save game.
    Quit.
    Run D2X-XL 1.18.43.
    Load game saved in this version.
    Computing lightmaps... (abandoned).

    ===
    Directory of C:\RELAX\D2X-XL\CACHE\LIGHTMAPS

    22.04.2015 06:43 <DIR> .
    22.04.2015 06:43 <DIR> ..
    [...]
    15.06.2015 22:11 93589462 descent2-12.lmap11
    [...]
    33 File(s) 3248434429 bytes
    ===

     
  • karx11erx

    karx11erx - 2015-06-15

    I am just looking into your problem, but a word about your settings:

    I have noticed that you are using the highest possible lightmap quality settings. Imo this is totally over the top, particularly for a standard Descent 1 or 2 mission from the official main campaigns.

    I think I should explain these settings to you.

    At highest lightmap quality settings, D2X-XL computes 256x256 lightmaps. That is an extremely high value given that even D2X-XL's high res textures are just 512x512.

    Lightmap precision affects how D2X-XL determines whether a light source can cast light on a pixel in the lightmap. To do that, D2X-XL casts rays from the light source to the pixel and checks whether these rays hit any geometry before they reach the face it is computing a lightmap for. At simple precision, D2X-XL only casts one ray from the light's center to the point of face it wants to light. At standard precision, it also casts rays from the corners of the face bearing the light. At high precision, it additionally casts rays from the centers of the light face's edges. D2X-XL will always stop as soon as the first ray reaches the face to be lit. Again, high precision is actually quite an overkill.

    I would therefore generally recommend to use high lightmap quality and standard lightmap precision, since this setting will already yield very good visual results while keeping the time required for computing lightmaps halfway in reasonable bounds.

     
  • karx11erx

    karx11erx - 2015-06-15

    Correction: Max. lightmap size is 128x128, but D2X-XL looks at up to 32 lights per face, and looks at each of them separately. This means that at highest lightmap settings you have a worst case of almost 5 million calculations and an average of 1 to 1.5 million calculations per face.

    What kind of super computer do you own to compute lightmaps at these settings? I do have a good machine, and I don't go any higher than high/standard (unless I want to see a certain mission with max quality lightmaps at very rare occasions)?

     
  • karx11erx

    karx11erx - 2015-06-15
    • status: closed-invalid --> closed-fixed
     
  • karx11erx

    karx11erx - 2015-06-15

    Fixed for good, btw.

     
  • Jaroslav Mazurak

    Re-computing lightmap is fixed in 1.18.45, thank you.

    About lightmap quality. :)
    Very interesting article except that I don't know exactly what textures I have and what size I need. I marked that in general game looks better and brighter with lightmaps. So I decided to use they.
    My notebook is weak enough (AMD A4-5000 APU w/integrated Radeon HD 8330) so I enable maximum static effects such as pre-computed lightmaps and disable dynamic effects such as fog.
    What lightmap settings you're recommend for HD+ (1600*900) resolution?

     
  • karx11erx

    karx11erx - 2015-06-16

    Lightmap quality: high
    Lightmap precision: standard

     
  • karx11erx

    karx11erx - 2015-06-16

    I am hosting special "medium resolution" texture packs for D1 and D2 on my Descent 2 server. These contain 256x256 textures. I recommend downloading and installing these.

     

Log in to post a comment.