[Dir3d-l] Specularmapping.
Duck
duck at robotduck.com
Tue Jan 9 10:32:20 EST 2007
Sunday, January 7, 2007, 7:41:52 PM, Per-Erik wrote:
PEB> I'm trying to get a specular map to work by using this:
PEB> pModel.shaderlist[2].specularLightMap = pMember.texture("Spc")
PEB> but it looks really really weird, like this:
PEB> http://www.uncle.se/tmp/3DViwer.htm looks more like a reflection map to me.
PEB> Anyone knows what I'm doing wrong?
Hi,
I've had a little experiment with these settings a while ago with no real results other than what you're getting (which is kind of like reflection mapping with additive blending).
As far as I know, the 'glossMap' and 'specularLightmap' shader properties are simply aliases to texture channels 4 and 5 respectively, with one small extra feature which is that when you use either of these properties to set a texture channel, they also automatically adjust the textureModeList and blendFunctionList.
In the case of setting the 'specularLightMap', the textureMode is automatically set to #specularLight, and the blendFunction is set to #add. As far as I can see though, the #specularLight texture mode seems to just give a similar mapping effect to the '#reflection' mode, but with strange quirks which make it appear to twitch around at certain angles, so you basically end up with a buggy-looking additive reflection.
For glossmaps, the textureMode is set to #none and the blendFunction is set to #multiply, which - as would be expected from those settings - just looks like a normal multiplied static lightmap, and certainly nothing like an actual gloss map effect.
So it appears that despite the promising names, there is no actual 'glossmap' or 'specularLightmap' functionality available through these features. There doesn't appear to be anything special about texture channels 4 and 5 which might provide these effects, and there isn't really any worthwhile reason to use the 'glossMap' or 'specularLightmap' properties as opposed to simply setting the texture channel properties by channel number - because you're still limited to the same old 4 blend modes: #multiply, #add, #blend & #replace.
All I can think is that these were perhaps features which were going to be implemented but never made it into the final version.
Sorry for the dissapointing news!
(and I would be very happily proven wrong should anyone know otherwise!)
- Ben
_______________________
duck_at_robotduck.com
www.robotduck.com
More information about the Dir3d-l
mailing list