PDA

View Full Version : Saved DDS producing square shield



Jagger
11-04-2004, 20:13
I have been modding TGA's recently. Redid the macedonian hypastists and was pretty happy with the results.

I started redoing the macedonian peltasts. Basically, I substituted a light blue for the orange areas. When I finished, I loaded everything up and tested it in the custom battle. Everything worked out fine except for the shield shape. Instead of a round shield, I ended up with a square shield. It looks like the black background surrounding the shield in the TGA is now displayed with the shield resulting in a square shield.

The TGA is saved as a DDS DXT 5 file. Any ideas as to what caused this problem and how I can solve it?

Thanks in advance!

Thedevil003
11-04-2004, 21:36
You have a problem with your alpha; it should be save as interpolated alpha.

Jagger
11-04-2004, 21:49
Thanks, Devil.

I am using the DXTBMP tool for saving and exporting the TGA's. I have been importing the TGA into the DXT tool, then exporting to Paint. After making color changes, I then save the results as a BMP. Then I use the DXTBMP tool to reload the BMP. Once reloaded, I save as a DDS DDT5 file to convert the BMP back to a TGA file.

Where did I introduce the problem with the alpha? Typically I don't do anything except paint the BMP with PAINT. Then save and convert, etc.

Some of the options I see under alpha are to "refresh alpha", "import/export", and "apply alpha to image". I don't see an option to interpolate or save the alpha. Would selecting any of these options result in an interpolated alpha?

Thanks in advance!

Plantagenet
11-04-2004, 21:49
The only time I've seen those squares is when I messed with the black background. So if you cut and paste anything, it must be just the object itself, no background. You can't just paint it black where you've altered it, you apparently have to leave it alone altogether.

Jagger
11-04-2004, 22:13
Actually I have been wondering how to cut and paste but I haven't even attempted to do it yet. And I am not sure I can do it with MS Paint.

The only thing I did besides the import/export/save process was to touch up the shields and change the color of the trim in some other segments. Somehow I seem to have accidently converted the alpha background from transparent to opaque. I suspect it happened during the save process but I really don't know.

Jagger
11-04-2004, 22:16
I think I just found the problem!!!

I saved as a DXT1 instead of DXT5 file. DXT1 doesn't have an alpha.

Let me go test.

Jagger
11-04-2004, 22:43
Not the problem, back to square one.

Jagger
11-04-2004, 22:51
Not the problem, back to square one.

Jagger
11-05-2004, 01:28
Bump....any ideas out there? I'm stuck.

The Evil Emperor Mindstation
11-06-2004, 07:01
I had the same problem too.

I use Gimp to edit the textures. If you get it i can help you. You can get it at http://www.gimp.org/
Add an alpha layer to the image then select the area you want to be transparent . Then set the "threshold alpha" for that area to maximum. This should make the black thingy around the shield go away.

-Emp

Jagger
11-06-2004, 14:52
Thanks! I will give it a shot today.

The samnite
11-07-2004, 07:37
Hey Jagger, I use DXTBMP too and I also get the square shield syndrome sometimes. I'm also not quite sure what causes it but here's a few things to check:
There is an import/export alpha channel option under the alpha drop menu. I always use that because when you import you picture from the editing program (like paint) the alpha channel will either be messed up or dissappear. I always export the alpha when starting a new texture and import it everytime I save a new one.

Make sure your file size is 86kb. All the CA textures are that size. Also, make sure the filename has .tga on the end.

Hope some of this helps!

Taamati
11-07-2004, 08:58
Here's how you save a texture so it retains it's alpha channel.

Firstly make sure you have an alpha channel, and make sure you only have 1. Creating new layers will probably create extra channels so you'll have to delete them.

Next save as .DDS with DXT5 interpolated alpha. Make sure you have generate mipmaps on.

That's it

Jagger
11-07-2004, 20:59
Thanks for all the feedback.

First, Samnite, "I always export the alpha when starting a new texture and import it everytime I save a new one." Are you separating the alpha from the TGA before starting work on the TGA with the paint program? Are you saving the alpha separately by exporting and then once the work is done, you import the original alpha back to the TGA?

If I understand correctly, I may be able to go to the original TGA and save the alpha. Then I could import the alpha into my completed TGA. Which would revert the alpha back to the original.

Second, Taamati, "Firstly make sure you have an alpha channel, and make sure you only have 1." This is going to sound dumb but how do make sure you have an alpha channel and how to you determine if you only have one?

Thanks again.

Taamati
11-07-2004, 22:15
I'm not sure where it is in pantshop but in photoshop there is a channels tab next to the layers tab just click that and you get the RGB, R, G ,B and Alpha. it works just like a layer.

Now don't forget when you paint on the alpha it's in grey scale and the White areas show the texture and the Black is transparent, shaded of grey are partial transparency. your going o have to paint that black corner on the shield black on the alpha channel so you don't see it

AmbrosiusAurelianus
11-08-2004, 19:38
What I do is take the original dds file, and draw what I want on to another, second, temporary dds file (remember to back up), then make the background on the second bright green, and erase everything else. Then cut out a layer round your shield, drag it on to the first, where it will be a new layer; position it over the shield, and erase all the green. If you save it properly, you should have changed just the painted part of the shield over the original and not tampered with the surroundings, which seems to be the trouble. This is a bit of a slapdash method, so feel free to laugh, but it has worked for me on occasion. Just thought I would mention it.
~:)