A texture atlas is basically one big texture that includes all textures of all the batches.
I has just committed a patch from Mattan Furst of a texture atlas extension to the RTSS.
I helped by adding geometry to demonstrate this new feature to the RTSS sample.
Mattan based his work on the well known NVIDIA texture atlas tools.
I created a sample texture atlas using the tool that looks like this:
The first problem we saw immediately was a texture bleed issue when using wrap addressing mode as you can see from this screen shot (on the left side are the original textures and the right side are the textures from the texture atlas):
The solution was lowering the textures quality by half in the texture atlas and have a frame of the texture wrapped, so when it bleeds – it bleeds into the appropriate texture, this modified image demonstrate the idea:
And here is a screen shot of the result with the modified texture atlas:
Here is the code for the modified texture atlas tool that support wrap
and here is a modified exe:
Note - you only need the tool to create texture atlas textures - not to use them - a parser to the tool output is included in Mattan's patch.
I named the texture atlas with the original tool TextureAtlasSampleOrg.tai and the modified one TextureAtlasSampleWrap.tai.
Here they are (for non-ogre forum members that don't want to search for them in the OGRE code):
Here is the command I used to create the atlas:
Code: Select all
"C:\Program Files\NVIDIA Corporation\Texture Atlas Tools\DEMOS\Direct3D9\bin\release\AtlasCreationTool.exe" -width 2048 -height 2048 -o TextureAtlasSample 1d_debug.png 1d_SPIRAL.png checker.png img1.png img2.png LowRes.png radial.png SmallLeaf_BP.png spotlight_image.png Dirt.jpg flare.png nm_bk.png rockwall.tga steelhead.png dirt01.jpg ogrelogo-small.jpg RustyBarrel.png NMBalls.png scr-up-p.png terr_dirt-grass.jpg tusk.jpg
And here are the textures I used (once more for ppl that don't want to download all of OGRE code just for this...):
I committed the patch to the trunk.