Problem models

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
kuncarous
Gnoblar
Posts: 3
Joined: Mon May 05, 2014 4:16 am

Problem models

Post by kuncarous »

Hello! :)

I am actually working on a custom mesh loader, actually it works perfect, however all the models I load from those special format point to right side(face to right but looks at front, like the up axis is wrong), I tried to rotate for fix it, didn't work not only cause a big bug on the movement(because it rotate the entire object not only the mesh), also I tried to assign a fixed yaw, didn't work, also bug all, the problem is the mesh pointing to right.

Any idea how to fix this? because i am getting crazy, and already tried to find information but nothing worked, everyone ask about how to rotate objects, and that doesn't help at all, I need a way to rotate the bones, position and all when loads for define the up axis to Y(i think if i am not wrong in this case the Up axis is X or Z i am not sure, i am new with this).

Example: sinbad the sample model of ogre, it walks and point up normal, right? and look at front, well think like keep looking at front but his up side instead of be his head is his left side :|
User avatar
mmixLinus
Silver Sponsor
Silver Sponsor
Posts: 199
Joined: Thu Apr 21, 2011 3:08 pm
Location: Lund, Sweden
x 12
Contact:

Re: Problem models

Post by mmixLinus »

I think your mesh loader is interchanging all the X and Z coordinates. You are loading X, Y, Z but should be loading Z, Y, X.
Powered by Ogre3D:
MMiX.Me 3D - 3D Music Player
Galaxy Navigator 3D - 2 million stars (ESA's Gaia satellite)
YouTube|Facebook
kuncarous
Gnoblar
Posts: 3
Joined: Mon May 05, 2014 4:16 am

Re: Problem models

Post by kuncarous »

i thought same, however i tried to exchange every value, and nothing, it destroy the model, the load function is perfect, the problem is that, the models literally point to axis x as up, instead of the axis y, so that cause the problem, so i wonder if exists a way to exchange the axis in ogre directly in the mesh, for don't break the object like will do the function rotate.
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 538

Re: Problem models

Post by Kojack »

Are you also loading the skeleton? If you are, maybe there's a problem reading the bone orientations. That could cause strange stuff like that.

How about a simpler mesh like barrel.mesh or column.mesh? Those are the smallest and simplest default ogre meshes that have a clearly visible upwards direction (the cube.mesh is smaller, but of course you can't tell which way is up).

The sinbad.mesh is modelled as +Y up, +Z forwards. That's actually the wrong way for standard ogre, which does +Y up, -Z forward. But that just means he faces backwards compared to meshes like the ninja. He shouldn't be rolled 90 degrees sideways (if I understand what you described).
kuncarous
Gnoblar
Posts: 3
Joined: Mon May 05, 2014 4:16 am

Re: Problem models

Post by kuncarous »

Solved, i had to change all the fixed yaw axis to X and now works perfect, also had some problems with the orientation, didn't know how it works, but all fine now :), thanks! :3
Post Reply