Skip to content

Allow using seeded noise for particle velocity and spawn position offset #6675

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

BMagnu
Copy link
Member

@BMagnu BMagnu commented Apr 9, 2025

Exposes the noise framework FSO uses for volumetrics to the particle system.
This allows particles to behave in noised-but-not-frame-independent-random ways.

As with volumetrics, it uses the DSL of the noise library to parse noise definitions.
While very flexible, this is also quite cumbersome and hard to visualize. I intend to eventually build a small utility program that can quickly visualize these noise patterns.

As an example, the following is a table that uses the new noise:

#Particle Effects
$Effect: NoiseTest
+Filename: AVMuzzle
+Radius: 1
+Lifetime: 8
+Duration: 20
+Spawns per second: 10
+Particle Count Per Spawn: 1
+Velocity Noise: color(scale(valueBasis(3,0),6), scale(valueBasis(3,1),6),0, 0)
+Velocity Noise Scale: 10
+Velocity Inherit: 0.9
#End

@BMagnu BMagnu added enhancement A new feature or upgrade of an existing feature to add additional functionality. particles An item related to the particle system labels Apr 9, 2025
// only achieved when the particle travels directly on the normal/reflect vector
vec3d normalizedVelocity;
vm_vec_copy_normalize(&normalizedVelocity, &velocity);
vm_vec_copy_normalize(&normalizedVelocity, &localVelocity);
Copy link
Contributor

Choose a reason for hiding this comment

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

As in #6678, is there ever a chance of localVelocity being 0,0,0 here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A new feature or upgrade of an existing feature to add additional functionality. particles An item related to the particle system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants