o3de / o3de

Open 3D Engine (O3DE) is an Apache 2.0-licensed multi-platform 3D engine that enables developers and content creators to build AAA games, cinema-quality 3D worlds, and high-fidelity simulations without any fees or commercial obligations.
https://o3de.org
Other
7.8k stars 2.2k forks source link

Cloth Mesh UVs not updating with simulation (looks like a projection) #13522

Closed micronAMZN closed 1 year ago

micronAMZN commented 1 year ago

Create a reasonably dense cloth mesh and apply a material that has a diffuse color map with a graphic feature such as a logo. Simulate the cloth with a force such as wind. Notice that the texture seems to be projected onto the cloth and behaves like a reflection on a water surface rather than being attached to the simulated cloth mesh.

https://user-images.githubusercontent.com/58789750/205430639-7a857b77-55aa-4fc7-afca-9205f691bb93.mp4

Steps to reproduce the behavior: You can follow the steps in the Wind Forces Tutorial to set up a cloth simulation. Use a higher density grid for the cloth mesh than the sample meshes, something that can generate more realistic simulations with folds. The cloth in the preceding movie has approximately 3200 quads. Use a diffuse color map that has an easy to discern feature such as the O3DE logo in the preceding movie.

Expected behavior Expect UVs to update with the simulated mesh and appear attached to simulated cloth surface.

Actual behavior UVs seem to be projected, and texture resembles a reflection on a water surface.

Found in Branch Development branch as of 12/3/22

Commit ID from o3de/o3de Repository.

2e3a0c5b21ce90f3a250395acfa5d2ed46b79e12

Desktop/Device (please complete the following information):

hultonha commented 1 year ago

Tagging @moraaar for visibility

moraaar commented 1 year ago

@micronAMZN that's very weird. Can you try with other texture that is not a round symbol and verify the issue happens as well please? I just want to verify it's not a visual effect from using a round symbol, giving the impression it's wrong when it is correct. It used to work just fine and nothing has changed in cloth for a long time, check out this Lumberyard flag:

https://d2908q01vomqb2.cloudfront.net/91032ad7bbcb6cf72875e8e8207dcfba80173f7c/2020/11/20/anim-nvidia-cloth-lyflag-1.23.gif

micronAMZN commented 1 year ago

I played with this a bit more this morning. I was moving the camera around and it occurred to me the material might be the issue. I used a Standard PBR because I had generated a displacement map for this material in Substance painter. Made a new material using Base PBR and it works fine, so there's something in the Standard PBR material that is causing this. Is this expected with Standard PBR? Should we keep this open and redirect it to graphics, or close it?

https://user-images.githubusercontent.com/58789750/205708935-8aff757e-c50e-4087-b04b-d7c3a260e1ba.mp4

moraaar commented 1 year ago

Thanks @micronAMZN , that new flags looks amazing!

Made a new material using Base PBR and it works fine, so there's something in the Standard PBR material that is causing this. Is this expected with Standard PBR? Should we keep this open and redirect it to graphics, or close it?

My recommendation is to close this bug and create a new one specific for sig-graphics rephrasing it as "Standard PBR material not working as expected with cloth" or something on these lines and explaining in the description that with Base PBR it works, to make it clear that is not related to the physics simulation itself, but with the material.

micronAMZN commented 1 year ago

closing