I don't understand the Doom 3 specular highlight problem...

Well, in JC's Qcon2004 speech, he was talking about Doom 3 having that one specular highlight that was all plasticy and stuff. He said that it could be remedied easily with DX9 HW.

So my question is, is the Doom 3 engine capable of doing tighter/broader specular highlights? or does he have to make a modification to the actual engine for it to work? Is it just a fragment program?

Thanks!
 
Fragement program and the constants sent to it I.E. one changed costant for each surfaces type so it would requires some code changes.

Atleast thats all I think that would be need to be changed.

Of course your could have more complicated lighting functions or multiple ( they only used a few in d3 ) which have more complex lightling models.
 
bloodbob said:
Fragement program and the constants sent to it I.E. one changed costant for each surfaces type so it would requires some code changes.

Atleast thats all I think that would be need to be changed.

Of course your could have more complicated lighting functions or multiple ( they only used a few in d3 ) which have more complex lightling models.

So, it's not just a programmable thing but it would require a slight renderer change? Same for all "plasticy" games?
 
I could've and should've used PM but :

london-boy, stop. If he wants to know more about the Doom3 engine, he has a right to post it here.

As long as he doesn't ask me to ask JC.

More seriously, he has actually brought up an interesting topic with this thread, whether it has to do with the Doom3 engine or not. XxSMXx, re-read your post -- the answer is right there.
 
Rev,

I'm judging that from what you're implying, that it IS just a fragment program and doesn't require a change in the actual "engine". Or you could be saying that it requires a modification to the engine.

It's just Carmack said that the ARB2 and Cg path's (paraphrasing) use a specular exponent based specular highlight, but it was made to emulate the old fixed function...(I could have misinterpreted it however).

I am genuiniely interested in this because I don't like the plasticy look of D3 and am hoping that a D3-engine based game could remedy it.

This is not a "best engine" quest.
 
XxStratoMasterXx said:
It's just Carmack said that the ARB2 and Cg path's (paraphrasing) use a specular exponent based specular highlight, but it was made to emulate the old fixed function...(I could have misinterpreted it however).

Not exactly, D3's specular is not based on a power function but instead references a texture look-up where those specular values are set. Which allows the Dx9 cards to provide a similar look to the NV20/R200 paths. Humus' mod actually changed it back to math ops.

What you want however, is different specular ranges for different materials (so that dull plastic has a very broad specular highlight, but a metal sphere has a very narrow specular, giving it the pinpoint effect).
 
Mordenkainen said:
Not exactly, D3's specular is not based on a power function but instead references a texture look-up where those specular values are set. Which allows the Dx9 cards to provide a similar look to the NV20/R200 paths.
It's not just that, really. Using a texture lookup-table allows for more artistic control.
What you want however, is different specular ranges for different materials (so that dull plastic has a very broad specular highlight, but a metal sphere has a very narrow specular, giving it the pinpoint effect).
This can be done by providing a different specular lookup-table or fragment shader for each type of material.
 
Ostsol said:
It's not just that, really. Using a texture lookup-table allows for more artistic control.

Yes. JC also specifically mentions how using clamped values allows for a more predictable output.

This can be done by providing a different specular lookup-table or fragment shader for each type of material.

Agreed.
 
Thowllly said:
XxStratoMasterXx said:
So...can Doom use tighter/broader specular values without an actual renderer modification?
Yes, just replace the lookup texture.

That's really cool! I cant wait to see what modders and Doom 3 licencees can do!

Now, could you (or someone) explain to me what a lookup texture is?
 
Modder's can't do much unless Carmack changes how the light interaction files work. Basically if they have to change it for everything at once. Also you can't change the lookup texture since its computed from math by Doom 3 I seem to recall.

It would be nice if the specular ramp was loaded from files (need a floating point file really though) and allowed to be changed for different materials.

Edit: A lookup texture is just a texture that has math precomputed in it for a bunch of values. If your texture reads are faster than doing the math then its faster to use a lookup texture. On ATI cards its slower to read a texture hence Humus's modification.
 
Cryect said:
Modder's can't do much unless Carmack changes how the light interaction files work. Basically if they have to change it for everything at once.
But changing it for everything at once would still be an inprovement. A higher power exponent would generally look better, IMO. The reason Carmack used the one he used was because it was the best he could do (quickly) on gf4mx level hw.
Also you can't change the lookup texture since its computed from math by Doom 3 I seem to recall.

It would be nice if the specular ramp was loaded from files
It is loaded from a file.
Edit: I think I might be wrong on that one. I remember someone having the lookup as a file, but they might just have captured that at runtime.
 
Thowllly said:
But changing it for everything at once would still be an inprovement. A higher power exponent would generally look better, IMO. The reason Carmack used the one he used was because it was the best he could do (quickly) on gf4mx level hw.

It would look better for shiny metal & plastic objects and not even really for shiny metal objects. So now people wouldn't look as nice as they currently do.

It is loaded from a file.

Curious what file is it in then?
 
Nope, I asked Carmack about that a while back and here's the email and response.

At 03:13 PM 8/29/2004 -0400, you wrote:

> Hi,
> I'm currently messing around with shaders and materials, and have come to some issues. Mainly I've been wanting to have a shader that allows for things to be changed by the shader and then lit appropriately (such as for parallax mapping on selected textures). Or having waves through a vertex shader but still have that lit as well. Can kinda get around some things by modulating a white diffuse map with the texture I want but doesn't work for everything of course. So is there anyway I can specify a different light interaction shader for a material? Thanks!
>
> John Rittenhouse
> Hmm I don't think I really want my email address here for spam bots

Sorry, D3 doesn't have a way to force different lighting interaction shaders. That is an obvious thing changing in new code, but D3 is still baselined to support non-fragment program cards.

John Carmack
 
Well that's interesting, I didn't know you couldn't actually write a seperate light interaction program. However, you can use a special fragmentMap passed from the material file and use that in the interaction program...doing that you could single out specifc materials to use parralax mapping, or whatever it is you want an extra image for (such as the specular thing).
 
Back
Top