r/hammer•
SamXZ

Dynamic Displacement Textures - Tutorial

Posted May 28, 2019, 3:20 PM UTC

442
SamXZOP•

This is not a beginner friendly video, you are expected to know your way around Hammer and creating maps. The video is only 2 minutes long, feel free to pause and follow the steps. However the process is very simple:

  1. Create your animated textures
  2. Add ToggleTexture proxies for the textures you'd like to change
  3. Apply your material to your displacement
  4. Create 1x1x1 func_brush blocks with your material and hide them behind your displacement so they're always rendered when a player is looking at the displacement.
  5. Create an env_texturetoggle with the brush as the target.
  6. To change the displacement texture, fire inputs to the env_texturetoggle.
8
TeamSpen210•

Do note that you're totally free to abuse the ToggleTexture proxy for uses other than toggling texture frames. The frame variable you specify can be any variable whatsoever. But you have to trick it in regards to the toggleTextureVar - this has to point to a texture variable for it to work, and it restricts the frame to the number of frames in that texture. Unfortunately you can't create custom texture variables, you need to use an existing one. What I'd suggest doing is creating a 4x4 texture with however many frames you want, then assigning it to $albedo. Based on the ASW code, this looks like a totally unused variable. Otherwise, use you'll have to repeat some other texture you use, or maybe assign to $detail with the blend factor at zero.

3
[deleted]•

[deleted]

1