3ds max: ogre exporter 1.19 problem

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
misterface
Halfling
Posts: 92
Joined: Sat Feb 04, 2006 6:41 pm
Location: Belgium

3ds max: ogre exporter 1.19 problem

Post by misterface »

I’m using ogre exporter 1.19 to export a big mesh from 3ds max7.

But after some time I get following error:

--runtime error: out of scripter memory – use options to increase

Any idea how to solve this?
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 »

use options to increase
User avatar
Seeadler
Gnoblar
Posts: 7
Joined: Tue Oct 15, 2002 2:42 am

Post by Seeadler »

I have set the "Initial heap allocation" in 3DS Max to 100MB and be able to export a 80K poly model. 3DS Max must be restarted after adjusting this option. Be careful with this option, a very high value will cause an error, 3DS Max will crash at start.
misterface
Halfling
Posts: 92
Joined: Sat Feb 04, 2006 6:41 pm
Location: Belgium

Post by misterface »

thanks! that works!

and how do you export the materials from 3ds max 7?
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 »

Check the "Export Materials" option at the bottom of the exporter GUI.
misterface
Halfling
Posts: 92
Joined: Sat Feb 04, 2006 6:41 pm
Location: Belgium

Post by misterface »

**update**

Entity *ent = mSceneMgr->createEntity( "MSworld", "1.mesh" );
ent->setMaterialName("Examples/Rockwall");
SceneNode *node = mSceneMgr->getRootSceneNode()->createChildSceneNode( "MSworld" );
node->attachObject(ent);

--> I can see the mesh in ogre with the rockwall material.
but I want my own textures (named 1.material from 3ds exporter)
How do I do this? ent->setMaterialName("1.material"); does not work :/ and i can't find an answer in the tutorials...

thx in advance
User avatar
celic
Gnome
Posts: 363
Joined: Wed Mar 23, 2005 11:05 am
Location: Chisinau/Moldova
Contact:

Post by celic »

--> I can see the mesh in ogre with the rockwall material.
but I want my own textures (named 1.material from 3ds exporter)
How do I do this? ent->setMaterialName("1.material"); does not work :/ and i can't find an answer in the tutorials...
the .material file does not contain any textures itself, it's just a file which contains material scripts.

Code: Select all

ent->setMaterialName("1.material");
this line of code you wrote means that you're tring to use a material named "1.material" which could be in any .material file.

try to remove this line of code, and you'll probably see the model with it's own material/texture.
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 »

You need to reference the material name inside the file, not the file itself. The file is loaded and the material(s) inside are parsed with the rest of the resources.
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 »

Or put differently:

Just whack it in your media folders, and Ogre will take care of business: put your mesh in media/models, your textures in media/materials/textures and your material script in media/materials/scripts.

Then load your entity into Ogre, and watch it texture itself via the material script.
misterface
Halfling
Posts: 92
Joined: Sat Feb 04, 2006 6:41 pm
Location: Belgium

Post by misterface »

thx guys, i can load everything successfully!!

but :)

anyone has an idea for tiling?
the tiling used in 3ds max is 'lost' when exporting.
so I tried uvw mapping with tiling but thats not compatible with meshes (and the exporter needs a mesh to convert...)

maybe there is a solution for this problem?

UPDATE
*** PROB SOLVED!!! :)) ***
misterface
Halfling
Posts: 92
Joined: Sat Feb 04, 2006 6:41 pm
Location: Belgium

Post by misterface »

Still having some problems :roll:

First let's say that I can load a simple scene successfully!!

But with a 'big' level (600 small objects) I have some problems:
- first of all: I can't 'attach' all my objects to 1 single mesh because 3ds max is out om memory then... (has nothing to do with initial heap...) :x
- when this WOULD work, I expect the ogre exporter to crash too. (even with initial heap set to 200mb)

So how do you guys do this with big levels??? You must have the same problem?!
User avatar
gerds
Goblin
Posts: 260
Joined: Mon Sep 01, 2003 3:59 am
Location: London, United Kingdom
x 1

Post by gerds »

Yeh I am interested to find out how to export a large scene from max as well. Traditionally we use a huge static scene for our applications, some 30km x 10km terrain with buildings, roads and trees etc, exported straight from max to one huge 300Mb file.

We then add a couple extra people and cars etc on to the static mesh at runtime. Can we still do this in ogre? or do we have to build the terrain as one model? place each of the hundreds of tree's seperately in the applications loader? same with buildings etc.. :(
Lioric
Google Summer of Code Mentor
Google Summer of Code Mentor
Posts: 295
Joined: Fri Aug 06, 2004 10:25 pm

Post by Lioric »

Use oFusion to create, work with and export large scenes
Post Reply