godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.12k stars 69 forks source link

Add a CanvasGroup equivalent for Sprite3D #7942

Open MudkipWorld opened 12 months ago

MudkipWorld commented 12 months ago

Describe the project you are working on

Currently making a 2.5D simulation where you can have pets with different effects on them. ezgif com-video-to-gif

Describe the problem or limitation you are having in your project

The pets are cut-out and animated in Godot itself, not an external app. CatRunning

this means if i wanted to play some effects like transparency, outline, etc.. the outcome would look super janky and off;

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

CanvasGroup3D, just like Sprite3D and Label3D. I think having a CanvasGroup3D will help a lot in making 2.5D games and games that generally use Sprite3D/ 3D Cut-out animation and still want to add effects on them (just like in 2D).

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

It will work just like the CanvasGroup (for 2D), but for 3D sprites.

Examples :

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

I did search a lot, even if there were any proposals done here for this feature. I couldn't find anything. The only thing I found was for 2D sprites, but nothing for 3D sprites.

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

It seems out of place that most of the 2D nodes have 3D counter-parts, but not this, despite it being a super helpful node in my personal opinion and I think it will help a lot if someone wanted to make cool and more interesting 3D cut-out sprites/ a group of them in a 3D or 2.5D game!

Calinou commented 12 months ago

I believe this approach should be designed to allow changing fragment depth as well, so that you can use it to draw weapon models in front of everything else while preventing them from poking into walls, even if the model is comprised of multiple meshes/materials.

MudkipWorld commented 12 months ago

I believe this approach should be designed to allow changing fragment depth as well, so that you can use it to draw weapon models in front of everything else while preventing them from poking into walls, even if the model is comprised of multiple meshes/materials.

EDIT : I originally got what you meant wrong, sorry :') Yes, I agree. It will help a lot with that. I think it could be interesting if something similar was done with 3D models, but I am not sure how possible would that be at the moment or generally.