I'm working on an updated version of the TV networks mod with the ability to auto switch network based on the next game in a franchise save. However, I have issues with getting logos with transparency in the game properly.
I do the following to import a PNG with transparency:
1. Open PNG in Photoshop CS6
2. Save as DDS, using the settings posted here by NickyJ
3. Import the DDS into a .dat file using DEX
4. Export from the DDS with DFR5
5. Then my mod imports it again using DBR4
I run into two problems:
- Some times, the DDS created at step 2 will have strange artifacts at places that should be transparent. E.g.:
- Other times, the image doesn't turn out completely transparent in the game. I.e. a semi-transparent white rectangle is visible around the logo.
It's kind of hit and miss, some times it works, other times it fails. It's extremely frustrating, because some times I have to create a logo over and over again, just to see it failed again...
Does anyone know any solution to these problems?
Need help importing images with transparency
- KeepinItTeal
- Hall of Fame
- Posts: 1784
- Joined: Fri Feb 19, 2016 5:11 pm
- Location: NE FLA
Re: Need help importing images with transparency
My recommendation would be to use paint.net to do most (if not all) of your transparency work. I have found that it works best. I use Paint Shop Pro for most of my image editing but then switch over to paint.net to do transparency work. Use the magic wand tool in paint.net to highlight any areas you want transparent and then click the delete button and save the file as a .png file. I've found that the .png file format works best for images with transparency.
I posted some additional tips on this topic here: viewtopic.php?f=85&t=19184#p91143
Good luck!
I posted some additional tips on this topic here: viewtopic.php?f=85&t=19184#p91143
Good luck!
Re: Need help importing images with transparency
The problem isn't that the transparency is wrong, the problem is that the conversion to dds goes wrong some times. However, I've now changed to using MUER, which replaces the first color in the palette with full transparency. Doesn't allow for anti-aliasing (I'm not sure the dds method did), but just upping the texture size fixes that anyway.
- GeneralSilent
- MVP
- Posts: 655
- Joined: Sat Apr 09, 2016 7:59 pm
Re: Need help importing images with transparency
Hey fsh, could you explain how you did this with MUER? It doesn't open png files.
God bless america!
Re: Need help importing images with transparency
GeneralSilent wrote:Hey fsh, could you explain how you did this with MUER? It doesn't open png files.
You need to use bmp files. For the transparency, I first make sure there are no semi-transparent pixels (i.e. each pixel is either fully transparent or fully opaque). I do this using Gimp 2's "threshold alpha" option. Then I go back to Photoshop, fill all (fully) transparent pixels with 1 color that is not in the main image (I just add a single color layer behind the main image). Then, you need to convert it to an indexed image. This can be done in Photoshop, but I believe Paint.NET also has this option. It is important to make the new background color the first color in the palette (video below). Save the image as bmp. Then, when importing using MUER, make sure to go to Tools -> Options -> Replacement BitMap and check the first and third options there. If you then import the image, it should work with transparency.
The video below shows how to properly convert to an indexed image. This uses a Photoshop version from the time dinosaurs were still around, but it still works the same in modern versions (I use CS6). Start at 0:27, follow the instructions. In the indexed color dialog, I also tick the "preserve exact colors" option. When you've followed the instructions up until 1:20, you're done and can save it as bmp. The video after 1:20 shows how to check if the transparency works correctly.
Re: Need help importing images with transparency
One method I use to remove the unwanted white lines is to hex edit the alpha value of that color.
What I do is open the dds file in Photoshop. The image will load up with the unwanted white lines. Using the color table's eyedropper I click on the unwanted white line. I then click on that particular color on the color table and read the hex value.
I then open the dds in a hex editor and search for that hex value and set the alpha to 00. Save the dds file and should remove the unwanted white lines.
What I do is open the dds file in Photoshop. The image will load up with the unwanted white lines. Using the color table's eyedropper I click on the unwanted white line. I then click on that particular color on the color table and read the hex value.
I then open the dds in a hex editor and search for that hex value and set the alpha to 00. Save the dds file and should remove the unwanted white lines.
Re: Need help importing images with transparency
I've noticed that happens, yet sometimes in game it looks fine..
So the Giants traded Beckham....
Who is online
Users browsing this forum: No registered users and 7 guests