What
it does
vSavePSDTGA,
and its companion script vQuickPSDTGA allow the relatively
fast saving of TGA image files from a source PSD. The script
is highly customizable, allowing the output TGA to be resized and normalized
(requires additional plugin) on saving, to be post processed
immediately after saving through command line controlled software,
and for multiple TGA's to be saved from a single PSD at the same
time.
Additionally
the script gives the option of storing preference information on
a per PSD basis, so when you open a source PSD at
a later date the script will recall how you wanted the output
TGA's saved. Alternatively there are global preferences that
can be applied to all images that don't have preference information
associated with them.
Features
-
The
saving of multiple TGA's from the same PSD source file.
-
Repeated
saving of TGA's to the same output folder without navigating
to it on each save.
-
TGA's
can carry the name of the PSD source file, or be named independently.
-
TGA
filenames can be automatically suffixed with an identifier. _D.tga
for a diffuse map for example.
-
TGA's
can be automatically resized using various resampling methods
when saving.
-
Save
TGA's from a PSD with just a quick keyboard shortcut.
-
Access
to the nVidia Normal Map filter (if installed), allowing normal
maps to be normalized , or height maps to be converted into
normals, on saving.
-
PSD's
can be set to recal specific settings, allowing for easier
output across multiple sessions.
-
The
script can call a command line function when run - allowing
post processing of images through proprietary tools or
droplets.
-
Alpha
channels can be stored and created automatically using a variety
of methods.
-
Can
reduce time taken to save output images by up to 80% - a big
saving across multiple saves.
Getting
Started
Before running
vSavePSDTGA you must have an image open that you wish to save. It
is recommended that this image already be saved as a PSD. The path
of this PSD in relation to where you wish your TGA's saved is irrelevant.
Once you have an image you can run vSavePSDTGA from Photoshop's
File/Scripts menu.
You can also
set up a keyboard shortcut for the script through the Edit/Keyboard
Shortcuts... menu.
About
the preferences
vSavePSDTGA
gets its preferences from two locations:
Global
Preferences
Global
preferences apply to every image. They can be considered as the
defaults for any settings not stored in the Local Preferences. These
defaults can be altered and saved at any time.
The
location of the Global preferences is in your Application Data,
in the vPSScriptPrefs folder. The prefs file is called vSavePSDTGA.jtp.
The Application Data location may vary depending on your OS, so
see your system help files for more information.
Local
Preferences
Local
preferences are associated with a specific PSD file. Not every setting
needs to be stored locally. If you know that all your TGA's will
be saved in the same folder then there is little point storing the
path settings locally for example (although this is still recommended).
On opening the script it will check to see if there are any Local
preferences, and those that are found will overwite the Global ones
in the interface.
The
Local preferences are stored in the keywords array of the PSD file.
This can be found by going to File/File Info in Photoshop. If you
require the use of the Keyword array for other data then it is possible
that you will be unable to use the Local preference functionality
of the script.
Note:
If you encounter any problems while running vSavePSDTGA your first
course of action should be to see if the preferences have been corrupted
some how. If you think this may be the case then check that the
issue occurs with every PSD. if it does then it's likely a Global
preference issue and the file may need to be deleted. If it's just
the one PSD then the preferences can be removed by opening the keyword
array and deleting the contents. This should solve the majority
of problems.
Options
The options
are broken down into several panels and sections, like this:
 |
