Sign in to follow this  
mrhallodri

Texture - Sprite Mapping

Recommended Posts

Hi there,

I am looking for the name of a technique that is used in some social games.
Sometimes, there are some animations (e.g. characters) looking very 3D-ish, but they are prerendered and loaded from a spritesheet.
But the strange thing (at least for me) is, that this animations can have a lot of different textures on it... and indeed there is only one spritesheet and some textures for it.
So somehow the textures are rendered on it with a shader using the color channels of the spritesheet.

Now my question is: how is this technique called? Thanks a lot in advance for helping me. :)

Share this post


Link to post
Share on other sites
[quote name='mrhallodri' timestamp='1317717226' post='4868900']
So somehow the textures are rendered on it with a shader using the color channels of the spritesheet.[/quote]

Usually this is done using layers in 2d, or just multitexturing in 3d, where each piece of clothing or skin tone is rendered separately to be combined later.

One can adjust the colour with a software (or the GPU), but applying a texture could look pretty bizarre because the texture would not conform to the shape of the body, and if you made it conform by deforming the texture on application based on a normal map of the character, it would probably negate the usefulness of the pre-rendering.


Can you show us a picture or video of this application?

Share this post


Link to post
Share on other sites
[quote name='driftingSpaceMan' timestamp='1317799469' post='4869297']
Usually this is done using layers in 2d, or just multitexturing in 3d, where each piece of clothing or skin tone is rendered separately to be combined later.
[/quote]

Layers would be my prefered way. When changing colors, you should probably use a mask, to determine what pixels of your texture will actually have their colors changed.

of you can do it as blizzard did in Diablo/Diablo2 and render separate images for every possible combination of images, then use the mask as I described to determine what parts of the image can change color.Also you can look into how Tropico 1 and 2 managed different layers. Were each sprite had a separate sprite with depth values. To allow objects to move behind parts of a sprite, they just did z comparisons when drawing two images on top of each other for every pixel drawn. Not the most elegant way, but it works.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this