godotengine / tps-demo

Godot Third Person Shooter with high quality assets and lighting
Other
955 stars 166 forks source link

Improve Main Menu options and fix misc bugs #166

Closed clayjohn closed 1 year ago

clayjohn commented 1 year ago

Depends on https://github.com/godotengine/tps-demo/pull/163 Fixes most issues in https://github.com/godotengine/tps-demo/issues/162 Fixes: https://github.com/godotengine/tps-demo/issues/164

  1. Turns on looping for the flying forklift animation
  2. Fixes scaling of the crosshair
  3. Switches to using physical keyboard layouts
  4. Replaces resolution settings with 3D_scaling
  5. Fixes settings menu (same as https://github.com/godotengine/tps-demo/pull/165)
  6. Updates settings menu settings to work with
  7. Replaces "Root" of .import files with "Node3D" instead of "Spatial"
  8. Uses buttons throughout the main menu so the buttons appear consistent
  9. Add GI Type menu options (SDFGI, VoxelGI, or LightmapGI + Reflection Probes)
  10. Removes the refraction setting from glass tiles (scale was 0 anyway so it wasn't actually doing anything) This dramatically improves performance on low-end devices
  11. Fixes robot aim

This PR gets the demo much closer to the functionality we want for 4.0.

clayjohn commented 1 year ago

LightmapGI seems very dark in the outside area, but I'm not sure how to fix this since there's no longer an energy multiplier available (unlike BakedLightmap in 3.x).

Heh, I noticed the same thing. With SDFGI and with VoxelGI we boost the energy by 2.2 times to account for how dark the scene is. Its definitely something to keep in mind as we revisit and improve LightmapGI

Calinou commented 1 year ago

I've merged https://github.com/godotengine/tps-demo/pull/163. This PR needs a rebase before this can be merged.

clayjohn commented 1 year ago

@Calinou Rebased and fixed a couple more bugs. This should be good to merge!

The only thing of concern is that the size of the lightmap file is 68 mb which is larger than Github recommends. On pushing the branch I got a warning that 50mb is the maximum recommended file size.

Calinou commented 1 year ago

The only thing of concern is that the size of the lightmap file is 68 mb which is larger than Github recommends. On pushing the branch I got a warning that 50mb is the maximum recommended file size.

I've baked high-quality lightmaps (Ultra quality, 16 bounces) which are only 20 MB in size, presumably as they're less noisy and compress better: level_lightmaps.zip

However, two floor structures in the inner room use a fully cyan color with this lightmap for some reason.

PS: Did you have Directional enabled when baking lightmaps? I had it disabled when baking here. We should write out the instructions for rebaking lightmaps somewhere, as this may be needed at some point in the future.

clayjohn commented 1 year ago

The only thing of concern is that the size of the lightmap file is 68 mb which is larger than Github recommends. On pushing the branch I got a warning that 50mb is the maximum recommended file size.

I've baked high-quality lightmaps (Ultra quality, 16 bounces) which are only 20 MB in size, presumably as they're less noisy and compress better: level_lightmaps.zip

However, two floor structures in the inner room use a fully cyan color with this lightmap for some reason.

PS: Did you have Directional enabled when baking lightmaps? I had it disabled when baking here. We should write out the instructions for rebaking lightmaps somewhere, as this may be needed at some point in the future.

I didn't enable Directional as I found the added size wasn't worth it.

It looks like your bake didn't include many assets. Here is what I get when I use it.

Screenshot from 2023-03-11 12-53-05

And here is how it looks without any GI

Screenshot from 2023-03-11 12-53-12

It looks like the pillars don't have lightmaps at all. And the things that do have lightmaps have turned completely black. When I captured lightmaps originally I had a similar issue and I had to reimport all the assets with static GI + lightmaps enabled so they had UV2s.

Calinou commented 1 year ago

When I captured lightmaps originally I had a similar issue and I had to reimport all the assets with static GI + lightmaps enabled so they had UV2s.

I've tried reimporting all assets[^1] this way to no avail. It seems the objects that get included every bake are picked almost randomly, so I think we should just merge this until we can figure out how to bake high-quality lightmaps properly.

[^1]: I kept the existing bake modes, since the light shafts/particle/player models shouldn't be included in the bake.