Best b3dpipeline/gile[s] artpath?

Blitz3D Forums/Blitz3D Programming/Best b3dpipeline/gile[s] artpath?

Dreday(Posted 2004) [#1]
I am working on a 3rd person action game (similar to Max Payne in gameplay) and I need some advice as the best method to export my artwork into Blitz. I am modelling in 3dsMax and lightmapping using gile[s]. I already know how to export models and all that stuff. What I need to know is what the best method for level editing using these tools would be.

For example. I want to have doors that automatically open when the player is close to them. So far the best idea was to name the door objects in 3dsmax something like: "door_17" so that the engine could test the string before the "_" and set this objects as a Door Type (and attach functionality to it). I know there are ways to set custon properties in the b3dpipeline/gile[s]. Has anyone had any success with this.

Also, what is the best method of using referenced objects. For instance, if a room has 100 of the same item, it would seem inefficient to export 100 copies of the same object into a b3d file. A better method would be to arrange placeholder objects to be later replaced with the real version in code via CopyEntity. Has anyone tried something like this? Let me know, thanks.


Rob(Posted 2004) [#2]
You ideally need to be exporting to giles using the B3D file format as this retains multitexturing, vert cols and normals.

You then export the lights only from max using ASE and merge the lights only into giles using ASE. This is the cleanest and most accurate way to get your levels with lights into giles.

As regards to doors, this isn't a problem. Those are seperate objects in Max and named as "door".

After the whole lightmapping process, giles will export a lightmapped B3D file. Use LoadAnimMesh, and then use "nextchild" function (in code archives and the fps code in my signature) to loop through each child in the level and use instr to search the child names for door.

Add each door to a type.

Type Door
field entity
End Type

Then in your game, each loop, use EntityDistance with types to loop through all the doors and the player. As you get closer to the door, it will slide smoothly open (with a little code).

Your other point mentions multiple copies. I made a feature request for instances/references recently which fell on deaf ears in general discussion. Why not see if you can dig up that topic and add your support?

You alternatively (in the case of items) can add a dummy object in max (under helpers) and name them. Then using the technique for doors above, search the children for named objects which have "health" etc. Then simply place health at the dummy location.

You would have loaded health object and used copyentity for each item that needed placing. The dummy will be a pivot (pipeline and giles preserve this data). The pivot has x,y,z,scale,rotation and name.

Instr was used because max will add a number on the end of copied objects. Just makes life easy. Don't forget lower$ in your comparison as well.

You can look at my fps test code for a way to loop through all the children in a level and extract interesting ones.


Dreday(Posted 2004) [#3]
Thanks so much for the quick reply. I was beginning to get worried that I would need to develop some sort of level editor / object placer for my game. Now that I can do all the object placement in max, I am going to save a lot of time. My hope is that I can just get a solid system together so that I can set a whole scene up in max and just load it up in the blitz engine and have it work. Once this works good I could just overwrite the b3d file and run the same exe and get the new level without any code changes. I would basically be using max as a level editor.

BTW, I checked out the code for the FPS Shell, real nice stuff. Thanks


Jeremy Alessi(Posted 2004) [#4]
Yep, Max is basically the level editor for us now. Aerial Antics had a separate editor but that was all before the pipleline came out in full force.