Caves Experiments

Posted on January 10, 2010

1 A year ago, I worked on a map called "quarry" with a fellow mapper named MrFin that also contained some caves. Back then I created those caves in 3dmax9 and saved them as separate ASE files. All of these sections were then imported into GtkRadiant as misc_models. To clip the models I used 'spawnflags 2' in the entity editor, making them solid... Now, Although it seem to work pretty well at first I soon discovered some problems later on.

Some disadvantages of 'spawnflags 2' :

- At several mapping forums it is mentioned that - when using spawnflags 2 - some polygons don't clip correctly, or don't clip at all. Players might get stuck near a clipped model - like a rock- or might hit an invisible wall.

- frames per second issues: Using the autoclipping on complex models WILL decrease your fps in that section of your map. This is something that I experienced myself with the quarry cave sections: I created some small rock and stone models for the cavefloor and this had a huge impact on my fps.

- no bot support: Omnibots and fritzbots have major issues with autoclipped models. As far as I know - But I have not tested this myself, only read about it on forums - they will completely ignore any path crossing a clipped model.

Because I want bot support for my map and I want to keep fps as high as possible I decided to create all caves by hand inside GtkRadiant instead of using a 3dsoftware program. Although this is a very time consuming process, I figured it's worth to at least give it a try.


fig.C & fig.D

I created a small testmap containing 2 narrow tunnels connected to a larger cave section ( fig.A) . All looked nice and well until I started texturing the brushes with a rock texture. The side, bottom and top parts of the caves would not properly align as you can see in fig.B. There is a reason why it does this, but I'll spare you the tech talk. Fact is that even the stock maps have this problem like the caves in Goldrush (fig.C) and Fueldump (fig.D). You could make these texture misalignments less noticeable by keeping them a bit darker / not adding a lightsource nearby. However when the caves are getting more complex, there will also be more and more of these misalignments....

So I tried something different: I converted the caves I created into a single ASE model and imported this into 3dsmax. By the way: Getting your ASE model into 3dsmax9 is a bit complicated as there aren't any ASE import plugins for 3dsmax6,7,8 or 9. However there does exist an ASE importer for 3dsmax5 and luckily I own a copy of 3dsmax5. I saved it as a max file that I could now open up in 3dsmax9.


If you look at the original uv-map of the cave section (fig.E) It shows that it's broken up into several different pieces. The job is to turn this into one large piece so the texture misalignments will be kept to a minimum. There's a nice little feature for uv-mapping in 3dsmax9 called "pelt mapping". The result is shown in fig.F.


fig.E & fig.F

The nice thing about using this method is that you can also assign several textures to different faces : for example, for the bottom parts of the caves I used a "sand/rock" texture, while I used a "rock" texture for the side and top parts of the caves. ( fig.G). I saved this model as an ASE model and imported it back into GtkRadiant. The cool thing is that I could use the original brushwork for clipping the model instead of using 'spawnflags 2'


So in the end we have a cave section with higher fps, better texture alignment and full bot support.... What else could a mapper wish for :)