X Tutup
Skip to content

Improve 2D Particle Emission Mask dialog#101165

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
timoschwarzer:feature/2d-particle-emission-textures-refactor
Nov 13, 2025
Merged

Improve 2D Particle Emission Mask dialog#101165
Repiteo merged 1 commit intogodotengine:masterfrom
timoschwarzer:feature/2d-particle-emission-textures-refactor

Conversation

@timoschwarzer
Copy link
Contributor

@timoschwarzer timoschwarzer commented Jan 5, 2025

In this PR I reworked the 2D particles emission mask dialog (C/GPUParticles2D → Load Emission Mask in the 2D viewport).

Screencast.From.2025-01-05.23-34-47.mp4

Before, it was only possible to let Godot generate an emission direction texture when using the "Directed Border Pixels" mode. With this PR, you can specify a custom normal map to use. Additionally, the "Centered" checkbox is now checked by default because all other emission shapes are also centered by default.

I refactored some code as well because I found some parts of it hard to read and understand due to undocumented abbreviations.

If you want to test this, make sure to also merge #101162 because emission mask textures are currently broken for GPUParticles2D.

@timoschwarzer timoschwarzer force-pushed the feature/2d-particle-emission-textures-refactor branch from ab89aee to 5b20953 Compare January 5, 2025 22:50
@Calinou Calinou added this to the 4.x milestone Jan 6, 2025
@timoschwarzer timoschwarzer force-pushed the feature/2d-particle-emission-textures-refactor branch from 5b20953 to 257d9bb Compare March 12, 2025 19:30
@timoschwarzer timoschwarzer force-pushed the feature/2d-particle-emission-textures-refactor branch from 257d9bb to 70f59ed Compare July 17, 2025 09:07
@timoschwarzer timoschwarzer requested a review from a team July 17, 2025 09:07
@timoschwarzer
Copy link
Contributor Author

timoschwarzer commented Jul 17, 2025

Rebased. I would appreciate it if this could be added to the 4.6 milestone and reviewed to keep further conflicts at a minimum. 👀

@timoschwarzer timoschwarzer force-pushed the feature/2d-particle-emission-textures-refactor branch 2 times, most recently from 3a51794 to 97b9c83 Compare July 17, 2025 09:13
@KoBeWi
Copy link
Member

KoBeWi commented Jul 22, 2025

I think the placeholder for Mask Texture field is unnecessary. Also the path seems to never get cleared; shouldn't accepting/canceling clear it?

For some reason the dialog has empty space at the bottom instead of shrinking to minimum size:
image
EDIT:
Looks like reserved space for Direction Texture. Maybe it would be better if the dialog was automatically resizing, idk.

@timoschwarzer timoschwarzer force-pushed the feature/2d-particle-emission-textures-refactor branch from 97b9c83 to cfe0888 Compare July 23, 2025 08:00
@timoschwarzer
Copy link
Contributor Author

I made the dialog resize automatically and it is reset when selecting another node, so you can adjust the particle mask settings for the same node again without needing to select textures and options again.

@timoschwarzer timoschwarzer force-pushed the feature/2d-particle-emission-textures-refactor branch 2 times, most recently from f657a89 to b98d1fc Compare July 23, 2025 09:16
@timoschwarzer timoschwarzer force-pushed the feature/2d-particle-emission-textures-refactor branch 3 times, most recently from 4d2c1f4 to 1d1cdd9 Compare July 23, 2025 16:22
@KoBeWi KoBeWi modified the milestones: 4.x, 4.6 Jul 23, 2025
@timoschwarzer timoschwarzer force-pushed the feature/2d-particle-emission-textures-refactor branch from 1d1cdd9 to e1d43ef Compare July 29, 2025 04:00
# Conflicts:
#	editor/scene/2d/particles_2d_editor_plugin.cpp
@timoschwarzer timoschwarzer force-pushed the feature/2d-particle-emission-textures-refactor branch from e1d43ef to a9dab2b Compare November 9, 2025 20:27
@timoschwarzer
Copy link
Contributor Author

Rebased

@Repiteo Repiteo merged commit 8950c65 into godotengine:master Nov 13, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Nov 13, 2025

Thanks!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

X Tutup