View Full Version : Doom3 with Relief Mapping
Just modified Doom3 shader (interaction.vfp file) to use Relief Mapping. You can check out the results in the following video:
Doom3 with Relief Mapping Video (http://fabio.policarpo.nom.br/videos/Doom3_ReliefMapping_Video.zip)
As the game does not include depth maps I also created a tool to process all game normal maps and generate the apropriate depth maps. I store the depth maps in specular map alpha channel (as normal map blue and alpha channels are useless with the DXT5 compression where X and W components are wapped and Z recalculated).
It works great at many places but will break at some gemetry where the polygon edges do not have depth zero. If depth maps wore manualy created this could be fixed but my tool is automatic and game normal maps wore not created for this type effect. Anyway it is a nice mod and intresting art to test my Relief Mapping shader idea.
And yes it does run real-time and you can play the game with all geometry using Relief Mapping. Get around 50 fps here in my P4 HT 2.5 with AGP 4X and geForce6800GT.
It could be more optimized as relief mapping changes only per view. For now it is calculated for every light (relief is recalculated many times per view, once per light). Could be done once per frame and have all lights share the same relief calculations stored in a texture for example (deffered shading). But this is not possible with current Doom3 render pipeline.
05-25-2005, 12:38 PM
Awesome work, again!
05-25-2005, 01:46 PM
Nice test ! :)
05-25-2005, 02:05 PM
Wow...do you have a patch or something :p id love to see it in action.
Unbelievable...when i first saw it i expected tonnes of artifacts, like with the parrallax mod.
That is so awsomely amazing I just had to register and tell you this:
That is so awsomely amazing.
05-25-2005, 04:37 PM
Argg... stop stop! you are making the rest of us look bad!
Really REALLY cool demo...
any chance of a few screenshots? (for those of us with dialup)
05-26-2005, 01:00 AM
I'm also surprised that it runs 50 fps on a GeForce 6800 GT. Looks really practical and robust. I can hardly wait to see how it actually matches up with Doom 3 environment and thus the coming G70/R520-gen PC games.
Anyway, when is the public release of the MOD? :)
05-26-2005, 01:28 AM
:eek: wow That's great man! I once modified the interaction.vfp to add parallax mapping, but this is just another league!
Can't wait to try it!!!
Is there a way this will work on a R9800?
Hi again... thanks for the complements and yes I have some images and the mod here:
Doom3 with Relief Mapping mod and screenshots (http://fabio.policarpo.nom.br/files/Doom3_ReliefMapping.zip)
Use htm files to view the screenshots and move mouse in/out image to switch from original and relief versions. And make sure to READ the README file... important instrictions there... 50fps at 640x480 resolution :rolleyes: .
In video I just got the places where I found to look better anyway. Expect to see bad areas where depth at polygon edges is not zero (white). It can be fixed by editing the depth maps manually but will be too tedious (too many maps).
Need to find a way to store depth in normal map (disable the x-w swap or normal map compression). Would be much better and more efficient to have the depth in blue or alpha normal map channel. Anyone knows how to do it?
Tried following cfg file options but seams nothing changes with them. Anyone knows specifics on the following parameters:
seta image_usePrecompressedTextures "0"
seta image_useNormalCompression "0"
seta image_useAllFormats "1"
seta image_useCompression "0"
this technique (and its kin) is the biggest graphic advancement of the year. up there with shadowmapping/bumpmapping
how well does it handle the stencilshadows (shadowmaps) in the first screenshot, various things look brighter for some reason
There is a blinking light there in the background and between the two screenshots I got it on/off by mistake... forget about that.
One nice things I want to try is outputing depth correct values (write to OUT.depth in shader). This makes shadow boundaries follow the relief nicely allowing correct shadows over the displaced geometry.
05-26-2005, 12:49 PM
Awesome work! On GF 6800 Ultra it is playable even on 1280x1024. This is excellent...
05-26-2005, 01:17 PM
When I drag and drop pak004.pk4 onto normal2depth.exe nothing happens. The app runs but creates no output ?
What am I doing wrong :)
05-27-2005, 04:24 AM
I believe this drag&drop technique only works on 2000/xp, so you must be using 98/95/ME! Ugh!
05-27-2005, 05:16 AM
Originally posted by knackered:
I believe this drag&drop technique only works on 2000/xp, so you must be using 98/95/ME! Ugh!I'm using XP SP2...
Hi pocketmoon... you can use the command line option. Open a command promt and go to the tool folder. Then type:
After processing all normal maps you should see all specular maps including depth in alpha channel at c:\doom3\base\textures\
But game must be in ultra-quality mode so you can see the relief mapping at work. It can be done for the high-quality mode but then we should process the dds files and not the tga ones... maybe for the future... should run faster at high-quality I gess.
06-01-2005, 05:39 AM
It does not work for me. When i load a map i can see
black screen, i can see only the flashlight.
My configuration is:
Doom3 1.3 + ROE
Win XP sp2
Asus GeForce 6800GT (Forceware 71.84), P4 2.8Ghz, 1Gb DDR400; No overclock!
i did all the steps in the readme file carefully
Java Cool Dude
06-01-2005, 06:38 AM
Anyone can see what Master FPO :D looks like if they flip on the contributors page in GPU GEMS, I know I did :p
06-01-2005, 07:43 AM
I Have the same problem as Mr Pink
Do we think it's a 1.3 patch issue
I have two 6800gt SLi Configuration though i can't see how that would make a difference.
Mod looks soo GOOD i just wanna try it out on me system and see how playable it is lets try and find a solution PLEASE!! :confused:
Ok fixed it. Someone told me the line:
was not needed and without it nv5xxx cards would also run it. So I removed it without testing.... too bad as it does not work without it.
So I included the NV_fragment_program2 dependency again (only works on nv6xxx hardware!!).
Please redownload the mod and it all should be fine.
Also please someone there with a SLI machine can you post how fast does it go with dual GPU configurations? Should be faster and maybe you can use 800x600 instead of low 640x480 resolution.
06-01-2005, 12:30 PM
it works fine now!
thanks man! :)
I just downloaded the modification, followed the instructions exactly, and am having the same black screen problem. All the textures seem to be totally black and I can barely see where I'm going.
My system specs:
Athlon 3200+ / 1GB DDR400 / nForce4 Ultra chipset
ATI Radeon X800 XT Platinum Edition (256MB)
Doom 3 1.3 patched
06-01-2005, 02:31 PM
the shaders require a geforce6 card
So it won't work with ATI at all... :p Crap.
06-02-2005, 06:10 AM
Also please someone there with a SLI machine can you post how fast does it go with dual GPU configurations? Should be faster and maybe you can use 800x600 instead of low 640x480 resolution. No way to get an improvement on any OGL application with SLI nowadays ... waiting for newer drivers ...
06-02-2005, 11:18 AM
No criticism to fpo, but I don't think the doom3 environment and textures do anything to show off this technique. I've spent a good half an hour walking around various old save points I've got lying around and it doesn't add much at all to the visual experience, which is mad because it should be dramatic. The environment is perhaps too dark and cluttered, don't know what it is really but I'm not as awe struck as I was by fpo's little demo progs.
06-02-2005, 03:43 PM
I felt the same as knackard. I did notice a lot of surfaces had a wavy look to them...quite strange. But I'm sure it's just b/c the art for doom 3 was not created with RM in mind, just plain dot3. Where as the demos fpo created were setup just for this technique so it's no wonder the demos look more impressive. Although I did notice a few spots in doom 3 where RM made it look better.
Yes many of the depth maps are not good... but this is my converter's fault. If you browse the generated depth maps (in specular map alpha channel) you will notice most of them have problems. But some parts in game look good with the mod (like the ones from my video and some others)... if we had perfect depth maps from original geometry it would be a different story. Maybe creating a new demo map using original textures with depth maps would make it look good.
Have to work more on the normal to depth converter. Try to remove those terrible artfacts.
06-02-2005, 09:23 PM
A simple unsigned binary triplet normal representation cannot represent a flat surface where the vector equals the normal.
If you derive a height map from the gradient in such a map then it will inevitably produce a slope for any 'flat' normal map.
You're right that this is entirely because you're producing the height map without the original content. The right place to add this is the art path.
Java Cool Dude
06-02-2005, 11:21 PM
A neat thing would be to get in touch with THE man (read John Carmack) and see if you guys can work something out.
I've probably been reading a lot of fairy tales as this could never happen in real life :rolleyes:
Do not think it will ever happen... they are very conservative with their game art material (it is very expensive to generate all that good art and letting other people use it would be like giving money away).
Sent them an email asking permission to use a single image from the game comparing a view with and without relief mapping in a chapter I'm writing about the idea for shaderx 4 book (also using deffered shading with relief mapping and other things)... but got no answer so far.
Without permission I can not use the screeshots from the game in a publication (ok to show on iternet I gess).
06-03-2005, 12:35 PM
FPO, use the screenshot - if anyone asks, say knackered gave you permission.
Java Cool Dude
06-03-2005, 01:47 PM
Originally posted by knackered:
FPO, use the screenshot - if anyone asks, say knackered gave you permission.I'm stand right with you on that one knackered, go for it FPO :D
Thanks knackered but the publishers will never let me use material without permission even though the contract tries to move all legal responsibilities to the authors.
Not that I believe something could happen to me as I'm not in US (and here in Brazil things are different). But I do not want to do anything other people might consider an abuse to them or to their rights. I will try talking to the publishers maybe they can resolve it by phone for example... but I'm running our of time for final text.
But if nothing else works I might just use it there and forget about it :rolleyes: .
06-03-2005, 02:10 PM
You should send an e-mail to Todd Hollenshead, he is in charge of that kind of stuff. His e-mail is <e-mail removed>. Make sure you put a meaningful subject to the e-mail so that he can see it right away.
Yes re-sent it to him... hope he reply me by next week. Used a good subject, hope his spam filter lets me trough.
06-03-2005, 04:08 PM
I've actually had best luck contacting id through Todd. Also that one programmer at id who runs the iddevnet.com site was good about getting back to me a few times. I forget his name ATM.
Already got a reply from Todd, he said it is ok to use the screenshot. Excelent! Will just add a copyright notice on the text. Thanks for his email.
06-05-2005, 06:57 AM
Originally posted by fpo:
Already got a reply from Todd, he said it is ok to use the screenshot. Excelent! Will just add a copyright notice on the text. Thanks for his email.No problem, I'm glad they let you use their stuff :)
PS: What happened to Paralelo Computação?
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.