Results 1 to 7 of 7

Thread: The Decal Experiment

  1. #1

    Default The Decal Experiment

    I'm calling this a resource not a tutorial because I'm not showing a step by step process but rather my documentation of a successful experiment. My goal was to bring the decal shield system to something other than shields. Since Rome 2 came out I was thinking there must be a way to simply increase the variations without having too many models. I though it was simple as adding a texture array to a non shield model. That doesn't work. Up until now I had no idea why.

    Then came the assembly kit and that helped out a lot. As silly as this sounds, I just now got a new shield model to use the decal system. Before I just used the shield models textures and had models upon models. The shield example doesn't exactly help much because all the relevant slots are given the same generic dds names. You can use the diffuse normal, specular, gloss and level maps like usual, but then you have to add the decal mask, decal dirt map and decal dirt mask slots to it as well. I looked into the game's files to find how I needed to set those up. Essentially here's how you need to do it.

    decal mask: take wherever there is an actual texture turn white and everything else black then scale the image to 128 x 128 pixels.

    decal dirt map: same as above except scale it to 512 x 512 pixels or if in doubt half the size of your original texture.

    decal dirt mask: everything black


    So my first test was getting a new shield to work with decals. I took the pavise shield from my Medieval mod and used that as a base. Simply put I got it to work! So then I wanted to try it with a body texture. I took the base surcoat I use for my Men at Arms and other units and used the texture variations as "patterns" Here's the result of both tests.

    Spoiler Alert, click show to read: 










    Yeah, I got it to work, The difference that was stopping me before the Assembly Kit was the shader that separates armor, helmets, etc from shields. Shields with decals need to use the shader "decal_dirtmap" and models with bones need to used "weighted" or "weighted_skin". I checked the shader list in the "Rigid_Materials.xml" (Found in raw_data\lighting) to see if there was a shader that basically did both and there is. "weighted_decal" is what you want to use.

    So now I've been brainstorming the potential with this and also any issues this could bring. This might be great for mods like DeI where they add lots of variations to the units. It could be a way to improve performance when instead of having a crap ton of linothorax models with different textures, you could just have one model with a texture array. You could kill off the three color system by adding an array to the clothing. To a lesser extent you could do this to helmets that use the same model. Now as I was typing this I realized something to be mindful for. Make sure you only add decals to where you want to. You shouldn't do it to the whole texture because some models will need gloss and specular maps and they might not look as good if you did just took the whole piece. (I only did it in the screenshot to test the method) So yeah, I think this has potential.

  2. #2

    Default Re: The Decal Experiment

    Would this work with just sticking emblems/insignia on individual men? So do the textures normal by having lots of odentical models each with a different texture and then having a random emblem stuck on the outside?

    That would be great for my chivalry medival warfare mod where every man has a different emblem.

  3. #3

    Default Re: The Decal Experiment

    I think that's possible, yes.

  4. #4

    Default Re: The Decal Experiment

    Word to the wise: When testing out linothorax decals, please, PLEASE, make sure your dds files are properly sized. I spent the greater part of a morning trying to figure out what I was doing wrong and I made a basic mistake. (expect pics soon.)

  5. #5

    Default Re: The Decal Experiment





    May I ask what am I doing wrong? The result is this。

  6. #6

    Default Re: The Decal Experiment

    Hmm, very interesting, so i can use a dirtmap for various rigid_models?

  7. #7
    Magnar's Avatar Artifex
    Join Date
    Jul 2013
    Location
    The last place you look
    Posts
    4,370

    Default Re: The Decal Experiment

    problem with the decals for the basic linos is that no parts of the model can be alpha'd which causes black spots around the tied rope

    and anywhere else alpha is applied

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •