prerogative

Author Topic: Texture with transparency does not work in Hammer.  (Read 191 times)

rtokuda

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
  • Acolyte
    • View Profile
Texture with transparency does not work in Hammer.
« on: December 30, 2020, 01:48:14 pm »

I watch the video several times and I'm having problems exporting the texture with transparency and the valve hamer doesn't recognize it. The texture is in TGA and I have no idea why it doesn't work.


wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3672
  • Karma: 101
  • Behind me?
    • View Profile
Re: Texture with transparency does not work in Hammer.
« Reply #1 on: December 30, 2020, 03:28:19 pm »
What are the dimensions of your TGA file? The texture compiler requires bitmaps to be standard dimensions (multiples of 2) like 1024x1024, 1024x512, 512x512, etc.

rtokuda

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
  • Acolyte
    • View Profile
Re: Texture with transparency does not work in Hammer.
« Reply #2 on: December 30, 2020, 04:40:27 pm »
It is in the 512x512 dimension

Joris Ceoen

  • Global Moderator
  • Full Member
  • *****
  • Posts: 232
  • Karma: 27
  • WallWorm Ambassador
    • View Profile
Re: Texture with transparency does not work in Hammer.
« Reply #3 on: January 04, 2021, 03:26:06 am »
It is in the 512x512 dimension
If you're trying to export the textures from 3DS Max to Hammer, make sure that the .vtf's are having at least DXT3 or DXT5 as compression method for the alpha (aka Eight-bit-alpha). You can change this in the bitmap parameters in the Wall Worm Texture Properties rollout (see image). If you don't see this rollout, generate these settings by going to Wall Worm (menu) -> Wall Worm Material -> Give Obj Mats+Tex WW Materials.

You should now see those options and be able to change the compression (DXT3 for 'sharper' alpha's, DXT5 for all other purposes), and then re-export the bitmap and .vmt to overwrite the old settings. For the vmt this means it will now include either $translucent or $alphatest to enable transparancy in Hammer and in-game.
« Last Edit: January 04, 2021, 03:28:03 am by Joris Ceoen »

wallworm

  • Administrator
  • Hero Member
  • *****
  • Posts: 3672
  • Karma: 101
  • Behind me?
    • View Profile
Re: Texture with transparency does not work in Hammer.
« Reply #4 on: January 11, 2021, 08:46:59 am »
One more thing: The same bitmap in the material editor needs to be piped into the Opacity slot of the standard material in order for the VMT exporter to set the $translucent flag.