Mobile app version of vmapp.org
Login or Join
XinRu324

: Creating spritesheets for gaming I am trying to create a SpriteSheet using Photoshop's Scripts>Export layers to files. Thinking about using each layer as a frame. This is what i am doing... I

@XinRu324

Posted in: #Actions #AdobePhotoshop

I am trying to create a SpriteSheet using Photoshop's Scripts>Export layers to files. Thinking about using each layer as a frame. This is what i am doing...

I have a layer with a rectangle in it. I want to duplicate the layer multiple times and in each duplicate, I want to increase the size of the rectangle by 2px.

I create an action with the following steps


Copy the layer with a rectangle
Transform the rectangle in the new layer
Increment the height by 2 px


When I save the action, it stores the height in % rather than pixels which I would need.

If I repeat this action a multiple times, I do not get a smooth transition. Is it possible to increase the height in pixels? Is there a better way to implement this?

Thanks,
Amrish

10.04% popularity Vote Up Vote Down


Login to follow query

More posts by @XinRu324

4 Comments

Sorted by latest first Latest Oldest Best

 

@Murray664

I've been using Texture Packer to create sprites for my iPhone game. Another great tool is Zwoptex

10% popularity Vote Up Vote Down


 

@Alves566

See answer to this other question [related]:
Automation of repetitive tasks in Photoshop?

10% popularity Vote Up Vote Down


 

@Vandalay110

I recently started playing with scripting Photoshop and I took a few minutes to mess with this simple problem as a way to get some practice. While I used VBScript, if you are in any way competent with programming, you could probably port it to applescript or javascript if you need to.

The layer resizing looks like it is, unfortunately, percentage based by design but through scripting it is possible to make the math conversions.

I put the script here: ideone.com/F4TL6
In windows, vbscript is a plain text file where you rename it VBS and it will be executable. As always with the internet, if you don't understand what it does, DO NOT RUN IT.

It has no real error checking, so its more a proof of concept. It grabs the first document it sees, and presumes the specially-named layer is transparent except for the rectangle.

10% popularity Vote Up Vote Down


 

@Lee3735518

First off: I have no experience with sprites. So I can't really tell if this is the best way to go (overlapping layers and stuff)

You could do this using "Canvas size...".


create an image with the smallest
dimensions
make new layer and fill it with the color of your choice.
Now record your actions:


Go to image -> Canvas Size...
Activate the relative option
Change the units to pixels and insert the size increment you want into the height box (in your case width should be "0")
after clicking OK create a new layer
fill it with the bucket
Stop recording. And play the action every time you want to increase the size.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme