Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Flipping cloth? ScaleX == -1?
#5
(14-08-2019, 12:19 PM)josemendez Wrote: Nope it won't fix anything, because of what I just explained. Final IK does not have to recalculate per-vertex mesh normals every frame (they can be directly transformed using the character bones). Obi however does, and does so using a cross product between face vertices, assuming clockwise vertex winding order (the standard approach to normal calculation, that is). As I explained in the previous answer, when you apply a negative scale to the mesh, clockwise orientation becomes counterclockwise thus reversing normals.

You cannot fix this by unflipping the mesh before the simulation and then flipping it again after. As I said the easiest fix is to negate the normals in your shader, when your object has negative scale.


Of course, since all other meshes do not need to recalculate their normals from scratch every frame.


IMHO, dealing with negative scales is usually much more troublesome than dealing with rotations. Rotation is always representable in the real world, however negative scale isn't. Many lighting and physics operations just don't work with negative scale.

The only thing I am baffled about is this: why don't you just let me try and see for myself? Just tell me the best case scenario the best way to do what I want to do and let me fail on my own. Maybe then I will have other ideas. Flipping normals in the shader isn't hard for me - I am worried about cloth mesh jumping into colliders after flip though.
Reply


Messages In This Thread
Flipping cloth? ScaleX == -1? - by cubrman - 13-08-2019, 05:29 PM
RE: Flipping cloth? ScaleX == -1? - by josemendez - 14-08-2019, 09:10 AM
RE: Flipping cloth? ScaleX == -1? - by cubrman - 14-08-2019, 11:11 AM
RE: Flipping cloth? ScaleX == -1? - by josemendez - 14-08-2019, 12:19 PM
RE: Flipping cloth? ScaleX == -1? - by cubrman - 14-08-2019, 04:48 PM
RE: Flipping cloth? ScaleX == -1? - by josemendez - 14-08-2019, 05:30 PM
RE: Flipping cloth? ScaleX == -1? - by cubrman - 22-08-2019, 06:13 PM
RE: Flipping cloth? ScaleX == -1? - by josemendez - 23-08-2019, 07:17 AM
RE: Flipping cloth? ScaleX == -1? - by cubrman - 23-08-2019, 10:03 AM
RE: Flipping cloth? ScaleX == -1? - by josemendez - 23-08-2019, 10:05 AM
RE: Flipping cloth? ScaleX == -1? - by josemendez - 23-08-2019, 10:35 AM
RE: Flipping cloth? ScaleX == -1? - by cubrman - 23-08-2019, 12:10 PM
RE: Flipping cloth? ScaleX == -1? - by josemendez - 23-08-2019, 01:06 PM