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

Simplify the GPUParticles3D editor gizmo to improve readability #91226

Merged

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Apr 26, 2024

  • Remove handles as users should use the Generate Visibility AABB option whenever possible, so manual resizing isn't needed often. (For particles that move quickly and have Local Coords disabled, Extra Cull Margin can be increased in the GeometryInstance3D properties in the inspector.)
  • Remove translucent filled part of the gizmo to be more consistent with GeometryInstance3D's recently introduced Custom AABB gizmo.
  • Remove center marker as it can visually obstruct particles.

This paves the way for future emission shape gizmos which will feature handles.

Preview

GPUParticles3D

Screenshot_20240426_222954

GeometryInstance3D Custom AABB (for comparison)

Screenshot_20240426_221248

- Remove handles as users should use the Generate Visibility AABB
  option whenever possible, so manual resizing isn't needed often.
  (For particles that move quickly and have Local Coords disabled,
  Extra Cull Margin can be increased in the GeometryInstance3D
  properties in the inspector.)
- Remove translucent filled part of the gizmo to be more consistent
  with GeometryInstance3D's recently introduced Custom AABB gizmo.
- Remove center marker as it can visually obstruct particles.

This paves the way for future emission shape gizmos which will
feature handles.
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

Makes sense to me, I always found this giant orange AABB annoying.

@akien-mga akien-mga modified the milestones: 4.x, 4.3 May 7, 2024
@akien-mga akien-mga merged commit 0494b37 into godotengine:master May 7, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@Calinou Calinou deleted the editor-gpuparticles3d-simplify-gizmo branch May 22, 2024 15:40
@GeminiSquishGames
Copy link

GeminiSquishGames commented Jun 29, 2024

This is a really neat idea for making the AABB, but I was playing with it and noticed particle attractors and colliders only work on particles if they are within the emitter's AABB. Attractors and colliders can push the particles outside of the AABB and also with any non-deterministic behaviors like Time Randomness, Lifetime randomness, and turbulence, particles will sometimes be outside of the calculated AABB. I assume it's only precalculating one emissive cycle and not doing an extra prediction for the randomness. I'm guessing one justs extends the margin to compensate. It makes a good estimate, the majority of them fall within the AABB and only dynamic or moving colliders and attractors are problematic (at least the box moves with the emitter and can be changed at runtime), and without the handles a little annoying to calculate, but I may just be nitpicking at that point if I'm not entirely. A lot of things I would love to see runtime helpers with, but I know runtime calculations and particle detection is hard since it's done visually on the GPU and the positions of particles aren't exposed in high level scripting for sake of performance in many cases like this, such as the MSDF calculated particle colliders. I doubt too many people will notice, but just in case this is important enough to consider.

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.

3 participants