godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.16k stars 97 forks source link

Implement aligning billboards to an arbitrary axis in Particles ProcessMaterial #3703

Closed djmaesen closed 2 years ago

djmaesen commented 2 years ago

Describe the project you are working on

working on a fps in 3d

Describe the problem or limitation you are having in your project

when using spritesheets in a particle processmaterial there is no option to allign the spritesheet to a specific axis and face the camera as much as possible. this would be a great feature for effects like explosions or all sorts of impact effects that rely on animated textures in a particle effect. in godot3.4 this function doesnt exist in gui of the standard particle process material

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

currently if u choose particle billboard in your material it always renders flat facing the camera

and the thread of the godot forum where the effect is explained https://godotforums.org/discussion/28308/orient-particle-to-specific-axis/p1

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

an option in process materials' gui to set billboard orientation to specific axis

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

it can be worked around by using a 3d sprite not with a few lines of script

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

it improves the particle effect system

Calinou commented 2 years ago

This is supported in Godot 4.0 thanks to particle trails, but it's not possible to backport it to 3.x for compatibility reasons.

For individual sprites, this could be added as a billboard mode to StandardMaterial3D, but it would make the (already complex) shader even more complex. We need to keep built-in shaders as simple as possible to improve performance – in fact, the current built-in 3D material is proving to be a bottleneck.

djmaesen commented 2 years ago

This is supported in Godot 4.0 thanks to particle trails, but it's not possible to backport it to 3.x for compatibility reasons.

For individual sprites, this could be added as a billboard mode to StandardMaterial3D, but it would make the (already complex) shader even more complex. We need to keep built-in shaders as simple as possible to improve performance – in fact, the current built-in 3D material is proving to be a bottleneck.

great that this will be supported in godot4.tnx