Author Topic: Anyone have clues to editing .dds files?  (Read 1966 times)

bilbous

  • Guest
Anyone have clues to editing .dds files?
« on: June 12, 2007, 09:30:06 pm »
I was going to take a look at the glyphs to see if I could clean them up or something but I can't open them for editing. I installed libDevIL.mdk... as well as downloading and compiling DevIL...RC2 from the website but I do not know what to do with them and they probably conflict anyway. Is this a lost cause?

Xordan

  • Crystal Space Developer
  • Forum Addict
  • *
  • Posts: 3845
  • For God and the Empire
    • View Profile
Re: Anyone have clues to editing .dds files?
« Reply #1 on: June 12, 2007, 09:34:28 pm »
I think GIMP has a dds plugin somewhere.

miadon

  • Hydlaa Notable
  • *
  • Posts: 934
    • View Profile
Re: Anyone have clues to editing .dds files?
« Reply #2 on: June 12, 2007, 09:44:37 pm »
- MiadonCam (Refresh page to see live in game Miadon Action!!)

bilbous

  • Guest
Re: Anyone have clues to editing .dds files?
« Reply #3 on: June 12, 2007, 11:18:04 pm »
Thank you muchly, the one I found was for version 1.2 of Gimp. Having trouble compiling it because pkg-config can't find some files. gimp-2.0.pc and gtk+-2.0.pc specifically. do they come from the devel packages? I am installing those anyway.

That seems to have solved that particular problem but now make is choking on glut.h like so:
Code: [Select]
/usr/include/GL/glut.h:531: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘glutInit’
/usr/include/GL/glut.h:539: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘glutInitDisplayMode’
and so on. Any ideas?
« Last Edit: June 13, 2007, 01:26:41 am by bilbous »

bilbous

  • Guest
Re: Anyone have clues to editing .dds files?
« Reply #4 on: June 20, 2007, 04:35:08 pm »
Sadly it seems that this plugin relies on the proprietary glut libraries and is not compatable with the libmesaglut Open Source libraries available in package repositories. I tried to compile the glut but was unable to wrap my head around that either. Looks like I'll have to run the windows binaries provided on that page if I want to use gimp to edit these files. All I can say is Stuff That Nonsense!

Induane

  • Veteran
  • *
  • Posts: 1287
  • What should I put here?
    • View Profile
    • Vaalnor Inc.
Re: Anyone have clues to editing .dds files?
« Reply #5 on: June 20, 2007, 04:40:46 pm »
Ummm I compiled with the libglut in the ubuntu repos

you need:

gtk dev files
gimp dev package
and a few others

Update: I compiled a copy for you real quick and though it works for me I don't know if it will work for you. Worth trying though:

http://vaalnor.mine.nu/Downloads/dds

I also took the liberty of compiling the normalmap plugin for you since I find it useful and perhaps you would too:


http://vaalnor.mine.nu/Downloads/normalmap

Put that in your ~/gimp-2.2/plug-ins/ directory - or wherever your plugin dir is.

In any case I have good luck compiling these.  What linux distro do you use?  These are compiled against Ubuntu Feisty but should work with most modern distro's.
« Last Edit: June 20, 2007, 05:01:29 pm by Induane »

bilbous

  • Guest
Re: Anyone have clues to editing .dds files?
« Reply #6 on: June 20, 2007, 05:52:45 pm »
I use mandriva 2007 and thank you for this kindness, that seems to have done the trick. Now all I have to do is figure out what the heck to do with it. I'll do some experimenting but I know little about the standard. Do the different mipmaps have specific functions or are they like animation frames?

Induane

  • Veteran
  • *
  • Posts: 1287
  • What should I put here?
    • View Profile
    • Vaalnor Inc.
Re: Anyone have clues to editing .dds files?
« Reply #7 on: June 20, 2007, 05:56:11 pm »
I think they are more like multiple layers of detail.  When you use the texture slider for instance you slide down to using the smaller less detailed mipmaps.  Also level of detail in the distance of textures uses these.  Beyond that I don't know much about the standard myself.

bilbous

  • Guest
