Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

3 Dimensional Chat / Blender to 2D frames for animated sprite

Author
Message
Naphier
12
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 23rd Mar 2012 05:01
2 part question much related.

I use Blender to do my animations, then render each frame to a png.
Then I stitch them together in GIMP so that I can use a new png as the animated sprite image file.

Anyone know of a tool to automatically stitch multiple images together in a single file / sprite sheet?

Looking for something free preferably.

Does anyone else use a similar method of creating a 3d model in Blender, animating with minimal frames, then stitch the frame images together to make a single sprite sheet?

I feel like the task could be automated, and I may write my own tool for it since I plan to use this method until I decide to tackle DBPro's 3D commands. Right now I want to keep it simple and see what I can do without invoking 3D.

Thanks for the help!

Penfold
19
Years of Service
User Offline
Joined: 3rd Dec 2003
Location: RED postbox houses of parliment
Posted: 23rd Mar 2012 15:23
you could always make DB construct a spritesheet for you?

'Ooh 'eck chief'...'crumbs'
Naphier
12
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 23rd Mar 2012 15:50 Edited at: 23rd Mar 2012 19:01
Yes, but hoping for other options or to hear from others how they do it.

EDIT
OK well I had some time to troll around the internet this morning and finally found a descent solution, though it would still be nice to hear how others do this or find a plugin for Blender that does this (which would cut down my steps even further).
Here's my process:

1. Model something in Blender

2. Animate the object and render each frame to a PNG file with RGBA (that RGBA distinction is important).

3. Select all of the PNG frame files and drag them in to the layer window in GIMP. I have a issue withthis where the files get imported out of order at times, which requires me to rearrange them. It would be ideal if I could have GIMP automatically rearrange layers by alphanumerically by name. I've not had luck finding a solution to this dilemma.

4. Run a script call tile-layers.scm which will automatically arrange each layer/frame into a grid that you specify the number of columns and rows or it automatically fits them into as much of a square as possible. Awesome tool.
The link is:
http://ffaat.pointclark.net/incoming/scripts/tile-layers.scm

or the text is (just save text file as SCM extension and copy to GIMP scripts directory)


5. Remove the white background layer and flatten the image then save as PNG.

6. Use your sprite sheet in dbpro

Not to bad, but would love to do this directly from Blender. Maybe someday I'll learn python to do so.

Travis Gatlin
13
Years of Service
User Offline
Joined: 14th May 2009
Location: Oxford, Alabama
Posted: 23rd Mar 2012 18:54
A quick google search got me this:
http://www.texturepacker.com/sprite-sheet-maker/

http://www.talenthouse.com/travisgatlin
You can find my latest work here. Please comment on my work and tell me what you think!
Naphier
12
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 23rd Mar 2012 20:21 Edited at: 23rd Mar 2012 20:26
Thanks, that looked really promising.
Unfortunately it has some odd nuances that I don't like to much.
All sprite sheet textures need to be sized in 2^x.
And it arranges the tiles strangely. It'll fill two rows then put less in each row after that. I couldn't figure out why.

I found this after realizing I could search for "sprite sheet maker" on google and find some of what I'm looking for.
http://spritegenerator.codeplex.com/
Can't try it out at work since I can't install .NET here.

Found this one:
GlueIT
http://www.varcade.com/blog/?p=206
Nice and simple and works pretty well. It doesn't allow any batch sorting on the files, which may be problematic, but in my test there was only one file out of order, so 50 clicks and I was OK.

This one looks promising, but no Adobe AIR installed here either.
http://blog.flashgen.com/2010/12/21/sprite-sheet-maker-preview/

Found "Sprite Builder" that was a dud... only allows BMP and JPG, I need PNG.

And at this point I'm wading through too many of those fun download sites that want to install crap on your PC.

So far the winning solution is to use the above script I found for GIMP since it gives me the best control.


I'd still love to hear how others do this!

Pincho Paxton
20
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 24th Mar 2012 00:38 Edited at: 24th Mar 2012 00:40
I do the same thing using Anim8or, and Photoshop. But I don't like sprite sheets, so I just keep the individual images. Keeping the individual images should save you some time. I manually animate the images.

Naphier
12
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 24th Mar 2012 01:22
Interesting. I hadn't really considered that.
How do you play through the frames?
File name concatenation and indexing or do you use something like the FIND NEXT command and increment through directories of the animation files?
Or something else?

Pincho Paxton
20
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 24th Mar 2012 14:34 Edited at: 24th Mar 2012 14:48
Well, you end up with images that are numerically saved. So you can load them in 'For n Next' loop where 'n' loads the images by updating the file number. You end up with groups of images in sequence. So just by changing the image numbers in a loop you have automatic animation.

For n = 1 to 26
Load Image "GFX/DarkBox" + str$(n) + ".PNG",n
Next n

If Gimp has batch editing like Photoshop, you can batch edit an entire folder. So you can batch scale, or batch crop. In other words, if your images have a lot of black around them, you can batch crop all of the black off them to get smaller image blocks. You can batch edit all of your bmp to PNG as well to get alpha blending.

Naphier
12
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 29th Mar 2012 03:19
@ Pancho - not sure if GIMP batch edits like PS does, but essentially you can load all the images into layers and then cropping is easy peasy. I render them from blender with transparent backgrounds... Could do batch filters in GIMP if I wanted.
I found a script for PS called layerstosprite which works just perfect.
A really nice simple Sprite Sheet maker is this one:
http://blog.flashgen.com/2010/12/21/sprite-sheet-maker-preview/

Very easy to use. But PS is the best. GIMP I'd put in third for making sprite sheets, though it has some handy filters and scripts.
Still would be really hot to just do it directly from Blender... maybe someday I'll learn python and make my own, but I doubt it

Thanks for the help!

Pincho Paxton
20
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 29th Mar 2012 23:26 Edited at: 29th Mar 2012 23:27
In Photoshop you have an macro event recorder. You record yourself dragging a cropping tool around an image, then crop, and save it. Then you just point to a folder, and it does all of your images in one go. Then you should have a bunch of images all lined up in the middle of a colour. So when you animate them the colour acts as an automatic X/Y position for each animation frame. It's really only a few steps to save the animation as bmp in blender, to having the whole folder cropped, and ready. To load in a loop with n loading them all in one go.

Naphier
12
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 30th Mar 2012 04:24
Thanks for the tips!

Login to post a reply

Server time is: 2023-01-28 07:56:25
Your offset time is: 2023-01-28 07:56:25