You need to log in to create posts and topics.

[Solved] Custom Textures Discolored & Have Tiled Outlines

Hello again!

My custom textures that I create via VTFedit and import into Hammer come out with a purple-looking tile artifact along their edges. Not only this, but they are not true to their original color and host a tint.

Right now, for the sake of simplicity, I'm trying to create a monochrome, solid gray, texture. It looks like this:

It started off as a .png, and it has the dimensions of 1024x1024.

I'll show you everything I did before showing the issue.

These are the VTFedit settings I create the .vtf file with:

Here you can see the name of my .vtf and .vmt files as well as the directory path:

The .vmt code is as follows:

Code: Select all
   "$basetexture"   "custom_mats/CustomGray"
   "$surfaceprop"   "brick"

This is the result I see in Hammer:

And this is the result I see in game (exactly the same):

As you can see there are purple-tiled artifacts that appear around each instance of the texture as it is tiled.

When I get close to the textures in game and in the Hammer viewer, the purple lines vanish.

Additionally, you can see that the color of the texture is all wrong. It has come out with a greenish hue.

I have tried importing the .png into VTFedit with the Normal Format settings at RGB888, because sources online say this ensures true RGB values, but this doesn't work.

Hammer shows the correct color in the texture viewer and in the face edit sheet, so it knows what it's supposed to look like, but somewhere between there and implementation it gets distorted. An example of this and the contrast between the correct and distorted colors is seen here:

For the purple-tiled issue: Because it is a monochromatic texture, I know I can select "fit" in the face edit sheet and this mostly solves it because the texture is no longer tiled, but this doesn't fix the green discoloration, and more importantly this is not a solution for my future textures that exhibit this problem which need to retain their size.

I found this forum where someone was having a similar problem and TopHatWaffle answered, saying it can be solved by using different compression methods or by changing filtering modes in VTFedit. But he didn't actually elaborate on what he meant by this or how to do it. (Which program is creating the compression issue? The program that originally exported the .png? VTFedit? Hammer? And what are filtering modes in VTFedit? How do I change it? What do I change it to?) He also suggested that since it is monochromatic, you could solve the problem in the .vmt file and he provides links which are supposed to show you how. However, these go to pages which require log in info, with no resources on how to get said info or make your own account, which is very odd.

Speaking of odd, I found that if I delete the source files from my materials folder in my steam directory, the problem is solved in the Hammer viewer instead of displaying the purple/black checkers!

Of course this isn't an actual solution as the media is offline and shows checkers in game, but it gave me a little more insight into the problem, that maybe it was something wrong with how Hammer is reading the texture?

Then again, based on other sources I've read I am assuming the issue stems from settings within VTFedit, but I have looked all over for answers as to what settings are proper and all sources refer to what I have already tried.

Thanks for reading, and any help would be greatly appreciated.

It doesn't look like there any problem with your generated texture properties.

The wiki suggests to convert images from a TIFF/TGA because there is no loss in quality. Perhaps this is the problem. Textures must also be in the sizes of power of 2 to work properly.

If you are using Photoshop, save TGA in 32 bit format before importing them into VTFEdit.

?????????????????????????????TWP Releases | My Workshop

It wasn't a TGA or file format issue, but I believe I found out what's going on here.

Thank you for your reply. My texture was definitely already a power of 2. I tried using Photoshop to export as a TGA, uncompressed, 32-bit, but this didn't work either. (Note to others, TGA's cannot be created at 32-bit, only as 8-bit. After exporting out your 8-bit project as a TGA, PS gives the 32-bit option.)

I did a lot of experimenting and I believe the main cause of this issue has to do with VTFedit or Hammer (not sure which one) not liking the color gray.

I tried using different colors for my solid texture and it turns out they all work just fine. I then tried white, and it worked fine too, but as soon as I tried going back to a gray color, I got green hues and ugly tiles. I tried an off-white, like eggshell, and it worked fine too. So it got me curious.. at what point does Hammer/VTFedit freak out and say, "This is gray, I don't like it anymore."

After a lot of exporting from Photoshop this is the answer. (Notice the green tints starting to appear as the shade approaches more gray and less white.)

According to VTFedit/Hammer, the shade on the left is kosher, but the shade on the right is just too radical, and it causes tiling and horrible green discoloration. There exists some weird threshold between those two that causes problems.

I was originally following this tutorial by TopHatWaffle to learn how to make textures, as well as other videos and Source wiki.

In it he says to use VTFedit version 1.3.2 because, "version 1.3.3 has issues" and he provides the link to download the older version, so naturally, I did. Well I decided that, clearly, 1.3.2 has issues, so I uninstalled it and got 1.3.3. Once I did this, the tiling issue went away. However, the bad green discoloration problem remains, but ONLY when dealing with shades of gray.

Setting Normal Format to RGB888 does a lot to combat the discoloration, but it is still there, and I can't solve this.

Instead, I tried exporting a gray TGA with a small purple tint (opposite of green) to compensate, and after running it through I got this, which is as close to normal as I can get.

I would be curious to know if others get green discoloration when using gray or if it's something unique to my system?

At any rate, thanks again for you help!