Better bumpmaps?

Got problems with your models? Struggling with textures? Get help with your custom assets.

Better bumpmaps?

Postby Mirr5 on Thu Mar 15, 2012 12:07 am

I am a bit new to this Source business so I don't know if the engine is just incapable of drawing proper bump patterns or if I am doing something wrong. So, the problem is in the picture. Up close the normal maps look just fine, but when you take distance they form these damn ugly Moire-pattern -like artifacts. Someone smart know how to do this without the ugliness? Texture was created in VTFEdit.

Image
Mirr5
Dumpling
Dumpling
 
Joined: Wed Mar 14, 2012 11:58 pm

Re: Better bumpmaps?

Postby marnamai on Thu Mar 15, 2012 12:23 am

I think it's caused by mipmaps, try compiling your normal map with mipmaps unchecked.

L4D supports selfshading bumpmaps, you might want to use those instead of normal maps, they are cheaper and better looking.
User avatar
marnamai
Veteran
Veteran
 
Joined: Thu Nov 10, 2005 12:17 pm
Location: Belgium

Re: Better bumpmaps?

Postby Mirr5 on Thu Mar 15, 2012 2:25 pm

Tried compiling without mipmaps, but it looked just as bad.
And besides, aren't mipmaps supposed to prevent stuff like this from happening?
Wonder how hard it would be to just somehow force the damn shader to blur the bump map at certain distance. Because as I understand it, the problem is that it renders the bumpmap as it is but with really bad sampling. Might be gpu drivers too, I don't know. Valve docs and google ain't helping much.

Also, I know of ssbump but so far I've been too lazy to do em, because for some reason vtex (and studiomdl) refuse to work on either of my two computers. I used a third party tool to create ssbumpmaps, but they were totally screwed ingame, and I had to convert them vtfs to vtfs so that they would work properly. Ain't life grand sometimes? :)
Mirr5
Dumpling
Dumpling
 
Joined: Wed Mar 14, 2012 11:58 pm

Re: Better bumpmaps?

Postby marnamai on Thu Mar 15, 2012 2:31 pm

Under "steam/steamapps/common/left4dead2/bin/" is a tool "height2ssbump" ;)

I am pretty sure the effect is caused by some setting on vtf edit, try playing around with the settings and check ingame for the results. https://developer.valvesoftware.com/wiki/VTF

try using

fileformat:
BGRA8888
flags:
Anisotropic Sampling
No Level Of Detail
User avatar
marnamai
Veteran
Veteran
 
Joined: Thu Nov 10, 2005 12:17 pm
Location: Belgium

Re: Better bumpmaps?

Postby MayheM on Thu Mar 15, 2012 4:38 pm

I'm curious, what does your bumpmap look like? Post it and let us have a look. Also, if you created a height map as well, post that so we can see what you are working with.

One side note though,I think you may run into issues since the bottom of the brush is so flat you will never get the full effect you want.
Image
User avatar
MayheM
Veteran
Veteran
 
Joined: Tue Oct 16, 2007 7:46 pm
Location: Lancaster SC

Re: Better bumpmaps?

Postby Zecrah on Thu Mar 15, 2012 6:47 pm

Just to add to what you said about mip maps causing it:
https://developer.valvesoftware.com/wiki/MIP_Mapping

The main purpose of this technique is to maintain texture definition on surfaces further from the camera and to avoid unslightly moiré patterns which can appear on surfaces, especially as they approach an angle parallel to the axis of the camera.


So yeah, perhaps. Post your VMT as well
Major Banter wrote:Zecrah, you've come from nowhere yet have rapidly become a Hammer God.

Wtf.


Check out my weapons tutorial
Zecrah
Design Section Moderator
 
Joined: Sat Sep 27, 2008 10:56 am

Re: Better bumpmaps?

Postby Mirr5 on Fri Mar 16, 2012 2:18 pm

Image

"LightmappedGeneric"
{
$baseTexture "CotD/crimsondarkDesat"
$bumpmap "CotD/container_bump"
$envmap "CotD/cubemaptest2"
$envmaptint "[0.01 0.1 0.1]"
$envmapmask "CotD/container_detail"
$surfaceprop metalvent
}


Don't happen to have any webspace myself, should register to something to post vtfs. I'll look into it. The normal isn't anything fancy. Just black'n white and a bit of directional blur turned into normalmap. The different mipmap-filters didn't seem to do much difference And as can see from the pic, the problem seems to exist in Valve's own textures too (far right, cs_havana/door01) even though the middle wood material seems to be somewhat okay. So the problem is either in engine or my desktop. Could someone confirm if they get this problem too?

The crimsondarkDesat is just a 16x16 single color solid.
Mirr5
Dumpling
Dumpling
 
Joined: Wed Mar 14, 2012 11:58 pm

Re: Better bumpmaps?

Postby MayheM on Fri Mar 16, 2012 3:45 pm

You could try working in CrazyBump. It will allow you to adjust your normal maps and veiw them real time.

As for posting textures, a simple JPEG of what you made would work. It does not need to be functional, only visible. I am assuming what you are trying to do here is something like curtains in a theatre, at least that's what I was thinking you are trying for. Shoot me a PM is you need any help with this. I have gotten quite good at creating height maps and normals...
Image
User avatar
MayheM
Veteran
Veteran
 
Joined: Tue Oct 16, 2007 7:46 pm
Location: Lancaster SC

Re: Better bumpmaps?

Postby Zecrah on Fri Mar 16, 2012 7:24 pm

Isn't anisotropic filtering supposed to stop this or something?
Major Banter wrote:Zecrah, you've come from nowhere yet have rapidly become a Hammer God.

Wtf.


Check out my weapons tutorial
Zecrah
Design Section Moderator
 
Joined: Sat Sep 27, 2008 10:56 am

Re: Better bumpmaps?

Postby Mirr5 on Fri Mar 16, 2012 8:36 pm

It's supposed to be new shiny metal shell on a shipping container that has these small repeating grooves. Best way would've been just have a repeating texture like here + cubemap for shininess, but if the filtering has a good chance of not working at all, I can't use it on my maps. Can't risk it making people's eyes bleed. A shame, really. And yes, I do think that anistropic should prevent this.
But anyways thanks for all the helpers. Gonna set up the game later on other hardware, see if it behaves the same way.
Mirr5
Dumpling
Dumpling
 
Joined: Wed Mar 14, 2012 11:58 pm

Re: Better bumpmaps?

Postby cra0kalo on Fri Mar 16, 2012 10:15 pm

Mirr5 wrote:It's supposed to be new shiny metal shell on a shipping container that has these small repeating grooves. Best way would've been just have a repeating texture like here + cubemap for shininess, but if the filtering has a good chance of not working at all, I can't use it on my maps. Can't risk it making people's eyes bleed. A shame, really. And yes, I do think that anistropic should prevent this.
But anyways thanks for all the helpers. Gonna set up the game later on other hardware, see if it behaves the same way.


Hey can I ask you a question

Code: Select all
"LightmappedGeneric"
{
$baseTexture "CotD/crimsondarkDesat"
$bumpmap "CotD/container_bump"
$envmap "CotD/cubemaptest2"
$envmaptint "[0.01 0.1 0.1]"
$envmapmask "CotD/container_detail"
$surfaceprop metalvent
}





Why do you have a line with $bumpmap and then $envmapmask the envmapmask has to be in the alpha channel of the bumpmap if I'm not mistaken. :?:
Cra0kalo
CG Artist/3D Animator
http://cra0kalo.com

Lead of Operation Reaper
http://projectreaper.com

Lead of the "Dark Alley" Project
http://alleyproject.net
User avatar
cra0kalo
Regular
Regular
 
Joined: Thu Apr 28, 2011 2:35 am

Re: Better bumpmaps?

Postby Zecrah on Sat Mar 17, 2012 1:04 am

Ah yes.

https://developer.valvesoftware.com/wiki/$envmapmask

Warning: $envmapmask will not work in model materials using $bumpmap. See #Alternative_methods.


Maybe that's your problem.
Major Banter wrote:Zecrah, you've come from nowhere yet have rapidly become a Hammer God.

Wtf.


Check out my weapons tutorial
Zecrah
Design Section Moderator
 
Joined: Sat Sep 27, 2008 10:56 am

Re: Better bumpmaps?

Postby Hollow on Sat Mar 17, 2012 1:17 am

If you want textures to use specular maps in your normals, use this command:

"$normalmapalphaenvmapmask" 1

But I'm not sure that weird effect you get at a distance is because of $envmapmask or not.
User avatar
Hollow
Ubisoft/Monothetic
 
Joined: Thu Aug 14, 2008 12:38 pm
Location: London, UK

Re: Better bumpmaps?

Postby cra0kalo on Sat Mar 17, 2012 8:37 am

thats how it should look buddy

Image

my code for VMT

Code: Select all
"VertexlitGeneric"
{
   "$basetexture" "models/cra0kalo/props/me_ac_window/ac_win_col"
   "$surfaceprop" "Metal_Box"
   "$nolod" 1
   "$bumpmap" "models/cra0kalo/props/me_ac_window/ac_win_n_s"
    "$normalmapalphaenvmapmask" 1
   "$envmap" "env_cubemap"   
}
Cra0kalo
CG Artist/3D Animator
http://cra0kalo.com

Lead of Operation Reaper
http://projectreaper.com

Lead of the "Dark Alley" Project
http://alleyproject.net
User avatar
cra0kalo
Regular
Regular
 
Joined: Thu Apr 28, 2011 2:35 am

Re: Better bumpmaps?

Postby Mirr5 on Sat Mar 17, 2012 2:54 pm

Totally forgot about the envmask-normal conflict, thanks, and thanks for the solution for that, but unfortunately it isn't the source of the moire-problem. I get the same effect with just albedo and normal parameters. Perhaps my AMD card just doesn't do filtering with Source. Still, I should see the damn texture blur when moving back. Anyone know how to do mipmaps yourself? As I would like to create a material with huge numbers or different colors indicating the mipmap levels, so I could actually see how this damn thing works, if it works at all.
Mirr5
Dumpling
Dumpling
 
Joined: Wed Mar 14, 2012 11:58 pm
Next

Return to Custom Asset Help

Who is online

Users browsing this forum: No registered users