Combining multiple DDS files

All tutorials about Celestia go in here. For Celestia itself, add-ons, textures, scripting, etc.
Topic author
Brady
Posts: 2
Joined: 27.03.2011
With us: 13 years 7 months

Combining multiple DDS files

Post #1by Brady » 30.03.2011, 22:14

Is there an application or script that can combine multiple DDS files into a single texture map so it can be used with a 3rd party 3D app?

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Re: Combining multiple DDS files

Post #2by selden » 31.03.2011, 03:13

Do you mean append them side-to-side and top-to-bottom to produce a larger texture image?
Or to combine them as mipmaps for viewing the optimal resolution image?

At any rate, Nvidia provide utilities for manipulating DDS/DXT files. See the texture and image tools at the bottom of the page http://developer.nvidia.com/page/tools.html
Selden

Topic author
Brady
Posts: 2
Joined: 27.03.2011
With us: 13 years 7 months

Re: Combining multiple DDS files

Post #3by Brady » 31.03.2011, 15:21

Thank you for your response.

Yeah, I've tried the NVIDIA tools, they don't work. Celestia can map a planet simply by choosing alternate surface and linking the folder containing the multiple dds files. I was wondering if there's
a way to do that outside of Celestia.

Yes I mean append them side to side and top to bottom automatically. Is there a way?

Thank you

-B

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Re: Combining multiple DDS files

Post #4by selden » 31.03.2011, 16:48

A lot of coding was involved in getting Celestia to support tiled textures -- which it calls "virtual textures".

Imagemagick ( http://www.imagemagick.org/ ) supports at least some of the DDS formats. Its command-line utility "convert" can append images to one another either horizontally or vertically.

Code: Select all

# +append concatenates left-to-right
convert pic1.dds pic2.dds pic3.dds +append row1.png
convert pic4.dds pic5.dds pic6.dds +append row2.png
convert pic7.dds pic8.dds pic9.dds +append row3.png
# -append concatenates top-to-bottom
convert row1.png row2.png row3.png -append merged.jpg


An alternative would be to use its "montage" utility. It might do "the right thing" if *.dds is specified. I haven't tried that.
Selden


Return to “Tutorials”