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

Transparency via AlphaColorCurve, but disabled "Set as Albedo" should give warning #10926

Open
TheYellowArchitect opened this issue Oct 7, 2024 · 2 comments

Comments

@TheYellowArchitect
Copy link

TheYellowArchitect commented Oct 7, 2024

Describe the project you are working on

Topdown 3D Shooter, requiring smoke grenade.

Describe the problem or limitation you are having in your project

godotengine/godot#97783

Synopsis: I create a GPUParticles3D with a quad mesh. Its material has transparency alpha, and its ParticleProcessMaterial has an alpha color curve. Transparency in Geometry Instance is set to 0 (opaque) but alpha color curve offers the transparency.

The problem is that I went through many choices, and the AlphaColorCurve's transparency didn't work at all, until I clicked the boolean flag choice in inspector: Vertex Color -> Use as Albedo (which doesn't hint to transparency at all)

Without the aid of that user, I would think it's an engine bug, and be unable to have transparency via alpha color curve.

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

There should be an editor warning if there is a scene running (or in the editor?) which has a GPUParticles3D with an alpha color curve at its ProcessMaterial + its material has transparency (Transparency -> Transparency -> Alpha), but has the DEFAULT value (false) at Vertex Color -> use as albedo

Could even automatically enable the flag use as albedo if it detects the above 2 transparent conditions (process material with alpha color curve, and material with transparency)

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

yes, knowledge of how gpu particles' transparency works. Or lucky to hit that flag under the folded menus.

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

It's an editor warning to aid users.

@Calinou
Copy link
Member

Calinou commented Oct 7, 2024

This should also apply to the color and emission curve properties. Likewise, the scale properties should also check if the material has Billboard Keep Scale enabled (if billboarding is enabled on the material).

Last time I checked, it's difficult to base node configuration warnings on a subresource's property, since the subresource doesn't emit a signal when one of its properties is changed. This may have changed since I checked though.

cc @KoBeWi

@KoBeWi
Copy link
Member

KoBeWi commented Oct 7, 2024

All Resources should emit changed signal when they change, so it's possible to connect to it and display warning.
Alternatively, godotengine/godot#90049 will allow Resource configuration warnings, so it will be possible without signals.

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