Game Development Community

Multiple Detail Maps

by Joe Melton · in Torque Game Engine Advanced · 01/15/2009 (11:55 pm) · 6 replies

Has anybody successfully implemented multiple detail maps with stock (non-Atlas) terrain? I'm talking about having a separate detail map for each terrain texture, stuff like that. I know there used to be some discussions about this on the old forums, but I can't find them in Search, and I'm not going to look through all these pages.

#1
01/16/2009 (4:57 pm)
I saw it done with Atlas in the past... not with TerrainBlock. That said... keep an eye out for a Torque 3D post on this in the future. ;)
#2
01/16/2009 (5:24 pm)
yeah I used to have the one running that would have 2 detail mapd but it was not per texture. It did them both at the same time and the second one was at like 10-20% of the first one.

#3
01/16/2009 (5:46 pm)
Tom, that was probably the answer I was looking for. I'm really hoping for high-quality, detailed terrain texturing in T3D. The lack of good terrain texturing in TGE/TGEA is one of my pet peeves. I've often thought about diving into the code myself as a learning experience, hoping to make this work...but then life gets in the way. :)
#4
01/16/2009 (5:47 pm)
James, that sounds interesting, but not necessarily what I had in mind. Thanks for your reply. :)
#5
01/16/2009 (8:28 pm)
I've done it multiple details with atlas, but using a layermap. We have two detail textures working currently in The Repopulation (I had it rigged for four, but it was more efficient to just use two, we use one for dirt/concrete/road areas and the other for the grass/sand type textures depending on the map). I was unable to get it working properly though, which resulted in some detail popping as you moved. As a result we had to set the detail texture to a near point (40 meters) and used the same layermap for groundcover to cover up the pop when it occured.

Basically what we did was we created an external layermap which we used for both groundcover and atlas when we exported it. Then when we drew detail textures we'd sample that texel, and use the RGB channels (or currently just in our R channel) to see if there was anything in those channels and then adding to a different detaillist. It required a sample pass and an extra detail shader, though if you could live with 8 bit greyscale textures you could use a single texture and have each channel of the image be used as a detail texture. The edges between the details were not smoothed in any way though and it was a dramatic shift. That combined with the popping requiring a short terrain distance, and it you'd really need to use groundcover to hide the areas. It worked well in our case because the groundcover was in the areas that the grass/sand texture was used in so it covered it up well, but if you push the draw distance up too far it is really ugly and noticable.

I haven't worked too much with Legacy terrain, but since it is using a clipmap I'd imagine you could use the same approach.
#6
01/16/2009 (9:26 pm)
J.C., thanks for the example. I think I read a post by you back on the old (good) GG site regarding your terrain implementation. It definitely got me thinking about how it could be accomplished.