Programatically combining bitmaps for UV Maps in complex ways.

Hello all, I’m trying to rewrite an established Horse MMO game of mine for Unity, at the same time, I’ll be going from 2D to 3D.

The biggest hurdle to this, is the horse breeds, I have probably around 500 breeds already made in the original game and I need to bring these over to the new game. The breeds are made from probably around 20 bitmaps, but then they’re overlayed on top of each other, with different blend modes, different levels of hue / saturation / brightness / contrast to create a new horse.

Here’s a video of the tool I’ve made to create breeds for the 2D game:

When required, the game creates a sprite sheet (1024 x 1024 image) on the fly from the bitmaps required from that breed as well as a 512x512 “large” view of the horse.

I’m hoping there is a way I can bring this over to Unity. Instead of creating a 2D sprite sheet though I will want it to create a UV Map for a 3D horse model and apply it to that.

  1. This should be do-able right? I’ve done some looking into blend modes in Unity, not found any way yet to overlay several bitmaps with different blend modes and draw that out to another UV map. Hue and Saturation seems more trivial.

  2. Does anybody want the job? Obviously would be paid work, the game at present has a small, but loyal following. I’d rather find someone with experience to do this bit of the game because I feel I would do a bit of a bodge job.

Finally if anyone has any advice for me on this, let me know :slight_smile:

Your video is set to private, can’t watch.

Very sorry about that, it should be published properly now

I wonder if you could do that with a shader, but I can’t say if it’s possible to provide it with 20 textures and all associated parameters.

When looking before I found someone else suggesting shaders to handle different blend modes too but I’m not sure how that would work, or at least not work efficiently (this needs to run on mobile devices). At the moment creating a sprite sheet from around 5 different 1024x1024 bitmaps takes around 250ms on an iPhone 4, and thats an acceptable amount of time for this.

I guess one option would be to code each blend mode myself using for example, code like this: Masking(Multiplication) of Two images using C# - CodeProject

though I’m worried that this could end up being a bit slow

Take a look at how the “splat maps” work for the Terrain shaders. They are essentially a color coded bitmap (like red, green, blue blotches) that dictate which other texture to use at each point, such as rock, grass, dirt, etc.

Thanks Kurt, I’ll do some research on that and see if it can apply to what I’m doing, in the meantime I’ve posted a job offering for this to the correct board: http://forum.unity3d.com/threads/complex-texture-combiner.349329/