Terrain graphics - .dds problem (GIMP)

Rubin

King
Joined
Dec 7, 2005
Messages
950
I want to have a look at the terrain .dds graphics--but something's not quite right.

I'm using GIMP 2.6.8
DDS Plugin here: http://registry.gimp.org/node/70 (directs to http://code.google.com/p/gimp-dds/ )

The files I am looking at are located in (I did not unpack any Civ5 files):
Code:
C:\Program Files\Steam\steamapps\common\sid meier's civilization v\assets\terrain\pieces\Grass\Europe\

The folder contains what looks like 3 different grass textures: Grass 01, Grass 02 and Grass 03; each made up of 5 files:

Code:
Grass 01.csv
Grass 01_H.dds
Grass 01_H_BLEND.dds
Grass 01_T1.dds
Grass 01_T_BLEND.dds

I am guessing the Grass 01.csv file is an index file that is irrelevant as long as I do not change any file names and keep the original .dds format. The Grass 01_H_BLEND.dds and Grass 01_T1.dds files are completely blank. There's nothing to see--not even a background. The Grass 01_T_BLEND.dds file looks like a normal overlay image.

However, I am still missing the "main" texture and GIMP refuses to recognize Grass 01_H.dds as a .dds file.

Question: What am I doing wrong?
 
Thanks for the quick reply, lemmy101!

I went ahead and unpacked the .fpk files using the Nexus tool. (The process of configuring the tool is definitely not user friendly; and the tool just dumps all the unpacked files (thousands!) into the .fpk folders and makes me wish I had kept the files packed :thumbsdown: ).

Oh well... I was able to locate euro_grassland_d.dds, euro_grassland_h.dds and euro_grassland_s.dds (DX9 folder). The _d file looks much more like a main texture. It's 1024x1024 and "looks" right--if not for the fact that it is semi-transparent. Perhaps it's another overlay image? _h is a 2048x2048 overlay image (I assume), and _s looks like an empty 8x8 image with proper mipmaps.

It feels like there's something missing. :confused:

Edit:

As per this post by Deliverator, the _d file could very well be the main texture I am looking for. I assume Deliverator used the Nexus Terrain Editor. Alas, I currently fail understanding this tool, so I guess I'll have to wait for a tutorial or something. Very nice work by Deliverator, though :thumbsup:
 
As per this post by Deliverator, the _d file could very well be the main texture I am looking for. I assume Deliverator used the Nexus Terrain Editor. Alas, I currently fail understanding this tool, so I guess I'll have to wait for a tutorial or something. Very nice work by Deliverator, though :thumbsup:

I didn't actually use the Nexus Terrain Editor - I just edited the terraindef.csv manually to reference my newly created textures. You can see how I did it if you download the Purple Grassland mod from that post.
 
I didn't actually use the Nexus Terrain Editor - I just edited the terraindef.csv manually to reference my newly created textures. You can see how I did it if you download the Purple Grassland mod from that post.

I did download your mod previously to see if I could figure out what you did. Now I see--and partially understand--the csv changes you made. However, it may be that GIMP is not loading the texture correctly, because your Purple Grassland is shown as semi-transparent.

I assume you did not use GIMP to edit the texture--and also that the application you used did not show the original as semi-transparent. If my assumptions are correct, GIMP is the problem (or me failing to configure GIMP).

Thanks :goodjob:

Edit: Attached image of how it looks on my end.

Edit 2: After loading the texture in Paint.NET I get the exact same semi-transparent result. Could be that the problem is not GIMP after all. :confused:
 

Attachments

  • GIMP_01.jpg
    GIMP_01.jpg
    147.1 KB · Views: 761
The transparency issue "may" not be an issue after all. It could be that the .dds files load incorrectly or that the textures are supposed to be semi-transparent. I am not sure. However, there is a way to get the textures to show correctly in GIMP. Here's what I did to get Deliverator's Purple Grass texture to show without being near-invisible:

  • Load the euro_grassland_purple_d.dds into GIMP (be sure to uncheck Load Mipmaps)
  • Select File -> Save As...
  • (Pick a suitable filename)
  • In the save pop-up menu for .dds files, choose Compression: None and Format: RGB8
  • Load the newly saved .dds and the transparency is gone
This marks a significant breakthrough, because I am now able to see how the textures actually look ;) -- and editing should become much, much easier. The next steps are all about how to get these visible textures into the game. Currently, I don't know which .dds format and compression the terrain textures use.

A huge thanks to Deliverator for paving the way to understanding how this works. :goodjob:

Edit: Heh, I'm not really used to working with these things in GIMP, but I believe I figured out how to re-apply the alpha-channel (the transparency). Note: There's is probably a much easier way of doing this, but here it is :D

  • Load the original semi-transparent .dds
  • Open the channels dialog (it's in the Layer toolbox)
  • Click the "eyes" (visibility) to disable the Red, Green and Blue channels, leaving only the Alpha channel visible.
  • Select Edit -> Copy Visible
  • Load and select the non-transparent .dds
  • Select Layer -> Mask -> Add Layer Mask
  • In the pop-up menu choose White (full opacity) and click Add
  • Select Edit -> Paste
  • Select Layer -> Anchor Layer
  • Select Colors -> Invert
  • Select Layer -> Mask -> Apply Layer Mask
I assume there is a reason having an alpha-channel and semi-transparency in the terrain textures. I also assume GIMP has a funtion to simply copy & paste alpha channels :lol: Oh well...
 
doing dds images for civ4 was very similar, at least for some of them that have transparency...Like the flags, I remember that when I loaded them up with GIMP they would look totally transparent, but if I loaded them up with PS they appear normal. Its pretty much a non-issue if you have PS as well, but yea I guess it could be a pain using only GIMP.
 
If the steps I've taken to produce a new terrain texture using GIMP are correct, I'm left with a single question:

Which format (RGB8, R5G6B8, L8A8, etc.) and compression (DXT1, DXT3, etc.) do I apply when saving the new .dds?

The file I've modified is the euro_desert_d.dds. Hopefully, this should conclude my GIMP issues and I can start a new series of questions on how to actually make the new texture appear in the game.
 
Hi Rubin,
I would personally save default, instead of RGB8 etc, best to leave that as is (regardless of how you got it to show.) The compression probably doensn't matter, but I'd save with DXT3 if I were you. I know this works in game, and makes the file size more reasonable. You can try the other's if you, I think DXT5 I've used, not sure. But since this is just one file, save as defaults, and DXT3 - then you can tinker with it later if you wish.
 
Thanks TheManFromMars! :goodjob:

These are issues that make me worry if my modifications will break the game--simply because I don't really know what all the DXT1, DXT3, etc. mean, what the differences are exactly, and if choosing a wrong option corrupts the whole thing.

I'll try DXT3 and post my results.

Edit: It works!

Simply choose DXT3, check the create mipmaps, and leave format as default. GIMP can still get the job done :D Attached in-game image using Deliverator's Purple Grass mod replaced with the new .dds.

Disregarding the Grass 01_H.dds file refusing to load, I consider the GIMP .dds problem SOLVED!
 

Attachments

  • GIMP_02.jpg
    GIMP_02.jpg
    50.4 KB · Views: 322
Back
Top Bottom