Disabling backfaceCulling helps, but seems like wrong way.
Changing sideOrientation to CW has no effect. (Should I do this?)
It is possible that I do not understand how to convert right-hand to left-hand correctly and forgot something?
I think that converting out of box via one method or flag could be more convenient than now(I found this thread).
Use right hand mode for all scene is not my case, and I really want to drop __root__ node and any transformations, because I have many instances of imported mesh.
Also, I suppose, that .babylon format can help me, but sounds like future is in gltf. (Maybe I’m not right?..)
Note it’s not only the determinant (in the use case it is > 0 so has no effect, it’s mesh.overrideMaterialSideOrientation that matters). I have done something like:
let mainDeterminant = renderingMesh._getWorldMatrixDeterminant();
let sideOrientation = renderingMesh.overrideMaterialSideOrientation;
if (sideOrientation == null) {
sideOrientation = material.sideOrientation;
}
if (mainDeterminant < 0) {
sideOrientation = (sideOrientation === Material.ClockWiseSideOrientation ? Material.CounterClockWiseSideOrientation : Material.ClockWiseSideOrientation);
}
engine.setState(material.backFaceCulling, material.zOffset, false, sideOrientation === Material.ClockWiseSideOrientation);
Please, tell me, .setParent(null) and .bakeTransformationsToVertices() is right way to drop __root__ parenting and clear transformations, or I need to do something else(sideOreintation, mb?..) ?
May you add to mesh loader functionality, that automatically covert right hand to left during importing from gltf and don’t create additional nodes?
I have a question that is off-topic to the OP, but somewhat relevant to the answers:
How do you learn to program in 3D like this? I work as a full-stack engineer building interfaces and APIs/general backend infrastructure, and my education is in computer science (weak on linear algebra and calculus, unfortunately).
I’m specifically asking for texts and other resources. It’s not an abstract question: I want to be where @Evgeni_Popov and @gleb-cher and @sebavan and @Deltakosh are at. I am fascinated that you took the screenshots / playground provided by OP and quickly converted that into a bugfix.
3D programming was what I was interested in far long ago when I was doing demos. Then I had to earn money, so I worked as a regular software programmer (no more 3D), but since august of last year, after I quit my job some months before, I found Babylonjs, fell in love with it and now working with the team