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

Improve display for lightmap probes in the editor #83863

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Oct 23, 2023

  • Use the default Back cull mode to improve performance slightly and prevent obstructing the camera.
  • Fade probes when the camera gets close as to be less intrusive.

Unfortunately, I didn't manage to make direct light display on probes. Removing unshaded draw mode doesn't make them receive any light, likely because of the general light mask used by 3D editor gizmos.

Testing project: test_lightmap_preview_bake_4.x.zip

Preview

simplescreenrecorder-2023-10-23_23.28.22.mp4

@jcostello
Copy link
Contributor

Can the distance be adjusted?

@Calinou
Copy link
Member Author

Calinou commented Oct 24, 2023

Can the distance be adjusted?

It should be feasible to add an editor setting to change the distance, or make it fade out in the distance (instead of fading out when the camera gets close). Due to BaseMaterial3D limitations, you have to choose between fading out the material when the camera gets close, or when the camera gets far – you can't do both.

@jcostello
Copy link
Contributor

It should be feasible to add an editor setting to change the distance, or make it fade out in the distance (instead of fading out when the camera gets close). Due to BaseMaterial3D limitations, you have to choose between fading out the material when the camera gets close, or when the camera gets far – you can't do both.

Right. To me fading out when the material gets closer is enough since having probes in front of the camera is annoying. Changing that distance will be helpfull

Copy link
Member

@Geometror Geometror left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I think we should also consider this for the SDFGI Probes debug view.
Honestly, I don't know whether we really need an editor setting for this - we can add one later if people need it.

editor/plugins/gizmos/lightmap_gi_gizmo_plugin.cpp Outdated Show resolved Hide resolved
@Calinou Calinou force-pushed the editor-lightmap-probe-gizmo-improve-display branch from 70e80a0 to 0bbd36c Compare October 18, 2024 20:52
@Calinou Calinou requested a review from a team as a code owner October 18, 2024 20:52
- Use the default Back cull mode to improve performance slightly
  and prevent obstructing the camera.
- Fade probes when the camera gets close as to be less intrusive.
@Calinou Calinou force-pushed the editor-lightmap-probe-gizmo-improve-display branch from 0bbd36c to 8e0c0d7 Compare October 18, 2024 20:53
@clayjohn clayjohn modified the milestones: 4.x, 4.4 Oct 18, 2024
@clayjohn clayjohn merged commit 44fa552 into godotengine:master Oct 18, 2024
20 checks passed
@clayjohn
Copy link
Member

Thank you!

@Calinou Calinou deleted the editor-lightmap-probe-gizmo-improve-display branch October 19, 2024 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants