Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BakedLightmap shadows looks highly pixelated when using ConeTrace and simply incorrect when using RayTrace #30929

Closed
Antokolos opened this issue Jul 29, 2019 · 6 comments

Comments

@Antokolos
Copy link

Antokolos commented Jul 29, 2019

Godot version:
Godot 3.1.1

OS/device including version:
Windows 10

Issue description:
I've had troubles when trying to implement baked light for our game.
Shadows looks highly pixelated when using ConeTrace and simply incorrect when using RayTrace.

Steps to reproduce:

  1. Get the demo project from here: https://github.com/Antokolos/palladium3d-demo/archive/v0.0.1.zip
  2. Open BakedLightmap node in res://floor_demo_full.tscn
  3. Click Bake Lightmaps and wait for completion (Caution, this will require some time to be finished)
  4. Run the game, press Esc, set the Optimal quality in the settings, now the Godot's OmniLights will be hidden and you'll see only baked light
  5. Take a look at the shadows, they are looking very pixelated.

image

image

  1. Press Esc, set the High quality in the settings, now you can see Godot's OmniLights with shadows enabled. This is what I'm trying to achieve when using baked light

image

  1. Press ALT+F4, exit the game.
  2. Open BakedLightmap node in res://floor_demo_full.tscn, set bake mode to RayTrace
  3. Click Bake Lightmaps and wait for completion (Caution, this will require some time to be finished)
  4. Run the game, set the Optimal graphics quality
  5. Take a look at the shadows, they are incorrect

image

image

Minimal reproduction project:
https://github.com/Antokolos/palladium3d-demo/archive/v0.0.1.zip

@Calinou
Copy link
Member

Calinou commented Jul 29, 2019

Cone tracing is less accurate than raytracing, which means most small fixtures won't cast shadows if you rely on lightmaps only (i.e. no real-time lighting).

There is an ongoing GSOC project on rewriting the lightmapper. It seems the cone tracing approach will be removed in favor of raytracing.

@Antokolos
Copy link
Author

Wow, GSOC project looks very promising! I hope that it will be included in Godot 3.2
And I hope that Godot 3.2 will be released relatively soon... ;)

@Antokolos
Copy link
Author

By the way, I intended to do this because I thought that baked lightmaps is more "lightweight" than the shadows from the Godot's OmniLight sources, but it seems that baked lightmaps consumes resources too, so I'm uncertain that this is the case...
For example, let's compare the stats for the Good quality settings (which means no baked lightmap & enables Godot's OmniLight sources without the shadows)
image
And the Optimal quality settings (which means hide the Godot's OmniLight sources and enable baked lightmap)
image
Take a look at the Material changes stat, it is actually increased in case of baked lightmap.
Drawcalls were decreased, but still overall performance is not significantly better in this case

@Antokolos
Copy link
Author

Antokolos commented Jul 30, 2019

Also, please take a look at the normal maps on the torches, they seems to be missing when using baked lightmaps. Is this really the case? Baked light means no normal maps? Or maybe I should post another issue regarding this problem?

@Antokolos
Copy link
Author

Please note: in the current version of the demo available on the GitHub I reworked the approach for lighting (baked lightmaps are not used anymore), so you'll need to download release 0.0.1 via https://github.com/Antokolos/palladium3d-demo/archive/v0.0.1.zip if you want to explore this issue

@Calinou Calinou changed the title Shadows looks highly pixelated when using ConeTrace and simply incorrect when using RayTrace BakedLightmap shadows looks highly pixelated when using ConeTrace and simply incorrect when using RayTrace Feb 15, 2020
@Calinou Calinou added this to the 4.0 milestone Mar 16, 2020
Calinou added a commit to Calinou/godot that referenced this issue May 24, 2020
huhund pushed a commit to huhund/godot that referenced this issue Nov 10, 2020
@Calinou
Copy link
Member

Calinou commented Feb 19, 2021

This was resolved in the 3.2 branch by #44628 (as it removed ConeTrace), closing.

@Calinou Calinou closed this as completed Feb 19, 2021
@Calinou Calinou modified the milestones: 4.0, 3.2 Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants