Logo by Pauldelbrot - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Did you know ? you can use LaTex inside Postings on fractalforums.com!
 
*
Welcome, Guest. Please login or register. October 04, 2022, 12:16:42 PM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1] 2 3   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Inigo Quilez's brute force global illumination  (Read 7145 times)
0 Members and 1 Guest are viewing this topic.
eiffie
Guest
« on: November 15, 2012, 06:04:29 PM »

I put together Quilez's code from his article on brute force path tracing and put it in a Fragmentarium script.
I probably should have attached it here but you are only a couple clicks away smiley I attached it in this thread...
http://www.fractalforums.com/programming/global-illumination-(article)/

It runs in continuous mode and may cause some issues on some cards - I only tested it on an Nvidia. Its a short and simple script so I hope others will feel free to improve it.

Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #1 on: November 15, 2012, 06:46:31 PM »

Love global illum so i love your pic smiley
Logged

---

divide and conquer - iterate and rule - chaos is No random!
knighty
Fractal Iambus
***
Posts: 819


« Reply #2 on: November 15, 2012, 08:22:47 PM »

Awesome!


* out3.jpg (77.72 KB, 768x768 - viewed 534 times.)
* iqP4f-bulb.frag (9.03 KB - downloaded 257 times.)
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #3 on: November 15, 2012, 08:42:13 PM »

render time ?
smiley
Logged

---

divide and conquer - iterate and rule - chaos is No random!
knighty
Fractal Iambus
***
Posts: 819


« Reply #4 on: November 15, 2012, 09:16:49 PM »

Something like 5 to 10mn on a crappy GF9400GT at 1024x1024 resolution and 100 steps (I used tile rendering). It should take seconds to render on a modern graphics card.
Logged
Syntopia
Fractal Molossus
**
Posts: 681



syntopiadk
WWW
« Reply #5 on: November 15, 2012, 09:25:48 PM »

Great stuff, Eiffie!

I'm playing around with a Path-tracer myself, and have been spending some time on stratification and importance sampling - it might be able to speed up the rendering a bit.

I really love the soft lighting from global illumination.
Logged
eiffie
Guest
« Reply #6 on: November 16, 2012, 06:16:20 PM »

It turned out to be very easy to add transparency with only a few changes. At first it still had solid shadows for transparent objects so I changed the shadow ray march to refract as well and I got some nice little caustics. Way better than I expected! This is fun smiley
<a href="http://www.youtube.com/v/ymc3arrjDNQ&rel=1&fs=1&hd=1" target="_blank">http://www.youtube.com/v/ymc3arrjDNQ&rel=1&fs=1&hd=1</a>
<a href="http://www.youtube.com/v/ymc3arrjDNQ&rel=1&fs=1&hd=1" target="_blank">http://www.youtube.com/v/ymc3arrjDNQ&rel=1&fs=1&hd=1</a>

* iqPathWithRefr.frag (6.42 KB - downloaded 249 times.)
« Last Edit: November 16, 2012, 08:11:24 PM by eiffie » Logged
subblue
Conqueror
*******
Posts: 116



WWW
« Reply #7 on: November 16, 2012, 07:48:40 PM »

It turned out to be very easy to add transparency with only a few changes. At first it still had solid shadows for transparent objects so I changed the shadow ray march to refract as well and I got some nice little caustics. Way better than I expected! This is fun smiley
<a href="http://www.youtube.com/v/ymc3arrjDNQ&rel=1&fs=1&hd=1" target="_blank">http://www.youtube.com/v/ymc3arrjDNQ&rel=1&fs=1&hd=1</a>

This stuff is excellent! Very good results for such a small renderer really. I can only run it at 2x preview res on my iMac, but impressive even so smiley
Logged

www.subblue.com - a blog exploring mathematical and generative graphics
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #8 on: November 17, 2012, 09:44:22 AM »

