Logo by Cyclops - 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: Check out the originating "3d Mandelbulb" thread here
 
*
Welcome, Guest. Please login or register. April 16, 2024, 07:50:36 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 ... 9   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: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.  (Read 51754 times)
0 Members and 1 Guest are viewing this topic.
Syntopia
Fractal Molossus
**
Posts: 681



syntopiadk
WWW
« on: January 22, 2011, 04:50:31 PM »

Hi,

I've just released the first version of Fragmentarium (v0.5.6), an open source, cross-platform IDE for exploring pixel based graphics on the GPU.
It was mainly created for exploring Distance Estimated systems, such as Mandelbulbs or Kaleidoscopic IFS, but it can also be used for 2D systems.

It is inspired by Adobe's Pixel Bender, but uses pure GLSL, and is specifically created with fractals and generative systems in mind.

Features:

* Multi-tabbed IDE, with GLSL syntax highlighting
* Modular GLSL programming - include other fragments
* User widgets to manipulate parameter settings.
* Different 'mouse to GLSL' mapping schemes (2D and 3D)
* Includes raytracer for distance estimated systems
* Many examples including Mandelbulb, Mandelbox, Kaleidoscopic IFS, and Julia Quaternion (all systems found here on Fractal Forums)

Fragmentarium is supposed to make GPU programming as easy as possible. For instance, a Distance Estimated system can be formulated in a few lines:
Code:
#include "DE-Raytracer.frag"

void init() {}

float DE(vec3 pos) {
return abs(length(abs(pos)+vec3(-1.0))-1.2);
}

It is also simple to create a custom slider and bind it to a variable in the GLSL code:
Code:
uniform float Angle2; slider[-180,0,180]
The code above will create a slider in the GUI with minimum, default, and maximum values specified in the brackets.

Fragmentarium can be downloaded from:
http://syntopia.github.com/Fragmentarium/

There are binaries for Windows, but for now you'll have to build it yourself for Mac and Linux. You will need a graphics card capable of running GLSL (any reasonably moderne discrete card will do).

Here is a screenshot:



There's also a gallery at Flickr: http://www.flickr.com/groups/fragmentarium/

Fragmentarium is not a mature application yet. Especially the camera handling needs some work in the next versions - camera settings are not saved as part of the parameters, no field-of-view control and you often have to compensate for clipping. For future versions I also plan arbitrary resolution renders (tile based rendering) and animations.

There are probably also many small quirks and bugs - I've had several problems with ATI drivers, which seems to be much more strict than Nvidias.

Regards,
Syntopia
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #1 on: January 22, 2011, 08:40:20 PM »

hello, nice program, i wonder how to enter a formula WITHOUT a DE estimator, those DE functions do simply not exist for some formulas, especially those that are hybrid, or newly developed .sad
Logged

---

divide and conquer - iterate and rule - chaos is No random!
Syntopia
Fractal Molossus
**
Posts: 681



syntopiadk
WWW
« Reply #2 on: January 22, 2011, 10:26:10 PM »

Fragmentarium is not restricted to distance estimated systems - any system will do, as long as it can formulated in such a way that each pixel can be calculated independently.

It just provides an example raytracer for DE-based systems.  smiley

Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #3 on: January 23, 2011, 02:28:15 PM »

Remember that for any "normal-ish" escape-time fractal algorithm you should be able to get reasonably smooth iteration/potential and given that then Buddhi's numerical DE will work (that seems to be the best for cases with no analytical solution).
In fact if one has just plain banded iteration (i.e. just integer counts) it's still possible to get an approximate DE value, just not so optimum !
Of course getting "correct" analytical DE is a different matter especially for more compicated formulas/algorithms wink
Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #4 on: January 24, 2011, 10:49:11 AM »

is there an example for how to use the non distance estimation "brute force" methods?
or should i just use the iterationcount/iteration as distance measure ?
Logged

---

divide and conquer - iterate and rule - chaos is No random!
Syntopia
Fractal Molossus
**
Posts: 681



syntopiadk
WWW
« Reply #5 on: January 24, 2011, 01:21:03 PM »

Just to make it a bit more clear: Fragmentarium is just a GUI for making it easier to experiment with GLSL code (by adding support for sliders and reuse of code). It comes with a few examples, but these are limited to the most popular DE-systems, and a few 2D systems. On the other hand you could probably spend ages by exploring (and adding rotations and folds to) these systems  smiley

David, I have seen your delta/binary search DE in a thread somewhere, but what exactly is Buddhi's numerical DE?

Btw, thanks to David Burnett there is now also a binary Mac version available.
Logged
visual.bermarte
Fractal Fertilizer
*****
Posts: 355



« Reply #6 on: January 25, 2011, 12:38:49 AM »

rot.box

hybrid with Fragmentarium



test on sample file
Code:
float DE(vec3 z);
uniform float as; slider[-5,1,5]
#replace "float DE(" "float DE1("
#include "../Kaleidoscopic IFS/Menger.frag"
#replace "Iterations" "Iterations2"
#replace "Scale" "Scale2"
#replace "RotVector" "RotVector2"
#replace "RotAngle" "RotAngle2"
#replace "Offset" "Offset2"
#replace "rot " "rot2 "
#replace "float DE(" "float DE2("
#includeonly "../Historical 3D Fractals/Mandelbox.frag"
#replace "float DE(" "float DE("
float DE(vec3 z) {
   return mix(DE1(z),DE2(z),as);
}
Code:
as = 0.46
AntiAlias = 2
AntiAliasScale = 1
LogMinDist = -3
LogNormalDist = -4
ClarityPower = 1
MaxDist = 3.24
MoveBack = 1.38
Limiter = 0.711
MaxRaySteps = 300
MaxRayStepsDiv = 5.275
AO = 0.7
AOColor = 0,0,0
SpotLight = 1
Specular = 0.3
SpecularExp = 30
SpotLightColor = 0.67,0.67,0.67
SpotLightDir = 1,1,1
CamLight = 1
CamLightColor = 1,1,1
Glow = 0
GlowColor = 0.3,1,0.4
BackgroundColor = 0.6,0.6,0.5
GradientBackground = true
OrbitStrength = 0.663
XStrength = 1
X = 0.5,0.6,0.6
YStrength = -0.114
Y = 1,0.9,0.7
ZStrength = -0.426
Z = 0.8,0.78,1
RStrength = 0.28
R = 1,1,1
Iterations = 7
Scale = 2.564
RotVector = 0.825,0.575,1
RotAngle = 126.54
Offset = 0.891,0.221,1
Iterations2 = 5
MinRad2 = 0.81
Scale2 = 2.448
« Last Edit: January 25, 2011, 05:02:05 AM by visual » Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #7 on: January 25, 2011, 01:37:59 PM »

@visual, how to use that in fragmentarium ? pasting the upper code gives error messages:


a copy of the log output isnt possible sad

it says:

"init() is already defined"
Logged

---

divide and conquer - iterate and rule - chaos is No random!
Syntopia
Fractal Molossus
**
Posts: 681



syntopiadk
WWW
« Reply #8 on: January 25, 2011, 03:39:17 PM »

Oh, being able to copy log text would be a nice addition. I'll put it on a Todo :-)

Visual's example is from an earlier build, before the 'init()' functions were added. If you want to try his example, insert the following at top of the script:
Code:
#replace "void init() {}" " "

What the script does is, that it includes two different DE's and renames some variables and functions to prevent name-clashing. I included a similar script in an earlier build, but decided to remove it, because the include/replace procedure got to ugly :-) I'm still looking for a sensible way to combine scripts without nameclashes (something like namespaces).

The 'init()' functions are also a bit of an annoying hack. Before that, the global variables were initialized by just calling functions, e.g.:

Code:
mat3 rot = rotationMatrix3(normalize(RotVector), RotAngle);

But it turns out that some ATI cards crash on user functions call in global variable initializers, so I had to introduce the 'init' functions:
Code:
mat3 rot;
void init() {
  rot = rotationMatrix3(normalize(RotVector), RotAngle);
}
Logged
knighty
Fractal Iambus
***
Posts: 819


« Reply #9 on: February 02, 2011, 12:49:50 PM »

Great program! Thank you Syntopia.
Logged
Syntopia
Fractal Molossus
**
Posts: 681



syntopiadk
WWW
« Reply #10 on: March 19, 2011, 11:09:43 PM »

Hi, I've released a new build of Fragmentarium with some much needed updates, including better camera control, high resolution renders, and animation.

New features in version 0.8:
- The 3D camera has been rewritten: it is now a "first-person", pinhole camera (like Boxplorer and Fractal Lab), and is controllable using mouse and keyboard. Camera view can now be saved together with other settings.
- Arbitrary resolution renderings (using tile based rendering - the GPU won't time out).
- Preview modes (renders to FBO with lower resolution and rescales).
- 'Tile preview' for previewing part of high-resolution renders.
- Animation controller (experimental: no keyframes yet, you must animate using the system supplied 'time' variable. Animation is output as a sequence of still images).
- Presets (group parameters settings and load them into a dropbox)
- New fractals: QuaternionMandelbrot4D, Ducks, NewMenger.
- Improved raytracer: dithering, fog, new coloring schemes.

Download here: http://syntopia.github.com/Fragmentarium/get.html

<a href="http://vimeo.com/moogaloop.swf?clip_id=19996015&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA" target="_blank">http://vimeo.com/moogaloop.swf?clip_id=19996015&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA</a>
Option for simple animation support.


The 2D Mandelbrot/Julia type fractals have options for embedding a Mandelbrot map. The fractal shown here is Samuel Monnier's 'Ducks' Fractal.


Improved interface with preview sliders. The fractal shown is a Quaternion Mandelbrot.
Logged
Side B
Guest
« Reply #11 on: March 20, 2011, 12:53:19 AM »

This is starting to look like a really amazing program.
Are the renders really fast with GLSL?
Logged
Syntopia
Fractal Molossus
**
Posts: 681



syntopiadk
WWW
« Reply #12 on: March 20, 2011, 10:13:22 PM »

This is starting to look like a really amazing program.
Are the renders really fast with GLSL?

For a decent mid-range graphics cards (e.g. a Geforce 8800GTX), you will be able to work in realtime with 3D raytraced fractals.

3D fractals calculations using a GPU, such as the 8800GTX, will be somewhere between 7x - 25x faster than a Intel Core 2 Quad CPU. (I made an informal benchmark here: http://blog.hvidtfeldts.net/index.php/2011/02/gpu-versus-cpu-for-pixel-graphics/)
Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #13 on: March 20, 2011, 11:41:23 PM »

Apologies for this late reply but Buddhi's numerical method is basically an extension of the original numerical method that I was using but adapted so that it is less directional and more accurate - my original "deltaDE" method relied on calculations based on 2 points at each step on the rays but in a conversation with Buddhi I suggested that the directional nature of this could be fixed by getting the DE values in the cardinal directions (x,y,z) using 4 points and calculating the "highest density" direction based on those DE values and then getting the final DE to use from a 5th point in the said direction from the base point.
Buddhi simplified that slightly by simply combining values from the cardinal directions to give the DE value to use.

In other words Buddhi method is:

For each point on the ray calculate a value from that point to 3 points respectively slightly in the x,y and z directions from the base point and combine them to give the DE value to use, see the original thread here:

http://www.fractalforums.com/theory/a-new-simple-way-to-compute-de-for-any-trig-mandelbulb/msg11047/#msg11047

Read through including Jos Leys' replies.
Also note that I think the number of iterations performed at each point should be the same irrespective of bailout but I could be wromg wink

Edit: I mean the same as the number of iterations used for the base point on the ray (when bailout occurred).
« Last Edit: March 21, 2011, 12:06:40 AM by David Makin » Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
Syntopia
Fractal Molossus
**
Posts: 681



syntopiadk
WWW
« Reply #14 on: March 22, 2011, 10:11:19 PM »

Thanks, David.

If I understand it correctly, you calculate 'dR' as the length of the (numerically approximated) gradient of R. (R being the length of the input point after n iterations). The distance estimate is then: DE = R*log(R)/dR

That seems to be very similar to the Koebe formula (http://en.wikipedia.org/wiki/Mandelbrot_set#Exterior_distance_estimation), the only difference being the use of a gradient instead of the complex derivative. (But shouldn't the DE-estimate be multiplied by 0.5?)

I'll try it out when I get some time.


Logged
Pages: [1] 2 3 ... 9   Go Down
  Print  
 
Jump to:  


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