Jump to content
How to Install Plugins ×

DDS FileType Plus (10-04-2023)


null54

Recommended Posts

  • 5 months later...

Hello, I would like to request a new feature.

GIMP's DDS plugin allows importing a picture's mipmaps as separate layers, edit them independently and save them to a DDS file as they are instead of generating new ones from the mip0 image. This is unorthodox, but I use it to create kit textures for PES which change color depending on the camera distance (and therefore depending on the mipmap used for texturing the player's kit models). It all works fine but I would prefer to be able to use PDN for everything, as editing images on GIMP is often a hassle compared to it.

 

file-dds_2022-12-03_23-41-45.png.8c71eb8e2a6f603694f30edf09b176e9.png

gimp-2.10_2022-12-03_23-40-51.png.d43f81f9500949a1d43ce4a57fe710cd.png

A friend of mine does the same but he uses Photoshop's DDS plugin, which instead of importing every mipmap to a different layer creates a mosaic.

 

image.png.7dec45fb84924109dccbbc3b14223336.png

Can you please implement whichever of these two solutions is simpler to you? (In case they're equal, I would prefer the first solution)

 

Link to comment
Share on other sites

2 hours ago, Shakes4cc said:

Can you please implement whichever of these two solutions is simpler to you?

 

There currently is no easy way to support multiple layers in this plugin.

I plan to eventually support loading mipmaps and cube maps as layers, once the Paint.NET plugin API adds the features that I need for it.

 

2 hours ago, Shakes4cc said:

A friend of mine does the same but he uses Photoshop's DDS plugin, which instead of importing every mipmap to a different layer creates a mosaic.

 

What DDS plugin is that?

None of the Photoshop DDS plugins I could find have that behavior.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

1 hour ago, hf61 said:

I am wondering which is the proper way to save dds like 8.8.8.8 ARGB 32 bpp/RGBA8 in Gimp 2.8 

 

B8G8R8A8 (Linear, A8R8G8B8) should be the equivalent format in this plugin.

  • Haha 1

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

3 hours ago, hf61 said:

btw may I ask how to compress dds file? 

 

To compress a file you would select one of the BC formats in the list, e.g. BC7.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • null54 changed the title to DDS FileType Plus (01-20-2023)

Release version 1.11.0.

 

This release is for Paint.NET 5.0+.

Changes:
  • Updated DirectXTex to the December 15, 2022 release.
  • Detect if the image using the wrong file extension and load it using the appropriate Paint.NET FileType.
  • Like 1
  • Upvote 1

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • null54 changed the title to DDS FileType Plus (01-31-2023)

Release version 1.11.1.

 

This release is for Paint.NET 5.0+.

Changes:
  • Updated DirectXTex to the January 31, 2023 release.
  • Like 1

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • null54 changed the title to DDS FileType Plus (03-03-2023)

Release version 1.11.2.

 

This release is for Paint.NET 5.0+.

Changes:

  • Added a BC 1-3 compression dithering check box to the save UI.
    •  This can improve the image quality when saving in those formats.
  • Like 2

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • null54 changed the title to DDS FileType Plus (03-04-2023)

Release version 1.11.3.

 

This release is for Paint.NET 5.0+.

Changes:

 

Fixed a regression in the DirectCompute code.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • null54 changed the title to DDS FileType Plus (03-05-2023)

Release version 1.11.4.

 

This release is for Paint.NET 5.0+.

Changes:

  • Added dithering support for the B4G4R4A4 (Linear, A4R4G4B4), B5G5R5A1 (Linear, A1R5G5B5) and B5G6R5 (Linear, R5G6B5) formats.
  • Renamed the BC 1-3 compression dithering check box to Error diffusion dithering.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • null54 changed the title to DDS FileType Plus (06-14-2023)
  • 4 weeks later...
28 minutes ago, moshemoshe said:

because the game has uncompressed DXT1 texture at 15.996MiB, but the same texture becomes 2.0MB after editing it.

 

DXT1 is a compressed format, there is no such thing as uncompressed DXT1.

I am guessing that the size difference may be due to the original file having mip maps, try enabling the Generate Mip Maps check box.

If that does not work, upload one of the original DDS files somewhere and post a link to it here.

 

What are the dimensions of the image you are working with? 15 MB seems large for a DXT1 compressed file, even with mip maps.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

25 minutes ago, null54 said:

 

DXT1 is a compressed format, there is no such thing as uncompressed DXT1.

I am guessing that the size difference may be due to the original file having mip maps, try enabling the Generate Mip Maps check box.

If that does not work, upload one of the original DDS files somewhere and post a link to it here.

 

What are the dimensions of the image you are working with? 15 MB seems large for a DXT1 compressed file, even with mip maps.

Ah sorry, I don't know much about this topic, I just mess around and bash things together till it works.

The texture is a 2048x2048 (12 LODs) in DXT1 format, according to this tool I am using (SpecialK) :53dsca.png

Here is the actual file that gets dumped, 2.66MB: https://files.catbox.moe/kztoqq.dds

 

So I guess the next question is how i'd go about uncompressing the 2.66MB back into 15.996MiB size.

Edited by moshemoshe
clarification
Link to comment
Share on other sites

12 minutes ago, moshemoshe said:

So I guess the next question is how i'd go about uncompressing the 2.66MB back into 15.996MiB size.

 

The 15.996 MiB value is probably the uncompressed size of the texture in memory, 2048 * 2048 * 4 RGBA channels.

DXT1 compression stores the image color data as RGB 565 (5 bits for red and blue, and 6 bits for green), with an optional 1-bit alpha channel.

When the image is loaded, it is decompressed with the RGB and alpha data getting expanded back to 8-bits-per-channel.

 

Paint.NET shows a 2048x2048 pixel image as require 16 MiB of RAM.

  • Like 1

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • null54 changed the title to DDS FileType Plus (07-13-2023)

Release version 1.12.0.

Changes:

  • Reduced memory usage when loading.
  • Various optimizations to the loading and saving code.
  • Only enable the Error Metric option for BC1-BC3.
  • Added the plugin version to the save UI.
  • Show an error when loading a texture array or volume map.
    • These files posed a silent data loss risk when saving because the plugin does not read all of the images.
  • Like 2
  • Upvote 1

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • null54 changed the title to DDS FileType Plus (07-29-2023)

Release version 1.12.1.

Changes:

  • Improved support for loading the 'swizzled' BC3/DXT5 normal map variants used by DOOM 3 (and possibly other games using the same engine).
  • Added support for loading FlatOut 2 textures with an incorrect DDS_PIXELFORMAT size.
  • Like 2
  • Hugs 1

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • null54 changed the title to DDS FileType Plus (08-05-2023)
  • null54 changed the title to DDS FileType Plus (09-05-2023)

Release version 1.12.3.

Changes:

 

Updated DirectXTex to the September 1, 2023 release.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • null54 changed the title to DDS FileType Plus (09-12-2023)

Release version 1.12.4.

Changes:

 

Allow loading of legacy files that have too many mipmaps.

  • Like 1

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • null54 changed the title to DDS FileType Plus (09-29-2023)

Release version 1.12.5.

Changes:

  • Add support for saving the ATI1, ATI2 and RXGB formats.
    • ATI1 is a legacy name for the BC4 Unsigned format.
    • ATI2 is a legacy name for the BC5 Unsigned format.
    • RXGB is a BC3 variant that is used for normal maps in some older games (e.g. Doom 3).

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • null54 changed the title to DDS FileType Plus (09-30-2023)

Release version 1.12.6.

Changes:

 

Fixed a few UI glitches with the RXGB format.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...