Big problem for me (About .3ds and .mesh)

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
User avatar
ahmadi
Gnome
Posts: 312
Joined: Sat Nov 26, 2005 4:03 pm

Big problem for me (About .3ds and .mesh)

Post by ahmadi »

Hi
i have some models in 3dsmax that was created by my modeller . now i want use this models in ogre.
i was readed all things about converting .3ds to .mesh in this forum ( by searching)
its very hard for me that i use some exporter such as octupus,...
because all of my models was created by 3dsmax's standard material, and for exporting as .mesh format i must convert this materials. its may be seen easy but for example i have a big city that approximately have 1200 material, no body can convert this materials.
i know that there is a 3dslib for c++ that can open directly .3ds file to c++
some guys say me that i write myself 3ds loader, i know this but i have not enough knowledge for this situation.
now i really ask from all ogre heros that help me. you can help me in following item:
1.help me to i find a 3ds loader for ogre(maybe other person was writed it).
2.hehe, sorry for this request but you write a 3ds loader ( because im a amateur).

new
its my screen shot of my project(with another renderer engine)
http://ahmadi1.topcities.com/ss2.jpg
http://ahmadi1.topcities.com/ss1.jpg
http://ahmadi1.topcities.com/city1.jpg
now i want create the project with ogre.
new
Pre Big thanks for any help
Last edited by ahmadi on Sun Feb 05, 2006 11:51 am, edited 1 time in total.
_________________________________
Best regards

Ahmadi
User avatar
raicuandi
Gargoyle
Posts: 1092
Joined: Wed Nov 09, 2005 12:56 pm
Location: Adelaide, Australia
Contact:

Post by raicuandi »

what you've read could be old
download the newest version of the convertor and try it out: convert the file, and load them with the example program (allready compiled) that comes with the Ogre SDK
User avatar
ahmadi
Gnome
Posts: 312
Joined: Sat Nov 26, 2005 4:03 pm

Post by ahmadi »

raicuandi wrote:what you've read could be old
download the newest version of the convertor and try it out: convert the file, and load them with the example program (allready compiled) that comes with the Ogre SDK
What is name of the convertor that you mentioned.
and url for download?
_________________________________
Best regards

Ahmadi
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 »

.3ds is an outdated format that can't preserve all the information that's usable in modern engines (like multiple texture coords, bone assignments etc), your modeller really should not be using it. Tell him to use a proper exporter instead.

Otherwise if you're forced to use it, you can import .3ds into many other packages like Milkshape and Blender for which there are OGRE exporters. You can also use this to clean up the crap that .3ds can't handle.

The direct converter is in ogreaddons/3ds2mesh but be aware this is not an officially supported tool.
User avatar
ahmadi
Gnome
Posts: 312
Joined: Sat Nov 26, 2005 4:03 pm

Post by ahmadi »

sinbad wrote: Otherwise if you're forced to use it, you can import .3ds into many other packages like Milkshape and Blender for which there are OGRE exporters. You can also use this to clean up the crap that .3ds can't handle.

The direct converter is in ogreaddons/3ds2mesh but be aware this is not an officially supported tool.
i have not any force for importing a 3ds file to ogre.
i only want to export an object(with standard 3dsmax uvw map ) from 3dsmax to ogre. no more
its not important for me that what is my model format.
exactly , my problem is
<Ahmadi> i have some models in 3dsmax
<Ahmadi> the models was created by my modellers
<Ahmadi> now i want use this model in ogre
<Ahmadi> in my first try
<Ahmadi> i was used octupus exporter for 3dsmax
<Ahmadi> but it say me that i must use octupus material instead of 3dsmax standard material
<Ahmadi> and i can not do it
<Ahmadi> because my models have very materials
<Ahmadi> and its very hard that i change all material
<Ahmadi> or i recreate material


maybe you want say me that i can recreate materials but for example i have a city that have very material and its impossible that i recreate materials.
i have not any problem for exporting mesh data without any materials.my problem is in exporting materials.
_________________________________
Best regards

Ahmadi
User avatar
ahmadi
Gnome
Posts: 312
Joined: Sat Nov 26, 2005 4:03 pm

Post by ahmadi »

im forgot to say that im using 3dsmax 7.
_________________________________
Best regards

Ahmadi
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 »

Normally you shouldn't have problems using the default max materials, but you do have to manually edit the xml files to remove the funny material names, especially those with spaces in them.
Otherwise Ogre will not be able to load them. :wink:

If you are in control of your artist: he/she really should use Ogre/Octopus materials: they are far superiour (and makes the artist look better). :)
User avatar
ahmadi
Gnome
Posts: 312
Joined: Sat Nov 26, 2005 4:03 pm

Post by ahmadi »

jacmoe wrote:Normally you shouldn't have problems using the default max materials, but you do have to manually edit the xml files to remove the funny material names, especially those with spaces in them.
Otherwise Ogre will not be able to load them. :wink:

If you are in control of your artist: he/she really should use Ogre/Octopus materials: they are far superiour (and makes the artist look better). :)
i have a simple box and simple material but i can not export it, and after exporting i have only a box01.mesh and not any more file.
maybe the ogre exporter dont work on 3dsmax7
_________________________________
Best regards

Ahmadi
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 »

It should work on max7 - did you try the octopus exporter? It is probably more up-to-date.
misterface
Halfling
Posts: 92
Joined: Sat Feb 04, 2006 6:41 pm
Location: Belgium

Post by misterface »

ahmadi wrote:
jacmoe wrote:Normally you shouldn't have problems using the default max materials, but you do have to manually edit the xml files to remove the funny material names, especially those with spaces in them.
Otherwise Ogre will not be able to load them. :wink:

If you are in control of your artist: he/she really should use Ogre/Octopus materials: they are far superiour (and makes the artist look better). :)
i have a simple box and simple material but i can not export it, and after exporting i have only a box01.mesh and not any more file.
maybe the ogre exporter dont work on 3dsmax7
i use ogre exporter and max7. I get 2 files (.mesh and .material)
but I don't know how to load the material in ogre. :-(

Entity *ent2 = mSceneMgr->createEntity( "MSworld", "1.mesh" );
ent2->setMaterialName("1.material");

does not work
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

The material name (not filename) is associated when the mesh.xml is converted into .mesh. You tell Ogre to load your .material by specifying its location with ResourceGroupManager::addResourceLocation(), and when you call ::initialiseAllResourceGroups() it will read the material and make it available to your mesh.

Ahmadi, you've been at this a while now; you surely have looked at the API Reference by now and know what setMaterialName() expects.
User avatar
ahmadi
Gnome
Posts: 312
Joined: Sat Nov 26, 2005 4:03 pm

Post by ahmadi »

My problem has been solved. :D :D
Thanks all
_________________________________
Best regards

Ahmadi
Post Reply