Welcome to Fractal Forums

Fractal Software => Fragmentarium => Topic started by: Syntopia on January 22, 2011, 04:50:31 PM




Title: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia 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:

(http://blog.hvidtfeldts.net/media/screenshot.png)

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


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: cKleinhuis 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 .:(


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia 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.  :)



Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: David Makin 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 ;)


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: cKleinhuis 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 ?


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia 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  :)

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.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: visual.bermarte on January 25, 2011, 12:38:49 AM
rot.box
(http://fc02.deviantart.net/fs70/f/2011/024/5/e/tor_xob_by_bermarte-d37ze09.jpg)
hybrid with Fragmentarium
(http://fc08.deviantart.net/fs71/f/2011/024/d/9/hybrid_1_by_bermarte-d37yrva.png)


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


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: cKleinhuis 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 :(

it says:

"init() is already defined"


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia 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);
}


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: knighty on February 02, 2011, 12:49:50 PM
Great program! Thank you Syntopia.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia 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

http://vimeo.com/19996015
Option for simple animation support.

(http://blog.hvidtfeldts.net/media/ducks.jpg)
The 2D Mandelbrot/Julia type fractals have options for embedding a Mandelbrot map. The fractal shown here is Samuel Monnier's 'Ducks' Fractal.

(http://blog.hvidtfeldts.net/media/interface.jpg)
Improved interface with preview sliders. The fractal shown is a Quaternion Mandelbrot.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Side B 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?


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia 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/)


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: David Makin 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 (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 ;)

Edit: I mean the same as the number of iterations used for the base point on the ray (when bailout occurred).


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia 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.




Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: David Makin on March 23, 2011, 02:46:10 AM
Since the DE estimate is only an estimate it should get scaled by a user-selected value to convert it into an actual step distance anyway.

In my case I tested all the methods I use for DE on rendering standard quaternionic z^2+c with the standard analytical method as the baseline and have preset internal adjustments for 2 things in particular with respect to DE and rendering - 1st to make all the methods as close as possible in terms of a given adjusted DE threshold distance (i.e. solid threshold) producing the same visual result plus another adjustment to convert from DE to actual step distance - this second scale factor being made smaller and smaller the more inaccurate the DE method used is.
The internal adjustements I guess should be done so that whatever DE method is actually used then the user-parameters for DE "solid" threshold (closeness) and "accuracy" (step-scale adjustment to DE value) should have the same defaults from the user's point of view.
Of course my UF formula also allows the user the option to have these values adjusted during render based on the distance from viewpoint.
Eventually I hope to spend more time on this so I can improve the adjustments to allow for the DE never quite being truly linear with respect to the true (minimum) distance no matter which DE method is used.
Ideally DE scale and step-scale values for the Mandelbox and KIFS should be calculated separately again for each type of DE used - of course once you start using combined formulas things get a little more tricky ;)


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: visual.bermarte on May 08, 2011, 02:00:31 PM
(http://fc07.deviantart.net/fs71/i/2011/120/4/e/h_2_by_bermarte-d3f89mw.png)

(http://th03.deviantart.net/fs71/PRE/i/2011/126/8/e/hilb_by_bermarte-d3fpxml.png)

(http://fc05.deviantart.net/fs70/i/2011/127/f/3/skoch_by_bermarte-d3frxhc.png)


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: visual.bermarte on May 10, 2011, 07:33:04 PM
thanx 2 DarkBeam  :)
(http://th08.deviantart.net/fs71/PRE/i/2011/130/5/e/menger_koch_cube_by_bermarte-d3g15qm.png)

(http://fc01.deviantart.net/fs70/i/2011/130/c/8/ort_by_bermarte-d3g1npb.jpg)


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia on May 11, 2011, 05:21:38 PM
Nice renders, Visual. There has not been a lot progress on Fragmentarium lately, but I've been trying to make it easier to explore hybrids and reuse formulas, and have played around with numerical distance estimation (Buddhi's 4-point method).

Here is a few pictures:

(http://farm6.static.flickr.com/5308/5622576078_076e6e11e8_b.jpg)

(http://farm6.static.flickr.com/5183/5614251128_76ec76f022_b.jpg)

(http://farm6.static.flickr.com/5030/5595797575_5a4c9b556b_b.jpg)

Btw, if you have feature requests, or bug reports, just post them here.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: ker2x on May 11, 2011, 06:04:51 PM
Impressive  :o
It works very well on my Ubuntu 10.04 LTS 64 bits Laptop (with a GTX460M)

Thank you very much for making it opensource (and using github).


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: alexl on May 11, 2011, 07:17:30 PM
Here is a few pictures:
Wow! Excellent! Can you show DE() for these samples?


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia on May 11, 2011, 09:46:24 PM
Here is a few pictures:
Wow! Excellent! Can you show DE() for these samples?

My script for the above pictures is a *terrible* mess, but the basic loop is:
Code:
          while (r<10 && n < 14) {
if (n==iter)break;

if (n<6) {
boxFold(z,dz);
sphereFold(z,dz);
z = Scale*z;
dz*=abs(Scale);
} else {
octo(z,dz);
r = length(z);
powN2(z,r,dz);
}
r = length(z);
n++;
}

If you want to see the whole script, it is here:
Code:
#include "DE-Raytracer.frag"
#include "MathUtils.frag"
#group Hybrid
// Inspired by the Spudsville systems

uniform float Scale; slider[-5.00,2.0,4.00]

// Scaling center
uniform vec3 Offset; slider[(0,0,0),(1,1,1),(5,5,5)]

mat3 rot;

void init() {
}

uniform float fixedRadius2; slider[0.1,1.0,2.3]
uniform float minRadius2; slider[0.0,0.25,2.3]
void sphereFold(inout vec3 z, inout float dz) {
float r2 = dot(z,z);
if (r2< minRadius2) {
float temp = (fixedRadius2/minRadius2);
z*= temp;
dz*=temp;
} else if (r2<fixedRadius2) {
float temp =(fixedRadius2/r2);
z*=temp;
dz*=temp;
}
}

uniform float foldingValue; slider[0.0,2.0,5.0]
uniform float foldingLimit; slider[0.0,1.0,5.0]
void boxFold2(inout vec3 z, inout float dz) {
if (z.x>foldingLimit) { z.x = foldingValue-z.x; }  else if (z.x<-foldingLimit) z.x = -foldingValue-z.x;
if (z.y>foldingLimit)  { z.y = foldingValue-z.y;  } else if (z.y<-foldingLimit) z.y = -foldingValue-z.y;
if (z.z>foldingLimit)  { z.z = foldingValue-z.z ; } else if (z.z<-foldingLimit) z.z = -foldingValue-z.z;
}

uniform float foldingLimit2; slider[0.0,1.0,5.0]
void boxFold(inout vec3 z, inout float dz) {
z = clamp(z, -foldingLimit, foldingLimit) * 2.0 - z;
}

void boxFold3(inout vec3 z, inout float dz) {
z = clamp(z, -foldingLimit2,foldingLimit2) * 2.0 - z;
}


void mengerFold(inout vec3 z, inout float dz) {
z = abs(z);
if (z.x<z.y){ z.xy = z.yx;}
if (z.x< z.z){ z.xz = z.zx;}
if (z.y<z.z){ z.yz = z.zy;}
z = Scale*z-Offset*(Scale-1.0);
if( z.z<-0.5*Offset.z*(Scale-1.0))  z.z+=Offset.z*(Scale-1.0);
dz*=Scale;

}

uniform float Scale2; slider[0.00,2,4.00]
uniform vec3 Offset2; slider[(0,0,0),(1,0,0),(1,1,1)]

void octo(inout vec3 z, inout float dz) {
if (z.x+z.y<0.0) z.xy = -z.yx;
if (z.x+z.z<0.0) z.xz = -z.zx;
if (z.x-z.y<0.0) z.xy = z.yx;
if (z.x-z.z<0.0) z.xz = z.zx;
z = z*Scale2 - Offset2*(Scale2-1.0);
dz*= Scale2;
}

uniform float Power; slider[0.1,8.0,12.3]
uniform float ZMUL; slider[-140.0,1,10]
void powN2(inout vec3 z, float zr0, inout float dr) {
float zo0 = asin( z.z/zr0 );
float zi0 = atan( z.y,z.x );
float zr = pow( zr0, Power-1.0 );
float zo = zo0 * Power;
float zi = zi0 * Power;
dr = zr*dr*Power*abs(length(vec3(1.0,1.0,ZMUL)/sqrt(3.0))) + 1.0;
zr *= zr0;
z  = zr*vec3( cos(zo)*cos(zi), cos(zo)*sin(zi), ZMUL*sin(zo) );
}

float DE2(vec3 pos) {
vec3 z=pos;
float r;
float dr=1.0;
int i=0;
r=length(z);
while(r<100 && (i<8)) {
powN2(z,r,dr);
z+=pos;
r=length(z);
z*=rot;
if (i<5) orbitTrap = min(orbitTrap, abs(vec4(z.x,z.y,z.z,r*r)));
i++;
}

return 0.5*log(r)*r/dr;

}
uniform int MN; slider[0,5,50]
float DE(vec3 z, inout float dz, inout int iter)
{
vec3 c = z;
// z = vec3(0.0);
int n = 0;
//float dz = 1.0;
float r = length(z);
while (r<10 && n < 14) {
if (n==iter)break;

if (n<MN) {
boxFold(z,dz);
sphereFold(z,dz);
z = Scale*z; //+c;//+c*Offset;
dz*=abs(Scale);
} else {
octo(z,dz);
r = length(z);
powN2(z,r,dz);
}
r = length(z);

if (n<2 && iter<0) orbitTrap = min(orbitTrap, (vec4(abs(4.0*z),dot(z,z))));
n++;
}
if (iter<0) iter = n;

return r;
}

uniform bool Analytic; checkbox[true]

uniform float DetailGrad;slider[-7,-2.8,7];
float gradEPS = pow(10.0,DetailGrad);

float DE(vec3 pos) {
int iter = -1;
float dz = 1.0;
if (Analytic) {
float r = DE(pos, dz, iter);
return (r*log(r) / dz);
} else  {
vec3 e = vec3(0.0,gradEPS,0.0);
float r = abs(DE(pos, dz, iter));
vec3 grad =vec3( DE(pos+e.yxx, dz, iter),  DE(pos+e.xyx, dz, iter),  DE(pos+e.xxy,dz,  iter) )-vec3(r);
return r*log(r)*0.5/ length( grad/gradEPS);
}
}

float DED(vec3 pos, vec3 dir) {
int iter = -1;
float dz = 1.0;
vec3 e = -dir*gradEPS;
float r = abs(DE(pos, dz, iter));
float grad =DE(pos+e, dz, iter)-r;
return r*log(r)*0.5/ abs( grad/gradEPS);
}

#preset Great
FOV = 0.62536
Eye = 2.01082,2.74166,3.98073
Target = 2.33583,-4.84236,4.31657
Up = -9.898e-06,-0.0442387,-0.999018
AntiAlias = 1
AntiAliasBlur = 1
Detail = -3.99665
DetailNormal = -5.99039
DetailAO = 0
FudgeFactor = 0.01573
MaxRaySteps = 530
MaxRayStepsDiv = 3.5
BoundingSphere = 10
Dither = 0.5
AO = 0,0,0,1
Specular = 0
SpecularExp = 16
SpotLight = 1,1,1,0.68478
SpotLightDir = -0.82858,0.1
CamLight = 1,1,1,0.77273
CamLightMin = 0.36449
Glow = 1,1,1,0
Fog = 2
HardShadow = 0
BaseColor = 1,1,1
OrbitStrength = 0.13861
X = 0.498039,0.262745,0.6,0.41732
Y = 1,1,1,0.11812
Z = 0.333333,1,0.258824,0.2756
R = 0.4,0.7,1,0.5873
BackgroundColor = 0.6,0.6,0.45
GradientBackground = 0.3
CycleColors = true
Cycles = 4.06318
Scale = -2.07185
Offset = 1.25,0.8456,0.9191
fixedRadius2 = 1.10571
minRadius2 = 0.03871
foldingValue = 2
foldingLimit = 2.01755
foldingLimit2 = 1
Scale2 = 0.79884
Offset2 = 1,1,0
Power = 1.81825
ZMUL = -140
MN = 6
Analytic = true
DetailGrad = -2.8
#endpreset

#preset Futura
FOV = 0.62536
Eye = 2.01619,2.75179,3.99268
Target = 2.20567,-4.85338,3.42426
Up = -0.0125349,0.0742175,-0.99716
AntiAlias = 1
AntiAliasBlur = 1
Detail = -3.99665
DetailNormal = -5.99039
DetailAO = 0
FudgeFactor = 0.01573
MaxRaySteps = 530
MaxRayStepsDiv = 3.5
BoundingSphere = 10
Dither = 0.5
AO = 0,0,0,1
Specular = 0
SpecularExp = 16
SpotLight = 1,1,1,0.68478
SpotLightDir = -0.82858,0.1
CamLight = 1,1,1,0.77273
CamLightMin = 0.36449
Glow = 1,1,1,0
Fog = 1.91946
HardShadow = 0
BaseColor = 1,1,1
OrbitStrength = 0.13861
X = 0.498039,0.262745,0.6,0.41732
Y = 1,1,1,0.11812
Z = 0.333333,1,0.258824,0.2756
R = 0.4,0.7,1,0.5873
BackgroundColor = 0.6,0.6,0.45
GradientBackground = 0.3
CycleColors = false
Cycles = 4.06318
Scale = -2.07185
Offset = 1.25,0.8456,0.9191
fixedRadius2 = 1.10571
minRadius2 = 0.03871
foldingValue = 2
foldingLimit = 2.01755
foldingLimit2 = 1
Scale2 = 0.79884
Offset2 = 1,1,0
Power = 1.81825
ZMUL = -140
MN = 6
Analytic = true
DetailGrad = -2.8
#endpreset

#preset p1
FOV = 0.595581
Eye = 1.25125,-0.200486,1.00756
Target = -6.83342,0.316279,4.0991
Up = 0.328927,-0.0522827,0.868915
AntiAlias = 1
AntiAliasBlur = 1
Detail = -2.60582
DetailNormal = -2.42305
DetailAO = 0
AOSpread = 1
FudgeFactor = 0.26168
MaxRaySteps = 652
MaxRayStepsDiv = 2
BoundingSphere = 2
Dither = 0.5
AO = 0,0,0,0.81967
Specular = 0.4167
SpecularExp = 16
SpotLight = 1,1,1,0.72826
SpotLightDir = 0.54286,0.1
CamLight = 1,1,1,0.23656
Glow = 0.356863,1,0.12549,0.50876
Fog = 0.10738
HardShadow = 1
BaseColor = 1,1,1
OrbitStrength = 0.42574
X = 0.411765,0.6,0.560784,0.88976
Y = 0.666667,0.666667,0.498039,0.1496
Z = 1,0,0,0.46456
R = 1,0.666667,0,0.60318
BackgroundColor = 0.203922,0.227451,0.368627
GradientBackground = 0.5
CycleColors = true
Cycles = 6.78762
Scale = 2
RotVector = 1,1,1
RotAngle = 0
Offset = 1,1,1
fixedRadius2 = 1
minRadius2 = 0.25
foldingValue = 2
foldingLimit = 2.10525
ZMUL = -0.229
Analytic = false
DetailGrad = -3.56146
#endpreset

#preset F
FOV = 0.62536
Eye = 2.56637,3.86792,-0.754746
Target = 0.509966,0.674452,1.10844
Up = -0.191611,-0.396206,-0.890571
AntiAlias = 1
AntiAliasBlur = 1
Detail = -3.06572
DetailNormal = -4.03844
DetailAO = 0
FudgeFactor = 0.04673
MaxRaySteps = 583
MaxRayStepsDiv = 1.8
BoundingSphere = 10
Dither = 0.5
AO = 0,0,0,0.7
Specular = 2.4348
SpecularExp = 16
SpotLight = 1,1,1,0.73563
SpotLightDir = -0.52,0.1
CamLight = 1,1,1,0.77273
CamLightMin = 0.18692
Glow = 0,0.666667,0,1
Fog = 1.44966
HardShadow = 1
BaseColor = 1,1,1
OrbitStrength = 0.18812
X = 0.411765,0.6,0.560784,0.30708
Y = 0.666667,0.666667,0.498039,0.40158
Z = 0.666667,0.333333,1,0.02362
R = 0.4,0.7,1,-0.96832
BackgroundColor = 0.6,0.6,0.45
GradientBackground = 0.3
CycleColors = true
Cycles = 4.80603
Scale = -2
Offset = 1.25,0.8456,0.9191
fixedRadius2 = 0.5609
minRadius2 = 0.0625
foldingValue = 2
foldingLimit = 1.44735
foldingLimit2 = 1
Scale2 = 2.61764
Offset2 = 1,0,0
Power = 1.03135
ZMUL = -140
MN = 7
Analytic = true
DetailGrad = -2.8
#endpreset

#preset Ville
FOV = 0.62536
Eye = 4.36274,2.40381,0.932371
Target = -2.8913,-0.351315,0.36855
Up = 0.0793765,-0.00854807,-0.979476
AntiAlias = 1
AntiAliasBlur = 1
Detail = -3.06572
DetailNormal = -4.03844
DetailAO = 0
FudgeFactor = 0.04673
MaxRaySteps = 583
MaxRayStepsDiv = 1.8
BoundingSphere = 10
Dither = 0.5
AO = 0,0,0,0.7
Specular = 2.4348
SpecularExp = 16
SpotLight = 1,1,1,0.73563
SpotLightDir = -0.52,0.1
CamLight = 1,1,1,0.77273
CamLightMin = 0.18692
Glow = 1,1,1,0
Fog = 0.24162
HardShadow = 1
BaseColor = 1,1,1
OrbitStrength = 0.16832
X = 0.411765,0.6,0.560784,0.30708
Y = 0.666667,0.666667,0.498039,0.40158
Z = 0.666667,0.333333,1,0.02362
R = 0.4,0.7,1,-0.96832
BackgroundColor = 0.6,0.6,0.45
GradientBackground = 0.3
CycleColors = false
Cycles = 18.1816
Scale = -2
RotVector = 1,1,1
RotAngle = 0
Offset = 1.25,0.8456,0.9191
fixedRadius2 = 1
minRadius2 = 0.0625
foldingValue = 2
foldingLimit = 2.01755
Scale2 = 2
Offset2 = 1,0,0
Power = 2.05554
ZMUL = -9.084
Analytic = true
DetailGrad = -2.8
#endpreset

#preset MN
FOV = 0.62536
Eye = 1.82748,2.819,3.89641
Target = -0.157115,10.1441,5.24904
Up = -0.230691,-0.235678,0.937828
AntiAlias = 1
AntiAliasBlur = 1
Detail = -3.57665
DetailNormal = -4.03844
DetailAO = 0
FudgeFactor = 0.04673
MaxRaySteps = 843
MaxRayStepsDiv = 1.8
BoundingSphere = 10
Dither = 0.5
AO = 0,0,0,0.7
Specular = 2.4348
SpecularExp = 16
SpotLight = 1,1,1,0.73563
SpotLightDir = -0.52,0.1
CamLight = 1,1,1,0.77273
CamLightMin = 0.18692
Glow = 1,1,1,0
Fog = 0.24162
HardShadow = 1
BaseColor = 1,1,1
OrbitStrength = 0.16832
X = 0.498039,0.262745,0.6,0.30708
Y = 0.666667,0.121569,0.121569,0.25984
Z = 0.333333,1,0.258824,0.38582
R = 0.4,0.7,1,-0.96832
BackgroundColor = 0.6,0.6,0.45
GradientBackground = 0.3
CycleColors = true
Cycles = 8.27397
Scale = -2.25185
Offset = 1.25,0.8456,0.9191
fixedRadius2 = 1.08472
minRadius2 = 0.1832
foldingValue = 2
foldingLimit = 2.01755
foldingLimit2 = 1
Scale2 = 1.55884
Offset2 = 1,1,0
Power = 2.42825
ZMUL = -140
MN = 6
Analytic = true
DetailGrad = -2.8
#endpreset

#preset Abstraction
FOV = 0.62536
Eye = 2.03979,2.41975,3.79673
Target = 0.259702,-1.54583,-2.44596
Up = 0.835361,0.323895,-0.443951
AntiAlias = 1
AntiAliasBlur = 1
Detail = -4.08758
DetailNormal = -3.63461
DetailAO = 0
FudgeFactor = 0.01573
MaxRaySteps = 357
MaxRayStepsDiv = 3.5
BoundingSphere = 10
Dither = 0.5
AO = 0,0,0,1
Specular = 9.25
SpecularExp = 32.292
SpotLight = 1,1,1,0.68478
SpotLightDir = -0.82858,0.1
CamLight = 1,1,1,0.51612
CamLightMin = 1
Glow = 1,0.85098,0,0.21053
Fog = 0.79194
HardShadow = 0
BaseColor = 1,1,1
OrbitStrength = 0.13861
X = 0.498039,0.262745,0.6,0.41732
Y = 1,1,1,0.11812
Z = 0.333333,1,0.258824,0.2756
R = 0.4,0.7,1,0.5873
BackgroundColor = 0.6,0.6,0.45
GradientBackground = 0.3
CycleColors = true
Cycles = 4.06318
Scale = -2.07185
Offset = 1.25,0.8456,0.9191
fixedRadius2 = 1.10571
minRadius2 = 0.03871
foldingValue = 2
foldingLimit = 2.01755
foldingLimit2 = 1
Scale2 = 0.35296
Offset2 = 0,0.72308,0.26154
Power = 1.81825
ZMUL = -140
MN = 8
Analytic = true
DetailGrad = -2.8
#endpreset

I'll include the script in a clean version in next release of Fragmentarium.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: knighty on May 13, 2011, 09:26:07 PM
Nice renderings! :thumbsup1:
Two little feature requests:  :embarrass:
Is it possible to support azerty keyboards in the next versions or to be able to remap the keys in the options box?
It would be nice if there is some more parametres types. For example, the rotation matrix could be computed outside the fragment shader by using some scripting language (javascript would be good for that IMHO).

Here are attached some scripts similar to the ones I've already posted in boxplorer thread (+ 2D mandel and newton). It's a simplified version of Theli-At's kleinian drops. Hope you'll like them.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia on May 14, 2011, 08:41:07 AM
Nice renderings! :thumbsup1:
Two little feature requests:  :embarrass:
Is it possible to support azerty keyboards in the next versions or to be able to remap the keys in the options box?
It would be nice if there is some more parametres types. For example, the rotation matrix could be computed outside the fragment shader by using some scripting language (javascript would be good for that IMHO).

Here are attached some scripts similar to the ones I've already posted in boxplorer thread (+ 2D mandel and newton). It's a simplified version of Theli-At's kleinian drops. Hope you'll like them.

These scripts are really great! Can I include them in the next version of Fragmentarium?

I guess I could implement JavaScript support (I did that in Structure Synth, to add support for building animations). But I'm not sure I can see the benefit: Isn't it much easier to just calculate the matrix in GLSL, where you have proper vector and matrix types? Wrt to animation I plan to build on the current timeline approach, where you can adjust the GLSL code, based on the 'time' parameter - I plan to add support for keyframes, and linear interpolation as well (though some better interpolation type probably is necessary for the camera movement).
 
I will take a look at an option for keyboard remapping - I had never heard of azerty-keyboard before :-)


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: knighty on May 14, 2011, 03:55:17 PM
Of course you can. Thanks!
The scripting language would be useful for uniforms which initialization is expensive and that could be done on the CPU side. The case of the matrix intialization is not very good but recomputing the same value for each pixel at each frame could be avoided. I have already tried (with boxplorer) to do the initializations in the vertex shader (passing the values as varying) but it was slow. I don't know why. :sad1:


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia on May 14, 2011, 05:25:33 PM
The scripting language would be useful for uniforms which initialization is expensive and that could be done on the CPU side. The case of the matrix intialization is not very good but recomputing the same value for each pixel at each frame could be avoided. I have already tried (with boxplorer) to do the initializations in the vertex shader (passing the values as varying) but it was slow. I don't know why. :sad1:

It is possible to do the initialization step in the vertex shader in Fragmentarium as well - in version 0.8, I made the vertex shader customizable. It can be specified inside the '#vertex' and '#endvertex' tags (for example in 'DE-raytracer.frag'). Since I'm aiming for modularity, I'm not sure how to nicely put DE-function dependent code there, though. Of course if you didn't see any performance gains, thats not the way to go anyway :-)

In terms of speed I dont think there's much to win by going to JavaScript - even though a single CPU core will be somewhat faster than a single GPU processor unit, interpreted JavaScript will surely be much slower. And if initalizations were done in the vertex shader there would be only four invocations, done in parallel.
 



Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: eiffie on May 14, 2011, 05:43:06 PM
Just thought I'd second knightly's request for scripting. I actually use TinyCC to compile ANSI C "animation" scripts. That way you can pass parameters to the shaders from any source.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: visual.bermarte on May 14, 2011, 05:56:32 PM
 :D
What about Python assembling shaders and running animations?
I did a test with Tacitus and everything is fine (ok for animations--should test with shaders).
@Syntopia: in this case, how can i call fragmentarium and pass params-file using cmd or terminal?
 Thanx


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: knighty on May 14, 2011, 08:08:45 PM
Thank you. I will try using the vertex shader.
Quote
@Syntopia: in this case, how can i call fragmentarium and pass params-file using cmd or terminal?
It would be nice to have command line options too.

BTW, It is possible to compile fragmentaruim with Qt creator. One have just to modify some paths in some of the #include statments and adding reference to OpenGL in the config. That would make compilation on other plateforms than windows quite eazy.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: ker2x on May 16, 2011, 06:22:54 PM
Thank you. I will try using the vertex shader.
Quote
@Syntopia: in this case, how can i call fragmentarium and pass params-file using cmd or terminal?
It would be nice to have command line options too.

BTW, It is possible to compile fragmentaruim with Qt creator. One have just to modify some paths in some of the #include statments and adding reference to OpenGL in the config. That would make compilation on other plateforms than windows quite eazy.

i compiled it on my linux with qtcreator without any change at all :)


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia on May 16, 2011, 09:43:05 PM
I'll consider adding command-line support. The main priority will be be to create an useable animation timeline, though - scripting variables from the outside will be tedious, I think.

Here is a few images made using Knighty's Pseudo-Kleinian scripts from above:

(http://farm3.static.flickr.com/2262/5722923855_077a6178f1_b.jpg)

(http://farm6.static.flickr.com/5092/5723538578_442f0b0270_b.jpg)



Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: marius on May 16, 2011, 10:43:39 PM
I'll consider adding command-line support. The main priority will be be to create an useable animation timeline, though - scripting variables from the outside will be tedious, I think.

For my boxplorer tweaks I went with splining between keyframes (how else?) but have a param per keyframe containing delta-time from previous. That param helps compute an absolute time (from start of sequence) per keyframe. The splining step interpolates these values to some very fine grain. Then, when rendering a target fps, skip over splined frames until a target frame time has passed.
Also allows for previewing of the real-time flow, at the cost of dropping lots of frames (or redrawing frames if your gpu is way fast). Or re-rendering at different fps.

Alternatively, you can render at constant speed along spline (integrating the fine grain inter-frame distances) but that gets jerky in tight turns.

It is still a pain to tweak the delta-time fields per keyframe to get a nice smooth flow. Being able to quickly step forward and backward between the keyframes is key. And being able to preview little animation segments between a couple of keyframes.

A keyframe definition contains all relevant fractal params and all those gets splined over as well, for animation of the fractal appearance. Pretty typical.

I added real-time visualization of the splined flight path though the fractal for both left & right eye to see where it'd be clipping through the fractal and to 'see' silly CatmulRom introduced bumps or sways in the flight path. Requires z-buffer rendering.
I guess w/ visualization of the flight path CatmullRom isn't as vital (i.e pass through keyframe), but you need some kind of knobs to pull the flight path by. Of course this static flight-path preview does not work if the fractal changes shape a lot between your keyframes..

I still don't like the workflow, and it's all a gross hack, but can by now set-up a flight path quite quickly, then tweak each keyframe for stereoscopic prowess and tweak delta-time to get a nice flow.

I did this (view on Youtube for 3d playback options!)
http://www.youtube.com/watch?v=MZRZ7KNsx9U
yesterday afternoon in a hour or so after I liked the shader and basic params. I uploaded all the keyframes and shader to http://code/google.com/p/boxplorer2 (http://code/google.com/p/boxplorer2)


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia on May 17, 2011, 09:44:11 PM
Great video!

For my boxplorer tweaks I went with splining between keyframes (how else?) but have a param per keyframe containing delta-time from previous. That param helps compute an absolute time (from start of sequence) per keyframe. The splining step interpolates these values to some very fine grain. Then, when rendering a target fps, skip over splined frames until a target frame time has passed.
Also allows for previewing of the real-time flow, at the cost of dropping lots of frames (or redrawing frames if your gpu is way fast). Or re-rendering at different fps.

That is also more or less how I plan to do it - how do you represent the camera? I use an Eye, Target, Up-vector and I plan on just trying to interpolate all of these and then "orthogonalize" the up-vector as needed. But I think I recall having seen somewhere that the best way to do camera movement is by using a quaternion representation for orientation and using this "SLERP"-approach. Judging from your video, whatever you do seems sufficient though.

I added real-time visualization of the splined flight path though the fractal for both left & right eye to see where it'd be clipping through the fractal and to 'see' silly CatmulRom introduced bumps or sways in the flight path. Requires z-buffer rendering.

Yes, I noticed the path preview on your screenshots - very impressive. You are drawing with standard OpenGL on top of the GLSL output right? I guess I should have taken more care to setup the proper GL projection matrices from the start :-)


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: marius on May 17, 2011, 10:16:12 PM
Great video!

Thanks. At the moment, I'm pretty 3D obsessed as my youtube uploads profess ;-)

For my boxplorer tweaks I went with splining between keyframes (how else?) but have a param per keyframe containing delta-time from previous. That param helps compute an absolute time (from start of sequence) per keyframe. The splining step interpolates these values to some very fine grain. Then, when rendering a target fps, skip over splined frames until a target frame time has passed.
Also allows for previewing of the real-time flow, at the cost of dropping lots of frames (or redrawing frames if your gpu is way fast). Or re-rendering at different fps.

That is also more or less how I plan to do it - how do you represent the camera? I use an Eye, Target, Up-vector and I plan on just trying to interpolate all of these and then "orthogonalize" the up-vector as needed. But I think I recall having seen somewhere that the best way to do camera movement is by using a quaternion representation for orientation and using this "SLERP"-approach. Judging from your video, whatever you do seems sufficient though.

I worried about that too. Even with the quat approach it'd appeared tricky to do multiple barrel-rolls between keyframes (I guess keep angles in full range somewhere, not mod 2pi?). Had a hard time converting the boxplorer matrix back & forth and then just tried interpolating those values. Given enough keyframes and not too much rolling in between etc. it works well enough for now.

I added real-time visualization of the splined flight path though the fractal for both left & right eye to see where it'd be clipping through the fractal and to 'see' silly CatmulRom introduced bumps or sways in the flight path. Requires z-buffer rendering.

Yes, I noticed the path preview on your screenshots - very impressive. You are drawing with standard OpenGL on top of the GLSL output right? I guess I should have taken more care to setup the proper GL projection matrices from the start :-)

Yeah, I had to twiddle the matrices around between proper ogl and boxplorer's flavor. And render the glsl output with a reasonably accurate z-buffer. But indeed, then you can just draw w/ ogl primitives and z-buffer clipping of course works. Could draw spaceships and aliens in there if you wanted ;-)

The key part of the preview flight path is that it be manipulated real-time in view, by dragging a keyframe marker around the screen. UI aspect is very tricky though; think dragging in 2d projected space vs. expected 3d space so in practice you have to swirl the viewpoint around a lot and do little nudges. Works wonders for tweaking a stereoscopic flight path through tiny holes though, as you can see the resulting splined path change its course.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: knighty on May 19, 2011, 09:45:43 PM
Nice renders and video! Thank you!
@marius: could you send a video without anaglyph? :)
Yeah, I had to twiddle the matrices around between proper ogl and boxplorer's flavor. And render the glsl output with a reasonably accurate z-buffer. But indeed, then you can just draw w/ ogl primitives and z-buffer clipping of course works. Could draw spaceships and aliens in there if you wanted ;-)

You can use the same "projection" matrices for raycasted stuff and geometry. Here is what I use:
Vertex shader:
Code:
varying vec4 Weye;//could be sent directly to the fragment shader as uniform. I'm using shader maker so...
varying vec4 WPpos;

void main( void )
{
// DON'T transform
gl_Position = gl_Vertex;

WPpos = gl_ModelViewProjectionMatrixInverse*gl_Vertex;//
WPpos /= WPpos.w;

//Center of projection's (eye's) coordinates (well! it's not really a projection! is it?)
Weye = gl_ModelViewMatrixInverse[3];
//Weye /= Weye.w;
}

Fragment shader:
Code:
// simple fragment shader
// Raycasts a sphere and updates the z-buffer
// Discards the fragment if no intersection with the sphere
uniform float Sr;//radius of the sphere

uniform sampler2D textureImage;
varying vec4 Weye;
varying vec4 WPpos;

bool IntersectSphere(in vec3 Oray, in vec3 Vray, out vec3 Int)
{
vec3 Spos=vec3(0.0,0.0,0.0);float Srad=Sr;
//Spos.z=Sz;
Spos=Spos-Oray;
float b=dot(Spos,Vray);
Spos=cross(Spos,Vray);
float d2=dot(Spos,Spos);
float delta=Srad*Srad-d2;
if(delta<0.0) return false;
delta=sqrt(delta);
float tmin=b-delta;
float tmax=b+delta;
float t=tmin;
if(t<0.0) t=tmax;
if(t<0.0) return false;
Int=Oray+t*Vray;
return true;//false;
}

void main()
{
vec4 Vray = normalize(WPpos-Weye);
vec3 Int;
if (IntersectSphere(Weye.xyz,Vray.xyz,Int)){
gl_FragColor.brg=abs(Int/Sr);
vec4 theInt=vec4(Int,1.0);//we need to use homogeneous coordinates to do the following
theInt=gl_ModelViewProjectionMatrix*theInt;//perspective transformation
theInt.xyz/=theInt.w;//perspective division
gl_FragDepth=theInt.z*0.5+0.5;//update the depth buffer
}
else discard;
}
That's what is used in my old experimental algebraic surfaces renderer (http://implicit.googlecode.com/files/Implicit.zip) (actually , only the vertex shader). Hope you will find it useful.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: marius on May 20, 2011, 01:12:18 AM
Nice renders and video! Thank you!
@marius: could you send a video without anaglyph? :)

@knighty: if you watch the vid on youtube.com, their player has options to show just left or right eye. And switch the 3d playback options to other flavors like cross-eyed or interlaced.
I uploaded over-under, not anaglyph so the anaglyph is probably the default playback setting that your youtube playback is set to? Check out the little '3D' button on the lower right.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: knighty on May 20, 2011, 04:19:07 PM
Ah! Thanks! Amazing... :thumbsup1:


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: visual.bermarte on June 04, 2011, 03:33:19 AM
Menger.Rotors
WATCH OUT, LOUD SOUND

http://www.youtube.com/watch?v=nxOzSZMAUYE


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: tomot on June 19, 2011, 05:57:19 PM
I have been dabbling a bit with Fragmentarium, doing some rebuilds, replacing various
sin notations with cos, etc. etc. I know that * means multiply, what does dot mean in this language?

tia


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia on June 19, 2011, 06:30:59 PM
I have been dabbling a bit with Fragmentarium, doing some rebuilds, replacing various
sin notations with cos, etc. etc. I know that * means multiply, what does dot mean in this language?

tia

Dot is the vector dot product: i.e. dot(a,b) = a.x*b.x + a.y*b.y + a.z*bz
Btw, the language is GLSL - the specifications may be found here: http://www.opengl.org/registry/


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Feline on July 10, 2011, 02:20:30 AM
So - is this the official place for feedback on Fragmentarium? Should I post here where I run into problems (in the sense of bugs/crashes etc)? I can't find any other "more official" feedback forum.

I've been spending more hours with that little bit of software for more days in  a row than I have since ... uh  ... Doom2? I love this to bits (pun intended). I have all kinds of ideas what one could add/improve but I realize it needs to stabilize first and I'd be more than happy providing whatever feedback I can to make that happen.

Meanwhile: I notice that this only works with certain graphics cards but not others. I wouldn't mind upgrading some of my olderish hardware and this is as good an excuse to do so as any :) -- but I don't know how to tell up front what to look for in a graphics card. How can I tell when looking at some Newegg page whether what I'm looking at will work?


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia on July 10, 2011, 06:45:22 PM
Hi, glad you like it!

There are plenty of areas to improve on right now in Fragmentarium, but I guess stability is one of the more important :-)

Now, I develop Fragmentarium on a Windows laptop using a low-end Nvidia 310M, which works nicely, but is slow. I think Fragmentarium should work with all newer Nvidia cards with recent drivers. From time to time, I test using an older ATI card (Radeon HD 4350), and there is always a lot of shader errors that needs to be corrected - but it is usually simple to fix them.

On Mac there are some additional GUI problems, and here I rely on other people's information. I test compile on Linux as well, and my observations so far are not very positive - it may be difficult to obtain compliant GPU drivers.

For ideas and bugs feel free to post them here - I'm sure the FF board admins will tell us if there is a better place :-) Otherwise you can post them as GitHub issues (requires an account).

Finally, If I were to buy a new GPU, I would go for a NVidia, because of the GLSL driver issues. For speed, the GFLOPS rating is the thing that matters most - you will find it listed on e.g. Wikipedia pages (http://en.wikipedia.org/wiki/GeForce_500_Series).


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: visual.bermarte on July 12, 2011, 09:38:37 AM
thanx 2 Kali and 2 Jesse  :)
(http://fc09.deviantart.net/fs71/i/2011/192/e/9/ilak_0_by_bermarte-d3n2i1s.jpg)


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: visual.bermarte on July 24, 2011, 01:25:48 AM
(http://fc05.deviantart.net/fs71/i/2011/204/b/a/death_me_tal_by_bermarte-d41fhhj.jpg)

(http://th02.deviantart.net/fs70/PRE/i/2011/206/0/e/ure_eng_ine_struct__by_bermarte-d41n8vg.jpg)


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: darkbrain on September 12, 2011, 12:57:48 PM
Really interesting, but how can i port a Mandelbulb3d creation (only formulaes) like: _PolyFolding/koch_cube/SierpHilbert (x2)/_reciprocalZ2 to Framentarium?

tnx,
   DarkBrain


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia on September 12, 2011, 04:35:53 PM
Fragmentarium uses an analytical distance estimator approach, so you need to (1) find analytical DE's for each "subformula" and (2) combine them. If the analytical DE's are of the same form (say DE=r*ln(r)/dr, with 'dr' being the length of a running (scalar) derivate), step (2) is straight-forward - otherwise it is more complicated (I don't know how to do it in a generic manner).

As an alternative, I have some example Fragmentarium code showing how to work with the numerical gradient approximation (the Makin/Buddhi four-point "delta" DE). This is the methods used by M3D and Mandelbulber for hybrid systems. It is slower and seems to be more prone to noise, perhaps because of the single-precision calculations used on the GPU. I'll put an example in the next Fragmentarium update.

So, all in all it is not easy :-)


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: visual.bermarte on October 08, 2011, 06:47:28 AM
test::slice your bulb (fast)! * :dink:
(http://fc06.deviantart.net/fs71/i/2011/280/9/f/sliced_guts_by_bermarte-d4c59da.jpg)
* and see the guts! :tongue1:
>fragmentarium 0.8


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia on October 08, 2011, 12:03:11 PM
Uh, very interesting! How did you manage that, Visual? Ordinary slicing results in a Mandelbulb that is filled inside.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: visual.bermarte on October 08, 2011, 02:50:36 PM
this time there's the frag. attached :) it's just a de-combination using the 'old' max-operator  :embarrass:


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: knighty on October 08, 2011, 03:05:58 PM
It looks like scalar derivative based DE with (very?) small DE factor (and small iteration number?). This is a wild gess based on the "wall" visible inside the main bulbs in visual's picture. Scalar derivative based DE have the nice property that it is someway usable especially when iteration number is low but it is far from being perfect.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: knighty on October 08, 2011, 03:07:07 PM
visual was faster! ;D


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia on October 08, 2011, 06:38:04 PM
Oh, you simply use the standard "DE=0.5*log(r)*r/dr" as a signed distance measure!

I had no idea that formula could be used as an interior estimate - I always assumed it would be pure noise - after all the analytical distance estimates are much more complex for the interior distances.

I'm still puzzled it works - if I take a look at the Mandelbrot DE using the standard formula, it has spikes (increasing with the number of iterations) where the DE goes towards -infinity.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: knighty on October 09, 2011, 10:30:10 AM
Syntopia: you are not using a scalar derivative there.  :)
The scalar derivative for the mandelbrot set is the same as for the mandelbulb. Use dr=2*r*dr+1; where r=sqrt(x²+y²); instead of dz=2*z*dz+1 then taking its norm.

If you vary the iteration number the DE will change periodically. This is related to the pariodicity of the iterate. Maybe it's possible to use a DE based on the first and second deriatives instead.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia on October 09, 2011, 11:46:20 AM
Syntopia: you are not using a scalar derivative there.  :)
The scalar derivative for the mandelbrot set is the same as for the mandelbulb. Use dr=2*r*dr+1; where r=sqrt(x²+y²); instead of dz=2*z*dz+1 then taking its norm.

If you vary the iteration number the DE will change periodically. This is related to the pariodicity of the iterate. Maybe it's possible to use a DE based on the first and second deriatives instead.

Well, I did try both the scalar and the complex DE, and the scalar thing was much worse, going toward infinity nearly everywhere :-(

But looking at your formula, I realise it is because I used the Julia running derivative 'dr=2*r*dr' without the '+1' term. (This seems to be an old error in many of my examples).

Here is some better pictures (with and without the plus one).

As you say, it is very sensitive to even small changes in iteration count inside.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: DarkBeam on October 09, 2011, 12:16:51 PM
Creamy mandel :D want to take a bit :angel1:


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: knighty on October 09, 2011, 12:27:22 PM
Yes, they taste good. Humm! ;D

Here is a little experiment with scalar first and second derivative. It doesn't mean it is a DE though... maybe...

note that it converges uniformly inside.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia on October 09, 2011, 09:51:21 PM
Yes, they taste good. Humm! ;D

Here is a little experiment with scalar first and second derivative. It doesn't mean it is a DE though... maybe...

note that it converges uniformly inside.

You are using dr/ddr as distance estimate? I'm not sure I can follow why this should work?

It seems to overshoot near (0.0). I believe the two largest spikes should have roughly same size.

Here is a 3D picture with some iso-contours:


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: cbuchner1 on October 09, 2011, 10:49:53 PM
Nice, that ISO fractal looks interesting.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: knighty on October 09, 2011, 10:53:04 PM
No, I'm not using dr/ddr as DE, just suggesting it looks a little like DE (beside it's poor behaviour near the cusp of the main cardioid). I've forgotten to mention that to get even coloring i used (dr/ddr)^0.3 instead (that part of the code is not visible in the picture). The exponentiation straightens it (near the borders) and makes it look more like a cone (and round at the top... I don't know just have worked it in 2D) than a witch hat  :D.

nice renders btw.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: knighty on October 09, 2011, 11:03:40 PM
Why it's (somehow) close to be DE? well... I really don't know. :-\


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Pauldelbrot on December 18, 2011, 11:00:44 AM
TL;DR: Fragmentarium crashes at least some of the times when the viewpoint is placed inside a "twisted" Mandelbox, and too many indexed textures and/or a division by zero when the distance estimate is zero may be the culprit, but it may also be a library, OS, or video driver bug.

Long version:

A fairly brief (< 20 minutes) examination of 0.8.0 on Vista Home Premium 32-bit quickly revealed a pretty severe bug in ... some layer of the software stack.

Moving the camera sliders for a Mandelbox in such a manner as to hit the box produces a blank white pane when the box is not "twisted" (by changing the bottom rotation slider on the Mandelbox tab) -- acceptable enough behavior. If the box is "twisted", though, and you crash into the box, the entire screen goes blank black for several seconds and things like alt-tab, etc. fail to foreground something else. After the computer has been in this frightening state for several seconds (and assuming you haven't already hit the reboot button by then), the display comes back, accompanied by a "ding" and an error dialog saying the OpenGL library lost contact with the NVidia driver, or something like that (for some reason the awesome dudes who program these MSVC/etc. library error dialogs never seem to include copy and paste capability, or even a way for application programmers to add it), and that there's an error code of 8, whatever the hell that means. Regardless, okaying it exits Fragmentarium, and it fails to provide any other options.

So, basically, moving the viewpoint inside a "twisted" Mandelbox crashes Fragmentarium, and in a manner that makes it look at first like the entire computer crashed. Not good, particularly since it's quite easy for this to happen accidentally while trying to set up an interesting view.

Debugging this is likely to be difficult, unless it's performing a generally-invalid OpenGL operation, as the application code sits on a Qt library that sits, on Windows, on an MSVC library whose graphics-related bits sit on an OpenGL implementation that sits on a Windows HAL that sits on a hardware-dependent video driver, and the problem lies somewhere down in this chain. The error message I saw was apparently NVidia specific, in particular -- not that that means the bug is a specific incompatibility with GeForce cards. It could just be that the error message, or more generally the kind of undefined behavior being triggered, would vary with other cards, and possibly also with other operating systems. But the behavior observed (affecting the display, however temporarily, of other applications and not just Fragmentarium) points to something going seriously wrong at a pretty deep level, where it's quite plausible that the same bug on other system configurations could trigger anything from blue screens, lockups, and reboots to more ordinary application hangs and crashes as well as this sort of funny in-between crash. So, I can envision the bug being almost anywhere; it could be anything from Fragmentarium doing something wrong to a bug in any of the layers beneath it that it merely provokes and that it would have to try to work around, down to and including a hardware bug with the specific graphics card I was using. How readily it, or something similar, reproduces might narrow things down -- for example, if nothing of the sort ever happens except on Windows machines, it's probably in the Windows-specific libraries, the HAL, or the Windows drivers for video cards. Likewise it might be NVidia-specific, pointing to their drivers or hardware as the culprit, or some version of it may afflict most system configurations, pointing to Fragmentarium itself doing something that the OpenGL standard says is a no-no or else the cross-platform Qt and (perhaps) GL libraries containing the error. I don't have access to other systems to test it on, at least for now. In the near future I may have opportunities to see what, if anything, happens under similar circumstances with a Windows 7 Home Premium 64-bit/ATI combination, and also with Windows 7 Home Premium 64-bit and a second NVidia card. If the bug is confined to either NVidia hardware or Vista this fact will be discernible, but not whether it's confined to Windows. Reports from other users will probably be necessary to begin to guess where precisely the problem lies, and/or reproducing it with debugging tools attached.

Cursory googling of elements of the NVidia-specific error message suggests that it can have three causes: 1. Overheating GPU; 2. Failing GPU; 3. Applications using higher RenderMaxTextureIndex than the card supports. The first two wouldn't be specific to a single 3D application, whereas I'm not seeing anything similar in any other 3D applications (e.g., games). So perhaps Fragmentarium is trying to use more indexed textures than the driver reports the card as supporting (Fragmentarium bug) or the driver is misreporting (unfortunately, there is at least one documented instance of a driver reporting a card as supporting 32 that supported only 16). This also allows the bug to be in Fragmentarium, in the driver, and maybe somewhere in the stack between them, but at least it suggests looking at any use of indexed textures by Fragmentarium, though my understanding of these things makes me doubt that pure pixel-shader rendering would need any? Another online discussion suggests that erroneous shader calculations such as array overruns or divisions by zero could cause it -- a division by zero in shader code while the camera is embedded in the Mandelbox and the distance estimate is zero seems like a particularly plausible candidate.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia on December 18, 2011, 06:16:41 PM
Hi Pauldebrot,

The most likely explanation is that the GPU code takes too long to execute and times out. For the default systems in Fragmentarium, this is only likely to happen on older GPU's (unless AA is turned on).

On Windows, there is a GPU Watchdog timer which monitors for how long a single task (in our case a frame rendering) runs. If a task takes more than 2-5 seconds (this seems to depend on drivers and OS settings), Windows will kill the graphics driver and restore it (resulting in unresponsive, possible black, display for another 5-10 seconds).

This restoration process also kills the Fragmentarium process and result in the errors you describe (see the attached screenshot). This is the expected and correct behaviour. It saves you from rebooting the machine to recover GPU access.

It is a fairly common thing when dealing with GPU code - I've experienced it a lot in Adobe's Pixel Bender, and it also applies to e.g. CUDA.

It is possible to turn off, or adjust the GPU timeout, but I wouldn't recommend it unless you know what you are doing - since you might be able to lock the machine completely by doing so. Here is how, anyway: http://www.flickr.com/photos/syntopia/4575335808/

It is possible to render in smaller units (tiles), this is done in Fragmentarium when rendering high-resolution images, but as far as I know, nothing can really guard you against an infinite loop.








Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: hobold on December 19, 2011, 01:17:15 AM
as far as I know, nothing can really guard you against an infinite loop.
Useless trivia: in some strict mathematical sense, it is impossible to automatically determine if some arbitrary program is making progress towards termination, or if it will run forever. This is the "halting problem", very closely related to the purely mathematical "incompleteness theorem". Wikipedia will probably have more details if anyone is interested.

But in practice, the most common infinite loops are inherently trivial enough to be detected (as they do not change relevant state between iterations), or you simply use watchdog timers to get a good enough approximation of the impossible thing that you cannot have.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Pauldelbrot on December 19, 2011, 08:58:19 AM
On real-world, finite hardware, all infinite loops that don't involve I/O can in principle be detected by using a cycle detection algorithm. (It would have to run in another thread and have privileged access to everything -- the first process's address space, saved registers and stack, etc.) I/O-containing loops can usually be broken out of by a suitable changed input, unless they contain only output (10 PRINT "HELLO, WORLD"; 20 GOTO 10) or won't accept *user* input. Regardless, they interrupt to perform I/O which gives the OS and high-priority processes like Task Manager opportunities to become responsive and let the user kill them, even if the looping process itself has a high priority. Given that many discrete-cycle detection algorithms need only one saved image to compare against periodically, and given that OSes save such images anyway when they page tasks to disk and back into main memory, it's not infeasible in principle for an OS to implement one as part of its job management/scheduler subsystem, though I know of none that currently does so.

On the original topic, the video hardware I have can run Quake 4, Doom 3, and HL2 without poor framerates, so I should hope it suffices for Fragmentarium. How is the tiling enabled, if that's a way to avoid triggering the bug?


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia on December 19, 2011, 10:17:15 AM
Well, static code analysis will only detect the trivial cases, and dynamic state cycle detection would be very inefficient on a GPU. The only reasonable solution would be to introduce a preemptive multi-tasking model on the GPU's, where running kernels could be forced to yield time to other kernels.

Pre-emptive multitasking is supported by the Windows WDDM driver model, but AFAIK no graphic cards support it. The Fermi architecture supposedly supports fast context switching, but it is uses only cooperative multi-tasking with the newest drivers. This will probably change at some point.

On the original topic, the video hardware I have can run Quake 4, Doom 3, and HL2 without poor framerates, so I should hope it suffices for Fragmentarium. How is the tiling enabled, if that's a way to avoid triggering the bug?

Rendering a frame in Fragmentarium can be much more expensive than a frame in Quake. It all depends on the fractal and settings, e.g. the max number of raysteps, the iteration count, the AA settings, and so on.

I've used Fragmentarium on a (laptop) Geforce 310M, where it is quite slow, but usable, on a 9800GTX, which works nicely, and on a 570GTX which works great.

Tile rendering is only possible when doing high-resolution renders (the 'Render' menu), but you may adjust the preview slider to render at lower resolution.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia on December 19, 2011, 10:42:23 PM
There is a new version of Fragmentarium out (version 0.9.0).

More info available here:
http://blog.hvidtfeldts.net/index.php/2011/12/fragmentarium-0-9-released/


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: knighty on January 06, 2012, 09:26:50 PM
Yay! A new version!
The new features are awesome!
 :thumbsup1:


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia on January 07, 2012, 10:04:03 AM
Thanks, Knighy. And your new fragment is great. The brings Fragmentarium closer to Structure Synth - but the DE approach yields a lot of new potential. Example picture:


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia on January 07, 2012, 10:07:49 AM
Btw, there is now a small FAQ for Fragmentarium:
http://blog.hvidtfeldts.net/index.php/2011/12/fragmentarium-faq/

I'm also upgrading the rendering pipeline in Fragmentarium, so that you can render progressively to accumulated float buffers (HDR). This makes it possible to do distributed raytracing, meaning DOF, bloom, soft shadows (for lights with finite extent), high-quality AA and better AO, is now possible. Here are some example images:
http://blog.hvidtfeldts.net/index.php/2012/01/pseudo-kleinian-blue/


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: bib on January 07, 2012, 10:13:36 AM
@Syntopia, I hadn't realized that you were the author of both Structure Synth and Fragmentarium. You're a real genius! I have tried both programs for less than an hour each, and although a few clicks where enough to get some nice images, I felt a bit lost. Too much coding everywhere! For stupid users like me, Mandelbulb3D is less scary :) Although I've been coding a little bit when I was younger, now that belongs to the past. So I absolutely need to find the time to play with these jewels, especially when I see Kali's latest images. WOW. Having spent sooo much time on Mandelbulb3D I feel like a dinosaur falling way behind :D

The digital art community owes you so much, I don't have enough words to thank you!

Best of luck in 2012!

@Knighty: funny, you tried to replicate the image I did in M3D? Impressive!


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: knighty on January 07, 2012, 03:35:12 PM
@bib: yes. thank you ;D. When I like a rendering, I always try to figure out how it was done. Sometimes I succeed.  O0
Jessy's difs are finally some kind of KIFS instancing. I did similar work some time ago (http://www.fractalforums.com/index.php?action=gallery;sa=view;id=3538). This technique is even more powerful. In the above picture by syntopia, the instansiated object is a (1 iteration) menger sponge. So it's possible (in principle) to do difs that instansiate another difs and so on. Too bad it gives too symmetric shapes.

@syntipia: Thanks.
I guess it's possible to transform Structure synth objects to RIFS with instancing and use Hart's algorithm to raytrace them. It's also possible to use DE (Hepting's algorithms, but it's also possible to modify Hart's algorithm to give DE). unfortunately, both would be difficult to implement on GPU.
As pointed out by David Makin, Hart's algorithm is much faster than DE but the later should also be usable with non linear transformations (in principle at least).

That progressive rendring feature looks very promising. How much time did it took to render those (pretty) blue kleinians?


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: DarkBeam on January 07, 2012, 06:34:56 PM
Hey awesome people! ;D

I implemented your "Dodecahedron" kifs, but I added more possibilities;

 // Snippet from Frag's script with my tweaks; (z is a vector with x,y,z)
 z *= Rot1;
 for (n2=0; n2<7; n2++) { // this works, the original formula for some reason used 9 cycles
 z-=2.0 * min(0.0, dot(z, n1)) * n1; // n1 = normalizedVec(phi-1,1/(phi-1), -1)
 if style=n2 { z *= Rot2; } // Rotating before the 'fold loop' is finished can be fun!
 flip3D(n1); // flip3d(x,y,z) = (y,z,x), easier way to cycle between the fold styles without additional vecs
 }

 z =+z*Scale - offset*(Scale-1.0);
 if style=7 { z *= Rot2; } // This is Fragmentarium's style.

Try it, it should be better for use instead of the default example. :dink:

Have a good time. :beer: :beer: :beer:


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: tit_toinou on January 07, 2012, 06:56:40 PM
This software is exactly what i needed. Thanks !


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia on January 07, 2012, 09:37:16 PM
@bib: Thanks a lot for the comments. Btw, Fragmentarium did turn out to become more complex and difficult than I planned when I started out. On the other hand, Mandelbulb3D and Mandelbulber are already so powerful and polished, that I think Fragmentarium makes most sense for people who wants to experiment with code and new formulas.

@knighty: I can see I have some catching up to do! I don't know what RIFS are, nor what the new Mandelbulb3D d.IFS do, or your mdifs.frag. Do you have any pointers? Which one of Hart's paper many papers describe this - is it the 'paradigm' one?

The blue kleinians were rendered using 60 frames (or rays/pixel). So they'd be 60x slower :-) On the other hand this is still only a few seconds on a good GPU.

@darkbeam: You are right - only 7 iterations are necessary! Your solution is elegant, but unfortunately swizzling the normal slows the shader by adding extra operations. Swizzeling z instead is ~13% faster  :-)

Code:
for (int j = 0; j < 7; j++) {
z.yzx = z-2.0 * min(0.0, dot(z, n1)) * n1;
}


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: DarkBeam on January 07, 2012, 10:43:50 PM
Elegant? I am definitely making progress, for being a spaghetti coder! ;)
Well, the fold takeoff can edventually affect the rotated stuffs, so be careful about that optimization. :)
Anyway, the option of a rotation that may break the folding regularity may be cool to experiment somewhere. :)


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: tit_toinou on January 08, 2012, 11:02:32 AM
Features that could be useful :
  • Betters sliders for float : there's no "fine tune" for example.
  • Click a pixel in the image => we get a vec2 coordinates (for Julia seeds). The same thing for the Show-map.
  • A user control to provide an image from hard drive. Then we coders would be able to use them (getPixel(x,y) etc..).
  • double precision instead of float
  • For 2DJulia.frag : Separate crunching of fractal and coloring pixels.
    To do so : First compute fractal, then store useful values. getColor2D() then gets the information it needs from the stored values. The result is that the user can tweak colors parameters more easily (since the output will be nearly immediate - no fractal is to be crunched when changing colors settings).

I don't understand how we can render animations. I see the "Render mode : Animation" but i don't know where do we choose uniforms values for t=0% and uniforms values for t=100%.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: DarkBeam on January 08, 2012, 11:49:27 AM
(http://img38.imagefra.me/i518/kriptokapi/jenc_49a_u6bci.jpg) (http://i.imagefra.me/280ivp1i)Uploaded at ImageFra.me (http://imagefra.me/)

A sample render with different rotation stlyes for the dodecahedral fractal. You can see a bunch of different effects... An universe of fractals :o :beer:

And btw you can clearly see the effect of dropping the last two folds; rotated fractals are aperiodic (not fully symmetrical). This gives more variety to the patterns :crazyeyes:


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: knighty on January 08, 2012, 12:43:58 PM
@knighty: I can see I have some catching up to do! I don't know what RIFS are, nor what the new Mandelbulb3D d.IFS do, or your mdifs.frag. Do you have any pointers? Which one of Hart's paper many papers describe this - is it the 'paradigm' one?
Sorry! My bad.
here are the links to the documents I was reffering to:
J. C. Hart's PhD thesis. (http://www.ice.eecs.uic.edu/files/pdf/diss.pdf)
John C. Hart, Thomas A. DeFanti:"Efficient Antialiased Rendering of 3-D Linear Fractals". (http://graphics.cs.illinois.edu/sites/graphics.dev.engr.illinois.edu/files/rayifs.pdf)
D. Hepting's MSc thesis. (http://www2.cs.uregina.ca/~hepting/research/dwnld/uregina1991MSc.pdf)

About dIFS/KIFS_with_instancing: It's the same idea as with plain IFS and R-IFS.
The general formulation if A KIFS is someting like this:
Code:
loop:{
   z=fold(z);
   z=scale*(z-c)+c;
   dr*=scale;
}
DE=(length(z)-bounding_volume_radius)/dr
KIFS with instancing would be:
Code:
dmin=distanceToAPrimitive(z);//that primitive could be a basic shape, a fractal or a dIFS/KIFS_with_instancing 
loop:{
   z=fold(z);
   z=scale*(z-c)+c;
   dr*=scale;
   dmin=min(dmin,distanceToAPrimitive(z)/dr);//we can also take different primitives depending on current iteration
}
DE=dmin;

The blue kleinians were rendered using 60 frames (or rays/pixel). So they'd be 60x slower :-) On the other hand this is still only a few seconds on a good GPU.
Thank you. :)


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia on January 08, 2012, 01:40:42 PM
@tit_toinou: Good and relevant suggestions.

Features that could be useful :
  • Betters sliders for float : there's no "fine tune" for example.

You can finetune float sliders by selecting them in the GUI (their widget will change to dark grey). Now, if you give the 3D canvas keyboard focus (which is also needed for keyboard navigation), you can use the arrow keys to fine tune: left/right changes value, up/down changes scale.

Quote
  • Click a pixel in the image => we get a vec2 coordinates (for Julia seeds). The same thing for the Show-map.

Would be nice, but difficult to implement. The CPU doesn't know how the GPU vertex shader transforms the input coordinates. And returning data from the GPU is not easy - you'd have to create a FBO just to do it.

Quote
A user control to provide an image from hard drive. Then we coders would be able to use them (getPixel(x,y) etc..).

there is a special syntax for that in Fragmentarium:

[/list]
Code:
uniform sampler2D texture; file[texture2.jpg]
...
vec3 col = texture2D(texture,uv).xyz;
    Relative file paths are searching according to the path of the executing script, and the include paths defined in preferences.

Quote
  • double precision instead of float
This is covered in the FAQ: http://blog.hvidtfeldts.net/index.php/2011/12/fragmentarium-faq/

Quote
  • For 2DJulia.frag : Separate crunching of fractal and coloring pixels.
    To do so : First compute fractal, then store useful values. getColor2D() then gets the information it needs from the stored values. The result is that the user can tweak colors parameters more easily (since the output will be nearly immediate - no fractal is to be crunched when changing colors settings).

This requires multiple shaders and passes. It also requires that the user GUI system is made more intelligent, so that changing a slider for a shader doesn't trigger an update for earlier shaders.

I working on multiple buffers in Fragmentarium with progressive rendering right now, and it would be nice to able to change the HDR renderinging (e.g. tonemapping and gamma correction) without a complete recalculation. It would also be nice to adjust the coloring, but at least for the 3D fractals, you need to store a lot of information: normals, base color, AO contributions and so on. And it does not play nicely together with progressive rendering, since you cannot accumulate these attributes - only the final color values can be properly accumulated I think.

Quote
I don't understand how we can render animations. I see the "Render mode : Animation" but i don't know where do we choose uniforms values for t=0% and uniforms values for t=100%.

Animations are terrible primitive at the moment. The only thing you can do is to use the:
'uniform float time;'
which is updated for the frames in the animation. So all animation must be programmed based on this.

Of course, the original plan was to make it possible to change the uniforms and automatically interpolate between keyframes. Hopefully, when I get some time :-)


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia on January 08, 2012, 01:52:52 PM
@darkbeam:

