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.

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

Postby devsh » Thu Dec 02, 2010 6:02 pm

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.
Portfolio (WIP) and Development Blog:
http://indirectlightandmagic.tumblr.com/

Do you want to hire a GLSL graphics programmer cheaply???
Try me!
http://indirectlightandmagic.tumblr.com/contact
User avatar
devsh
Competition winner
 
Posts: 1303
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK


Postby macron12388 » Thu Dec 02, 2010 8:33 pm

Awesome! Glad to see you got it working.
macron12388
 
Posts: 126
Joined: Wed Sep 29, 2010 8:23 pm

Postby devsh » Thu Dec 02, 2010 8:39 pm

Yh its pretty sweet when you get it working :)
Portfolio (WIP) and Development Blog:
http://indirectlightandmagic.tumblr.com/

Do you want to hire a GLSL graphics programmer cheaply???
Try me!
http://indirectlightandmagic.tumblr.com/contact
User avatar
devsh
Competition winner
 
Posts: 1303
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK

Postby Lonesome Ducky » Thu Dec 02, 2010 9:54 pm

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.)
User avatar
Lonesome Ducky
Competition winner
 
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Postby devsh » Thu Dec 02, 2010 10:03 pm

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 :)
Portfolio (WIP) and Development Blog:
http://indirectlightandmagic.tumblr.com/

Do you want to hire a GLSL graphics programmer cheaply???
Try me!
http://indirectlightandmagic.tumblr.com/contact
User avatar
devsh
Competition winner
 
Posts: 1303
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK

Postby slavik262 » Thu Dec 02, 2010 10:12 pm

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.
User avatar
slavik262
 
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Postby devsh » Thu Dec 02, 2010 10:23 pm

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
Portfolio (WIP) and Development Blog:
http://indirectlightandmagic.tumblr.com/

Do you want to hire a GLSL graphics programmer cheaply???
Try me!
http://indirectlightandmagic.tumblr.com/contact
User avatar
devsh
Competition winner
 
Posts: 1303
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK

Postby Mel » Thu Dec 02, 2010 10:24 pm

Looks great! good job! If you get to map the SH to the textures correctly, i'll clap ever more :) Good luck.
http://santiagong.daportfolio.com/
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
User avatar
Mel
Competition winner
 
Posts: 1783
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Postby fmx » Thu Dec 02, 2010 10:35 pm

Looks interesting, I can't wait to try the demo to see the performance gains (or hits) for myself :wink:
User avatar
fmx
 
Posts: 559
Joined: Wed Dec 06, 2006 9:28 am
Location: UK

Postby devsh » Thu Dec 02, 2010 10:35 pm

Portfolio (WIP) and Development Blog:
http://indirectlightandmagic.tumblr.com/

Do you want to hire a GLSL graphics programmer cheaply???
Try me!
http://indirectlightandmagic.tumblr.com/contact
User avatar
devsh
Competition winner
 
Posts: 1303
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK

Postby devsh » Thu Dec 02, 2010 11:03 pm

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 :)
Portfolio (WIP) and Development Blog:
http://indirectlightandmagic.tumblr.com/

Do you want to hire a GLSL graphics programmer cheaply???
Try me!
http://indirectlightandmagic.tumblr.com/contact
User avatar
devsh
Competition winner
 
Posts: 1303
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK

Postby slavik262 » Thu Dec 02, 2010 11:07 pm

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.
User avatar
slavik262
 
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Postby devsh » Thu Dec 02, 2010 11:11 pm

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
Portfolio (WIP) and Development Blog:
http://indirectlightandmagic.tumblr.com/

Do you want to hire a GLSL graphics programmer cheaply???
Try me!
http://indirectlightandmagic.tumblr.com/contact
User avatar
devsh
Competition winner
 
Posts: 1303
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK

Postby slavik262 » Thu Dec 02, 2010 11:36 pm

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.
User avatar
slavik262
 
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Next

Return to Code Snippets

Who is online

Users browsing this forum: No registered users and 1 guest