SC4 Devotion Forum Archives

Sim City 4 Devotion Tools => Tools - General Discussion => null45's Tools => Topic started by: null45 on May 05, 2011, 05:39:24 PM

Title: Fsh Format Plugin for Adobe® Photoshop®
Post by: null45 on May 05, 2011, 05:39:24 PM
This plugin allows Adobe® Photoshop® 5.0 or later to load and save Fsh files.

Images containing an alpha channel are handled differently depending on the version of Photoshop.
Photoshop 5.5 or earlier will add the alpha channel to the channels palette.
Photoshop 6.0 or later will use the alpha channel as the layer transparency.

When compressing certain Maxis files (e.g. the base texture 0x258E3004) the resulting image is darker than it looks under Photoshop, this is an issue with the color matching algorithm that Squish (http://code.google.com/p/libsquish/) uses.

Download: FshFormat (http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=2623).

I hope it is useful.  ;)
Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: jdenm8 on May 05, 2011, 07:26:05 PM
Oh cool! It supports my version too!  :)
Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: jdenm8 on May 20, 2011, 07:47:23 AM
It's been a fortnight and I've got a bug to report, so I guess a double-post isn't too bad.

FSHes don't save properly in Photoshop 6, it seems to corrupt them somehow.
Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: null45 on May 20, 2011, 08:04:25 AM
Could you upload the images that it saves?

Does it give any error messages?

I tested the saving functionality of this plugin under the Photoshop CS2 demo as the demo of Photoshop 6 does not allow you to use the save command.  :(
Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: jdenm8 on May 20, 2011, 08:20:46 AM
This one was exported from Reader using Decoded File exportation, I used the eraser tool to remove some of the garbage texture, then saved it using Ctrl-S.

When I try to re-open it, I get the error message "Could not open:'{directory}.fsh' because the file-format module cannot parse the file.

Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: null45 on May 21, 2011, 11:52:19 PM
That issue should now be fixed.
File version updated to 1.0.0.1.  :thumbsup:
Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: dobdriver on August 11, 2011, 11:31:56 PM

G'Day Null this is a very useful item, thanks mate.

Is there any possibility of you doing a a 64bit version? Thanks.

cheers
dobs
Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: vester on August 12, 2011, 08:49:03 AM
Fantastic! Very useful indeed.

Thank you.
Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: null45 on August 12, 2011, 12:14:11 PM
Quote from: dobdriver on August 11, 2011, 11:31:56 PM
Is there any possibility of you doing a a 64bit version? Thanks.

The 64-bit plugin is up on the LEX.
File version updated to 1.0.0.2.   :)
Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: dobdriver on August 12, 2011, 09:47:55 PM

G'Day Null,

Thanks a lot mate, that was quick. Talk about great service.

Thanks and cheers
dobs
Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: vester on May 13, 2012, 03:57:33 PM
Have a small request if posible.

When saving to fsh, to have it ask for the size of the file.

Works with graphics in bigger size like 1024x1024 px, but would love to be able to resize in the process of saving to fsh.

At the moment, I save to png, then open the png, resize it and save as fsh.
Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: null45 on May 13, 2012, 09:14:49 PM
Quote from: vester on May 13, 2012, 03:57:33 PM
Have a small request if posible.

When saving to fsh, to have it ask for the size of the file.

Works with graphics in bigger size like 1024x1024 px, but would love to be able to resize in the process of saving to fsh.

At the moment, I save to png, then open the png, resize it and save as fsh.

This will most likely not be implemented, Photoshop Actions might work to automate the PNG loading and saving.
Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: jdenm8 on May 14, 2012, 01:57:16 AM
I don't see why you would need that functionality, I can open the FSH, resize it using Image Size, then save it again perfectly fine in Photoshop CS6 Beta.
Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: vester on May 14, 2012, 06:29:26 AM
It would save a lot of time, saving, opening and resizing png/fsh files.

.... and help me avoid be resizing the psd flie, as I have done a few times.
Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: null45 on December 11, 2012, 11:17:45 PM
Added saving of embedded mipmaps and FSHWrite compression is now optional.
Additionally this plugin is now scriptable using Photoshop Actions, file version updated to 1.0.0.3.  ;)

Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: vortext on December 12, 2012, 03:57:58 AM
Awesome new features, especially it can now be used in Actions. Thanks.  &apls
Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: vester on March 04, 2013, 06:42:04 AM
Thank you for the update.


Have an question about the differences between the save options:
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi40.photobucket.com%2Falbums%2Fe242%2Fvester_DK%2FDiv%2FFSHOptions_zps7cea88a3.jpg&hash=47e3639a83f9366361d3611467c844f54528d0a4)
What to choice for what ?


Specific I have nigthlight texture for an automata. I don't need an alpha channel. Not sure what to save it as of 3 first options.
Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: JoeST on March 04, 2013, 07:19:24 AM
the 24bit RGB has no alpha and is uncompressed, whereas the DXT1 will be compressed so may lose quality
Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: vester on July 30, 2013, 03:00:03 PM
Its me again :P

Have now installed Windows 7, 64 bits and PS CS6 64bits.

Got this error (system info):

Plug-ins that failed to load:

   FshFormat NO VERSION -  - from the file "FshFormat64.8bi"

I have Microsoft Visual C++ 2010 SP1 Redistributable Package (x64) installed.
Just repair it for just to eliminate it.

Not sure what to do. Place a copy of it in both folders:
C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\Plug-ins\File Formats
C:\Program Files (x86)\Adobe\Adobe Photoshop CS6\Plug-ins\File Formats
Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: null45 on July 30, 2013, 06:36:56 PM
That issue should be fixed, file version updated to 1.0.0.4.  ;)
Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: vester on July 31, 2013, 05:59:42 AM
Yep that did the trick. Now I can open FSH in PS.  &apls &apls &apls

Thank you.
Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: null45 on November 19, 2014, 04:41:18 AM
Fixed a memory leak when saving images, file version updated to 1.0.0.5.
Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: c.p. on November 19, 2014, 09:06:07 AM
Thank you for this.  It looks like it could be very useful. :thumbsup:
Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: null45 on January 20, 2015, 09:30:02 AM
Added support for Photoshop 5.0.
Fixed a bug with DXT1 images that do not have an alpha channel, various other bugs fixed.

File version updated to 1.1.0.0.
Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: null45 on April 17, 2022, 10:56:58 PM
Release version 1.1.1.0
Changes:

Fixed an error when saving a file for the second time.
Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: Badsim on April 18, 2022, 04:37:15 AM
A big thank-you ! :thumbsup: 

Since I practice the FSHs replacement technique  , I use your script intensively. It was not a big deal , just a little annoying ... on the other hand, it is more annoying to be unable to save rectangular FSHs correctly, ( is this just valid for me? I'm using  Photoshop CS2 which is rather old...) I save them in png format then convert them with GoFSH...
Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: null45 on April 18, 2022, 05:25:48 PM
Quote from: Badsim on April 18, 2022, 04:37:15 AM... on the other hand, it is more annoying to be unable to save rectangular FSHs correctly, ( is this just valid for me? I'm using  Photoshop CS2 which is rather old...) I save them in png format then convert them with GoFSH...
Fixed in version 1.1.2.0.
My DXT compression code had a buffer overflow bug, it was allocating too small a buffer for the compressed data.

Quote from: Badsim on April 18, 2022, 04:37:15 AMSince I practice the FSHs replacement technique  , I use your script intensively.
What do you mean by "FSHs replacement technique"?

If you are using BAT4Max, I posted an updated version of the FSHWrite tool to the STEX (https://community.simtropolis.com/files/file/35053-fshwrite-for-bat4max/).
Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: null45 on May 16, 2022, 05:02:16 PM
Release version 1.1.3.0
Changes:

Fixed an issue with DXT1 and DXT3 images having extra padding after the image data.
Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: null45 on May 25, 2022, 11:55:11 PM
Release version 1.1.4.0.
Changes:

Fixed a crash when saving rectangular images as DXT1 and DXT3.
Title: Re: Fsh Format Plugin for Adobe® Photoshop®
Post by: null45 on May 17, 2023, 06:18:57 AM
Release version 1.1.5.0, which fixes loading of QFS compressed files using the SC4 format.