- Preference
Locations
- Layersets
- Alpha
Channels
- Resize
- Output
Location
- Normals
- Command
Line
- Misc
- Save
|
1)
PREFERENCE LOCATIONS PANEL
PSD/Global
This toggle
will switch between the window showing just preferences stored in
the Global Prefs, and a combination of the Global Prefsand the Local
Prefs associated only with the currently selected PSD.
When the toggle
reads PSD then the Associate with PSD box is displayed, indicating
which options are currently linked to the current image, and which
are global to all files. Clicking Save Prefs in this mode
will save the prefs based on their status in the Associate with
PSD panel.
When the toggle
reads Global then the Associate with PSD panel is hidden,
and the preferences shown will effect all files that do not have
an overiding PSD association. Clicking Save Prefs in this
mode will save the Global preferences only.
Clicking the
button toggles its status.
Associate
with PSD
These Checkboxes
indicate which preferences are stored Locally, and which Globally.
Each checkbox is associated with one of the panels displayed in
the main preferences. For example, the checkbox labled CMD
relates to the status of the Comand Line panel below.
On clicking
the Save Prefs button, information in the related panels
to the unchecked boxes are stored in the Global prefs, while ones
that are checked are stored in the Local prefs of the selected PSD.
In practice
you will probably want to associate most items with the PSD, although
you'll have to do this each time you begin a new image.
The associations
are fairly self explanatory, but just in case:
- Name
- The Name field and the Use PSD Name checkbox.
- Path
- The Path Field and the Use PSD Path checkbox.
- Size
- All the information in the Resize panel
- Alpha
- All the information in the Alpha Channels panel
- Normal
- All the information in the Normals panel
- CMD
- All the information in the Command Line panel
- Sets
- All the information in the Layersets panel
Note:
Unchecking something that was previously stored in a PSD will overwite
the global settings for that panel when the prefs are saved - This
is something that will be addressed in the future.
2)
LAYERSETS PANEL
Sets
If you have
multiple images stored in the same PSD, such as related Normal,
Spec and Diffuse maps, you may sometimes want to save these all
at the same time, or at least be able to save each of them using
vSavePSDTGA without having to change the name field each time. The
sets option allows you to do both of these things.
The setting
takes the form of a drop down box containing a number of options
related to layer sets. The default option is Ignore Marked Layersets,
and the output TGA will be an image based on the PSD source image's
current state.
For the other
options in the list you will need to have root layersets in your
PSD, and at least one of those layersets will need to be flagged.
If you have neither of these things the script will remind you of
the requirement.
To
the right is an image of an example PSD's layers palete. You can
see that the seperate source images have their own folders: Diffuse,
Normal and Specular, and are marked using a preceding ~ symbol.
The UV guides, which we don't want to be a seperate ouput image
are stored in their own set, which is not marked.
Following
this example the other options in the Sets dropdown will have the
following effect:
- Save
highest, append _initial - will hide all the marked layersets
except the highest in the list (in this case that would be ~ Normal
~), and saves the output TGA with the name listed in the Name
field with the first letter of the layerset name added with an
underscore. EG: Testimage_N.tga
- Save
highest, same name - will hide all the marked layersets
except the highest in the list (in this case that would be ~ Normal
~), and saves the output TGA with the same name as the layerset,
ignoring the Name field. EG: Normal.tga
- Save
highest, append name - will hide all the marked layersets
except the highest in the list (in this case that would be ~ Normal
~), and saves the output TGA with the name listed in the Name
field with the name of the layerset added. EG: TestimageNormal.tga
The
remaining options doe the same thing as the previous ones, except
they cycle through the visibility of all the marked layersets and
save them in turn. EG: Save all, append _initial would save
the images Testimage_D.tga, Textimage_S.tga and Testimage_N.tga
Finally, if
a marked layerset is also suffixed with the Marker symbol (EG "~
Normal ~" in the image) when using the layersets options then
the script will also run the settings contained in the Normal
Map panel, irrespective of whether the option to do this is
selected in the interface. The script will attempt to work out if
the Normal marked layerset is supposed to become a normal map, or
is already one and needs normalizing (see the section on the Normal
Map panel to see how auto detection works).
Likewise
if no marker is found after the name, the nVidia filter will not
be run, even if a filter type is selected by default.
Further Examples:
A PSD containing the layeresets named "~ Frank" (at the
top), "~ George" and "~Bank" (at the bottom)
is to be saved as a TGA with the name "Lloyd". "~
George" and "~Bank" are visible, "~ Frank"
is not:
If Save highest, append _initial is picked the resulting
file will be called "Lloyd_G.tga"
If Save all, append _initial is picked the resulting files
will be "Lloyd_F.tga", "Lloyd_G.tga" and "Lloyd_B.TGA"
If Save highest, append name is selected the resulting file
will be "LloydGeorge.tga"
If Save all, same name is selected the resulting files will
be "Frank.tga", "George.tga" and "Bank.tga"
Notes:
- Only Root
layersets are noticed by the script. If you have the layerset
"~ Grime" inside a layerset called "Dirt"
the script will ignore it.
- The script
will not modify the visibility of any unmarked layersets. In the
example above all the TGAs would have the UV guides visible on
them. If the UV's layerset visibility was off when saving then
this would not occur.
- There may
be a space between the Marker and the filename, but additional
spaces will be included in the file name (or treated as the initial
depending on the option).
- If there
are two marked layersets with the same name (or the same first
letter in the case of the initials options), one will overwite
the other.
- The initials
options will always place an underscore between the base name
and the initial.
- The marker
symbol (~ by default) is never considered to be part of the filename
when used correctly.
Root
layer set marker:
This is the symbol or character used to flag a marked layerset for
use in the Layersets operations. The default is ~ (Tilde) but it
can be set to any single character you want. It is strongly recommended
you stick with ~ unless there is a good reason not to.
3)
ALPHAS PANEL
Alpha
Channel
This dropdown offers different ways for the script to handle Alpha
channels stored in the PSD when outputting for TGA:
- Do
not save alpha - Never stores an alpha channel in the
output TGAs
- Highest
Alpha Only - If the image has 1 or more alpha channels
then the highest one on the list is saved to the Output files.
- Associated
with Marked Sets - Saves an alpha channel with the output
TGA only if one is found with the same name (minus markers) as
the layerset currently being processed. If no matching alpha channel
is found then none is used.
- EG.
If we have three marked layersets - ~Diffuse, ~Spec, ~Normal~
- and three alpha channels - Alpha1, Alpha2, Diffuse - then
when using the save all, append _initial sets option
only the Diffuse TGA would save with an alpha channel, the
one with the same name.
- Image
Transparency (8bit)
- This will create the alpha channel for
the image based on the image's transparency. Wherever background
shows through will be transparent, with partial transparency showing
as partially transparent pixels. The background colour of the
main image (the colour that will replace the transparent areas)
is set using the Key Color (hex) option. If there are no
transparent pixels, no alpha channel is saved.
- Image
Transparency (2bit) - This
works exactly the same way as the Image Transparency (8bit)
option, except that there are no partially transparent pixels
- they will all be either fully transparent, or fully opaque.
Any opacity in a pixel will show up as fully opaque in the final
image.
- Chroma
Key Only - This
works much the same as the Image Transparency (2bit) option,
except that no alpha channel is created, only the transparent
pixels are replaced by the Key Color in the TGA.
Key
Color (hex)
This option is only available if one of the last three Alpha options
are chosen. It is the hex representation of the colour you wish
to replace the transparent pixels. To set the color either click
the button and select the color from your system color picker, or
type a known hex value into the text field.
4)
RESIZE PANEL
Resize
TGA to
Sets the size of the output TGA in pixels. Limited to game standard
sizes between 64 and 2048.
Resample
Sets which resample method to use when resizing the output TGA.
If the TGA is to remain the same size this is ignored.
5)
OUTPUT LOCATION PANEL
Use
PSD Path
Forces the output TGA/s to be saved into the same folder as the
source PSD is saved. See Path below for more information.
Use
PSD Name
Forces the output TGA/s to use the name of the source PSD as it's
base filename. See Name below for more information.
Name
The base name to save the TGA/s with. Note that if you put a period
in the name nothing after it will be included, ".tga"
is appended automatically on the end so you don't have to add it,
but it doesn't matter if you do. If the Save TGA with same name
as PSD checkbox is checked it will uncheck itself if the name
here is altered.
Path
The path to which the output TGA/s will be saved. To change it hit
the ... button next to it. If the Save TGA to same folder as
PSD checkbox is checked it will uncheck itself when you change
the path.
6)
NORMAL MAP PANEL
NOTE:
All Normal Map operations require the presence of the nVidia normal
map filter & the resulting normal map is always of the tangent
space type.
Run Filter
Using
Covers how the TGA will be processed by the filter, if it is at
all.
Note:
using
the name suffix marker while using sets can overide this setting
- Do
not run filter - Doesn't run the filter on the
image.
- Auto
Select Filter Type
-Tries to work out if the image to be processed is a height map
requiring conversion, or already a normal map requiring normalizing
and then runs the relevant option. It cannot work out whether
to use the filter or not based on this - if you don't want to
use the filter at all, turn it off. Note:
If the layer set post name marker is used to run the normal map
functionality, then this is always the type used.
- Convert
Bumps to Normals
- Converts the TGA into a normal map based on the brightness values
in the TGA. Ideally these will be in a height map of some kind,
but the conversion does not require this. Output can be modified
using the other settings in the normal map pane.
- Normalize
existing Normal Map
- Simply normalizes the source image before saving the output
TGA. This will ignore the other settings in the pane.
Wrap
Activates the "wrap" option in the nVidia filter. This
is most useful for normal maps that are intended to tile.
Invert
Normals
Reverses the way the filter handles lights and darks in it's conversion
from greyscale to normals. If something is White on the greyscale,
but is showing up in the normal map as indented then you probably
need to check this.
Depth
This is the depth the resulting Normal Map will apparently have.
The default depth is 2.5, with 100 being the deepest, and 0 being
the shallowest.
7)
COMMAND LINE PANEL
Run CMD on
save
When checked this creates and runs a batch file after saving the
TGA that then runs the command line option stored in the CMD field.
In this way anything that can be called in a command line can be
called from the script to further act upon the output TGA, including
Photoshop droplets for further post processing.
CMD
The comand line parameters to run on saving
the TGA. The comand line will be run exactly as shown, with the
exeption of the flags <FILENAME> and <FILEPATH> which
insert the relevant information regarding the TGA being processed.
Append
to CMD:
These add the correct flags for the TGA's
name <FILENAME>, and the TGA's path <FILEPATH> to the
end of the CMD field.
Set
CMD to: Droplet...
This will allow you to choose a Photoshop
droplet to run on the output image as a post process, and then add
the correct parameters to run the droplet to the command line. For
more information on creating droplets, see the Photoshop help files.
8)
MISC PANEL
Options
in the additional panel are saved to the global preferences only
Compress
TGA (RLE)
When checked the TGA will save with RLE compression. When not checked
no compression is used.
Leave
TGA open after saving
When checked the output TGA will remain open
in Photoshop subsiquent to saving, allowing additional processing.
To save any additional changes to this TGA the file can be saved
using the standard Photoshop save command, no additional path information
is required.
Note:
It is not recommended that you use this option if running a command
line option as the command line is run on the saved TGA,
not the image remaining open in Photoshop.
9)
SAVE PANEL
Save
Prefs
Saves the currently displayed preferences.
If the PSD/Global button reads Global then preferences are
only written to the Global file, if it reads PSD then the
settings are saved to both the Global prefs and the Local prefs
in the current PSD's keywords.
Note: To permanently
store Local preferences the PSD itself must be saved.
Save
Images
Saves the PSD as displayed, and also saves
the respective output
TGAs as described in the preferences.
Save
TGA Only
Saves only the TGAs. The PSD is not saved
(this can save time for small changes to a large PSD file). Don't
forget to occassionally use Save Images anyway, or at least
save from Photoshop's File menu so you don't lose work if there's
a crash.
Cancel
Exits the script without saving any images.
NOTE:
If the source image is not already saved as a PSD, the script will
prompt the user for a file path and name before allowing a save.
vQuickPSDTGA
v1.3

This is a companion script to vSavePSDTGA. It saves just
the TGA/s based on the settings in vSavePSDTGA, without bringing
up the full interface. Think of it as the "Save" command
to vSavePSDTGA's "Save As...". This can also be
set to a keyboard shortcut for much faster use.
Notes:
- You should
still use vSave' to set up your preferences for vQuick', especially
when first saving a TGA from a new PSD. It may also be prudent
to run the former on occassion to ensure the settings are as you
need them to be.
- Smart use
of the Sets feature can make vQuick' very useful indeed.
- vQuick'
requires vSave' to be kept in the same folder for it to function.
You'll know if this is not the case because it will tell you.

vSavePSDTGA
Release Version History
3.75
> Several changes to enforce CS3 compatability.
> Fixed several small bugs.
> Added the option to turn select the Key color from the system
color picker.
3.72
> Fixed a fairly major bug witht he Alphas resulting from the
changes made in 3.7, where the image would always save with an alpha
if certain conditions were met, even if there was no alpha in the
original image and the user had not chosen to create one.
> Found and fixed two other Alpha channel issues - one with storing
the Hex value fro chroma key, one with identifying th enumber fo
alphas an image has.
> Added the option to turn RLE compression on and off.
3.7
> Added the option of creating an alpha channel based on the
transparency of the image, or the ability to chose the color the
transparency would be filled by.
> Fixed some small bugs
3.67
> Added the option to select a droplet file to add to the command
line for running on the TGA after saving.
> Made some minor interface changes
3.65
> Put in an auto detect aspect into the normal maps section that
will detect if the image is a normal map or a heightmap, and run
the nVidia filter using the relevant settings. The setting does
not detect that the image in not intended to run the filter at all.
> Fixed some glitches with the command line option:
> The script would fail if a command line containing the "
symbol was saved to the global prefs - fixed
> Error parsing <FILENAME> or <FILEPATH> if the user
did not save the PSD, but was saving to the same folder - fixed
3.62
> Added the option for the alpha channel used during save to
be a channel named for the marked layer set it's to be saved with.
> Added the option for the normal map filter to Normalize and
existing normal map as well as to create one from scratch.
3.6
> Added code to allow the script to be called from another script
without displaying the interface.
> Wrote a script to do this call, v1.1 of vQuickPSDTGA.
3.5
> Replaced global preference format with an easier and faster
one.
> Added the option to mark layersets for saving and normal map
generation with symbols other than ~.
> Allowed the leave TGA open flag to be saved with the global
preferences.
> Fixed bug where referencing a deleted or renamed folder would
cause the path options to lock up.
> Fixed major bug that would cause command line calls across
multiple layersets to loop the creation of batchfiles until the
system ran out of memory and crashed.
3.4
> Fixed a number of small bugs
> Added option to save only the highest visible marked layerset
as the current TGA using a number of naming schemes.
> Added help text.
> Removed the automatic normal map generation of _N files.
> Replaced the above witht he automatic generation only for files
based on layersets with an appended ~ symbol.
3.01
> Complete rewite of preference parseing.
> Major Interface Redesign, grouping major sections and moving
PSD association group to interface head.
> Option to switch between global and PSD specific preference
display.
> Options for saving all marked root layersets at once in various
ways. _N files automatically converted to normal maps.
> Added "Wrap" and "Invert" options to normal
map generation.
> Replaced Skynet call with full command line options.
> Added option to leave TGA open after saving.
2.5
> Added Skynet call to create RFG .vbm files.
> Moved to using nVidia filter for creating Normal maps.
2.2
>Fixed several small bugs, most prominently the Normal Map was
inverted for Volition specific normal map useage.
2.15
> Added resize filtering options
> Added custom Normal Map generation
> Cleaned up interface, grouping PSD saved preference selection
at the bottom of the interface.
2.0
> Moved preference settings into the main confirmation screen.
> Allowed folder selection through Folder Tree.
> Added TGA resize settings.
1.28
> Allowed association of selected preferences with the current
PSD file.
|