Pages: [1] 2 3 4   Go Down
  Print  
Author Topic: Tech Demo: HDR Self Shadow Radiosity Normal Map (Relief Map)  (Read 12329 times)
October 30, 2007, 03:26:14 pm
Hello everyone.
The shader itself is not that much complex but you need some advanced bake option for 3 directional lightmap. Also special shader for baking normal map (if you want self shadow). I use Turtle render engine for maya with the help of one of their developers. Thanks to him Jens Olsson.
You need a GPU with PS3 support.
I hope you like it.

Dothttp://www.ali-rahimi.net/other/self-shadow-radiosity-normal-map.exe



* ssrnm-1.jpg (184.11 KB, 1024x768 - viewed 815 times.)

* ssrnm-2.jpg (180.8 KB, 1024x768 - viewed 692 times.)

ali-rahimi.net
October 30, 2007, 03:47:21 pm
hey i really like it Wink

Are you gonna to share some more inside ?

micha

October 30, 2007, 04:00:15 pm
Hey Ali,

Self shadow with normal mapping. You did it  Grin

So, Do you need a lightmap for the self shadow? Are you using 3 lightmaps textures?
October 30, 2007, 04:07:22 pm
Impressive Smiley
And performance is pretty good, too!

Did you test how it looks if you animate the light source? I think dynamic lighting is where radiosity normal maps are supposed to shine, right?
October 30, 2007, 05:12:36 pm
Looks impressive. The difference with/without normal map is unbelievable. It's hard to believe the shapes are created by a simple image. The depth is really there.
October 30, 2007, 05:18:59 pm
Just look at that depth! HDR+Relief map+Light map+Self Shadow Smiley Those are just flat polygons you are looking at haha


* depth.jpg (51.12 KB, 800x500 - viewed 632 times.)
October 30, 2007, 05:24:04 pm
Thanks Remko  Wink
I only use 3 directional lightmap as you can see lightmap#1 have an alpha for global specular mask. Also a single special normal map with alpha and 1 diffuse texture with specular alpha mask. thats all and you can see the result. about the shader i build it all in shaderfx.
I dont used any light at all. this shader is just for static objects but perhaps i should expand it but first of all the problem of shadow needed to be solved. next step would be to add piont cloud to this. With turtle we can bake all the stuff that is needed for the stuning rendering like halflife2 Killzon 2 .

My favorit pipeline.
1. SSRNM
2. Point Cloud
3. Good shadow system
4. SSOCC (screen space occ)

ali-rahimi.net
November 04, 2007, 12:48:17 am
Congrats Ali - looks impressive! You made it ^)

Peter
Directional lightmaps are static solution but you can animate your normal map, add detail maps and directional lightmaps dont need to have a high resolution.

Post will be long and i hope not too boring Smiley

Discussed long ago one idea with my friend. At that time i was busy with Precomputed Radiance Transfer (using Spherical Harmonics)  and we was thinking how to make it in such a way that you dont need to store a lot of parameters in vertices or generate bunch of special textures. After reading article on how lighting is made in HL2 one idea came to my mind.

PRT and Directional lightmaps (DL) in general build upon the same idea - divide you lighting calculation in two steps - precomputation and realtime. Both techniques use special basis for calculations. Main difference between them is that PRT is used to calculate diffuse and ambient term under low frequency dynamic environment lighting and DL is used to enchant look of bump mapping techniques with static lightmaps.

What if we take a basis of DL and use it for PRT?
Idea is simple:
Precomputation
1) Calculate 3 lightmaps in basis of DL using only global illumination (no direct or point or other kind of lights)
2) Store each lightmap in defferent color channel of the same texture
Real-time
3) Bake environment ligthing (dynamic sky or just rotate panoramic texture) in to cubamep
4) Blur cubemap (or even use cubemap of small resolution whan you bake it, edges might be not a problem here as you will sample 3 points on the cubemap)
5) sample 3 points of cubemap that correspond to each axis of DL basis, actually you can calculate color of the sky only for this 3 points
6) multiply each sampe of cubamep with corresponding directional lightmap
7) blend results according to normal map at current point of surface

This was not implemented yet, so no guarranty of good looking end result. But if it works than you will be able to obtaine soft diffuse and ambient terms + better depth of normal map and all this under dynamic low frequency lighting.

Ali, i can make this shader + connect it to dynamic sky if you can provide me a simple scene with calculated directional lightmaps.

Upgrade to PSSM is available for SSAO customers. Check http://www.3dvrm.com/shadows_solution/ for details.
November 04, 2007, 07:40:03 am
Thanks Viktor.
It sound good. But iam not sure if it would be a good idea to use the PRT and DL. I think the combination of these 2 method is a bit strange. Cause each one can do the others job alone. unless it have been used somewhere else before.
With Radiosity Normal Map (RNM) you can achive the same result even much more better than PRT. PRT is expensive and you can not store good shadow on that, But RNM is almost free. the only different between PRT and RNM is dynamic lighting for static mesh.
Instead the PRT we should use point cloud. point cloud is a bake volume radiosity (It used in HL2 with low density)
I can bake in point cloud wiht turtle. If someone is interested to impliment it in Q3D just let me know.
Dothttp://www.cs.utah.edu/%7Eshirley/papers/irradiance.pdf

My favor shading pipeline.  Wink Half-Life®2 / Valve Source™Shading
Dothttp://www2.ati.com/developer/gdc/D3DTutorial10_Half-Life2_Shading.pdf

However it would be nice to see your pipeline too. I can also bake the Spherical Harmonics with turtle if you need it. Your email please.

ali-rahimi.net
November 04, 2007, 10:19:48 am
What kind of grafic card do you have? an can you tell me setting of your card? thanks
November 04, 2007, 10:25:46 am
Normal map: 100 fps at 1024x768 on a 6600GT + AMD3000+ (single core) + 2 GB memory
Normal map + HDR: 40 fps
Relief Map: 25 fps
Relief Map + HDR: 17 fps

It would be nice if we have a low cost HDR in Q3D something like HL2 HDR.

ali-rahimi.net
November 04, 2007, 02:31:08 pm
ok and can you tell me antialias and antistropic. thanks
November 13, 2007, 05:28:05 pm
Source file.
Dothttp://www.ali-rahimi.net/other/self-shadow-radiosity-normal-map-01.rar
If you dont know how to compute the SSRNM then i should write an article about it, cause its not that much easy to build such a normal map.  Wink

ali-rahimi.net
November 13, 2007, 05:39:09 pm
i would appreciate this  Heart

Did you all the rendering with turtle ?

Turtle is very very powerful in my eyes. Especially you can script all the render to texture stuff with lua.
This enables you to precalculate a lot of thing and store them in a texture. Really cool stuff.
I haven't seen any renderer able to this.

November 13, 2007, 06:00:44 pm
Heheh. Yes micha its all done in turtle. I told you before turtle is amazing.  Grin

ali-rahimi.net
Pages: [1] 2 3 4   Go Down
  Print  
 
Jump to: