-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
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
Add visualization of 3D particle emission shapes #100113
Add visualization of 3D particle emission shapes #100113
Conversation
7f3bcee
to
c9c468a
Compare
Should the signal emission be gated behind a tools build? |
Hmm I guess we could put it behind a tools build flag 🤔 not sure if we have to though. Do you think we should? |
I'd say yes, if the signal has no purpose outside of the editor. If there's strong demand, the signal could be made available for use in projects later, but that would need a separate proposal to gauge interest first. |
My rationale here is that I don't want this to cause performance issues in case people are animating the size (for whatever reason). Alternatively instead of using a signal, it could be polled, but i don't know if gizmos support it. |
c9c468a
to
6ed62f7
Compare
@QbieShay I think I added this now |
7afaabb
to
b232c3a
Compare
editor/plugins/gizmos/particles_3d_emission_shape_gizmo_plugin.cpp
Outdated
Show resolved
Hide resolved
The above suggestion should correct the ring gizmo. Needs to be added for CPU as well, but it should be identical. godot.windows.editor.dev.x86_64_1KYwAabcbW.mp4 |
5d6653a
to
7ab5283
Compare
a785ad6
to
e9bf4f9
Compare
e9bf4f9
to
544ecef
Compare
544ecef
to
3361073
Compare
3361073
to
181a54a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested the PR locally, everything works except changing the emission shape offset/scale which emits the wrong signal (see comment below).
Small nitpick since this is undefined behavior; when setting the emission ring radius to 0 and the emission ring inner radius to something > 0, one of the rings disappears:
I mean we shouldn't allow this at all (add checks to the setters of ParticleProcessMaterial accordingly), but that's for another PR.
editor/plugins/gizmos/particles_3d_emission_shape_gizmo_plugin.cpp
Outdated
Show resolved
Hide resolved
editor/plugins/gizmos/particles_3d_emission_shape_gizmo_plugin.cpp
Outdated
Show resolved
Hide resolved
editor/plugins/gizmos/particles_3d_emission_shape_gizmo_plugin.cpp
Outdated
Show resolved
Hide resolved
editor/plugins/gizmos/particles_3d_emission_shape_gizmo_plugin.cpp
Outdated
Show resolved
Hide resolved
editor/plugins/gizmos/particles_3d_emission_shape_gizmo_plugin.cpp
Outdated
Show resolved
Hide resolved
editor/plugins/gizmos/particles_3d_emission_shape_gizmo_plugin.cpp
Outdated
Show resolved
Hide resolved
editor/plugins/gizmos/particles_3d_emission_shape_gizmo_plugin.cpp
Outdated
Show resolved
Hide resolved
editor/plugins/gizmos/particles_3d_emission_shape_gizmo_plugin.cpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Haven't tested but code looks good
181a54a
to
90c544f
Compare
90c544f
to
a552883
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Retested to ensure nothing broke. Great work!
Just a few missing const
s left, then I think it's good to go.
editor/plugins/gizmos/particles_3d_emission_shape_gizmo_plugin.cpp
Outdated
Show resolved
Hide resolved
editor/plugins/gizmos/particles_3d_emission_shape_gizmo_plugin.cpp
Outdated
Show resolved
Hide resolved
editor/plugins/gizmos/particles_3d_emission_shape_gizmo_plugin.cpp
Outdated
Show resolved
Hide resolved
editor/plugins/gizmos/particles_3d_emission_shape_gizmo_plugin.cpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Kasper Arnklit Frandsen <kasper.arnklit@gmail.com>
a552883
to
e689c12
Compare
Done now and thanks for the detailed feedback 👍🏻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, it works as expected with both GPUParticles3D and CPUParticles3D.
Code and docs look good to me.
While testing, I found an unrelated bug: #100946
Thanks! |
Adds support for visualization of particle emission shapes.
Separated part of #86902 due to discussion with @QbieShay on RocketChat
TODO
Showcase