• Advertisement
Sign in to follow this  

cube map utilities

This topic is 4718 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Anyone know of a utility or existing source that can build .dds cube maps from a set of .tgas with existing mip maps (or memory image data)? I don't want to have mip maps generated, I want to use my own data and just have the cube map .dds built, perhaps with compression. I know the format information is available but I'd rather not rewrite the wheel.

Share this post


Link to post
Share on other sites
Advertisement
You can use the DX Texture Tool that comes with the DirectX SDK if you just want to assemble some images (You can create a cube map and load .TGAs onto the surfaces).

If you want to do it in code, take a look at some of the D3DX functions (D3DXCreateCubeTexture(), D3DXLoadSurfaceFromFile[InMemory]()) to create cube maps at runtime.

Share this post


Link to post
Share on other sites
Hmm....

This is for an automated tool so I can't use one of the many fine GUI driven cube map utilities (none of which allow you to supply your own mip maps for cube maps anyway...)

I don't want to load many surfaces separately at runtime for performance and simplicity - it would be annoying to have 6*8 = 48 or so separate texture files lying around in my asset pipeline. Another reason I didn't want to use the d3dx functions in the tool is that you must create a bunch of d3d objects (d3d, device, textures, surfaces) which are really peripheral to the task. IMO an offline tool should be able to do any type of format conversions by munging data around without messing with d3d directly.

Share this post


Link to post
Share on other sites
If the only thing you are trying to avoid is having lots of textures lying around, then just combine all 6 targas into one texture. Then you can assemble them into a cubemap at runtime with only one texture load.

Share this post


Link to post
Share on other sites
It would be something more like 48 surfaces, for each of the faces and mip levels.

I want to do as little work at load time as possible. It doesn't make any sense to me to do work at load time that can be done while preprocessing. This means having a single .dds file that is loaded in one operation. I definitely don't want to have a lot of surfaces being moved around and copied, byte by byte, into texture objects. That would be a substantial anti-optimization.

Share this post


Link to post
Share on other sites
IIRC there are some DDX utilities from nVidia that consist of command line tools and some static libraries. Google for "DDS utilities" or "DXT library".

Share this post


Link to post
Share on other sites
Yeah...they don't let you supply your own mip maps, for cube maps or otherwise. They only generate mip maps using various filters.

I'm pretty much resigned to dealing with the format myself at this point :(.

Share this post


Link to post
Share on other sites
Wow, it looks like that will solve my original problem and save me a lot of work. Thanks a lot for the information!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement