Home Technical Talk

Photoshop - Save 2 Files in Same Time

Hi,

I'm currently working with a project, texturing,
The working file is 256x256 PSD and the final file is 64x64 TGA,
Everytime I want to save as to TGA and open that file then resize to 64x64,
This eat me a lot of time because there are a lot of game assets there,
So, what I hope is, I apply all 64x64 textures to all the game assets 1st,
Then just a simply click on Photoshop, it will do the followings:

> Save current 256x256 PSD into Folder A.
> Resize to 64x64, do an unsharp mask and save as as TGA into Folder B.
> Undo unsharp mask and resize back to 256x256.

... ...continue texturing... save ...keep continue like this... ...

Note:
> Detect the PSD file name and save as to same file name as TGA.
> Detect if the TGA file has alpha channel.
-- If yes > Save as 32-Bit TGA.
-- If no > Save as 24-Bit TGA.

That's all, hopes somebody can help,
Thanks, really appreciated. =)

Replies

  • Noors
    Options
    Offline / Send Message
    Noors greentooth
    You can do all this with simple Actions (window>actions) except the alpha detection i'm affraid. You can still make 2 actions, one for 24 bits and one for 32 bits and launch them manually with a keyboard shortcut, depending of your psd. This would already reduce the process.
    Create a new action, assign to a key or whatever and simply do all those stuff one time. Stop the recording. Here you go. Now you can simply copy it, and just change the line to save in tga 32 bits, to have your 2 actions.
    There's probably tons of tutorials out there to explain action process + photoshop help ofc

    edit:removed batch and droplet part, this is not what you are looking for here.
  • monster
    Options
    Offline / Send Message
    monster polycounter
    I created a JavaScript that can save a 24 or 32 bit tga based on if you have an alpha channel. You can make this part of an action that can do the rest of what you want.

    http://dl.dropbox.com/u/2904948/Tools/SaveTGA.jsx

    Here are the steps you need to take.

    1. Start recording a new action in the action panel and assign it a hotkey.
    2. Save your PSD.
    3. Resize and unsharp filter
    4. Run the script by clicking File | Scripts | Browse... and pick the SaveTGA.jsx
    5. Step back in the history 2 times to undo the unsharp filter and the resize.
    6. Stop recording.

    Now when you press the hotkey it will do anything at once.

    The only problem is that I don't know your folder stucture so the TGA just saves to the same folder as the PSD.
  • monster
    Options
    Offline / Send Message
    monster polycounter
    Also, note that you can go to File | Automate | Batch and run your new action on a directory of files to convert all your PSDs to TGAs.
  • KonataNX
    Options
    Offline / Send Message
    Wow, it's very nice, thanks you monster~
    Just 1 thing is, can you teach me how to modify save location~
    So that I can modify that myself, thanks, you really helped me a lot~
    Appreciated~ =)

    Oh ya, I realize that the saved TGA files is compressed~
    Can you make it no compressed, or teach me how to change that~
    So that I can change it myself~
    Thanks again~ =)
  • monster
    Options
    Offline / Send Message
    monster polycounter
    I updated the script, back up the old copy though in case it doesn't work out. Download it from the same link above.

    I turned off compression and may have found a solution for saving the TGA in a different folder. Open the script in a text editor and at the top of the file change the devPath and assetPath variables to match what you need. The paths need to be written in javascript format so use the template below.

    For example:
    assetPath = /c/myproject/source/
    devPath = /c/myproject/game/

    So if you have a file named C:\myproject\source\trees\pine\Wood.psd
    It will save it to C:\myproject\game\trees\pine\Wood.tga
Sign In or Register to comment.