Home Technical Talk

Pre rendered character sprites with changing weapons and gear workflow ?

interpolator
Offline / Send Message
Shrike interpolator
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

  • Eric Chadwick
    Options
    Offline / Send Message
    You'll want to use mattes. Which 3d renderer are you using? They all do it differently.

    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.
  • Shrike
    Options
    Offline / Send Message
    Shrike interpolator
    I use cinema 4d. Thanks, Hm I thought about that, although wasnt sure if it works out.
    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)
  • Eric Chadwick
    Options
    Offline / Send Message
    You can either rotate the camera, or you can rotate the character. If you want the lighting to be consistent, make sure it rotates with the character.

    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
  • Shrike
    Options
    Offline / Send Message
    Shrike interpolator
    No, i mean I would have to rotate the camera and the character to do the weapons on a circular path like shown on the previous image.
    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
  • Eric Chadwick
    Options
    Offline / Send Message
    Use a hierarchy to rotate things. Link whatever you want to rotate to a common parent, then rotate that.

    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.
  • Shrike
    Options
    Offline / Send Message
    Shrike interpolator
    Yes I will do that, I can not think of any other way of doing things right now and I doubt there is something super out of the box and different that can be done there, I was just hoping there would be some other way
  • Eric Chadwick
    Options
    Offline / Send Message
    It's pretty simple, rendering wise. I've done multi-pass renders with mattes quite a lot. Not in C4D but I imagine it's not all that different from Max or Maya. 

    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.
  • Shrike
    Options
    Offline / Send Message
    Shrike interpolator
    I use game maker studio, and it only has a very poor 3D implementation, its a full 2D engine.
    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



  • Eric Chadwick
    Options
    Offline / Send Message
    Looks great! So, 2d it is.
Sign In or Register to comment.