Page 1 of 1

[Release]DDJ/DDS converter

Posted: Thu May 15, 2008 2:56 pm
by JanChlpik
Image

DDS and DDJ converter
Description of program
Program to convert DDJ from Silkroad files and DDS back to DDJ.
How it works
converting DDJ>DDS
Program rewrite the file without first 20bytes and rename it as DDS.
converting DDS>DDJ
Program will calculate the header and add original file to it and rename it as DDJ.
Known problems:
Virustotal.com 1 of 32 antivirus reports it as suspicious(possibly due to adding header part)
Cannot open more then 2600 file at once with file select option (Try to convert minimap directory from media.pk2).

Download link
http://files.filefront.com/DDS+DDJzip/;10216780;/fileinfo.html

Alternative link
http://www.mediafire.com/?zwb5fbwyyzk

Recomended programs and plugins:
DDS plugin for adobe photoshop(http://developer.nvidia.com/object/photoshop_dds_plugins.html) or irfanview(http://www.irfanview.com with all plugins or MS DXtool(Need to download whole DX SDK possibly did not find particular download)
Gimp with dds plugin to edit alpha area.

Other programs for texture editing
http://bakhter.com/html/3d/texture_generators.html(not my page, but nice selection of programs and adobe plugins).

Converting DDJ to DDS and back manualy with hex editor XVI
Download
XVI hex editorhttp://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm

You can use script(XVI) to convert DDJ to DDS write(in script window)

Code: Select all

DEL 20
and save it as DDS

To convert it back use

Code: Select all

INSERT 4A 4D 58 56 44 44 4A 20 31 30 30 30 XX XX XX XX 03 00 00 00


How to get XX bytes. When DDS is at begining clicking edit>insert, enter 123456789(in text area), now go to end of file and click at last value in hex field. Read adr. Hex in bottom left corner. Note the adr somewhere and delete the 123456789 numbers from beggining
Examples for Getting XX values from adr. Hex
Adr.: 18A XX: 8A 01 00 00
Adr.:123AB589 XX: 89 B5 3A 12
Adr. 188FA XX: FA 88 01 00
As you see if the number is odd you need to add imaginary zero at beginning.

Saving DDS
Recomended formats:
Picture without transparency: R5G6B5
Picture with one invisible area A1R5G5B5
Fully transparent picture A8R8G8B8

If you use adobe photoshop you should save without mipmap and same for right click converter(works for jpg images if you have installed nvidia dds tools)

Image
ImageImage

Credits:
This program was written in Turbo Delphi.

Re: [Release]DDJ/DDS converter

Posted: Thu May 15, 2008 5:46 pm
by penfold1992
well done good guide! i might make one soon about the ub i made using this tool as well to help people :)
in my opinion this should be sticky'd

Re: [Release]DDJ/DDS converter

Posted: Thu May 15, 2008 5:47 pm
by /Pi
Finally! A working converter. Thank you so much. :D

Re: [Release]DDJ/DDS converter

Posted: Sun May 18, 2008 11:08 am
by JanChlpik
Added directory/subdirectory option.

Re: [Release]DDJ/DDS converter

Posted: Fri Oct 03, 2008 12:54 am
by Knight_Ange1
I dunno how to save this >.>

This is all the options it was already selected by default.

Spoiler!

Re: [Release]DDJ/DDS converter

Posted: Fri Oct 03, 2008 10:38 pm
by Eraser_Rain
what are those converters...

Re: [Release]DDJ/DDS converter

Posted: Sun Feb 01, 2009 6:31 pm
by obeckcity81
nice tool! thanks

Re: [Release]DDJ/DDS converter

Posted: Sun Feb 01, 2009 11:43 pm
by The Furious Ninja
Eraser_Rain wrote:what are those converters...

lets you change the file type of the images inside the media.pk2 and the other .pk2 files so you can edit them change htem back and import them back into the files