pokepetter / ursina

A game engine powered by python and panda3d.
https://pokepetter.github.io/ursina/
MIT License
2.18k stars 327 forks source link

The *.stl mesh imports mirrored #493

Open fader111 opened 1 year ago

fader111 commented 1 year ago

Entity(model=_path, scale=(.1, .1, .1), y=-2, flipped_faces=False, ) loads as a mirrored object. without flipped_faces=False mesh is transparent. In blender or Paint3D it loads correct. What can be the problem?

pokepetter commented 1 year ago

.stl is not supported by ursina. If the format is not supported, it will try to load it with assimp instead. However, my guess is that .stl doesn't include coordinate system information, so it gets mirrored. I recommend using either .obj or .gltf/.glb. If you can't export to those formats, you can import the .stl to Blender and convert it there.

fader111 commented 1 year ago

Unfortunately, the same results with *.obj. There are 2 meshes in blender( ok ) and in ursina (mirrored). obj's are in attach also. Can be solved by importing with negativ scale by one of axes, though. But it looks like a hack. obj2.zip blenderOBJ ursinaOBJ