Animating Refract?

Modelling, Textures, Animating and other general engine asset topics.

Animating Refract?

Postby Groxkiller585 on Fri Oct 29, 2010 10:59 pm

Ok, is it possible to animate a refract? If so, how?

I've tried:

Code: Select all
       "Proxies"
    {
          "AnimatedTexture"
          {
         "animatedTextureVar" "$normalmap"
         "animatedTextureFrameNumVar" "$normalframe" //IDK about this, made it up
         "animatedTextureFrameRate" "14"
          }
         }


Code: Select all
       "Proxies"
    {
          "AnimatedTexture"
          {
         "animatedTextureVar" "$bumpmap" //I added the $bumpmap parameter, not sure if it works on a refract though...
         "animatedTextureFrameNumVar" "$bumpframe"
         "animatedTextureFrameRate" "14"
          }
         }

Code: Select all
       "Proxies"
    {
          "AnimatedTexture"
          {
         "animatedTextureVar" "$bumpmap"
         "animatedTextureFrameNumVar" "$frame"
         "animatedTextureFrameRate" "14"
          }
         }


And:

Code: Select all
   "Proxies"
    {
          "AnimatedTexture"
          {
         "animatedTextureVar" "$normalmap"
         "animatedTextureFrameNumVar" "$frame"
         "animatedTextureFrameRate" "14"
          }
User avatar
Groxkiller585
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Fri Jul 09, 2010 3:43 pm

Re: Animating Refract?

Postby vcool on Sat Oct 30, 2010 12:35 am

I was able to animate refracting textures by actually making an animated VTF of the normalmap. I didn't specify the animation in the VMT though, maybe that's the proper way to do it, but in my case it worked.

Not sure what animation you are exactly trying to achieve, but maybe a simple bumptransform in the proxy would suffice?
Image

Neighborhood Forum Elitist
User avatar
vcool
Veteran
Veteran
 
Joined: Fri Jun 23, 2006 1:03 am
Location: USSR

Re: Animating Refract?

Postby Groxkiller585 on Sat Oct 30, 2010 2:00 am

vcool wrote:I was able to animate refracting textures by actually making an animated VTF of the normalmap. I didn't specify the animation in the VMT though, maybe that's the proper way to do it, but in my case it worked.

Not sure what animation you are exactly trying to achieve, but maybe a simple bumptransform in the proxy would suffice?



Ok, let me be a bit more clear. The normalmap is the one used for VALVe's water, dev/water_normal. I have used it previously on other textures and it animates fine there but here on a refract it does not.

A bumptransform would not suffice as this is supposed to look like water, exept vertical, hence why it's a refract. Not like a waterfall, I want THIS normal's animation.

All I need atm is the normal animating to complete the effect I want.
User avatar
Groxkiller585
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Fri Jul 09, 2010 3:43 pm

Re: Animating Refract?

Postby poisonic on Sat Oct 30, 2010 6:17 pm

Code: Select all
"Refract"
{
"$model" 1
"$bluramount" "1"
"$surfaceprop" "glass"
"$scale" "[1 1]"
   "$refractamount" ".00625"
   "$refracttint" "[0.9 1.0 0.95]"
"$normalmap" "prorefract/refractingexpbump"
"$dudvmap" "prorefract/refractingexpdudv"
"Proxies"
   {
      "AnimatedTexture"
      {
         "animatedtexturevar" "$normalmap"
         "animatedtextureframenumvar" "$bumpframe"
         "animatedtextureframerate" 11
      }
"AnimatedTexture"
      {
         "animatedtexturevar" "$dudvmap"
         "animatedtextureframenumvar" "$bumpframe"
         "animatedtextureframerate" 11
      }
   "TextureScroll"
      {
         "texturescrollvar" "$bumptransform"
         "texturescrollrate" 0.25
         "texturescrollangle" 90
      }
}
}


last week tried the same you are looking for here's my example vmt

Good luck ;)
[img:400]http://mypsn.eu.playstation.com/psn/profile/poisonic.png[/img]
User avatar
poisonic
Pheropod
Pheropod
 
Joined: Tue Jan 20, 2009 5:10 pm

Re: Animating Refract?

Postby nub on Sat Oct 30, 2010 7:12 pm

That VMT above should work just fine. You just need an animated bumpmap VTF. It's like making a water texture without the water parameters, and you use the Refract shader type.

PS: The texture scroll parameter in that VMT is not necessary, unless you want your texture to scroll as well.
User avatar
nub
Veteran
Veteran
 
Joined: Tue Nov 15, 2005 1:11 am
Location: Charlotte, NC, US

Re: Animating Refract?

Postby Groxkiller585 on Sun Oct 31, 2010 2:26 am

Wait, does a refract need a DUDV map to work right? I thought those were obsolete or something because of how low your DX settings would need to be for it to actually be used. if i DO need it, can i just use the
normal I used before, or do I need it in another setup? If I do need it in another setup can someone give me or show me where to get a "flat" DUDV map?

Also why is there a "$model" parameter? Was this used on a model? Mine's a brush.
User avatar
Groxkiller585
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Fri Jul 09, 2010 3:43 pm

Re: Animating Refract?

Postby poisonic on Sun Oct 31, 2010 4:00 pm

yes ofcourse u need a dudv for a refracting texture ;) read the tutorial on how to make an refracting shader
[img:400]http://mypsn.eu.playstation.com/psn/profile/poisonic.png[/img]
User avatar
poisonic
Pheropod
Pheropod
 
Joined: Tue Jan 20, 2009 5:10 pm

Re: Animating Refract?

Postby poisonic on Sun Oct 31, 2010 10:41 pm

$model is needed or else it does not work
the brush you use needs to be an func_wall to work allright ;)
[img:400]http://mypsn.eu.playstation.com/psn/profile/poisonic.png[/img]
User avatar
poisonic
Pheropod
Pheropod
 
Joined: Tue Jan 20, 2009 5:10 pm

Re: Animating Refract?

Postby Groxkiller585 on Mon Nov 01, 2010 1:37 am

poisonic wrote:$model is needed or else it does not work
the brush you use needs to be an func_wall to work allright ;)


You mean a func_brush not func_wall.

I get it to work fine on a func_brush. no issues at all.

Ok, i'll try it with the $model parameter.
User avatar
Groxkiller585
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Fri Jul 09, 2010 3:43 pm

Re: Animating Refract?

Postby poisonic on Mon Nov 01, 2010 2:51 am

i hope you get it working :) it has to be an entity so a func_brush would also work or an func_ilusionary :-D
and a tip if you can do it make a model out of it somehow refraction on a model is much nicer Image
dont ask for the models ive used to make up the window frame im 99,9% sure i lost it lol :D maybe its still on my hdd somewhere in a lost backup :smt021
eeeem abouth the dx needed for refaxtion i tought it was dx8 ;)
[img:400]http://mypsn.eu.playstation.com/psn/profile/poisonic.png[/img]
User avatar
poisonic
Pheropod
Pheropod
 
Joined: Tue Jan 20, 2009 5:10 pm

Re: Animating Refract?

Postby poisonic on Mon Nov 01, 2010 2:57 am

here's an example VMT!!!! im still missing the DX part in my code to make it work from dx6 till dx9
Code: Select all
"Refract"
{
"$model" "1"
"$bluramount" "1"
"$surfaceprop" "glass"
"$refractamount" ".100"
"$scale" "[1 1]"
"$normalmap" "textures/underwater_glass_normal"
"$dudvmap" "textures/underwater_glass_dudv"
"$REFRACTTINTTEXTURE" "textures/underwater_glass"

"Proxies"
   {
      "TextureScroll"
      {
         "texturescrollvar" "$bumptransform"
         "texturescrollrate" .1
         "texturescrollangle" -90
      }
   }


   "Refract_dx90"
   {
      "$refractamount" "0.100"
   }
   
   "Refract_DX80"
   {
   "$refractamount" ".025"
   "$REFRACTTINTTEXTURE" "textures/underwater_glass"

       "Proxies"
           {
      "TextureScroll"
      {
         "texturescrollvar" "$bumptransform"
         "texturescrollrate" 0.1
         "texturescrollangle" -90
      }
      }
   }

   "UnlitGeneric_dx8"
   {
        "$basetexture" "textures/underwater_glass"
       "Proxies"
           {
            "Sine"
               {
                   "resultVar"    "$alpha"
                   "sineperiod"   15
                   "sinemin"      0.1
                   "sinemax"      0.1
              }
      }

   "UnlitGeneric_dx6"
   {
        "$basetexture" "textures/underwater_glass"
       "Proxies"
           {
            "Sine"
               {
                   "resultVar"    "$alpha"
                   "sineperiod"   15
                   "sinemin"      0.1
                   "sinemax"      0.1
              }
      }
   }
}
}


NOTE!! this is not my vmt !!!! this piece of vmt code is made by JBsource
http://blog.jailbreaksource.com/?p=762
[img:400]http://mypsn.eu.playstation.com/psn/profile/poisonic.png[/img]
User avatar
poisonic
Pheropod
Pheropod
 
Joined: Tue Jan 20, 2009 5:10 pm

Re: Animating Refract?

Postby Groxkiller585 on Tue Nov 02, 2010 6:19 pm

I got it working, adding the flat DUDV map I made and $model fixed it.

I would have made a DUDV map of the actual normal but I don't wanna make 30 frames and manually haul them together when the effect I get now is what I want.
User avatar
Groxkiller585
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Fri Jul 09, 2010 3:43 pm

Return to Art Creation

Who is online

Users browsing this forum: No registered users