Click here for EyeGasm (RL GI) [FULL SRC && DEMO AVA

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Click here for EyeGasm (RL GI) [FULL SRC && DEMO AVA

Post by devsh »

THE GRAND DEMO

Now my demo shows global illumination with changing light conditions (sun a.k.a directional light) although without shadow mapping. Point and spot lights would be possible but only with another set of 9 coefficients coding for depth.

http://project-ninja-star.googlecode.com/files/GIv2.zip

Image

Sorry for the choice of words but "I'm going to rape UR eyes and make you **gasm over" my snippet/example

Yes what you see here is real time global illumination using spherical harmonix!

Will post more details+screenies in a bit
Last edited by devsh on Wed Dec 08, 2010 10:21 pm, edited 2 times in total.
macron12388
Posts: 126
Joined: Wed Sep 29, 2010 8:23 pm

Post by macron12388 »

Awesome! Glad to see you got it working.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

Yh its pretty sweet when you get it working :)
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post by Lonesome Ducky »

Eh, here I am with clean pants. I was hoping for something a little more... exciting. Interesting, but could you crop the pictures to your actual window? It's distracting and takes up way too much space with your IDE in the background as well. (Yes, I'm fully aware that you said you had no time to crop them, but it's stretching the forums and it'll be very hard to read replies over a line. That horizontal scrollbar is the spawn of the devil.)
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

how exciting did you expect?

this is WIP, I will only consider it HALF-DONE when I set up a "deferred render" or a pass which records the normal and depth of all pixels and inject SH into the scene per pixel :)
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Post by slavik262 »

My pants are clean as well. It's cool, but I imagine it being extraordinarily expensive and not applicable in a real-time game scenario.

I also couldn't agree more with
Lonesome Ducky wrote:Interesting, but could you crop the pictures to your actual window? It's distracting and takes up way too much space with your IDE in the background as well. (Yes, I'm fully aware that you said you had no time to crop them, but it's stretching the forums and it'll be very hard to read replies over a line. That horizontal scrollbar is the spawn of the devil.)
Use thumbnails or crop them down. You should never have to scroll sideways on a forum.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

it is applicable Real Time, the level runs at 230FPS same as without GI... the spherical harmonic is only 27*4 bytes.... even with the level divided into a grid of 57*57*13 it still gives just over 4.3 mb I could make it even more defined if not for irrlicht's memory leaks when reading RTTs on CPU

You prebake the level and you can convert each cubemap (40*40*6*4), so the level looks as if you have covered it with 1.5GB worth of environment maps

I will take care of the images in a bit/replace them by a demo
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Post by Mel »

Looks great! good job! If you get to map the SH to the textures correctly, i'll clap ever more :) Good luck.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
fmx

Post by fmx »

Looks interesting, I can't wait to try the demo to see the performance gains (or hits) for myself :wink:
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

okay now it seems I only need to find and adapt the HDR image loader so I can finally stick my samples in a texture :)
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Post by slavik262 »

You could always just export two textures. One would be the color and the other could be a per-pixel multiplier up to a certain maximum.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

Will not work :(

The main advantage is that with the ALL awesome SH atlas I can do PER Vertex interpolation and lookup whereas in this demo the interpolation is per object...

This approach has 2 pros:
1) More accurate lighting
2) object can be big (bigger than space between probes)

And 1 con:
1) the more geometry the more performance loss

Obviously my holy grail would be PER pixel GI... which would yield the same computational time/render time loss

I will raise the sysreq to SM 3.0 because I want to get 6/7 of the trilinear interpolation for free from the graphics card interpolating the 2d texture
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Post by slavik262 »

Let me rephrase. Don't use two textures at runtime, but save your HDR texture as two images: a colormap and a multiplier map. Then, just recreate the HDR texture from the two.
Post Reply