Page 1 of 1

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

Posted: Sat Nov 19, 2011 12:59 am
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

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

Posted: Sat Nov 19, 2011 1:01 am
by mr otakhi
Try doing a Join (Crtl-J) after select All and export them as one single mesh and see if it helps.

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

Posted: Sat Nov 19, 2011 3:27 am
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.

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

Posted: Sat Nov 19, 2011 4:18 am
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?

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

Posted: Sun Nov 20, 2011 11:38 am
by LDAsh
Try selecting everything in object mode and pressing CTRL+A to "realise" your transforms.

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

Posted: Mon Nov 21, 2011 8:00 pm
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

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

Posted: Mon Nov 21, 2011 8:08 pm
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

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

Posted: Tue Nov 22, 2011 12:10 pm
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.

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

Posted: Tue Nov 22, 2011 5:48 pm
by iblues1976
Hi,
thank you for the great info. I'm going to look into it today.
thanks,
Francisco

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

Posted: Mon Nov 28, 2011 11:18 am
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.