Nice images. There are many interesting ways to modify the K-IFS, one thing you should consider in a the M3D formula, is to make it possible to move the offset. Another variation, which I like in particular, is to move some of the folds outside the iteration loop - this creates a hollower fractal, see e.g. http://www.fractalforums.com/3d-fractal-generation/kaleidoscopic-%28escape-time-ifs%29/msg17328/#msg17328

@knighty:

Thanks a lot for the links - I haven't seen Hart's PhD thesis before - it looks interesting and well organised.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: DarkBeam on January 08, 2012, 03:55:25 PM
That is equivalent to a pretransform (or a hybridized fmla), so it can be easily achieved ;)

I am examining btw your NewMenger, I like it a freaking lot :cocaine:


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: tit_toinou on January 08, 2012, 06:23:08 PM
@Syntopia: Thanks for the information.
For animation it would be pretty simple to code it..
And the user would just have to select two "Presets" !
One other thing missing : to add a "Preset" whenever we want from choosen parameters.

However i've manage to do that little animation (Kaliset formulae z->abs(scale/z)+c & my own coloring technique with cosine) :
http://www.youtube.com/watch?v=I7G23m3N9no (http://www.youtube.com/watch?v=I7G23m3N9no)

Fragmentarium is really awesome :) .


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: subblue on January 08, 2012, 11:47:54 PM
A sample render with different rotation stlyes for the dodecahedral fractal. You can see a bunch of different effects... An universe of fractals :o :beer:
You can see these styles in motion here ;)
http://vimeo.com/18842873


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: blob on January 09, 2012, 01:05:42 AM
Hello, the latest fragmentarium does not render anymore here and I am seeing this in the log:

