-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
[3.x] Added ring emitter for 3D particles #47801
Conversation
da81705
to
7c6333d
Compare
LGTM! |
Crash in CI is not related with this PR(I think), but uncovers strange crash with multithreading, GradientTexture and Particles/Spatial/Standard Material Address sanitizer log
|
I still compiling it for test :S I have only one question why |
@Chaosus Oooohhh good point. I didn't follow my own feedback 😅 I will fix it |
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.
Worked fine, Do you want to implement this type of shape to CPUParticles?
@Chaosus yes, that's the plan if the PR is desired. I wanted to have approval before starting to do that because it takes some time |
7c6333d
to
e2d542d
Compare
One more suggestion - maybe changing the axis of rotation of this shape to upward-y is a good idea so the circle will be placed on the ground by the default, rather than the wall - this is cosmetical but I think such portal effects are used more frequently. |
@Chaosus I have oriented the circle to the z axis for compatibility with 2D particles. It isn't the best for 3D but otherwise it doesn't work as-is with 2D particles. Maybe it would be better to have people select an axis (x, y or z, not a custom one), but I'm not sure. What do you think? |
Yeah, I think so - You can rotate the emitter itself but the gravity is still needed to be changed accordingly so provided axis is the best solution, yeah. Maybe a custom axis vector is better than the defined x/y/z axis. |
Okay, will do. |
e2d542d
to
9dea223
Compare
dbcfd28
to
2332d60
Compare
9d44048
to
7353f79
Compare
Could you amend the commit message to be more explicit? (and remove the |
This commits adds a new emitter type for particles material and 3D CPU particles. The new emitter is called "ring" and it can emit either in a ring or cylinder fashion. This adds the following properties for the emitter: 1. ring_emitter_axis: the axis along which the ring/cylinder will be constructed 2. ring_emitter_radius: outer radius of the ring/cylinder 3. ring_emitter_inner_radius: inner radius of the cylinder. when set to zero, particles will emit in the full volume. 4. ring_emitter_height: height of the ring/cylinder emitter. Co-authored-by: Rémi Verschelde <[email protected]>
No need to credit me as co-author, I didn't do any significant work here :) |
I appreciate getting suggestions directly for the code that i can integrate with a click ;) |
But you deserve the full credit (or blame, if buggy :P) for this contribution ;) |
Thanks! |
This PR implements the ring emitter for 3.x particles.
It does not have a 4.0 counter part because it will be covered in this PR already: #42248
If this change is desired, I'll update the CPU particles as well.
Let me know!