Something like 5 to 10mn on a crappy GF9400GT at 1024x1024 resolution and 100 steps (I used tile rendering). It should take seconds to render on a modern graphics card.
   I'm jealous!  I've got an 8600m... mobile!!!
Logged

cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #9 on: November 17, 2012, 01:07:33 PM »

woot! i love caustics!!!!!!!
Logged

---

divide and conquer - iterate and rule - chaos is No random!
Softology
Conqueror
*******
Posts: 120


« Reply #10 on: November 19, 2012, 11:52:12 PM »

Very nice.

I am trying to use the code as a GLSL shader outside Fragmentarium.  The problem I am having is how to accumulate each "pass" into a smooth image?  At the moment I get an output like the following that flickers around but never seems to smooth out into a final image...



Each pass I am averaging the returned color with the current pixel color.  How does the continuous mode accumulate the previous pixel results?

If I render a single pass it looks identical to the Fragmentarium results with one pass, so I am assuming it must be the way I am averaging the pass colors.

Thanks,
Jason.


« Last Edit: November 19, 2012, 11:58:49 PM by Softology » Logged
marius
Fractal Lover
**
Posts: 206


« Reply #11 on: November 20, 2012, 12:24:24 AM »

Each pass I am averaging the returned color with the current pixel color.  How does the continuous mode accumulate the previous pixel results?

Your approach assigns 50% weight to the most recently computed pixel.
Hence that will dominate and your frame mimics a single shot.

I figure you have to track the running total and divide by N to have the samples have equal weight?
Logged
Softology
Conqueror
*******
Posts: 120


« Reply #12 on: November 20, 2012, 01:04:31 AM »

I figure you have to track the running total and divide by N to have the samples have equal weight?

Geez I feel stupid.  So obvious.

Thanks.  Now I am starting to get the sort of results I expect.



Jason.
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #13 on: November 20, 2012, 07:37:05 AM »

yay, this script runs nicely out of the box wink

too bad it is relying on the DE formulas wink wink wink

dont really understand the concept-of-re-rendering the same buffer in fragmentarium, is it some kind of render-to texture feature and then re-use the output of a previous step !?

and another thing i am interested in, HOW DO YOU DO RANDOM ?! by a simple map !? or using built in perlin noise ?!
Logged

---

divide and conquer - iterate and rule - chaos is No random!
cbuchner1
Fractal Phenom
******
Posts: 443


« Reply #14 on: November 20, 2012, 11:58:53 AM »

Oh my god. You're really on to something. Caustics based on procedurally generrated fractals. W00t!

UPDATE: at work we're soon going to have a laptop with GT 680M graphics (1388 shader cores or so).
The fastest nVidia tesla cards have 2688 cores, but they don't do graphics AFAIK.

The GTS 250 that I am on now only has 128 of 'em.

So keep those scripts coming. We need material for testing and benchmarking wink

BTW, would anyone know if SLI can accelerate OpenGL applications? Does it need specific SLI profiles for the application?
« Last Edit: November 20, 2012, 03:30:09 PM by cbuchner1 » Logged
Pages: [1] 2 3   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Global illumination here we come! Mandelbulb Renderings « 1 2 3 » twinbee 41 12007 Last post April 03, 2011, 09:11:26 PM
by pfrancke
global illumination (article) Programming willvarfar 6 2014 Last post April 06, 2013, 05:28:14 PM
by eiffie
Brute force raytracing + binary 0.9.12b = broken? Fragmentarium Roquen 9 1271 Last post July 19, 2013, 03:45:16 PM
by Roquen
I˝igo Quilez - Mandelbulb fractal in my Desk! Fractal News across the World cKleinhuis 0 531 Last post September 19, 2015, 03:20:47 PM
by cKleinhuis
inigo quilez - the main bulb of the Mandelbrot set (analytical) Fractal News across the World cKleinhuis 2 562 Last post April 30, 2016, 03:19:04 AM
by eiffie

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.165 seconds with 25 queries. (Pretty URLs adds 0.008s, 2q)