Quote
Could not link shaders: Fragment info
-------------
(400) : warning C7506: OpenGL does not define the global function exp
(204) : error C5051: profile does not support conditional returns
(204) : error C5051: profile does not support conditional returns

This video card supports: OpenGL1.1, OpenGL1.2, OpenGL1.3, OpenGL1.4, OpenGL1.5, OpenGL2.0

Have the opengl or video card requirements increased. I am using a relatively old nVidia 7950 GT.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: ker2x on January 09, 2012, 03:59:35 PM
Hello, the latest fragmentarium does not render anymore here and I am seeing this in the log:

Quote
Could not link shaders: Fragment info
-------------
(400) : warning C7506: OpenGL does not define the global function exp
(204) : error C5051: profile does not support conditional returns
(204) : error C5051: profile does not support conditional returns

This video card supports: OpenGL1.1, OpenGL1.2, OpenGL1.3, OpenGL1.4, OpenGL1.5, OpenGL2.0

Have the opengl or video card requirements increased. I am using a relatively old nVidia 7950 GT.


i didn't knew GLSL supported conditional return (on any version).
Ewwwww  :vomit:


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: DarkBeam on January 09, 2012, 06:37:08 PM
A sample render with different rotation stlyes for the dodecahedral fractal. You can see a bunch of different effects... An universe of fractals :o :beer:
You can see these styles in motion here ;)
http://vimeo.com/18842873

Video is mind blowing, but it refers to one style with changing angles; I used the same exact angles for both renders but changed the position of the rotation inside the formula. More, my formula is a bit less regular than that (should show more interesting patterns) ;)


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia on January 09, 2012, 10:52:40 PM
Hello, the latest fragmentarium does not render anymore here and I am seeing this in the log:

Quote
Could not link shaders: Fragment info
-------------
(400) : warning C7506: OpenGL does not define the global function exp
(204) : error C5051: profile does not support conditional returns
(204) : error C5051: profile does not support conditional returns

This video card supports: OpenGL1.1, OpenGL1.2, OpenGL1.3, OpenGL1.4, OpenGL1.5, OpenGL2.0

Have the opengl or video card requirements increased. I am using a relatively old nVidia 7950 GT.


i didn't knew GLSL supported conditional return (on any version).
Ewwwww  :vomit:

Conditional returns are allowed by the GLSL standard, and should also be supported on your card, which should be a fp40 profile (http://http.developer.nvidia.com/Cg/fp40.html)

This profile compiles with no errors on my computer:
Code:
C:\Program Files (x86)\NVIDIA Corporation\Cg\bin>cgc -profile fp40 -oglsl -strict -nocode e:\test2.glsl
e:\test2.glsl
e:\test2.glsl(219) : warning C7011: implicit cast from "int" to "float"
e:\test2.glsl(230) : warning C7011: implicit cast from "int" to "float"
616 lines, 2 warnings, 0 errors.

The warning about the 'exp' function is in particular puzzling. This function was added in version 1.1 of the GLSL spec?

Are you by any chance using old gfx drivers?

It may also be that I've made some kind of code construct which confuses the compiler or catches a bug in it. The current version of Fragmentarium also crashes the ATI compiler on Mac's, which also annoys me. Any help on the Mac issue is appreciated, especially since I can not test this myself.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: blob on January 10, 2012, 12:20:15 AM
The warning about the 'exp' function is in particular puzzling. This function was added in version 1.1 of the GLSL spec?

Are you by any chance using old gfx drivers?

Yeah I am using old drivers as my operating system is Windows ME, they are version 82.something and they seem to be from around 2006. Previous versions of fragmentarium were running fine though, not overly fast but still useable.

Don't worry too much about it.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: blob on January 13, 2012, 08:54:14 AM
After fiddling a bit I found out that I can render many examples by using the DE-Raytracer.frag from version 0.8 and I think I can render all of them by using the Fast-Raytracer.frag so that's pretty cool.  O0

And rendering a 8000x6000 image takes just about 2 minutes on that old GPU, amazing!  :o


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: ker2x on January 13, 2012, 02:34:03 PM
After fiddling a bit I found out that I can render many examples by using the DE-Raytracer.frag from version 0.8 and I think I can render all of them by using the Fast-Raytracer.frag so that's pretty cool.  O0

And rendering a 8000x6000 image takes just about 2 minutes on that old GPU, amazing!  :o

Yup. and on a powerfull gfx card (like GTX470) it's really fun to play with parameters in near-realtime (including DOF, Antialiasing, Reflection, ...) then render a 50MPixel version in 1 or 2mn :)
I'm learning GLSL now that i discovered the impressive render (and speed!) we can do using only Fragment Shader   ;D


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: ker2x on January 13, 2012, 05:57:04 PM
this fractal at 116Mpixel (14508x8388) took less than 20 seconds to render on my laptop (GTX460M)  ;D :

(http://fractals.s3.amazonaws.com/fragmentarium/blue-again-1-small.jpg)


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: bib on January 13, 2012, 06:04:09 PM
this fractal at 116Mpixel (14508x8388) took less than 20 seconds to render on my laptop (GTX460M)  ;D :

This is absolutely mindblowing. I am still so much focused on M3D. How would you qualify the Fragmentarium learning curve coming from M3D? Especially as regards to animations.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: ker2x on January 13, 2012, 07:41:53 PM
this fractal at 116Mpixel (14508x8388) took less than 20 seconds to render on my laptop (GTX460M)  ;D :

This is absolutely mindblowing. I am still so much focused on M3D. How would you qualify the Fragmentarium learning curve coming from M3D? Especially as regards to animations.

i don't know anything about animation in fragmentarium, it probably can't do it right now.
the learning curve is easy, everything is well written/commented GLSL and even if you don't know anything about GLSL you can easily modify/learn it by reading syntopia's blog http://blog.hvidtfeldts.net/ and the exemples.

You can also modify the raymarching engine on the fly (written in GLSL). Fragmentarium itself is a tool to write/compile/run fragment shader, it happen that it's used to do fractals but you could do whatever relatively easily.  ;D



Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Syntopia on January 13, 2012, 09:13:51 PM
Well, Fragmentarium is very much a programmers tool - so the learning curve is steeper than M3D and MB'er, I'm afraid. There is limited support for animations (set 'render mode' to 'animation'), but you have to programmatically base everything on the 'time' variable (no key framing).


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Crist-JRoger on March 10, 2015, 05:16:09 PM
just for joke )
added 4D Quaternion Julia into PseudoKleinian  :D

Code:
#infoTheli-at's Pseudo Kleinian (Scale 1 JuliaBox + Something
#include "MathUtils.frag"
#include "DE-raytracer.frag"

#group 4D Quaternion Julia

uniform int jIterations;  slider[0,16,100]
uniform float jThreshold; slider[0,10,100]
uniform vec4 jC; slider[(-1,-1,-1,-1),(0.18,0.88,0.24,0.16),(1,1,1,1)]
float DE1(vec3 pos) {
vec4 p = vec4(pos, 0.0);
vec4 dp = vec4(1.0, 0.0,0.0,0.0);
for (int i = 0; i < jIterations; i++) {
dp = 2.0* vec4(p.x*dp.x-dot(p.yzw, dp.yzw), p.x*dp.yzw+dp.x*p.yzw+cross(p.yzw, dp.yzw));
p = vec4(p.x*p.x-dot(p.yzw, p.yzw), vec3(2.0*p.x*p.yzw)) + jC;
float p2 = dot(p,p);
orbitTrap = min(orbitTrap, abs(vec4(p.xyz,p2)));
if (p2 > jThreshold) break;
}
float r = length(p);
return  0.5 * r * log(r) / length(dp);
}


#group PseudoKleinian

#define USE_INF_NORM

uniform int MI; slider[0,5,20]

// Bailout
//uniform float Bailout; slider[0,20,1000]

uniform float Size; slider[0,1,2]
uniform vec3 CSize; slider[(0,0,0),(1,1,1),(2,2,2)]
uniform vec3 C; slider[(-2,-2,-2),(0,0,0),(2,2,2)]
uniform float TThickness; slider[0,0.01,2]
uniform float DEoffset; slider[0,0,0.01]
uniform vec3 Offset; slider[(-1,-1,-1),(0,0,0),(1,1,1)]

float RoundBox(vec3 p, vec3 csize, float offset)
{
vec3 di = abs(p) - csize;
float k=max(di.x,max(di.y,di.z));
return abs(k*float(k<0.)+ length(max(di,0.0))-offset);
}


float maxcomp(vec3 a) {
return max(a.x,max(a.y,a.z));
}

float sdToBox( vec3 p, vec3 b )
{
  vec3  di = abs(p) - b;
  float mc = maxcomp(di);
  return min(mc,length(max(di,0.0)));
}

float Thingy(vec3 p, float e){
p-=Offset;
return (abs(length(p.xy)*p.z)-e) / sqrt(dot(p,p)+abs(e));
}

float Thing2(vec3 p){
//Just scale=1 Julia box
float DEfactor=1.;
    vec3 ap=p+1.;
for(int i=0;i<MI && ap!=p;i++){
ap=p;
p=2.*clamp(p, -CSize, CSize)-p;
     
float r2=dot(p,p);
orbitTrap = min(orbitTrap, abs(vec4(p,r2)));
float k=max(Size/r2,1.);

p*=k;DEfactor*=k;
     
p+=C;
orbitTrap = min(orbitTrap, abs(vec4(p,dot(p,p))));
}
//Call basic shape and scale its DE
//return abs(0.5*Thingy(p,TThickness)/DEfactor-DEoffset);

//Alternative shape
//return abs(0.5*RoundBox(p, vec3(1.,1.,1.), 1.0)/DEfactor-DEoffset);
//Just a plane
return abs(0.5*abs((p.z-Offset.z)*DE1(p))/DEfactor-DEoffset);
}

float DE(vec3 p){
return  Thing2(p);//RoundBox(p, CSize, Offset);
}







#preset test
FOV = 0.5
Eye = 2.7293,6.2764,-2.28296
Target = -3.06278,13.1388,-6.68298
Gamma = 0.8654
ToneMapping = 2
Exposure = 1.75533
Brightness = 1
Contrast = 1
Saturation = 1
GaussianWeight = 1
AntiAliasScale = 2
Detail = -3.7
FudgeFactor = 0.7
Dither = 0.86364
NormalBackStep = 1
AO = 0,0,0,0.91489
CamLight = 0.760784,0.870588,1,0.95384
CamLightMin = 1
Glow = 1,1,1,0
GlowMax = 20
BaseColor = 1,1,1
OrbitStrength = 1
X = 0.5,0.6,0.6,0.7
Y = 1,0.6,0,0.59596
Z = 0.8,0.78,1,0.41414
R = 0.4,0.7,1,0.06122
BackgroundColor = 0.313725,0.6,0.541176
GradientBackground = 0.3
CycleColors = false
Cycles = 3.25689
EnableFloor = false
FloorNormal = 0,0,1
FloorHeight = 0
FloorColor = 1,1,1
jIterations = 7
jThreshold = 10
jC = 0.856,1,-1,0.456
MI = 10
Size = 1.03334
CSize = 0.54868,2,2
C = 0,0,0
TThickness = 0
DEoffset = 0
Offset = 0,0,0.26924
Samples = 0
Intensity = 5
Decay = 0.9
ScreenX = 0.5
ScreenY = 0.5
SubframeMax = 10
EquiRectangular = false
FocalPlane = 1.76135
Aperture = 0
DetailAO = -0.67018
MaxRaySteps = 4310
Specular = 0.07143
SpecularExp = 16.176
SpecularMax = 100
SpotLight = 1,0.803922,0.631373,5.4
SpotLightDir = 0.14286,-0.71428
Fog = 0.281
HardShadow = 0.37179 NotLocked
ShadowSoft = 0
Reflection = 0 NotLocked
DebugSun = false
Up = -0.115178,0.105882,0.316753
#endpreset

#preset test1
FOV = 0.5
Eye = 4.74822,7.73998,-3.86969
Target = -4.51354,11.4635,-3.27358
Gamma = 0.8654
ToneMapping = 1
Exposure = 1.75533
Brightness = 1
Contrast = 1
Saturation = 1
GaussianWeight = 1
AntiAliasScale = 2
Detail = -3.7
FudgeFactor = 0.88608
Dither = 0.86364
NormalBackStep = 1
AO = 0,0,0,0.73404
CamLight = 0.760784,0.870588,1,1.6
CamLightMin = 1
Glow = 1,1,1,0.39535
GlowMax = 20
BaseColor = 1,1,1
OrbitStrength = 1
X = 0.5,0.6,0.6,0.7
Y = 1,0.6,0,0.59596
Z = 0.8,0.78,1,0.41414
R = 0.4,0.7,1,0.06122
BackgroundColor = 0.313725,0.6,0.541176
GradientBackground = 0.3
CycleColors = false
Cycles = 3.25689
EnableFloor = false
FloorNormal = 0,0,1
FloorHeight = 0
FloorColor = 1,1,1
jIterations = 7
jThreshold = 9.091
jC = 0.008,-0.104,0.168,1
MI = 10
Size = 1.03334
CSize = 0.54868,2,2
C = 0,0,0
TThickness = 0
DEoffset = 0
Offset = 0,0,0.26924
Samples = 0
Intensity = 5
Decay = 0.9
ScreenX = 0.5
ScreenY = 0.5
SubframeMax = 10
EquiRectangular = false
FocalPlane = 0.328
Aperture = 0.003
DetailAO = -0.67018
MaxRaySteps = 4310
Specular = 0.07143
SpecularExp = 16.176
SpecularMax = 100
SpotLight = 1,0.803922,0.631373,5.4
SpotLightDir = 0.14286,-0.71428
Fog = 0
HardShadow = 0.37179 NotLocked
ShadowSoft = 0
Reflection = 0.2 NotLocked
DebugSun = false
Up = 0.0140523,-0.0214554,0.352351
#endpreset


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: 3dickulus on March 15, 2015, 07:22:58 PM
i don't know anything about animation in fragmentarium, it probably can't do it right now.

I added some "experimental features" to Fragmentarium some time ago, keyframes, parameter morphing, auto focus, and a few other things ;)
you can find descriptions, tutorial frags and executable here -> http://www.fractalforums.com/fragmentarium/cat-mull-rom-spline-paths-cameraparameter-keyframes/
The things I'm looking at next are http://chromium.sourceforge.net/doc/index.html and https://github.com/nigels-com/glfixes/blob/master/gl/specs/ARB/gpu_shader_fp64.txt and the ability to select and move keyframe control points with the mouse :D
My hacked version of Fragmentarium is just a test bed for some ideas that I wanted in this program and thanks to Syntopia's great code they were easy to implement, perhaps not perfect or proper but working, hopefully, someone with better programming skills than mine will consider polishing some of these ideas.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: laser blaster on March 15, 2015, 09:18:43 PM
I'm glad you're putting work into Fragmentarium- keyframes are a big step forward. :) I would like to hep, but I don't have experience with c++ or qt, and working on someone else's code always feels like digging through a rat's nest to me.  :dink:

Lately I've thought of several optimizations that should be able to improve raytracting speed on GPU (or CPU) dramatically. I've begun implementing them in my own program (because they require some CPU-side code to implement), but it would probably be more productive for me to instead learn c++ and qt and work on improving Fragmentarium.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Crist-JRoger on October 21, 2015, 09:04:46 AM
Spend some time playing with pseudo-kleinian fractal and added other scripts into that to see what will be happen. Very interesting effect when i added menger_iterated_20.frag from \Examples\Knighty Collection\Fold_and_cut_polyhedra_examples. For variety of forms i replaced some constant values to sliders. PseudoKleinianMenger_03.frag in attached archive.

(http://pre00.deviantart.net/bd1c/th/pre/f/2015/293/5/8/thicket_by_crist_jroger-d9duhes.jpg) (http://orig11.deviantart.net/86eb/f/2015/293/5/8/thicket_by_crist_jroger-d9duhes.jpg)


(http://orig05.deviantart.net/35c8/f/2015/289/5/4/double_by_crist_jroger-d9d96wg.jpg) (http://orig05.deviantart.net/35c8/f/2015/289/5/4/double_by_crist_jroger-d9d96wg.jpg)


(http://orig07.deviantart.net/407f/f/2015/289/d/e/foggy_and_cloudy_by_crist_jroger-d9d972d.jpg) (http://orig07.deviantart.net/407f/f/2015/289/d/e/foggy_and_cloudy_by_crist_jroger-d9d972d.jpg)


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Patryk Kizny on October 21, 2015, 07:41:31 PM
Very cool results!
What raytracer did you render it with?


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Crist-JRoger on October 21, 2015, 08:59:13 PM
Thank you! I use DE-Kn2, but i added more options for regulate AO, shadows, bloom. So I deleted all "extra" code like two shadows, and deleted all "#defines" because I dont like it, I replaysed it to checkboxes  :dink: That's all i can in programming  :D


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: SCORPION on October 22, 2015, 12:49:24 AM
Сергей, ну ты вообще молодец!
Супер!
Я бросил GLSL и фрагментариум год назад, да думаю вернуться, чёт как то всё остальное не очень то....
Ты как, не против где ни будь подытожить и перетереть наработки за год, которые я пропустил?
Твои наработки по накладыванию текстуры - дисплейса ичень интересны, Патриковы трейсеры надо посмотреть.
Ты вроде удачно доработал один? Жалко, что Патрик переметнулся на сунтэкплис или как его там...
Кстати, у тебя сохраняется картинка в формате .exr?
У меня нет - фраг ошибку выдаёт.


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: 3dickulus on October 22, 2015, 03:01:20 AM
@SCORPION Формат OpenEXR используется только при сохранении изображений из меню "Render->High Resolution and Animation" Окно вывода диалога и 2DSampler загрузки текстур. Снимки экрана и просмотр оказывает только форматы Qt. Если вы можете дать мне немного больше информации о точно, что вы делаете, я мог бы помочь ...


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Crist-JRoger on October 22, 2015, 07:45:15 AM
Владимир, без проблем, давай на Деми. А то народ начнёт переводить наши рассказы и запутается.
.exr сохраняется, но я новый фраг не юзаю - там границы ползунков "заморожены" это очень напрягает  :)

3dickulus, чувак ты знаешь русский???


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: 3dickulus on October 22, 2015, 03:20:45 PM
not Russian, Googlian, just trying to be helpful ;)


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Crist-JRoger on October 24, 2015, 09:52:50 PM
terrain as surface in PseudoKleinianMenger_03

(http://pre14.deviantart.net/d9c1/th/pre/f/2015/297/0/e/lost_planet_by_crist_jroger-d9e844h.jpg) (http://orig11.deviantart.net/ada0/f/2015/297/0/e/lost_planet_by_crist_jroger-d9e844h.jpg)


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Patryk Kizny on October 27, 2015, 07:13:50 PM
And a receipe?


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Crist-JRoger on October 29, 2015, 08:43:44 AM
And a receipe?
It`s a merge of two fractals with min function. Need to include Terrain code into own script, rename marching variables, rename main DE function in DE1 or other, rename DE in terrain to DE2 or other. And than
Code:
float DE(vec3 p){
return min(DE1(p), DE2(p));
}



Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Patryk Kizny on October 29, 2015, 11:33:43 AM
So which formulas exactly you merged? Pseudo Kleinian and Menger?


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Crist-JRoger on October 29, 2015, 08:57:02 PM
Yes, but this not the end. Kleinian and Menger merged like this \Examples\Knighty Collection\PseudoKleinianMenger.frag - i just used other Menger`s formula (\Knighty Collection\Fold_and_cut_polyhedra_examples\menger_iterated_20.frag)
After that result merged with Terrain.frag  :dink:


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Crist-JRoger on November 08, 2015, 08:14:09 AM
Another parameters from fractal i called PseudoKleinianMenger_03

(http://pre02.deviantart.net/fb5b/th/pre/f/2015/311/5/f/the_lake__fractal__by_crist_jroger-d9fspo2.jpg) (http://orig05.deviantart.net/9a6b/f/2015/311/5/f/the_lake__fractal__by_crist_jroger-d9fspo2.jpg)


(http://pre02.deviantart.net/c4d9/th/pre/f/2015/311/b/3/silent_forest_by_crist_jroger-d9ftrra.jpg) (http://orig02.deviantart.net/90f5/f/2015/311/b/3/silent_forest_by_crist_jroger-d9ftrra.jpg)


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: 3dickulus on November 08, 2015, 09:04:09 AM
 :thumbsup1:


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: cKleinhuis on November 08, 2015, 12:44:06 PM
huh, dude, that looks fantastic, the depth of field comes out fantastic, now how do i create a 2160p version of that ??? :D


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: LMarkoya on November 08, 2015, 01:17:58 PM
Beautiful result, need to look into this seriously


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Crist-JRoger on November 08, 2015, 02:26:16 PM
huh, dude, that looks fantastic, the depth of field comes out fantastic, now how do i create a 2160p version of that ??? :D
Thank you! But not as good as we would like... It's about cloud bugs, you can see that on second render when open image in fullsize. I posted this problem here http://www.fractalforums.com/index.php?topic=20680.msg88473#msg88473
2160p? I don't know your hardware, but i think there is no problem ) My videocard can make not more than 100Mpixels  :)


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: 3dickulus on November 08, 2015, 07:26:55 PM
how do i create a 2160p version of that ??? :D

Fragmentarium does tiled render to exr format = no size restrictions ;)


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Patryk Kizny on November 08, 2015, 08:09:02 PM
These last renders look so decent!


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Crist-JRoger on April 20, 2016, 07:10:26 PM
radeon hd7850 fullscreen render, PseudoKleinianMenger_03.frag
(http://pre06.deviantart.net/71e4/th/pre/f/2016/107/7/9/glass_cave_by_crist_jroger-d9zbdjx.jpg) (http://orig01.deviantart.net/f587/f/2016/107/7/9/glass_cave_by_crist_jroger-d9zbdjx.jpg)


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Pauldelbrot on April 20, 2016, 08:09:20 PM
:thumbsup1:


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Crist-JRoger on June 20, 2016, 07:41:48 AM
Another params of PseudoKleinianMenger_03.frag, fractals on vacation  :surf:
Rendered in window mode on AMD GPU, used virtual super resolution feature.

(http://pre12.deviantart.net/eb0d/th/pre/f/2016/171/7/1/summer__sea__sun_by_crist_jroger-da71cq0.png)


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Max Sinister on June 20, 2016, 09:51:28 PM
Your pictures look great, I especially liked those.

How did you create them? One of them looks somewhat like Apollonian circles, but I'm not sure about the other one.

Another parameters from fractal i called PseudoKleinianMenger_03

(http://pre02.deviantart.net/fb5b/th/pre/f/2015/311/5/f/the_lake__fractal__by_crist_jroger-d9fspo2.jpg) (http://orig05.deviantart.net/9a6b/f/2015/311/5/f/the_lake__fractal__by_crist_jroger-d9fspo2.jpg)


(http://pre02.deviantart.net/c4d9/th/pre/f/2015/311/b/3/silent_forest_by_crist_jroger-d9ftrra.jpg) (http://orig02.deviantart.net/90f5/f/2015/311/b/3/silent_forest_by_crist_jroger-d9ftrra.jpg)


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Crist-JRoger on June 21, 2016, 08:17:12 AM
Your pictures look great, I especially liked those.

How did you create them? One of them looks somewhat like Apollonian circles, but I'm not sure about the other one.

Here (http://orig15.deviantart.net/715f/f/2016/172/9/5/01_by_crist_jroger-da72na9.jpg) I done progress of work:
1. "clear" fractal, ambient light +  ambient occlusion
2. fog
3. water surface
4. direct light + reflexions
5. changed direction of light,  changed camera FOV, more distance of view, more datails
6. texture
7. volumetric light
8. tonemapping
9. DoF and bokeh
10. Bloom


Geometry of this fractal was found in process of educated guess method  ;D By merging Pseudo-Kleinian fractal with Menger (Fold and cut polyhedra by Knighty)
I don't know what means Apollonian circles  :dink:


Title: Re: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.
Post by: Max Sinister on June 21, 2016, 11:27:30 PM
Of course - I mixed up inverted circles and the Apollonian gasket.