Hey guys,
Im working on a game using all pre rendered sprites (because I use a 2D engine and like the style).
Animation and characters are my weakpoint and I am looking for some input how to most efficiently do this.
My main character is seen from around 45° top down
(Placeholder character)
And I have to render this out in at least 9 directions. If I want to have some arms animations, assuming 10 frames the animation, that would be 90 frames already. This all costs memory so I need to keep this potentially low I guess.
I already decided to split the legs and the upper body in 2 parts to save frames, so lets only assume the upper body. Now this all would work if I only had one weapon. If I want to switch weapons, I had to re-render the whole
upper body with all animations again.
Now one idea was to render the
weapon animations hands empty, and the
weapons themselves seperately
and make them rotate per code to be always at the characters hands but im not sure this can work due to depth
and just making them fit properly, probably not possible like that, especially with animations.
Do I have to do this brute force and just rerender it all every time ?
(Rectangles represent the transparent background sprites / textures)
Are there any workflows I don't know of ? If you did something similar how did you do it ?
Any good resources ?
Replies
Basically you set the arms and body to be a matte, but the weapon(s) not. Then when you render, the arms/body occlude the weapon but are invisible.
The biggest problem you'll have is different hand placements on different weapons... pistol vs. machine gun vs. rocket launcher. You may want to separate the arms from the torso, so you can render a few different reusable poses.
Yea the hand placements are an obvious hurdle but maybe I can cheat a bit there. Detaching the hands would not really save any frames however but add a lot more work as they are close to the torso ether way and have roughly similar image size.
Im still not sure how I could render the weapons in this circular cutout, gotta set up a perfectly located rotating camera I think, hmm
Any other experiences with the subject ?
I also just read that the guys from transistor rendered out 400x400 Bink videos for their character animations which is
strange but interesting (not really a workflow but just implementation thing I assume however)
You probably want PNG as your format, since it supports soft alpha. GIF is only on/off alpha. But if you use PNG you'll want to use a PNG optimizer to reduce the file size. SuperPNG for Photoshop works great for this.
Shoebox has some great tools for managing sprites.
http://renderhjs.net/shoebox/
We have a thread for it here
http://polycount.com/discussion/91554/shoebox-2d-gamedev-tools/p1
For the rest ive been using simple object rotation with a fixed camera as that was enough so far.
Ive been doing the ordinary things, PNG works perfectly fine but I dont really have other options. I don't think using SuperPNG works in any engine as theyare converted into the engine format or DXT ether way, this only works for web im pretty sure. Shoebox is a nice tool used it before, but implementation is clear (using image sequences no sheets, really comfortable), just how to get the sprites rendered out in this case is the tricky part or the general approach id say
Either link camera to the rotating parent, or link all models and lights.
Then render in passes. Legs only. Upper body only. Weapon1 with upper body matte. Etc.
I think the tough part is going to be aligning all the pieces in your game code. Which engine are you using?
And what art style are you going for? It may be a heck of a lot easier just to use 3d characters. You could use custom shaders to get the right look.
It could be done but id had to do so much work to make it look comparable as there are no shaders or hdri or modern animation or
anything support so its out of question, but I think I will be all fine, the rendering out the rest worked out so far too.
Here is an example of one of my larger props sprites, its kinda simplified 'realism' and all ortographic of course