Specular issues

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

Specular issues

Postby scubaduck on Sun Jan 22, 2012 12:09 pm

Hey guys i'm posting this around on a few forums so i can try and solve my problem any help is greatly appreciated : )

I'm currently working on some models for a l4D map but i'm having a major headache over getting my specular to work. I'm convinced that it's some stupid little, noobish thing that i'm missing but yeah. I'm kind of hoping it is becasue then it will be easily fixed ha ha (FYI - i have hardly any experience with hammer so treat me as a beginner ha ha Also i am using the L4D authoring tools - sorry, i hope it's okay to ask here)
This is my VMT file ->

Code: Select all
"vertexlitgeneric"
{
   "$basetexture" "models/Level 1/BackBar"
   "$bumpmap" "models/Level 1/BackBar_nrm"
        "$envmap" "env_cubemap"
        "$normalmapalphaenvmapmask" 1
        "$envmapcontrast" 1
        "$model" 1
        "$selfillum" 1
   "$envmaptint" "[.5  .5 .5]"
}


I grabbed this off the Valve developer site and added the Self illumination and envmaptint. The Specular is in the normal map's Alpha channel. Pretty much what's been happening is that the model shows up in the hammer viewport with a bronze kind of shinyness but when you run map and build cubemaps there's no specular information at all. This is the bronze kind of thing i mean.

Image

The bronze changes in intensity in Hammer when i change the envmaptint so that says to me that hammer is picking up on there being specular but who knows. Maybe it's the cube maps?

Also when my friend looked at it on his computer apparantly there was like a checkered specular pattern when he ran the map. It's bizarring me out so any help would be very much appreciated.

Thanks
scubaduck
Just Joined
Just Joined
 
Joined: Sun Jan 22, 2012 12:05 pm

Re: Specular issues

Postby Gambini on Sun Jan 22, 2012 2:26 pm

You should post the normal map of the alpha channel. If i recall correct normalmapalphaenvmapmask works the inverse, meaning that dark parts will be reflective whileas white will be opaque.

The first thing I would try though is commenting the selfillum parameter, usually some shaders conflict with each other disabling some effects.
User avatar
Gambini
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Mon Oct 20, 2008 1:52 am
Location: Buenos Aires, Argentina.

Re: Specular issues

Postby TheDanishMaster on Sun Jan 22, 2012 8:20 pm

The $selfillum VMT command makes a material glow in the dark. Shaders commonly support this effect.

The effect is masked by default by the alpha channel of $basetexture, but there are other options (see below). Wherever the mask is located, white areas are self-illuminated while black areas are not.
Warning:Cannot be used with $translucent or similar values on models.

To do: Possible fix?


I think the selfillum is your problem as Gambini says
Specs:
MSI P67A-GD55, Intel Core i7 Sandy Bridge 2600k @ 3,4GHz, Corsair 8GB DDR3 1333MHz, 1TB HDD, NVidia GTX580 1,5GB GDDR5, Blu-Ray drive
Image
User avatar
TheDanishMaster
Been Here A While
Been Here A While
 
Joined: Sun Jul 26, 2009 7:02 pm

Re: Specular issues

Postby cra0kalo on Wed Jan 25, 2012 1:20 am

Gambini wrote: If i recall correct normalmapalphaenvmapmask works the inverse, meaning that dark parts will be reflective whileas white will be opaque.


Wait what! No it doesn't I made the alpha channel black in photoshop then exported it and in hlmv it appeared to have no reflection at all then i made it super white and back in hlmv it was too shinny.

Dont know why you say this
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: Specular issues

Postby Gambini on Wed Jan 25, 2012 4:08 am

Hlmv isn´t such a great ingame preview you know. If you get reflections in hlmv but not in game it is most likely because the model viewer isn´t even aware of the $selfillum parameter.

I said what you quoted because i have played with shaders quite a bit in my source time and remembered this line from the VDC:

Note:Alpha channels embedded in $basetexture work in reverse. Black areas are reflective, white areas are matte. This is because ...


But it was basetexture and not bumbmap and that´s why i said "if i recall correct".

EDit: have you even tried commenting the $selfillum line or just came back here to tell us that im wrong?
User avatar
Gambini
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Mon Oct 20, 2008 1:52 am
Location: Buenos Aires, Argentina.

Re: Specular issues

Postby Black_Stormy on Sun Jan 29, 2012 8:39 pm

I'm going real basic here, does your map have an env_cubemap entity? You'll need it to generate the cubemaps used for reflection specularity.
User avatar
Black_Stormy
May Contain Skills
May Contain Skills
 
Joined: Sun Nov 28, 2010 6:03 am
Location: Cairns, QLD, AUS

Re: Specular issues

Postby Gambini on Mon Jan 30, 2012 2:14 pm

He said having run buildcubemaps and you can see the env_cubemap entity next to the bar sign. But i don´t know why i´m answering lol
User avatar
Gambini
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Mon Oct 20, 2008 1:52 am
Location: Buenos Aires, Argentina.

Return to Custom Asset Help

Who is online

Users browsing this forum: No registered users