[SOLVED] 3D Model from Blender to OGRE MESH looks different

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
iblues1976
Gnome
Posts: 379
Joined: Fri Sep 16, 2011 4:54 pm
x 10

[SOLVED] 3D Model from Blender to OGRE MESH looks different

Post by iblues1976 »

Hi,
I'm new to OGRE3D. My specs are Windows 7 Service Pack 1 (7.1) , Visual Studio 2010, Blender 2.6 , exporter for 2.6 found in the forum (0.5.5 http://www.ogre3d.org/forums/viewtopic. ... =61485%20)

I'm working on the tutorial #1 : http://www.ogre3d.org/tikiwiki/Basic+Tu ... =Tutorials

When I load the OGRE face is perfect as the tutorial demonstrate. However, I went to get a free blender 3D model to test it from here: http://www.blendswap.com/3D-models/architecture/stairs/

In blender it looks like this:
Image
in the OgreMeshy looks like this:
Image
in my app, that I wasn't able to take a screenshot, looks distored as well.
here is the code the scene, which is the same as the tutorial

Code: Select all

void TutorialApplication::createScene(void)
{
    // create your scene here :)
	Ogre::Entity* ogreHead = mSceneMgr->createEntity("Head", "Stairs.mesh");
 
    Ogre::SceneNode* headNode = mSceneMgr->getRootSceneNode()->createChildSceneNode();
    headNode->attachObject(ogreHead);
 
    // Set ambient light
    mSceneMgr->setAmbientLight(Ogre::ColourValue(0.5, 0.5, 0.5));
 
    // Create a light
    Ogre::Light* l = mSceneMgr->createLight("MainLight");
    l->setPosition(20,80,50);

}
Please note that when I exported, the following files :

Code: Select all

Material.004.material
Stairs.mesh
Stairs.mesh.xml
stairs.scene
I don't know how to use blender, but at least I was able to select all, and then export to ogre3d.

what do you think is going on?
thanks,
Francisco
Last edited by iblues1976 on Mon Nov 28, 2011 5:04 pm, edited 1 time in total.
mr otakhi
Gnoblar
Posts: 6
Joined: Wed Jan 13, 2010 4:26 am

Re: 3D Model from Blender to OGRE MESH looks different

Post by mr otakhi »

Try doing a Join (Crtl-J) after select All and export them as one single mesh and see if it helps.
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 114

Re: 3D Model from Blender to OGRE MESH looks different

Post by mkultra333 »

Make sure it's all one mesh, and only apply scale, rotation and translation in edit mode, not object mode. Remove any object mode alterations. That might solve the issue.
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
iblues1976
Gnome
Posts: 379
Joined: Fri Sep 16, 2011 4:54 pm
x 10

Re: 3D Model from Blender to OGRE MESH looks different

Post by iblues1976 »

Hi,
I will try the suggestions. I'm sure is one mesh file , which I guess it means is one mesh (maybe not? )

thanks,
Francisco

Moderator: I wonder if I did post in the right forum or I should had post this in the "HELP" section?
LDAsh
Gnoblar
Posts: 20
Joined: Thu Aug 25, 2011 8:29 pm
x 3

Re: 3D Model from Blender to OGRE MESH looks different

Post by LDAsh »

Try selecting everything in object mode and pressing CTRL+A to "realise" your transforms.
iblues1976
Gnome
Posts: 379
Joined: Fri Sep 16, 2011 4:54 pm
x 10

Re: 3D Model from Blender to OGRE MESH looks different

Post by iblues1976 »

Hi,
Control J doesn't work since it says "No Mesh Data to join"

I do select all to export, but the behavior is what I explained.

LDASH:
When I hit control A, I received a menu named "Apply"
with options: Location, Rotation, Scale, Rotation & Scale, Visual Transformation, Make Duplicate Real.

Which option should I pick. You think this will fix the problem?

thanks,
Francisco
iblues1976
Gnome
Posts: 379
Joined: Fri Sep 16, 2011 4:54 pm
x 10

[SOLVED] Re: 3D Model from Blender to OGRE MESH looks differ

Post by iblues1976 »

Yeah, I selected a few of the options and it looks a lot better now.

thanks,
Francisco

MODERATOR: Can you please show me how to (or do it yourself) set the topic to "SOLVED". Thanks
User avatar
duststorm
Minaton
Posts: 921
Joined: Sat Jul 31, 2010 6:29 pm
Location: Belgium
x 80
Contact:

Re: 3D Model from Blender to OGRE MESH looks different

Post by duststorm »

A problem could be that in Blender you apply some object transformation (for example a scale in Z direction) that makes the model look good, while in fact the geometry is distorted. I believe the Ogre Mesh exporter has an option to apply object transformations or not, try enabling that.

Otherwise: in Blender in the 3D window in object mode, click on Object and select "show transformations". Make sure scale is set to 1 for x,y,z. If by setting it to 1 your model distorts, go back into edit mode (TAB), select all vertices and scale them again in Z direction until your model looks ok.

Another tip, in object mode, select the object of your mesh, press A and select "Apply object scale and rotation". This will restore your object transformations to defaults and apply all those effects to the mesh itself.

Remember that blender has transformations for objects and for geometry. Exporters do not always handle object transformations well. Especially when animating using skeletons (armature) make sure those awful object transformations are set to defaults, or you might get in trouble. Apply object scale and rotation is your friend.
Developer @ MakeHuman.org
iblues1976
Gnome
Posts: 379
Joined: Fri Sep 16, 2011 4:54 pm
x 10

Re: 3D Model from Blender to OGRE MESH looks different

Post by iblues1976 »

Hi,
thank you for the great info. I'm going to look into it today.
thanks,
Francisco
User avatar
Jabberwocky
OGRE Moderator
OGRE Moderator
Posts: 2819
Joined: Mon Mar 05, 2007 11:17 pm
Location: Canada
x 218
Contact:

Re: [SOLVED] Re: 3D Model from Blender to OGRE MESH looks di

Post by Jabberwocky »

iblues1976 wrote:MODERATOR: Can you please show me how to (or do it yourself) set the topic to "SOLVED". Thanks
Just hit the "edit" button of your original post, and type in [SOLVED] at the beginning of the subject. You'll need to be logged in to do this.
Image
Post Reply