|
Re: Normal-Mapping Shader (The Best @ vsps2.0)
[Re: xXxGuitar511]
#120761
04/07/07 02:23
04/07/07 02:23
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
Alright. This has been making me think for a while, and I'm not sure what to do.
Should static lights be faked as dynamic lights, or used for "ambience" of the model when walking in certain areas? Both are useful, but I'm not sure which one to choose...
xXxGuitar511 - Programmer
|
|
|
Re: Normal-Mapping Shader (The Best @ vsps2.0)
[Re: xXxGuitar511]
#120763
04/07/07 11:03
04/07/07 11:03
|
Joined: Dec 2005
Posts: 414 Munich, Germany
Robotronic
Senior Member
|
Senior Member
Joined: Dec 2005
Posts: 414
Munich, Germany
|
Well I used 24bit TGA for the diffuse map and 32bit TGA for the normal map. => no stencil shadows => normal map with decent specularity If I remove the normal map or reduce it to 24 bit => stencil shadows => no normal map or plastic look Engine version is last public beta (6.506) and my testobjects are just simple boxes (closed), placed on terrain and blocks. Well, doing some research it turned out, Iīm not the first one who has a problem with the automatic transparency thing in A6: link I guess it has something to do with this, because the manual recommends, that for stencil shadows the entities must not be transparent. Maybe these lines of code could solve this? ZWriteEnable=True; AlphaBlendEnable=False; AlphaTestEnable=True; These, of course, are just some ideas of a shader noob ...
|
|
|
Re: Normal-Mapping Shader (The Best @ vsps2.0)
[Re: lostclimate]
#120765
04/07/07 23:08
04/07/07 23:08
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
@Lostclimate: Nice, I can't wait...
@Robotronic: I'g give your solution a try, but as I said, my [stencil & non-stencil] shadows are showing up, so I can't...
I'm gonna leave the poll open a lil longer until i decide. I'd like to do a combination of both, because a sort of ambience is needed somehow...
xXxGuitar511 - Programmer
|
|
|
Re: Normal-Mapping Shader (The Best @ vsps2.0)
[Re: Robotronic]
#120766
04/08/07 02:32
04/08/07 02:32
|
Joined: Aug 2001
Posts: 2,320 Alberta, Canada
William
Expert
|
Expert
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
|
Quote:
Well, doing some research it turned out, Iīm not the first one who has a problem with the automatic transparency thing in A6:
http://www.conitec.net/beta/aentity-overlay.htm
Ahh yes, the transparency problem, A7 solves this with the new my.overlay flag. It works great, I make good use of it already for my terrain shaders. If your using the beta you can try it out. This will fix alpha problems between the entity and other entities, but not necessarily within the entity itself. The lines you posted might also work.
If your having problems where is seems like your normals flipped, make sure that your first texture for your entity(the non-normalmap) has no alpha map. I think the reason for this lies in the second pass where the lighting requires the blending/alpha transparency. If it has an alpha map then its almost like all the normals of the model flips. Mabye this is a shader problem? Or it might just be how it goes. I know when you make vegetation and the such you cannot have alpha transparency or the normals do the same thing. If you do put an alpha map for the first model, and turn off alphaBlendEnable for the second pass, then the lights do not show for that pass, but the normals do not flip.
|
|
|
Re: Normal-Mapping Shader (The Best @ vsps2.0)
[Re: William]
#120767
04/08/07 04:39
04/08/07 04:39
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
As for static lights...
I'm going to add a switch to enable/disable the checking for static lights. I'm having unusable results with vecLight, so I must use a trace, and pass the results to the shader. This trace can be slow, so I'm goin to add an option for it. I'll let you know which flag I'll put it on. All feedback is appreciated!
xXxGuitar511 - Programmer
|
|
|
Re: Normal-Mapping Shader (The Best @ vsps2.0)
[Re: William]
#120768
04/08/07 17:15
04/08/07 17:15
|
Joined: Dec 2005
Posts: 414 Munich, Germany
Robotronic
Senior Member
|
Senior Member
Joined: Dec 2005
Posts: 414
Munich, Germany
|
I can just use the last public beta (A6.50.6) but itīs good to hear, that the transparency problem has been solved. I hope this overlay feature makes it into the next public update. Anyway, I was playing around with alphaBlendEnable & co. but it didnīt help. Most often my testcube just turned into something completely black. @ xXx Guitar: I think itīs a very good idea, to implement an option for static lights. Makes this great shader even better .
|
|
|
Re: Normal-Mapping Shader (The Best @ vsps2.0)
[Re: Robotronic]
#120769
04/08/07 22:19
04/08/07 22:19
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
@Robotronic: Thanks!
And as for static lighting (again). Accoding to my above poll, I've decided I'm going to add an option [again] in the shader. You'll be able to use faking, ambience, or both...
xXxGuitar511 - Programmer
|
|
|
Re: Normal-Mapping Shader (The Best @ vsps2.0)
[Re: xXxGuitar511]
#120770
04/10/07 21:52
04/10/07 21:52
|
Joined: Mar 2006
Posts: 2,503 SC, United States
xXxGuitar511
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 2,503
SC, United States
|
Alright, I'm still working on this shader, and I just corrected a majot bug!
I was calculating the tangents incorrectly. This means that the faces were being lit corectly, but the bumps were getting the light direction incorrectly. I have fixed it now. It's hard to tell the difference, but it makes a big improvment in look when you figure out what to look for!
I still need to fix some of the lighting options, then I'll update the download and let you all know!
xXxGuitar511 - Programmer
|
|
|
|