Cutting a hole in Atlas
by Dave Young · in Torque Game Engine Advanced · 12/06/2006 (4:53 am) · 2 replies
I know in the end Atlas2 terrain is just a LOD mesh. Somewhere in the chu generation it has got to make vertexes and faces, and therefore be able to not make a couple of faces somewhere in the terrain, allowing us to cut a hole to put a dungeon entrance or tunnel for a dif.
Aside from detail textures, this seems like one of the biggest missing features from our beloved and esteemed Atlas terrains.
I'd like to invite some really powerful and knowledgeable people to helping me figure this one out, so that it could be done programmatically, if not with an editor. I'll start looking into the code that generates the mesh from the heightmap and post my findings. As wonky as it sounds, I think I'll start by handsetting a heightmap pixel to a specific unused value and see if I can get it to be detected in the mesh generation.
Aside from detail textures, this seems like one of the biggest missing features from our beloved and esteemed Atlas terrains.
I'd like to invite some really powerful and knowledgeable people to helping me figure this one out, so that it could be done programmatically, if not with an editor. I'll start looking into the code that generates the mesh from the heightmap and post my findings. As wonky as it sounds, I think I'll start by handsetting a heightmap pixel to a specific unused value and see if I can get it to be detected in the mesh generation.
#2
Anyway, thanks for the pointer, off to look!
12/06/2006 (6:17 am)
I thought about the LOD issue, and while at first I thought it only needed to be done at the lowest LOD as that's the one a player would want to walk through, it might be a problem if for some reason you wanted the hole to appear at other LODs too. Then again, the cascading repercussions for a LOD hole could have bad effects if you had rigid objects falling through a hole that suddenly got much larger than it should be. Anyway, thanks for the pointer, off to look!
Torque 3D Owner Phil Carlisle
The geomchunks are loaded from an atlasfile. What you can do is grad a geom chunk into an atlas discrete mesh, then mess around with the adm, and finally instate the new edited chunk. There is a bit of code during instate that generates the collision geometry. In theory simply ommitting certain vertices by cutting them out of the adm would do the trick.
I'll give it a try actually.. You would be well advised to do this at the leaf level (the lowest lod of the atlas mesh, basically the low level geom chunk). The only problem is when you get lod switching, you'll have a hole in the lowest LOD, but then as the LOD kicks in, the hole will disappear, unless you propagate the change on up the LOD tree, which implies you are using the low level LOD and generating up the tree to the top.