Jump to content
  • Advertisement
Sign in to follow this  
mrhallodri

Texture - Sprite Mapping

This topic is 2451 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement

So somehow the textures are rendered on it with a shader using the color channels of the spritesheet.


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

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.


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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!