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

Change the default gravity to 0 in Particles ProcessMaterial #2533

Open
QbieShay opened this issue Mar 31, 2021 · 8 comments
Open

Change the default gravity to 0 in Particles ProcessMaterial #2533

QbieShay opened this issue Mar 31, 2021 · 8 comments

Comments

@QbieShay
Copy link

Describe the project you are working on

Various VFX

Describe the problem or limitation you are having in your project

In all the effects that I've made, I have used the gravity property of the process material perhaps 10% of the time, of which half of it was going upwards and not with the same magnitude as 9.8.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

I have to change it every time i make a new process material

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Default gravity of the process material to zero

If this enhancement will not be used often, can it be worked around with a few lines of script?

One click and 2 keys
I could made an addon with some default, pre-configured particle materias to choose form, but that's a lot more work than changing the default to zero :)

Is there a reason why this should be core and not an add-on in the asset library?

It's the default particle shader.

@Calinou Calinou changed the title Gravity defaults to zero in process material Change the default gravity to 0 in Particles ProcessMaterial Mar 31, 2021
@Xrayez
Copy link
Contributor

Xrayez commented Apr 1, 2021

I reset gravity to zero as well most of the time but I don't think that would be a good thing to do by itself. I think we should strive to showcase at least basic functionality of what particles can do from scratch for beginners.

This is what basic particles do in 2D when you assign a new particles material:

image

This what happens when you set gravity to zero (mostly nothing):

image

To a beginner it may seem like particles just don't work at all, and they'd have to tinker with more parameters in order to make particles do at least something.

That said, it may be worth doing something different depending on the motivation/use case behind this proposal.

Most particles I make are:

  • Not bound to local coordinates (projectiles).
  • Do not have gravity.
  • Have initial velocity and maximum spread (explosions).

Basically this:

image

Which I think may be a better default option for particles material (excluding the suggestion regarding local coordinates perhaps).

@QbieShay
Copy link
Author

QbieShay commented Apr 1, 2021

I think that for showcase purposes we can link to tutorials. I believe it's better for it to be functional first for people that use it all the time, rather than giving a good overview as a one-time perk, especially because it could be done in the docs.

@golddotasksquestions
Copy link

At first I wanted to immediately thumbup this proposal, as I am terribly annoyed having to reset gravity to 0 nearly every time I use particles in 2D.

On second thought I have to agree with Xrayez. If there is one thing that annoys me a million times more than default settings that don't reflect many of my usecases, it's defaults that don't communicate what is going on.

Like a player in a game, the Godot user needs feedback of their actions. If the Godot user adds something to scene, or preforms an action, there the editor has to provide crystal clear feedback.

Adding particles and then not seeing any particles even though they are playing is like the worst idea for a solution imho. Documentation and tutorials are in no way a replacement for appropriate feedback. Substituting lacking feedback with tutorials is really worst UI design mistake you can make.
If we take another value like initial velocity, we might end up with the same discussion later, but if there is enough community support it might make sense.

@QbieShay
Copy link
Author

I have been done more VFX with the time passing, and I am more and more convinced that gravity is getting more in the way than helping, being default at -9.8.

Perhaps we could have a "template particle material" choice with a couple of pre-configured ones?

@Calinou
Copy link
Member

Calinou commented Mar 21, 2022

My issue with defaulting the gravity to 0 is that if you don't change anything else (such as linear velocity), then it's very difficult to see any visual feedback with brand new particle systems. This isn't conductive to a good user experience for new users that are just trying to get something visible on screen. Of course, this no longer applies if we agree to increase the default linear velocity so that particles move away from the origin over time.

Perhaps we could have a "template particle material" choice with a couple of pre-configured ones?

Maybe #2998 could be useful here. It would also be possible for someone to create an add-on with various premade particle scenes on the asset library.

@QbieShay
Copy link
Author

Linear velocity would be equally a problem for me T_T
What i use mostly is scale over life ..

I like a lot the idea of a wizard though!

@Calinou
Copy link
Member

Calinou commented May 21, 2022

I've thought a little more about this proposal. Here are my suggestions for the default ParticlesMaterial in both 3D and 2D:

  • (Property: Old → New)
  • Amount: 8 → 10
  • Direction: (1, 0, 0) → (0, 1, 0) (pointing upwards)
  • Spread: 45 → 15
  • Initial Velocity: 0 → 5 (both Min and Max)
  • Scale Curve: None → The curve below (high point at roughly 10%, default tangent positions to allow for easing)
    Scale Curve inspector

The same changes should also be applied to CPUParticles for consistency.

With these changes, you get a pretty decent-looking particle system out of the box. Particles taper nicely in and out. They don't fall below the floor they're placed on, and they aren't spread too far apart to look cohesive. The default amount is kept low to allow complex meshes to be rendered at a good performance level. (Not that using complex meshes in particles is a good idea, but we should prevent the editor from slowing down to a crawl if one is chosen.)

CPUParticles3D on the left, GPUParticles3D on the right. Both are placed on the exact floor level:

simplescreenrecorder-2022-05-21_23.11.08.mp4

Scale curve is preferred to color curve to fade particles over their lifetime, since it doesn't require you to enable vertex color on the material to work. Also, it performs slightly better as it allows "old" particles to use less GPU fillrate, which is especially important for transparent particles.

Testing project: test_particle_defaults.zip

@QbieShay
Copy link
Author

QbieShay commented Jun 7, 2022

Up for all of those and up too for local coord's proposal!

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

No branches or pull requests

4 participants