godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.28k stars 20.23k forks source link

In Godot4 alpha 15 billboard particles are now missing Quad mesh option in the draw pass and shaders act weird #65186

Closed MeshVoid closed 2 years ago

MeshVoid commented 2 years ago

Godot version

4.0.alpha15

System information

Windows 10, Vulkan, Nvidia Gefore 1080, Nvidia Gefore 1070, Amd Ryzen 2700x

Issue description

I have noticed that particles looked weird in the newest alpha release of Godot 4. At first I thought that it might be the problem with how engine renders mesh with materials that have billboard particles turned on. But then I noticed that in particle mode I don't even have an option to generate quad mesh: image

All the GPUparticles that have had Quad mesh assigned in the draw pass, are now automatically substituted with Plane mesh, where Particle Billboard in the material options looks skewed (Should it look like that, or is it also a bug?).

For example, this used to be normal fire particle in Godot alpha 14, now it's broken in Godot alpha 15. image

Also, I have noticed that Godot4 alpha 15 permanently breaks compatibility of majority of shaders both visual and spatial and GPUparticles made in Godot4 alpha 14, completely corrupting the project? But that is my assumption so far. I don't know if it is intentional and now I should start everything from scratch in GD4alpha15.

Same scene in Godot4 alpha15 looks like this (previously made in Godot4 a14):image

Same project in Godot4 loaded again in Godot4 alpha14: image

P.S. The whole project is weird now, even when shader cache is deleted and .godot folder inside the project is wiped.

Steps to reproduce

1 - Add a GPUparticle scene 2 - Go to draw pass tab and look at the list of objects to draw

To reproduce the weirdness with shaders I experience:

1 - open a project with different shaders and GPUparticles made in GD4 alpha 14 with GD5 alpha 15, compare the two differences, it is impossible to not notice problems.

Minimal reproduction project

No response

Zireael07 commented 2 years ago

Quad was merged with PlaneMesh. Pick the planemesh from the list and check if it fixes it?

If not, this is likely caused by octahedral compression, probably the single biggest and most problematic change in a15...

MeshVoid commented 2 years ago

Same. image I did that just now, and the first time I launched the project, that was my first thought that Quad mesh got merged with Plane mesh, because it was always strange for me to have both and logical to have them merged. But, Plane mesh always had this problem with skewed planes in the viewport when Billboard particle mode turned on in the materials, so I guess when they merged the two, they forgot to fix Plane mesh's Billboard particle mode bug.

To reproduce it do the following:

Here, absolutely new GPUparticles with Plane in the draw pass and new material with Billboard particles mode turned on, it is rendered completely skewed: image

The reason why everybody used Quad Mesh in the draw pass was because Plane mesh rendered Billboard particles this way, maybe it got overlooked in gd4alpha14 when the merge happened?

clayjohn commented 2 years ago

For the QuadMesh/PlaneMesh issue, you need to set the orientation property of the PlaneMesh to FACE_Z then it will behave the same as QuadMesh did.

For the other issues, it indeed looks like an Octahedral compression issue. To fix it, you just need to reimport your assets

MeshVoid commented 2 years ago

For the QuadMesh/PlaneMesh issue, you need to set the orientation property of the PlaneMesh to FACE_Z then it will behave the same as QuadMesh did.

For the other issues, it indeed looks like an Octahedral compression issue. To fix it, you just need to reimport your assets

OMG, thank you for your tip on resolving particle issue, I didn't even see that option there until you mentioned, always used QuadMesh because of that, thank you!