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

Vulkan: LightmapGI Crashes when uv2 is high #75726

Closed
CachorroVoador opened this issue Apr 5, 2023 · 8 comments · Fixed by godotengine/godot-docs#7314
Closed

Vulkan: LightmapGI Crashes when uv2 is high #75726

CachorroVoador opened this issue Apr 5, 2023 · 8 comments · Fixed by godotengine/godot-docs#7314

Comments

@CachorroVoador
Copy link

Godot version

4.0.stable

System information

Windows 10, Gt 710, Driver: 474.14, Vulkan

Issue description

Goodnight! How are you?

When I try to bake, but with the uv2 of the objects set to below 100, it does without any problem, however when they are above 100, godot hangs and stops responding and appears in the console saying that it has lost the vulkan Driver as if the video card has been reset

Here's a video demonstrating it and I'm sorry for the awful fps in the video. I had to download obs because the recorder I used used the video card to record, but even it stops recording when it gives an error

2023-04-05.19-49-52.1.mp4

Steps to reproduce

1- Place some objects in the scene that contain uv2
2- Expand them until the uv2 is above 100
3- Bake the LightmapGI

Minimal reproduction project

lightmap_crash.zip

@Calinou
Copy link
Member

Calinou commented Apr 6, 2023

You're most likely running out of video memory, as a GT 710 only has 1 GB of VRAM. Decrease the Lightmap Size Hint properties to resolve this issue.

According to nvidia-smi, baking lightmaps requires at least 1.5 GB of VRAM in this scene (my VRAM usage goes from 2.6 GB to 4.1 GB when I click Bake Lightmaps). However, since your GPU will be doing other things at the same time (such as rendering the editor and desktop applications), this means you need a GPU with 3 GB of VRAM to be able to successfully bake lightmaps in this scene.

For reference, baking lightmaps in the MRP takes 34 seconds on my RTX 4090 (this includes denoising time, which is performed on the CPU).

PS: You need to switch to the Forward+ rendering method to see the baked lightmaps due to #55867.

@CachorroVoador
Copy link
Author

Oh yes, I understand! Thanks

The video card model I bought has 2gb of vram in total
Which

PS: You need to switch to the Forward+ rendering method to see the baked lightmaps due to #55867.

About this. Is it only possible to have all lightmapgi features in forward? This becomes somewhat limiting for mobile, which already has almost nothing

@lawnjelly
Copy link
Member

If it is to do with the UV2s, maybe Godot should be normalizing the lightmap UVs (this would alter the source mesh data though).

@Calinou
Copy link
Member

Calinou commented Apr 6, 2023

About this. Is it only possible to have all lightmapgi features in forward? This becomes somewhat limiting for mobile, which already has almost nothing

LightmapGI intends to be fully supported when using the Mobile rendering method, but it has several bugs right now.

If it is to do with the UV2s, maybe Godot should be normalizing the lightmap UVs (this would alter the source mesh data though).

The issue isn't with the UV2 coordinates.

@CachorroVoador
Copy link
Author

CachorroVoador commented Apr 6, 2023

LightmapGI intends to be fully supported when using the Mobile rendering method, but it has several bugs right now.

And about gl_compatibility? Is be possible to use LightmapGl with gl?

Do you intend to also put a processor-only version for the lightmap? As it was before in godot 3. I think it would be interesting for those who have the same problem as me. Sorry for bad english, i'm using google translate

@Calinou
Copy link
Member

Calinou commented Apr 6, 2023

And about gl_compatibility? Is be possible to use LightmapGl with gl?

There's no way to bake lightmaps while using the Compatibility rendering method, but it should be possible to render lightmaps that were already baked in the future. This isn't currently implemented yet though.

Do you intend to also put a processor-only version for the lightmap? As it was before in godot 3. I think it would be interesting for those who have the same problem as me. Sorry for bad english, i'm using google translate

See godotengine/godot-proposals#3921.

@CachorroVoador
Copy link
Author

I understood. Thank you for your attention! I will close this issue as I consider it resolved
Have a good day!

@Calinou
Copy link
Member

Calinou commented Apr 7, 2023

Reopening, as the video memory usage caveat should still be documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants