Sign in to follow this  
CWizard

Using 3D Studio Max as basic "level editor"

Recommended Posts

CWizard    127
Hello good folks. Has been too long since I was active around here... but now I need your help! I'm currently developing a fairly small educational game, that simulates the construction process and using 3D to visualize the progress. So there will be a number of building projects in the game, and the idea is to break the buildings down into elements/blocks, which encapsulates animation and logic for when work is done on them. Many of these could be shared between projects. The meat of these blocks could be one or more 3D models or done in code or whatever. Now, i could just represent the building in a text file, which lists all objects and their position/rotation. But it would be nice to have a more intuitive way of working with it. I'm a programmer and don't know a lot about modeling software and the designer/modeler doesn't know much about the technical side. So, is there a way of assembling an object/scene in say 3D Studio Max, that takes objects from an "external" library and a way and format to save it so you only get object "class", id, position and rotation in the file? Hope you see what i'm getting at. Don't want or need meshes and materials and so on, since the objects/blocks are defined elsewhere. I'll admit I might be looking at this the wrong way. Cheers!

Share this post


Link to post
Share on other sites
Kryzon    4630
Sure thing.

Make your artist assemble the scene using copies of those prefabs. After that's done, go to File -> Export... -> ASCII Scene Export (.ASE).

When the dialog opens, have your options be like this:

ASE Scene Export Dialog


Which means "no vertex information will be exported", just the objects names and pos\rot\scale data.

In the end you'll get an ASE file (it's plain text) that looks like this:
Quote:


*3DSMAX_ASCIIEXPORT 200
*COMMENT "AsciiExport Version 2,00 - Mon Feb 15 16:29:10 2010"
*SCENE {
*SCENE_FILENAME ""
*SCENE_FIRSTFRAME 0
*SCENE_LASTFRAME 100
*SCENE_FRAMESPEED 30
*SCENE_TICKSPERFRAME 160
*SCENE_BACKGROUND_STATIC 0.0000 0.0000 0.0000
*SCENE_AMBIENT_STATIC 0.5098 0.5098 0.5098
}
*GEOMOBJECT {
*NODE_NAME "Box01"
*NODE_TM {
*NODE_NAME "Box01"
*INHERIT_POS 0 0 0
*INHERIT_ROT 0 0 0
*INHERIT_SCL 0 0 0
*TM_ROW0 1.0000 0.0000 0.0000
*TM_ROW1 0.0000 1.0000 0.0000
*TM_ROW2 0.0000 0.0000 1.0000
*TM_ROW3 -10.7301 24.9387 0.0000
*TM_POS -10.7301 24.9387 0.0000
*TM_ROTAXIS 0.0000 0.0000 0.0000
*TM_ROTANGLE 0.0000
*TM_SCALE 1.0000 1.0000 1.0000
*TM_SCALEAXIS 0.0000 0.0000 0.0000
*TM_SCALEAXISANG 0.0000
}
*PROP_MOTIONBLUR 0
*PROP_CASTSHADOW 1
*PROP_RECVSHADOW 1
}


Most of that stuff you can just cut right off from a Notepad, or you can ignore it when you're going to read the useful bits. I'd recommend encrypting this information so as to prevent users from...tampering with your files.

You can even ask the modeller to name every object conveniently (using prefixes etc.), so that you can parse things better when inside the engine.

Good luck with your project.

Share this post


Link to post
Share on other sites
SteveDeFacto    109
I used 3DS max as a level editor in a game I made a while ago but it became very slow and unusable after I placed just a few objects, I soon moved on to my own editor. I can't say I would advise using it for any thing move then a few very low poly objects.

Share this post


Link to post
Share on other sites
CWizard    127
Quote:
Original post by Kryzon
Sure thing.

Make your artist assemble the scene using copies of those prefabs. After that's done, go to File -> Export... -> ASCII Scene Export (.ASE).


Thank you! Looks like a great solution. The project is in flash using Away3D, which apparently have a loader for ASE (although I'm guessing a need to tweak that a bit). The file is going to be loaded from a server, and hopefully don't have to bother with encryption. Any modification would just cause the game to fail.

Quote:
Original post by SteveDeFacto
I can't say I would advise using it for any thing move then a few very low poly objects.

Think the objects will mostly be dummies representing the components/objects rather than the real models. But thanks for the heads up!

Ah, it's great to be back here! May have a few more questions down the line.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this