PDA

View Full Version : Windows 7 supports specular textures!...sort of.



gecko
July 23rd, 2012, 17:41
Have a look at this shot.
69627

I made a high contrast specular texture consisting of black and white stripes and enabled the high gloss shader in the shaders.xml. I've included the relevant lines below, where I changed the bold value from false to true to enable the gloss:

<ModelSpecularGloss Desc="Vertex lighting w/ Specular modulated by Gloss map"
Lighting="True" SpecularEnable="True"
SrcBlend="One" DestBlend="Zero"
ZEnable="True" ZFunc="[ZFunc]" ZWriteEnable="True" ZBias="0" FogEnable="True"
AlphaBlendEnable="true" AlphaTestEnable="true" AlphaRef="8" MultiSample="True"
ColorArg10="Texture" ColorOp0="Modulate" ColorArg20="Diffuse"
AlphaArg10="Texture" AlphaOp0="SelectArg1" AlphaArg20="Current"
Texture0="0"
ColorArg01="Current" ColorArg11="Specular" ColorOp1="MultiplyAdd" ColorArg21="Texture"
AlphaArg11="Current" AlphaOp1="Modulate" AlphaArg21="TFactor"
Texture1="3" TexCoordIndex="0"
/>

The problem is that the unrealistically high level of gloss is still there, but the specular texture does show through beneath it. Does anyone know of a way to get rid of the extra gloss and just keep the specular texture? Any help is much appreciated.

Daniel

gecko
July 25th, 2012, 15:04
:bump:

Pat Pattle
July 26th, 2012, 03:24
That would look great on an aluminium skinned aircraft! Is this something over and above what you can do in Xp? (excuse my ignorance Daniel!)

gecko
July 26th, 2012, 06:06
Actually, the opposite is true. It has always been possible in XP (if you have an nvidia graphics card), but no one has been able to get windows 7 to recognize specular textures. This is the first time I've heard of this happening on a windows 7 machine, but it still isn't displaying the specular texture in the same way that XP displays it. This is what I'm trying to figure out how to do.

gecko
August 15th, 2012, 23:12
Still coming back to this one as I bludgeon my way through the shaders.xml. I think the problem with specular textures for Win7 users lies in the bolded value in the code below, which seem to no longer work.

<ModelSpecularGloss Desc="Vertex lighting w/ Specular modulated by Gloss map"
Lighting="True" SpecularEnable="False"
SrcBlend="One" DestBlend="Zero"
ZEnable="True" ZFunc="[ZFunc]" ZWriteEnable="True" ZBias="0" FogEnable="True"
AlphaBlendEnable="true" AlphaTestEnable="true" AlphaRef="8" MultiSample="True"
ColorArg10="Texture" ColorOp0="Modulate" ColorArg20="Diffuse"
AlphaArg10="Texture" AlphaOp0="SelectArg1" AlphaArg20="Current"
Texture0="0"
ColorArg01="Current" ColorArg11="Specular" ColorOp1="MultiplyAdd" ColorArg21="Texture"
AlphaArg11="Current" AlphaOp1="Modulate" AlphaArg21="TFactor"
Texture1="3" TexCoordIndex="0"
/>

I've heard this has something to do with the newer versions directx no longer using it. The question is, is there an equivalent value in direct x10 or 11 for "Specular" that would give us the effect we had in XP?

MajorMagee
August 16th, 2012, 03:28
Probably not without being able to rewrite some of the CFS3 code itself. This parameter is not sent directly to the DirectX rendering engine "as is". It's simply a signal to the CFS3 code to pass a particular value to DirectX. On an XP machine that value still does what it was originally intended to do. Win 7 sees that signal come through and says "Oh, Sorry, I remember that, but I don't do things that way anymore." and then does it the way it wants to. There is probably some additional parameters that need to be set that the old basic way of doing this doesn't encompass. Perhaps it use to just be on / off, now it's a long list of details about what on really means (i.e. color, intensity, direction, distance, texture, etc.)

gecko
August 16th, 2012, 06:58
Makes sense, a guess I'll start saving my pennies for a copy of XP and go the dual boot route. I've gotten pretty tired of the flat look of the aircraft without specular, and can't stand the over done shine that is all that Win 7 can come up with.