RotateMesh and mesh distortion

BlitzMax Forums/MiniB3D Module/RotateMesh and mesh distortion

Matt(Posted 2010) [#1]
Hello All.

I have a basic person mesh created in Blender and exported using the python exporter plug-in found here by Gandolf. Anyways, the mesh has a walking animation which animates correctly in Blender and when imported into Minib3d.

However, the mesh is upside down, so I RotateMesh and the mesh becomes completely distorted to the point where I can't tell what it is. RotateEntity however works fine in the regards of the mesh, but makes the coordinate system all messed up.

Is there something I am missing here?


jkrankie(Posted 2010) [#2]
Gimbal lock? Maybe try Warner's matrix code, or turn the model upside down in Blender before you export?

Cheers
Charlie


Matt(Posted 2010) [#3]
I thought about just rotating it in Blender, but that just seems like a bit of a unnecessary work around.

I'm unfamiliar with a gimbal lock. Any details?


slenkar(Posted 2010) [#4]
just a guess......

maybe rotatemesh is not moving the bones so its gets totally messed up,
what about rotateentity?


Matt(Posted 2010) [#5]
Rotateentity works great, but it makes all the coordinates act in reverse, which makes it very difficult to work with.


Matt(Posted 2010) [#6]
Yea, this is pretty unusable. I want to RotateEntity along the z axis to face my character and when they happens, the mesh goes bonkers. So, that means just flipping the mesh in blender is out.


simonh(Posted 2010) [#7]
RotateMesh should work ok. Can you send me the mesh so I can take a look?

An alternative solution is to parent your mesh to a pivot, then just move the mesh using the pivot.


Matt(Posted 2010) [#8]
I have sent you the mesh.

Also, I will try out pivots right now.


simonh(Posted 2010) [#9]
Actually thinking about it, RotateMesh is only suitable for use with static meshes, as it just transforms vertices and nothing else. Sorry, it should have occurred to me sooner.


SLotman(Posted 2010) [#10]
Have you tried importing the mesh on 'regular' b3d, to see how it appears? If it's also upside down, then it may be a problem on the exporter...


Matt(Posted 2010) [#11]
Ok, well I used a pivot and that works great. However, does anyone have a suggestion on how to handle the changes with it's coordinates relative to what the "normal" axis are?