Page 2 of 3
Re: Strange "add" behaviour
Posted: 2013-08-22T06:54:24-07:00
by Langschwert
OK... Tomorrow afternoon?
Well, but till then - anybody got an idea how to keep PNG2DDS from popping up all the time?
Re: Strange "add" behaviour
Posted: 2013-08-22T11:01:31-07:00
by fmw42
Langschwert wrote:OK... Tomorrow afternoon?
Well, but till then - anybody got an idea how to keep PNG2DDS from popping up all the time?
You likely will need to ask that of the PNG2DDS developer or some forum about that. But perhaps some IM user may be familiar with that tool and you will get lucky.
Re: Strange "add" behaviour
Posted: 2013-08-22T17:54:58-07:00
by mambo4
There are a few command line tools for dds conversion.
Nvidia has nvconvert, part of Nvidia texture tools
https://code.google.com/p/nvidia-texture-tools/
ATI hasTheConversionator ( which i am using)
http://developer.amd.com/resources/arch ... /#download
XnConvert is another dds/dxt tool that supports batch commands.
http://www.xnview.com/en/xnconvert/
Edited: added links for tools.
Re: Strange "add" behaviour
Posted: 2013-08-23T00:07:37-07:00
by Langschwert
Thanks, I will try to find these.
Re: Strange "add" behaviour
Posted: 2013-08-23T07:01:04-07:00
by Langschwert
I found a different approach using a Dos command I never used before.
Instead of
FOR /F %%I IN ('DIR %zieldir%\*.png /b/s') DO
png2dds.exe -c %%~pI%%~nI.png %%~pI
I use
FOR /F %%I IN ('DIR %zieldir%\*.png /b/s') DO
start /I /wait /min png2dds.exe -c %%~pI%%~nI.png %%~pI
That way the program is started minimized. Now it still is popping up every two seconds - but just in the task bar not interfering with any other work I do.
Re: Strange "add" behaviour
Posted: 2013-09-07T12:39:24-07:00
by dlemstra
I just committed my changes to add support for writing dds files. This will be included in the next release of ImageMagick. You can use the following options when writing dds files:
- dds:compression
- dxt5 (Write the file in the dxt5 format, this is the default value)
- dxt1 (Write the file in the dxt1 format, this will be used automatically when the image has no transparency)
- none (Write the file without compression)
- dds:cluster-fit
- true (Use a slow but very high quality compression method)
- false (Use the range-fit compression method, this is the default)
- dds:weight-by-alpha
- true (Weight the colour by alpha during cluster fit)
- false (This is the default value)
- dds:mipmaps (This has been changed see below for details)
- true (Writes mipmaps in the output file, this requires the image width and height to be a power of two)
- false (Disable writing mipmaps, this will be used when the width and height are not a power of two)
If you want to convert a PNG that has no transparency to a dds file with the best quality you should do this:
convert input.png -define dds:compression=dxt1 -define dds:cluster-fit=true output.dds
Re: Strange "add" behaviour
Posted: 2013-09-07T16:24:35-07:00
by Langschwert
Thank youuuuu.
Re: Strange "add" behaviour
Posted: 2013-09-09T14:51:42-07:00
by mambo4
nice! 2 questions:
1.) NVIDIA tools include a DXT5n compression setting for compressing normal maps -which is useful as normal maps require careful compression to preserve the normal data.
any such options for imagemagick?
2.) Some utilities allow specifying the number of mip levels.
at my studio, we are limiting the amount of mip maps generated.
Instead of descending by powers of 2 down to a 1x1 map, we are cooking down to Oringinal size and 2 mip levels.
any such options for imagemagick?
Re: Strange "add" behaviour
Posted: 2013-09-09T22:10:55-07:00
by dlemstra
1.) I would have to do some research to figure out how that would work. Feel free to contact me to give me some pointers.
2.) This will be added before the next release. I will call this option 'dds:mipmapcount'?
Re: Strange "add" behaviour
Posted: 2013-09-10T01:35:42-07:00
by Langschwert
Are you able to estimate a release date for the next version? I am quite interested in the dds-writing capabilities.
Re: Strange "add" behaviour
Posted: 2013-09-11T11:27:57-07:00
by dlemstra
dlemstra wrote:
- dds:mipmaps
- true (Writes mipmaps in the output file, this requires the image width and height to be a power of two)
- false (Disable writing mipmaps, this will be used when the width and height are not a power of two)
dlemstra wrote:
2.) This will be added before the next release. I will call this option 'dds:mipmapcount'?
I decided to just change the dds:mipmaps option. You can use it now to set the number of mipmaps. Setting it to zero will disable writing mipmaps.
Re: Strange "add" behaviour
Posted: 2013-10-07T02:40:29-07:00
by Langschwert
Thank you sooooo much für implementing the .DDS writing feature.
Now I have another question that is more about syntax.
convert %1 %2 %3 -compose Over -composite %4
Whereas
%1 = original tank skin
%2 = camo Pattern
%3 = template between both
%4 = target file
How do I have to change the command line to make %2 only 80% of density (or 20% transparenty). I´m trying to make the camo pattern a little transparent to have more of the original structure pass through the paint.
Examples:
Original:
http://files.homepagemodules.de/b167881 ... 1626n3.png
After processing:
http://files.homepagemodules.de/b167881 ... 1626n2.png
...and the camo pattern should be more like 80% (I´m going to experiment a little with the value).
Re: Strange "add" behaviour
Posted: 2013-10-07T05:57:51-07:00
by snibgo
You can adjust the level of %3, for example:
Code: Select all
convert %1 %2 ( %3 +level 0,80% ) -compose Over -composite %4
If in a Windows batch script, double the "%".
Re: Strange "add" behaviour
Posted: 2013-10-07T06:42:12-07:00
by Langschwert
Thank you sooooo much - again!
Re: Strange "add" behaviour
Posted: 2013-10-08T07:31:40-07:00
by Langschwert
It works perfectly - and of course that results in a new problem. Each nation got a different basic color for its tanks. Now it changes the camo colors by abut 20%.
Pics:
http://167881.homepagemodules.de/g22-.html
Sooooo, is there a way to greyscale only the area that is beeing procecced by the batch? If I´d greyscale the wohle picture, all wood, rubber and stuff would be greyscaled too.
Since I use a special work directory the procedure does not have to be integrated into the other command line, I can run it on a different occasion before the actual processing.
%1 = original tank skin
%2 = camo Pattern
%3 = template between both
%4 = target file
Man, siss tank skin business is a surprrizingly diffikult one. (German accent included)