Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Flipping cloth? ScaleX == -1?
#4
(14-08-2019, 11:11 AM)cubrman Wrote: You are making things unnecessary confusing, it is clear from your answer that my suggested approach can fix absolutely everything: let me know where you compute stuff and I will make sure that my mesh is NOT flipped just before the calculation and flipped again (if necessary) just after the calculation. Then there would be no reason to do anything else, as normals won't be flipped (they aren't for all of my other meshes) and mesh simulation would be absolutely clean and clear. This approach works perfectly with Final IK - it will work with your plugin too.

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.

Quote:(they aren't for all of my other meshes)

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

(14-08-2019, 11:11 AM)cubrman Wrote: Ofcourse I thought about rotating the character. But for now it would introduce quite a number of complications into the project and would require quiet a large body of work to be done to be worth it.

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.
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