Re: Anyone have clues to editing .dds files?
« Reply #8 on: June 20, 2007, 06:03:33 pm »
Thanks, I edited the main (biggest) layer and when I saved the image I lost all the others with a messages as to them not all being the same size. Is that what you use the other tool for or how do I get around that?

Induane

  • Veteran
  • *
  • Posts: 1287
  • What should I put here?
    • View Profile
    • Vaalnor Inc.
Re: Anyone have clues to editing .dds files?
« Reply #9 on: June 20, 2007, 06:07:25 pm »
Its been a while since I messed with it, I thought I deleted all but the big layer then had an option to generate mipmaps on export.  Not sure though - if I get some down time here at work I'll play with it.

Edit:

I played around a bit and that is indeed the way to do it.  Just delete the mipmap layers except for the biggest full sized one.  Then edit the image to your desire.  At this point I usually save as .xcf, then merge any layers I have created during editing before saving as .dds - then I go File ---> Save As  and call it whatever.dds   this brings up a dialog asking some basic questions.  I leave everything default but  I checkmark the  "Generate Mipmaps" option.  If you save at this point then close the image and reopen it you will see that those mipmap layers exist again.
« Last Edit: June 20, 2007, 06:18:29 pm by Induane »

bilbous

  • Guest
Re: Anyone have clues to editing .dds files?
« Reply #10 on: June 20, 2007, 06:17:57 pm »
No worries, I saved a copy and got that generate mipmap dialog, seems to be fine. I'll play with it some more. Thanks again...

BTW what is the normalmap used for? Guess I could have a look at it too and see for myself what it is about.

Induane

  • Veteran
  • *
  • Posts: 1287
  • What should I put here?
    • View Profile
    • Vaalnor Inc.
Re: Anyone have clues to editing .dds files?
« Reply #11 on: June 20, 2007, 06:24:12 pm »
Normalmaps are used to generate some depth bump layers for use with things like parallax lighting or some bump mapping.  Instead of just being a heightfield like a heightmap is, it incorporates x,y,and z directional coloring.  Using this in crystalspace allows you to generate some cool bump mapping and parallax mapping effects.  I usually create a texture, then make a normal map of that, and then greyscale that for my heightmap.  A parallax map shader requires 3 textures - main texture - normalmap and heightmap.   This is fun when you want to mess with doing cool things to some of the maps in PS.  I've added parallax mapping to the main hydlaa area for instance on the walls.  Just have to edit the world files and change to a diffuse renderloop since it has a lightier step and then hand edit the materials to change the shader :) Fun stuff :D

Example Heightmap:




Example Normalmap based on previous heightmap:

« Last Edit: June 20, 2007, 06:44:17 pm by Induane »

bilbous

  • Guest
Re: Anyone have clues to editing .dds files?
« Reply #12 on: June 20, 2007, 06:37:58 pm »
Hmm okay a little more than I'm ready for.

I backed up the original zip file with the glyph I edited and zipped the folder containing the edit. It turned out to be a little larger than the original and none of the graphics are viewable in game or in konqueror as they are in the original. How do I fix that? I used a context menu to zip do I need to use some particular commandline switch, perhaps specifying the compression level or is it likely something else?

Induane

  • Veteran
  • *
  • Posts: 1287
  • What should I put here?
    • View Profile
    • Vaalnor Inc.
Re: Anyone have clues to editing .dds files?
« Reply #13 on: June 20, 2007, 06:41:23 pm »
Might have to poke a dev to see exactly which options they used when creating them.  I've only edited textures that are uvmapped onto meshes and have not had trouble with the default options.  They might do something special though so that paws can read them in the gui. 

Karyuu

  • Forum Legend
  • *
  • Posts: 9341
    • View Profile
Re: Anyone have clues to editing .dds files?
« Reply #14 on: June 20, 2007, 06:46:54 pm »
The inventory slots are sized at 64x64 pixels. If an icon is smaller than that, it gets resized in the game, and so to prevent any unwanted distortion new icons are now at the same size as the inventory slots.

Since the icon needs to have transparency, make sure you save it with an alpha channel. Beyond that, I'm not sure what to suggest without seeing screenshots of the icon as it appears in the game, and perhaps your .DDS itself.
Judge: Are you trying to show contempt for this court, Mr Smith?
Smith: No, My Lord. I am attempting to conceal it.