Overlaying Textures with position

I was wondering if anyone could help me with this.

I’m recreating the system from WoW where they overlay armour textures onto a single mesh.

They do it like this

I could only find the one thread on reddit thread where the guy wrote an article on how he achieved it, but it isn’t reusable for multiple characters per scene. So I’m kinda struggling here.

If anyone has any suggestions please lemme know thanks :slight_smile:

Lil bump

I’ve been looking into using SetPixel to draw onto textures with a position… but idk how performant that’d be with a lot of NPCs dotted about my game world
I’m also struggling to position the new textures in specific positions on the bottom texture, any advice would be appreciated :slight_smile:

This is not very performant. It may be appropriate for certain uses at load time, but don’t expect to do anything useful at runtime without completely freezing your computer while the drawing happens. And remember to call .Apply() after any SetPixel/SetPixels() calls.

This is un-actionably vague.

Is there perhaps a different method you can think of that would be much better at runtime? This one is just the first one I found that would work… however awful it might be.

The simplest engineering for this problem is always going to be to tell the artist to make all combinations of armor and weaponry all in the same model stack, boned and overlaid and animated together.

The engineering for that approach is trivial: it just requires turning on and off the requisite pieces based on what is equipped, which is mostly a click-and-drag party to set everything up once and you’re done.

Anything other than that will require more engineering, more complexity, more data-to-code binding, etc.

I was afraid that’d be the alternate option.
I assume based on the models imported from WoW that in their engine they have a finer control over sub-meshes where as unity just gives me materials for each sub-mesh, without as much flexibility.

I’ve got a few other things to try before going through and resizing all the textures and moving them into the correct position.

My current idea is using the RenderTexture method I’ve got working currently and just saving the current configuration of gear using ReadPixels and applying the output texture from that to each model, creating a queue of different entities that need updating, doesn’t look like, from a few tests I’ve done, it’d be too intensive at runtime. And as entities were loaded in they could call on the RenderTexture to update them which would add them to the queue and get it done.

Look at what UMA did