Skip to content

Feat: EmitterMeshFaceShape - enhance particle emission uniformity #2503

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 1 commit into
base: master
Choose a base branch
from

Conversation

capdevon
Copy link
Contributor

@capdevon capdevon commented Jun 18, 2025

This PR introduces significant improvements to the EmitterMeshFaceShape class. The core change involves updating the triangle point generation algorithm to use barycentric coordinates, ensuring a more uniform and accurate distribution of particles across mesh faces. The barycentric coordinate method is more standard and often easier to reason about for uniform distribution within a triangle.

Additionally, this PR includes:

  • Improved Documentation: Detailed Javadoc comments have been added throughout the class, providing clearer explanations of its functionality, constructors, and methods for better code readability and maintainability.

Red Arrow: old algorithm (linear interpolation)
Green Arrow: barycentric coordinates

image

@yaRnMcDonuts yaRnMcDonuts added this to the v3.9.0 milestone Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants