Logo by kr0mat1k - 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: Support us via Flattr FLATTR Link
 
*
Welcome, Guest. Please login or register. March 28, 2024, 11:16:07 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: questions: how to colour, performance and zoo  (Read 1683 times)
0 Members and 1 Guest are viewing this topic.
willvarfar
Explorer
****
Posts: 57


« on: August 09, 2012, 04:27:57 PM »

I'm a fractal newbie and the Ludum Dare competition is fast approaching so I need to learn quickly wink

I've been doing ray marching and talking in the programming board, but I have some more general questions about 3D fractals:

1) Colouring: I've loved Syntopia's DE series; is there an equiv cheat sheet for colouing fractals?  How is it normally done?

2) Performance: which fractals (with typical iterations and bailouts etc) are the quickest to render?

3) Zoo: is there any nice summaries with lots of common 3D fractals thumbailed near and far?  So I can glance over and say "oooh that'd look good in this part of that game..."?
Logged
bib
Global Moderator
Fractal Senior
******
Posts: 2070


At the borders...


100008697663777 @bib993
WWW
« Reply #1 on: August 09, 2012, 05:01:17 PM »


3) Zoo: is there any nice summaries with lots of common 3D fractals thumbailed near and far?  So I can glance over and say "oooh that'd look good in this part of that game..."?

On point 3) check this out for instance:

http://www.fractalforums.com/images-showcase-(rate-my-fractal)/familiar-fractals-in-the-mandelbox
http://miqel.com/fractals_math_patterns/3d_fractals_mandelbulb.html
Logged

Between order and disorder reigns a delicious moment. (Paul Valéry)
eiffie
Guest
« Reply #2 on: August 09, 2012, 06:05:56 PM »

I would be interested in the coloring info too!
The amazing box and variants are often used in demos for speed. One cheat I use is low iterations then return a distance to a square rather than a sphere. You lose detail but still have sharp edges. Use the distance field for collision detection and you should come up with a pretty good maze game smiley
Logged
willvarfar
Explorer
****
Posts: 57


« Reply #3 on: August 10, 2012, 11:24:25 AM »

I would be interested in the coloring info too!
The amazing box and variants are often used in demos for speed. One cheat I use is low iterations then return a distance to a square rather than a sphere. You lose detail but still have sharp edges. Use the distance field for collision detection and you should come up with a pretty good maze game smiley

AmazingBox is another name for MandelBox, right?  Can you share your fast DE?  would other end shapes also be interesting?

Regards Ludum Dare, I always do a collaborative entry; this compo I'll post to the collabortion board here if there's anyone who wants and can join in.  (Or do other, competing entries; that'd also be cool smiley
Logged
eiffie
Guest
« Reply #4 on: August 10, 2012, 07:52:38 PM »

Yes ABox and MBox are same thing. This code was originally from rrrola but I have perverted it somewhat. There may be typos as I don't have a graphics card to try it right now. The vars in caps look something like ITERS (5 to 13), SCALE (-4 to 4), RADIUS (2 to 16) and SIZE is dependant on SCALE (just play around). This isn't the best DE, just a fast one as you can use low iters. Maybe you can even do a reflection off the nice flat surfaces??
Code:
float DE(vec3 z0)
{
vec4 z = vec4(z0,1.0),c=z; //or use a constant for c
for (int n = 0; n < ITERS; n++) {
z.xyz=clamp(z.xyz, -1.0, 1.0) *2.0-z.xyz; //box fold
z*=SCALE*clamp(1.0/dot(z.xyz,z.xyz),1.0,RADIUS); //scale and sphere fold
z+=c;
}
z=abs(z);
return (max(z.x,max(z.y,z.z))-SIZE)/z.w;
}
You can substitute this fold z.xyz=abs(z.xyz+1.0)-1.0 for a different look (from kali I think).
You can also substitute a cylinder fold or elliptical fold for the sphere fold or use a swizzle like this...
if (n==2)z=z.yzxw;
etc. etc. etc... Maybe try to make it a random box so you never play the same game twice smiley
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Fractals Improve Imaging Performance Fractal News across the World Nahee_Enterprises 0 1769 Last post February 01, 2007, 09:42:58 PM
by Nahee_Enterprises
Has anyone compared performance of GMP with MPFR when computing the M-Set? Programming jwm-art 5 5580 Last post November 12, 2010, 08:56:25 PM
by jwm-art
Fractal Extreme Performance Benchmark Fractal eXtreme stardust4ever 0 9754 Last post March 21, 2012, 03:21:06 PM
by stardust4ever
Animation Rendering Performance Problem Mandelbulb 3d Weber 7 2846 Last post April 14, 2012, 04:51:46 AM
by rahulmukerji
Rendertime - High Performance Synthclipse cKleinhuis 10 2154 Last post September 19, 2014, 08:05:20 PM
by cKleinhuis

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.182 seconds with 26 queries. (Pretty URLs adds 0.008s, 2q)