Octopus exporter creating LODs

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
User avatar
DrPain
Gnome
Posts: 349
Joined: Tue Jul 05, 2005 2:51 pm
Location: Connecticut, USA

Octopus exporter creating LODs

Post by DrPain »

I hacked my version of the Octopus exporter to do LODs on export, and thought someone else might like the info.

I'm no script writer, so this is indeed a hack (hardcoded values). However it works fine.

This change is in the file OctopusToolbar.mcr in the directory scripts\octopus\macros.

Change line 343 from:

format "% \"%.mesh.xml\" \"%.mesh\"\n" xmlfullpath filename filename to:batfile;

To:

format "% -l 5 -d 20 -p 25 \"%.mesh.xml\" \"%.mesh\"\n" xmlfullpath filename filename to:batfile;

and change line 357 from:

DOSCommand (xmlConvPath + "\\" + xmlexe + " \"" + filename + ".mesh.xml\" \"" + filename + ".mesh\"") ;

to:

DOSCommand (xmlConvPath + "\\" + xmlexe + " -l 5 -d 20 -p 25 \"" + filename + ".mesh.xml\" \"" + filename + ".mesh\"") ;

This will generate 5 LODs with a distance setting of 20, and a percentage change of 25. Adjust these numbers as you need.
Post Reply