Logo by Dinkydau - 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: Visit the official fractalforums.com Youtube Channel
 
*
Welcome, Guest. Please login or register. March 28, 2024, 10:53:42 AM


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]   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: reflective menger  (Read 1320 times)
0 Members and 1 Guest are viewing this topic.
marius
Fractal Lover
**
Posts: 206


« on: June 11, 2011, 05:35:43 AM »

Since reflections are the new hotness, I played with adding 1 level to a simple glsl shader.  grin



« Last Edit: June 20, 2011, 01:56:46 AM by marius, Reason: (vid removed from youtube) » Logged
marius
Fractal Lover
**
Posts: 206


« Reply #1 on: June 13, 2011, 07:42:08 AM »

Since reflections are the new hotness, I played with adding 1 level to a simple glsl shader.  grin

Watch on youtube.com for proper 3d playback options!


Improved the shader a bit and added a loop. Showing the reflections nicely now. Watch on youtube for proper playback!

<a href="http://www.youtube.com/v/V56CTViaOgQ&rel=1&fs=1&hd=1" target="_blank">http://www.youtube.com/v/V56CTViaOgQ&rel=1&fs=1&hd=1</a>
Logged
knighty
Fractal Iambus
***
Posts: 819


« Reply #2 on: June 13, 2011, 09:19:32 PM »

Repeating Zooming Self-Silimilar Thumb Up, by Craig
I have done some expriments with reflection too. here is the script  grin.

* pKleinian.zip (7.43 KB - downloaded 62 times.)
Logged
marius
Fractal Lover
**
Posts: 206


« Reply #3 on: June 13, 2011, 09:46:12 PM »

I have done some expriments with reflection too. here is the script  grin.

Ah, very cool!
Indeed, was playing with your other pkleinian scripts as well w/ adding a simple reflection pass.
I'll post an animation soon, that Theli-at fractal lends itself very well for reflections with all the balls and surfaces.

Is it OK if i tweak your script for boxplorer2 and add it to code.google.com/p/boxplorer2 set of configs ?
Logged
marius
Fractal Lover
**
Posts: 206


« Reply #4 on: June 14, 2011, 10:13:26 AM »

I have done some expriments with reflection too. here is the script  grin.

Ah, very cool!
Indeed, was playing with your other pkleinian scripts as well w/ adding a simple reflection pass.
I'll post an animation soon, that Theli-at fractal lends itself very well for reflections with all the balls and surfaces.

Is it OK if i tweak your script for boxplorer2 and add it to code.google.com/p/boxplorer2 set of configs ?

<a href="http://www.youtube.com/v/I0ilmEcsj8c&rel=1&fs=1&hd=1" target="_blank">http://www.youtube.com/v/I0ilmEcsj8c&rel=1&fs=1&hd=1</a>
Logged
knighty
Fractal Iambus
***
Posts: 819


« Reply #5 on: June 14, 2011, 08:20:36 PM »

Wow! looks much better than on my 400x300 window, taking into account that youtoube degrades video's quality.
Is it OK if i tweak your script for boxplorer2 and add it to code.google.com/p/boxplorer2 set of configs ?
Yes O K !! . (Reminding me that I haven't asked Rrrola for permission  evil. The script is based on his original mandelbox shader implementation  angel. Hope he's not upset about that. undecided)
Logged
visual.bermarte
Fractal Fertilizer
*****
Posts: 355



« Reply #6 on: June 14, 2011, 08:33:53 PM »

I quite like them both!  afro
I think would be nice to have 20+ params for boxplorer2  smiley
« Last Edit: June 14, 2011, 08:36:24 PM by visual » Logged
marius
Fractal Lover
**
Posts: 206


« Reply #7 on: June 14, 2011, 08:39:58 PM »

Wow! looks much better than on my 400x300 window, taking into account that youtoube degrades video's quality.
Is it OK if i tweak your script for boxplorer2 and add it to code.google.com/p/boxplorer2 set of configs ?
Yes O K !! . (Reminding me that I haven't asked Rrrola for permission  evil. The script is based on his original mandelbox shader implementation  angel. Hope he's not upset about that. undecided)

I know, been a while since we heard from Rrrola  huh?
He did put boxplorer out there w/ a pretty open license for all to enjoy and tweak: http://code.google.com/p/boxplorer/source/browse/trunk/LICENSE
IANAL, but appears to me we're in spirit of that.

btw, love the coloring in your shader. Been iterating and struggling to get something as nice with the pkleinians.
I'll tinker around some more with them, the pkleinian-menger w/ reflections should be nice. I really should unify the common code out of the shaders..

I have some questions about the tracing code in your shader; min_dist cannot be (say 1e-5) small w/o affecting the reflections badly. Hard to crank up the detail that way  huh?
It would be nice to have some screen resolution adaptive level of detail (min_dist morph?). Played a bit with that in some shaders w/ boxplorer2 but no panacea.
Can you enlighten me on the ULP logic in your marche() function?

Logged
knighty
Fractal Iambus
***
Posts: 819


« Reply #8 on: June 14, 2011, 11:10:09 PM »

I know, been a while since we heard from Rrrola  huh?
He did put boxplorer out there w/ a pretty open license for all to enjoy and tweak: http://code.google.com/p/boxplorer/source/browse/trunk/LICENSE
IANAL, but appears to me we're in spirit of that.
I think I should add that licence to my boxplorer shaders (just in case they burn someone's graphics card  grin). Thanks for the link.

btw, love the coloring in your shader. Been iterating and struggling to get something as nice with the pkleinians.
I'll tinker around some more with them, the pkleinian-menger w/ reflections should be nice. I really should unify the common code out of the shaders..

Glad you like it. it's also possible to color by integer iteration number used with a variant that cheks when the iterated point becomes invariant. The later gives each level of spheres a different color.

I have some questions about the tracing code in your shader; min_dist cannot be (say 1e-5) small w/o affecting the reflections badly. Hard to crank up the detail that way  huh?
It would be nice to have some screen resolution adaptive level of detail (min_dist morph?). Played a bit with that in some shaders w/ boxplorer2 but no panacea.
Can you enlighten me on the ULP logic in your marche() function?
Well, that tracing code is still experimental (maybe forever smiley).
Indeed, it is written in order to have a resolution dependent rendering. The rendered surface is actually at some distance from the fractal. That distance depends linearly (using min_dist) on the distance from the eye. min_dist should be function of the resolution and the FOV. Something like this:
Code:
sqrt(2)*tan(0.5/180*pi*fov)/xres;

I left the pixel "size" (min_dist) as parameter because this information should be given by the main program as uniform. One have also to take into account the raystep multiplier. I found that a value of around 1e-3 - 5e-4 gives good results(for a 800x600 resolution, at 1600x1200 it should be 5e-4 - 2.5e-4). a value of 1e-5 seem to be too small. I'll try to see if reflection artifacts can be reduced. My first gess is that the normals need to be more precise (needs more bits). EDIT: the banding comes from the abs() used in d_PZshape() function... You can remove it but this will give different shapes when par[9].y is around 1.0.
If I remember well, the ULP is the smallest positive floating point number e such that: (1+e)-1!=0. It's just a hint about the maximum detail attainable. The way it is used in the shader is not exact. I assumed that the evaluated point is at a distance around 1.0 from the origin.

There are two numbers that should in fact be parameters (BTW, I second visual's suggestion smiley):
8192.0 * ULP -> precision at the surface. this is the epsilon used to stop raymarching. The bigger, the faster. Smaller values give more accurate renderings.
256.0 * ULP -> This is the minimal precision for normal vectors.
Logged
marius
Fractal Lover
**
Posts: 206


« Reply #9 on: June 14, 2011, 11:58:18 PM »

I quite like them both!  afro
I think would be nice to have 20+ params for boxplorer2  smiley

Ask and thou shall receive.
http://code.google.com/p/boxplorer2/source/detail?r=63

Turns out you can send more elements than array in glsl has declared, so backward compatible with older glsl files.
Haven't decided how to control fields [10-19] with keyboard but at least you can use them for vectors and colors etc. via AntTweakBar #defines.

Perhaps using left & right arrow to step through all par[].xyz and up & down to change value?
And pick up descriptive names from #define in glsl?
Logged
marius
Fractal Lover
**
Posts: 206


« Reply #10 on: June 20, 2011, 02:00:23 AM »

Since reflections are the new hotness, I played with adding 1 level to a simple glsl shader.  grin

Watch on youtube.com for proper 3d playback options!


Improved the shader a bit and added a loop. Showing the reflections nicely now. Watch on youtube for proper playback!

Spent more time on the raymarching parts. And added support for a background image. Re-rendered the menger sequence and then some.
Pretty cool how the menger has a single boring color but the background bleeds in due to all the reflections. Rays are bounced up to 4 times here.

Watch on youtube.com for proper 3d playback options!

<a href="http://www.youtube.com/v/z3oguDRThpE&rel=1&fs=1&hd=1" target="_blank">http://www.youtube.com/v/z3oguDRThpE&rel=1&fs=1&hd=1</a>
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
A Menger Sponge Images Showcase (Rate My Fractal) David Makin 5 5104 Last post April 02, 2007, 03:16:32 AM
by bradorpoints
Menger sponge fly-through 3D Fractal Generation twinbee 10 6662 Last post February 16, 2009, 05:43:21 AM
by twinbee
into the menger Mandelbulb3D Gallery tomot 0 787 Last post March 09, 2011, 01:34:46 AM
by tomot
The Infinite Wisdom of a Reflective Virtual Mind Mandelbulb3D Gallery Madman 0 640 Last post October 18, 2012, 10:12:48 PM
by Madman
Read Me File Tuts / Reflective Diffs/100 % Mirroring Excercise / Image load Help & Support Balok 3 316 Last post January 19, 2017, 10:53:57 PM
by DarkBeam

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.258 seconds with 24 queries. (Pretty URLs adds 0.012s, 2q)