Suggestions on World Building?

Newbie to Panda3D, and I was just wondering if there was a good world editor or something I was missing. I’m mainly looking for something on the order of HL2 (Source Engine) maps, so nothing too terribly elaborate. (Though, if something could scale up well, it’d be a plus). I’m pretty familiar with Q3Radiant (GTKRadiant now, I guess.) and Hammer (HL2 map editor), so a way to at least do the geometry in one of those would be excellent.

The main problem I see with just chucking the .map file into blender and throwing it through Chicken is that from my reading, Panda3d does rendering and collision on a mesh by mesh basis, meaning it’d draw the whole thing… which would be bad. (Unless I missed something.)

So, I was wondering if there was a decent solution to this problem. I’d need normal rendering, as well as collision (At least for the main geometry). I could probably rig up some form of XML file format for actual props, actors, so on, but a way to do that through Hammer or *Radiant would make life so much easier.

I was also wondering if there were any docs on implementing AI and pathfinding (Again, pretty basic “hey, shoot X” for now.) Pathfinding and how to not make them laser snipers would be most interesting.

Thanks in advance

There is no dedicated map editor, though some people are working on one elsewhere in the forum.
Being the Chicken maintainer though I just wanted to point out that you can get Blender/Chicken to do everything you need - its not perfect, that is for sure, but I think its probably the best solution that doesn’t involve baking your own. But then, I’m heavily biased;-)

Firstly, to have it rendering only part of the level rather than all of it all the time Chicken has recently gained Octree support, allowing you to export the map such that it automatically does some degree of culling. Note that octree output alone is not enough for really large levels, but that would involve sophisticated game specific techniques anyway (PVS springs to mind.) - its certainly enough to begin with and has the potential for expansion latter at any rate.
For collision you would probably export a separate collision mesh - you would probably use the basic level geometry shape without the detail meshes, which could have their own collision geometry.

Chicken also supports instancing - that is you can set it up so you have groups in blender with multiple instances - each time it finds an instance it exports the instances position/rotation/scale and a file to load it from only, you can then have a separate set of instance egg files to load from - this is the ideal way to do detail meshes. All you do is load the level egg file and Panda automatically goes and loads the instanced meshes within. For other stuff you can export empties and then write code to find the empties and use their position/rotation/tags to instance stuff. Its possible to have a non-empty in blender be exported as an empty, so for instance you could have a player start visualised with the players mesh yet exported as an empty.

Between those features and stuff like baking in Blender you can do everything that hammer/radiant can do, its just not as well integrated/obvious/easy. Your still going to need to write the glue code I’m afraid. If you do decide to go down this route go look at the Chicken manual - it documents it all.

Saying all that there is no reason why you can’t write a loader for the output of any level editor, but it wouldn’t be easy and I know of none that currently exist.

Think I’ll leave it there - I could write loads on AI, but that is a subject for another post;-)

After playing with Chicken a bit, I really like it, but I have a couple of questions:

Are empties in the scene just exported by name?

Does the octtree splitting occur on a mesh-by-mesh level, or will it split meshes? (From there I could just chuck a .map in, run the collision and normal form, then add details as needed.)

Also: Is there any special requirements for materials exported from Chicken?

Basically yes, though they get put into any hierarchy as long as their parent nodes etc. are selected on export. Tags will also get exported with them, so you can store arbitrary data as needed. But the find and findAll methods in Panda work exactly as you would expect.

The octree code is (currently) quite limited - it expects a single mesh to be exported for octreeing - it won’t handle multiple meshes or indeed a file with empties in. I’m hoping to fix that as some point. However, that one mesh will then be split into multiple smaller meshes for putting into the octree, so if your .map file is in blender as a single mesh it will work fine.

I’ld read the manual to get precisely what it does and doesn’t support material/texture wise, but the basic rule is nothing procedural, i.e. image textures only. Stick to that and it mostly works. It also supports normal maps, which look very pretty if you have them:-)

I’m currently putting together a fps example that demos how Chicken can be used in this way - I basically have everything separated into different layers, so you can just goto the right layer and select all, you then export a different file for each. I then export a geometry file, a collision file and an empties file, loading and handling each separately in code.