Lightmap Baking: Denoise and Export - Krunklehorn/io-scene-gzrs2 GitHub Wiki

Blender's denoiser currently only applies to the 'Combined' pass, which includes both surface color and lighting.

For Realspace, we only want lighting, so we have to denoise manually...

  1. Open the compositor, enable "Use Nodes" and delete all the nodes inside.
  2. Add a "Viewer" node and disable alpha.
  3. Add an "Image" node and select your lightmap image.
  4. Add a "Denoise" node and disable HDR.
  5. Plug the image sockets between the nodes in this order: Image->Denoise->Viewer
  6. Open the image editor and switch to the "Viewer" image.
  7. Toggle the viewer node's alpha switch on and off to force it to update. (Oh, Blender)
  8. Save the image and overwrite the lightmap you previously saved to disk.
    • Make sure it's a PNG set to RGB at 16 bits! Blender likes to switch back to 8 all the time. It's annoying.
  9. Switch the image editor to your original, noisy lightmap and select "Image->Reload". Presto!
  10. Double check that your bake mesh's type is set to "None".
  11. Export your map and test.

Gotcha: Props use dynamic lights, not lightmaps. That's why the cloth flag looks so bright. MAIET's flag textures were manually painted to make them fit with their surrounding geometry. If you're savvy, you can setup a unique diffuse texture for each of your props, then bake and composite lightmap color directly to them, though it may not animate well if the contrast is too high.

<- Prev Next ->

blender_bpR0XfjJXj _20250603_030138 2025-06-03 03-01-38-799

Experimental "V4" Lightmaps

Notice the ugly dithering? Realspace's lightmap exporter has to squash the value range because the client scales it back up at runtime. Why? No reason. Just MAIET things.

Unfortunately, all vanilla lightmaps and clients suffer from this oversight. Luckily, a solution has been developed in the form of an experimental lightmap version. This version fixes the D3DTOP_MODULATE4X bug (dubbed "MOD4"), supports the full 0-255 color range and offers DXT pre-compression for faster load times. Lightmap resolutions of up to 8k are now viable!

This upgrade requires client changes and thus is for private servers only. V4 lightmaps do not work with vanilla GunZ. If interested, contact Krunk#6051 for information on how to implement this.

230730_gzrs2townbakewip