1. Hey there Guest,

    The game servers have moved to semi-dedicated hardware and IPs have changed. Please see front page server widget for up-to-date game server information.

Scrolling texture behind transparent texture?

Discussion in 'Mapping Questions & Discussion' started by Delta_135, Apr 16, 2015.

  1. Delta_135

    Delta_135 L1: Registered

    Messages:
    5
    Positive Ratings:
    0
    Hej!

    I've got what seems to a rather unique question;
    how to get a not transparent texture to scroll behind a transparent texture. (or rather a texture with transparent parts in it)

    Now i've been playing with it for a few hours now and i have gotten it to work, but only using the "VertexLitGeneric" shader mode. (with we all know is less then ideal for a brush texture)

    So i looked around some more and found the "WorldTwoTextureBlend" witch seems to do what i need.

    The problem is that; while i can make the "not transparent texture" appear behind the transparent texture i can't make it scroll individually, when i add the scroll proxy it scrolls both textures.

    before i show you the .vmt file there are a few things i should probably explain first:

    The $detail texture is the one on top (aka transparent texture)
    and the $basetexture the one underneath and can be seen through part of the detail texture.

    So all i need is to animate the $basetexture without animating the $detail texture. I know it might sound insane but as i said it works fine using VertexLitGeneric so i just need to find a light mapped equivalent which WorldTwoTextureBlend seems to fulfill for the most part.

    Did that make sense? If not i'll try to reformulate it.

    anyway here is the .VMT
    Code:
    WorldTwoTextureBlend
    {
    	$basetexture "nature/underworld_lava001"
    	$surfaceprop Glass
    
    	$detail "Metal/metaltruss001"
    	$detailblendmode 2
    	$detailscale 1
    
    	%keywords "test"
    
    	Proxies
    	{
    		TextureScroll
    		{
    			textureScrollVar $baseTextureTransform
    			textureScrollRate 0.25
    			textureScrollAngle 90
    		}
    	}
    }
    this wont work as intended but if you replace "WorldTwoTextureBlend" with "VertexLitGeneric" you should see what i mean. (yes the lighting on the brush will glitch, thats why i need different shader)

    and yes i did try to other shaders but found none that could display a texture behind a transparent texture in the way i need.
     
  2. Seba

    aa Seba DR. BIG FUCKER, PHD

    Messages:
    2,363
    Positive Ratings:
    2,692
    Is there a reason you can't make two materials and use two brushes? That'd make this a million times easier (maybe just possible, since what you're asking to change sounds hard-coded into shader parameters (although I might be wrong; does fubar know anything about this?)).
     
  3. Delta_135

    Delta_135 L1: Registered

    Messages:
    5
    Positive Ratings:
    0
    No, it'll just me easier for me to use one material. But wanted to be sure if it was possible since it seems like a thing that should be doable without to much trouble.
     
  4. Vel0city

    aa Vel0city func_fish

    Messages:
    1,938
    Positive Ratings:
    1,542
    Ha.
    Haha.
    Hahaha.

    Welcome to the Source engine, where a lot of things are supposed to be simple yet they aren't.
     
  5. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,377
    To be fair, how many engines allow the creation and implementation of custom shaders without making any modifications to the engine?