Animated Textures

Creating and using animated textures in PAC.

Download VTFEdit, open the archive and extract the x64 folder. 1)

To create an animated texture file you'll need a sequence of image files, you can get them by converting existing animation files such as .GIFs or creating them yourself. There are multiple methods of acquiring those files, some of them will be listed here but you can use your own methods if you prefer.

If you already have the image files you can skip to Creating animated .VTFs

  1. Go to EZGIF.COM
  2. Click on Browse/Choose Files and select your file
  3. Click Upload!
  4. On the next page you'll see a bunch of tools that you can use to edit your .GIF, they are optional and won't be covered here but feel free to use them
  5. Once you're done editing, select the Split tool
  6. Scroll down to Split options:
    1. If your .GIF is transparent select Output images in PNG format
    2. If your .GIF is NOT transparent select Output images in JPG format
  7. Click Split to frames!
  8. Click Download frames as ZIP
  9. Open the .ZIP file and extract all the files to a folder
????

This section explains creating animating .VTF files from image sequences. If you already know how to do this and just want to know how to use those files in PAC, go to Using animated .VTF files in PAC

  1. Open VTFEdit and click on FileImport
  2. Navigate to the folder with your images, select all of them and click Open
  3. In the VTF Options window
    1. Set Normal Format to DXT1
    2. Set Alpha Format to DXT5
    3. Set Texture Type to Animated Texture
    4. (Optional) If you want to reduce the size of your texture, you can use the Clamp option and set the Maximum Width and Height
  4. Click OK
  5. Go to FileSave As…
  6. Name your file and click Save
  1. Upload the .VTF file → Hosting custom content online
  2. Add a Model to your outfit
    1. If you're looking for a flat, one-sided model → Use this .ZIP as your model
  3. Attach a material to the model
  4. Paste the .VTF link into the basetexture field
  5. Attach a Proxy to the material
  6. Set variable to frame
  7. Set expression to time()*fps where fps is the number of frames per second

Expression: timeex()*fps


fps - frames per second


Example: timeex()*24

Expression: start_frame+(timeex()*fps)%range


start_frame - the frame that you want the animation to start on

fps - frames per second

range - how many frames you want to play


Example: 5+(timeex()*24)%10 — Starts on frame 5 and plays 10 frames

Expression: min(timeex()*fps,end_frame)


fps - frames per second

end_frame - the frame that you want the animation to stop on


Example: min(timeex()*24,68) — Plays until frame 68

Texture used: rock.vtf

Expression: time()*24

Replacing materials → Replacing materials/textures

Proxy expressions → Proxy


1)
It might not work on some systems, in that case use x86.
  • Last modified: 24 months ago
  • by yagira