1 Reply Latest reply on Apr 23, 2007 8:35 PM by Grampa Gar

    Blending tiled textures

    Grampa Gar Level 1
      I was checking out some of the Necromanthus "Reloaded" versions of Return to Castle Wolfenstein, Half Life, etc. and noticed that he was able to blend tiled textures in Shockwave. A typical example of what I'm talking about is a dirt path on a grassy field. You have two textures - soil for the path, and grass for the field, each is tiled, but there is a gradual transition from soil to grass. I'm assuming one shader here with the two tiled textures in different texture layers and alpha channels in between to "paint" the tiled textures where you want them, but I just can't seem to make it work. I'd really appreciate some advice here.
        • 1. Re: Blending tiled textures
          Grampa Gar Level 1
          I'll try to answer my own question until someone chimes in. I found a crude way to blend tiled textures as follows: For the dirt path in a grassy field example use a dark soil tiled texture in layer 1. Dark soil is necessary because that layer is going to get added to the grass layer and we don't want it to get too bright. In layer 2 put a grey-scale, non-tiled image of the path with a light color where you want the path and black where you want the grass. Set blendFunctionList[2] to #multiply. That will give us just the tiled soil path and black where the grass will go. Now in layer 3 add the tiled grass and set blendFunctionList[3] to #add. The grass looks fine, but because the soil will get added to the grass, the soil pattern gets a little "grassy". I know there must be a better way, but that's the best I've been able to do so far. Help?