Hey guys,
A friend of mine told me to post this script I made to ease your lifes while texturing in photoshop.
I created a script for photoshop that can export multiple .tga's with the right suffix and resolution from your .psd file. It utilizes the name and path of your psd.
For example, I have this .psd named TEX_MyTestObject, 2048x2048 with 3 folders in it, named Diffuse, Specular and Normals. When I run the script I get a dialogue where I select the Diffuse and Specular folder and set them to 50%. When I press ok it will take the Diffuse and specular folder seperatly and save them both on 1024 naming TEX_MyTestObject_D.tga and TEX_MyTestObject_S.tga in the same folder as my .psd within a few second.
This saved myself and other arists at playlogic a lot of time, because it completly automated the save as, the naming conventions and the resizing.
A Larger explanation can be found at my
website
And you can download the scripts
here
Critz and comments are welcome!
Cheers!
Mark Verkerk,
Replies
I added it to the wiki, along with the similar (but different!) vTools.
http://wiki.polycount.net/2D_Software
Awesome script!
The name should now look like this "TestName -n" when you export your layer it will automaticly be called NamePSD_TestName.tga
kdm3d: If you add an alpha channel to you file, you will get a new checkbox when using the exporter, you can then select the layerSet that should be exporter with the alpha.
(this only works when there is 1 alpha channel, in the case of more alpha channels. the script will become very bugged).
I looked at using a group as an alpha before but were some problems with creating a alpha channel using a group, it didnt always work. if there are more people wanting this I will look into the matter. for now, convert your alpha group manually to the alpha channel
Also there is 1 small problem with photoshop not finishing its scripts in case of an error. Normally the script will select a folder, resizes it for exporting, and then undoing the resize step. But I found a occasion that if photoshop gives an error message of any kind (memory for example) and your using the resizing option, it will not undo this because it stops the script! So if you are using the resize option, and photoshop fails, ALWAYS manually revert the resize command in your history!
it only happened once to me though, and I cant make a failsafe, because its all photoshops failt to begin with
Basically you can record an action of you saving out a TGA to a directory with certain settings, such as with an alpha or not and the directory. For the basic actions, I typically use 3 permanent actions that are set the F2, F3, and F4 hotkeys. The first time I save a file, I open the action pallete, double click on the action I want, and select the location to save, the file name, and the action. From then on, I just have to hit F2 to do the save operation. I usually do F2 for Diffuse, F3 for Specular, and F4 for normal. The nice thing is you can change any of them at any time.
This especially comes in handy you are saving to DDS, because it will record your DDS settings and do it silently so you don't get the popup window.
You can also record more complicated actions. For example, one that I used a ton at work was F5 did a copy merged and pasted it into a new document and flipped the channels to match our engine's normal map settings, F5 did a copy merged (with specular folder visible), and pasted the specular into the correct channel in the new document, and F6 did the same for the alpha channel. Then F4 to save the normal map with the proper settings.
I don't think it was quite as powerful as the script you posted, but it had the advantage of being very flexible to match changing conditions and an artists workflow.
It is really artist friendly, because you just hit 'record' and do the actions you want, and hit stop, and then tweak it if needed.
Thanks for posting
LOL I was just being a smart ass. It really is a good script!
PredatorGSR, its funny you actually mention the actions. I started out exactly like that, but I didnt like the lack of dynamics, such as the resize options ect. So I started experimenting with it, and I ended up with the script.
For the guys who like to analize this sort of code, I hope I did a good job on making it clear, I have no experience in scripting or programming what so ever so im sorry if its a bit messy at some points
If any of you guys have anything that can make a nice addition to the script, please tell me and i will try to make the script better!.
Thanks again for the feedback:D
http://felixschlitter.com/snippets/quick-save-maps#6