• Texture Refraction
    2 replies, posted
I'm working on an Active Camouflage thing for Garry's Mod, and I'm making a custom texture for it. [B]Before I go any farther[/B], I just want to say that if I posted this in the wrong spot, I went by "For your modelling/animation/SKINNING needs." Anyways, back to the point. The normal map and everything else works fine, but there is a small problem. The original texture shows under the normal map, but in a funny way. Here is a picture: [IMG]http://puu.sh/bg08W/8796efbf74.png[/IMG] It looks [I]just[/I] like this in-game. I want it so that the bump map shows and the texture underneath does not, giving a really nice-looking effect. Here is the VMT code: [CODE]Refract { $basetexture "camo/camo" $normalmap "camo/camo_n" $refractamount .08 $forcerefract 1 } [/CODE] If it helps, here is the folder with the materials in it. [IMG]https://dl.dropboxusercontent.com/u/80403306/camo_window.PNG[/IMG]
Try this vmt: [CODE]"Refract" { "$model" 1 "$bluramount" 1 "$refractamount" ".25" "$REFRACTTINT" "{250 250 250}" "$scale" "[1 1]" "$dudvmap" "camo/camo_dudv" "$normalmap" "camo/camo_n" "$envmap" "env_cubemap" "$envmaptint" "[.3 .4 .4]" } [/CODE] Where "camo_dudv" - is your du/dv map. You can read about having one [URL="https://developer.valvesoftware.com/wiki/Du/dv_map"]here[/URL].
[QUOTE=Hamk;45859397]Try this vmt: [CODE]"Refract" { "$model" 1 "$bluramount" 1 "$refractamount" ".25" "$REFRACTTINT" "{250 250 250}" "$scale" "[1 1]" "$dudvmap" "camo/camo_dudv" "$normalmap" "camo/camo_n" "$envmap" "env_cubemap" "$envmaptint" "[.3 .4 .4]" } [/CODE] Where "camo_dudv" - is your du/dv map. You can read about having one [URL="https://developer.valvesoftware.com/wiki/Du/dv_map"]here[/URL].[/QUOTE] Thanks, I'm going to try it now. [editline]1st September 2014[/editline] YES! It works! Thanks, Hamk.
Sorry, you need to Log In to post a reply to this thread.