Use SolidWorks model in Ogre3D

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
User avatar
Delrina
Gnoblar
Posts: 14
Joined: Fri Sep 16, 2005 3:51 am
Location: South Korea
Contact:

Use SolidWorks model in Ogre3D

Post by Delrina »

I am going to make a 3D simulation of industrial robot hand using Ogre3D.

I make some 3 models in SolidWorks. I don not know how to export these models to Ogre3D's format.

I also want to use Novodex as physics engine for my application.

Anyone has experience with this matter, please give me some advise.

Thanks,
Delrina Chang.
Last edited by Delrina on Sat Sep 17, 2005 5:59 pm, edited 1 time in total.
User avatar
DrPain
Gnome
Posts: 349
Joined: Tue Jul 05, 2005 2:51 pm
Location: Connecticut, USA

Post by DrPain »

I imagine you'll have to get the model into a format that has an exporter built for it, such as 3DS, Max, Maya, Softimage...
Then you'll have to import it into the other modelling program and export it to Ogre format.

I'm not sure, but there may be a direct 3DS to Ogre converter.
If you can get it to 3DS or Max format, I can export it to Ogre format for you.
User avatar
Delrina
Gnoblar
Posts: 14
Joined: Fri Sep 16, 2005 3:51 am
Location: South Korea
Contact:

Post by Delrina »

Thanks DrPain,

Unfortunately, I already sketched models in SolidWorks. They are mechanical parts of robot hands.

I cannot use 3D AutoDesk because my lab does not buy its license.
User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

1. Export in VRML (File > Save As)
2. Use VRMLConverter (included in Ogre.)
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

Or, here's a tutorial on how to get a SolidWorks model into Blender via VRML.
http://en.wikibooks.org/wiki/Blender_3D ... orks_Model

Blender is significantly better supported by OGRE tools than direct VRML so you might get a better result this way.
User avatar
Delrina
Gnoblar
Posts: 14
Joined: Fri Sep 16, 2005 3:51 am
Location: South Korea
Contact:

Thanks Sinbad

Post by Delrina »

Really good tutorial,

Delrina Chang,
User avatar
Delrina
Gnoblar
Posts: 14
Joined: Fri Sep 16, 2005 3:51 am
Location: South Korea
Contact:

Post by Delrina »

I downloaded latest version of Bleder. Its has a feature to import VRML 1.0.
So the progress to convert a model in SolidWorks to Ogre3D mesh is:
1- From SolidWorks, Save As model to VRML 1.0 format
2- in Blender, user Import VRML 1.0 to import VRML file
3- From Blender, Export OgreXML
4- Use Ogre MeshViewer to open OgreXML file and save to OgreMesh file

For simple SolidWork model, it works well. However when I tried to convert Teapot model, Blender always encounter an error "normalize error"

---------------------------------------
New Question:

How can I define local axis for each OgreMesh so I can rotate and translate it base on this axis. For example. I want to define as z axis which is coincide with the axis of the shaft of a wheel. And in Ogre, I want to rotate this wheel about its shaft.

Delrina Chang,
reimpell
OGRE Contributor
OGRE Contributor
Posts: 570
Joined: Mon Mar 01, 2004 10:35 am
Location: Hamburg, Germany

Post by reimpell »

Delrina wrote:For simple SolidWork model, it works well. However when I tried to convert Teapot model, Blender always encounter an error "normalize error"
From the FAQ:
Wiki wrote:Q. Why does the export log say "error in normalize"?

A. This error happens if the length of the vector to normalize is below some threshold. This may happen in the calculation of face normals (likely) or in the conversion of the armature (not likely). In the case of the face normal you have some really small faces in your mesh, which is usually not what you want. In this case you can use the "Remove Doubles" option in Blender's "Mesh Tools" to get rid of them.
nfz
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 1263
Joined: Wed Sep 24, 2003 4:00 pm
Location: Halifax, Nova Scotia, Canada

Post by nfz »

You can skip step 4 and export from Blender directly to Ogre mesh format by setting up the path in ogreexport.py to point to the OgreXMLConverter.exe.

Locate the section in ogreexport.py:

Code: Select all

# OGRE_XML_CONVERTER
#  the command line used to run the OgreXMLConverter tool.
#  Set to '' to disable automatical conversion of XML files.
OGRE_XML_CONVERTER = 'C:\\softwaredevelopment\\c++\\ogrenew\\tools\\common\\bin\\release\\OgreXMLConverter.exe'
and set the variable OGRE_XML_CONVERTER with your path. The exporter will then convert your mesh to .xml and then launch OgreXMLConverter.exe and convert from .xml to .mesh.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

<moderator>
I am moving this thread to Artist & Content - that way others can benefit from its content! :wink:
</moderator>
Post Reply