-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Enhancement) Better/more realistic specular effects? #282
Comments
this is excellent looking, what have you changed? you changed more than the specular power isn't it? |
I didn't change anything. It's a screenshot of an enhancement mod for the 2004 version of Doom 3. I was using it as a reference. |
ok, so it's one of those mods that changed the interaction, they solved the way specular some times in some surfaces gets all wonky, I think they "renormalized" the surface which I don't know what this means, I think Carmak spoke several times on that problem. it was the base of those mods that did "perfect metallic surfaces", before sikkpin implemented his HDR in the ARB progs |
Basically, if I'm remembering this correctly, renormalizing literally means that the shader changes the way that the geometry normals and the specularity interact. Change how much the normal affects the specularity, and it's done... I probably could fork the code and set this up, then do a pull request. |
great, I'd like to see the renormalizing where is done and the effect itself |
I'll be working on it soon. It's likely part of the interaction shaders, EDIT: Having trouble finding where this is handled... I created a fork, and my own SpecularHighlights branch. This could take a while. Feel free to hop in. :) EDIT2: Looks like it may be in the renderprogs. I'm fiddling around now. |
Probably everything in the interaction shaders even provided by the community is wrong. Metallic specular reflections require indirect light information sampled from screen space colors or cubemap probes placed in the map. The interaction shaders itself are only about direct light interaction and "not" indirect light. Stochastic Screen-Space Reflections from http://advances.realtimerendering.com/s2015/index.html explains it quite well. That's a technique that I will implement anyway. |
but this doesn't have to do in the quality of the specular, but on the quality of the normals, isn't it? (maybe not on the quality of the normals but this thing about re-nomalitzation) it's got nothing to do with indirect light but the specular reflection of direct light (which itself is an un-physic idea, there is no diffuse and specular there is only specular with smoothness of the surface affecting the way reflected photons look like ) the wonkiness of the reflection can be seen specially with a higher specularPower value like 100 or 1000, in a flat surface the reflection won't be displayed correctly with the correct perspective, it's like if the triangle of the surface somewhat distorted the reflections |
I've found Carmack's plan where he talks about renormalizing the normalmap and the probles he encountered: http://www.bluesnews.com/cgi-bin/finger.pl?id=1&time=20030129210315
And I've found this article with a piece of code: http://www.ozone3d.net/tutorials/bump_map_compression_p2.php but I haven't tried it yet, In the article one can see that the renormlaitzation helps achieve a more correct specular reflection --EDIT--
but all the bump map effects became even wonkier! :) so this piece of code don't solve the problem of wonky specular in the current implementation. |
Ooh! Nice work! Looking forward to seeing where this goes. Should I keep
|
I've been tinkering with it, but I can't get it to work I think the improvement we should see should be more akin like: to this: but the code is too different to port it from the glsl in the article to the cg in renderprogs, or at least I don't know how to interpret it, to make a correct port (if necessary at all). Sorry! :( |
OK this seems like you are conflating ideas. If you want improved Normal Map processing with renormalization. http://forums.thedarkmod.com/topic/15178-tdm-engine-development-page/page-4#entry352322 to GLSL (etc). Source: https://web.archive.org/web/20111203210912/http://mhquake.blogspot.com/2011/11/doom-3-shaders.html Relevant code block: #- perform the diffuse bump mapping TEX localNormal, tex1, texture[1], 2D; If you want the specular look, check out Maha-X's "Brilliant Highlights" mod which is the source of nearly every metallic shader mod for Vanilla Doom 3 including Sikkpin's mod. The problem being, of course, that it's not a PBR method so the true resolution is to author PBR materials to replace the metals in Doom 3 and use those for an accurate metal look. |
So wait for Robert to finish what he's working on. Got it.
|
Well, that depends on whether Robert is a texture artist with PBR authoring tools too. The other option is to create a cvar to force a new interaction shader with the brilliant highlights feature similar to the half lambert cvar. |
Sounds like a good option for the average end user.
|
@RobertBeckebans That Stochastic Screen-Space Reflections looks very impressive. Would it be possible to add some sort of cheap caustics with it? |
I was wondering if it was possible or planned to have some improved specular highlighting. Metal looking like metal, etc.
For example:
Hope I put this in the right place...
~SteamFox
The text was updated successfully, but these errors were encountered: