I’ve not been doing much recently due to the grind of real life and being distracted by borderlands (which is, by the way, an excellent game only let down by its lack of user created content) But I thought I’d finally find out just how the seamless texture stuff added for the antlion tunnels in episode 2 works. It’s actually incredibly awesome and will have major applications in HL2 mods going forward provided people actually pay it some attention.
After a bit of tinkering I was able to make my own, I believe they’ll only work as displacements but I might be wrong. You can do the full range of normal texture options with them as well: specularity maps, normal maps, blend textures etc. are all very possible. I whipped up my own texture to show clearly how it worked, here is the texture side by side with the .vmt for it:
It really is as simple as adding the “$seamless_scale” value into your texture! Be warned though the scale is set per-material instead of in hammer and it doesn’t use the conventional hammer scale, in this case smaller numbers give larger textures. When I thought I’d want to initially try a scale of 1 I found that the entire 1024 pixel texture was tiling every ~5 hammer units. That is, far too often! Making myself as complex a test map as I could be bothered I resorted to subdivide to get smooth displacements, which didn’t let me down too badly.
When compiled and run in episode 2 here is what it looks like, you can see that it doesn’t make any attempt to keep the texture’s rotation which makes this example not so good. It lends itself well to noisy materials that don’t have a logical orientation (such as the antlion web) since you won’t notice they’re rotated on some walls. You can also see that the scale is different to that in hammer, since the scale you make it in hammer is irrelevant. Most importantly it blends all my seams together so into a nice smooth transition.
Now go see what you can do with this amazing feature!
Tags: displacements, episode 2, seamless textures
As I understand, another significant benefit of $seamless_scale is that you avoid the ugly and inconsistent texture scaling when a displacement’s triangles are different sizes.
Yes that is true, you also lose the inconsistant sizing caused by irregular triangle sizes.
The compiled product looks so good. What an amazing transition from what it looked like in Hammer!
I had heard about seamless scale, but never saw how it was implemented. Thanks for making it so easy to understand!
This would be incredibly useful in TF2. I hope Valve will add support for this!
Come on boys and girls, let us journey inside the depths of the great Bacon Caverns.
Hey this cave looks awesome. Will you give a download link for the map? If you do, post it and I’ll come back later to check out for the link(I give no mail).