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

ParticleProcessMaterial: Default curve range for particle angles of -360 to 360 is not very useful #91404

Open
derkork opened this issue May 1, 2024 · 2 comments · May be fixed by #91556
Open

Comments

@derkork
Copy link

derkork commented May 1, 2024

Tested versions

v4.2.2.stable.mono.official [15073af]

System information

Godot v4.2.2.stable.mono - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4080 (NVIDIA; 31.0.15.5222) - AMD Ryzen 9 7950X3D 16-Core Processor (32 Threads)

Issue description

When you add a curve to the Spawn > Angle setting of a ParticleProcessMaterial, this is initialized with a range of -360 to to 360. Since the curve value is actually multiplied with the particle angle and not replacing it, I think this range does not make a lot of sense in most cases as it will just send all the particles heavily spinning if you multiply their angle with 360. I think a default range of -1 to 1 would make more sense to me here.

2024-05-01_12-41-49.mp4

Steps to reproduce

  • Create a GPUParticles2D Node
  • Add a ParticleProcessMaterial to it.
  • In the Spawn > Angle setting, add a curve.
  • The curve has default values of -360 to 360.

Minimal reproduction project (MRP)

N/A

@akien-mga
Copy link
Member

CC @godotengine/shaders

@clayjohn
Copy link
Member

clayjohn commented May 1, 2024

Ya, that makes sense. It's a multiplier, so [-1,1] range would be best.

We can change the values here:

_adjust_curve_range(p_texture, -360, 360);

@clayjohn clayjohn added this to the 4.x milestone May 1, 2024
@AThousandShips AThousandShips modified the milestones: 4.x, 4.3 May 1, 2024
aXu-AP added a commit to aXu-AP/godot that referenced this issue May 4, 2024
Fixes godotengine#91404
Curve is applied as a multiplier, so range [-1, 1] makes much more sense than [-360, 360]. Same goes for angular velocity.
aXu-AP added a commit to aXu-AP/godot that referenced this issue May 4, 2024
Fixes godotengine#91404
Curves are applied as a multiplier, so ranges [-1, 1] or [0, 1] make much more sense than ranges like [-360, 360] or [0, 100]. The actual range is selected with separate min and max parameters.
aXu-AP added a commit to aXu-AP/godot that referenced this issue May 4, 2024
Fixes godotengine#91404
Curves are applied as a multiplier, so ranges [-1, 1] or [0, 1] make much more sense than ranges like [-360, 360] or [0, 100]. The actual range is selected with separate min and max parameters.
@aXu-AP aXu-AP linked a pull request May 4, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants