Logo by Cyclops - Contribute your own Logo!

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

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

this forum will stay online for reference
News: Visit us on facebook
 
*
Welcome, Guest. Please login or register. March 29, 2024, 10:12:10 AM


Login with username, password and session length


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


Pages: 1 2 [3] 4 5 ... 9   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Fragmentarium - an IDE for exploring 3D fractals and other systems on the GPU.  (Read 51051 times)
0 Members and 1 Guest are viewing this topic.
Syntopia
Fractal Molossus
**
Posts: 681



syntopiadk
WWW
« Reply #30 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:





Logged
marius
Fractal Lover
**
Posts: 206


« Reply #31 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!)
<a href="http://www.youtube.com/v/MZRZ7KNsx9U&rel=1&fs=1&hd=1" target="_blank">http://www.youtube.com/v/MZRZ7KNsx9U&rel=1&fs=1&hd=1</a>
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
Logged
Syntopia
Fractal Molossus
**
Posts: 681



syntopiadk
WWW
« Reply #32 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 :-)
Logged
marius
Fractal Lover
**
Posts: 206


« Reply #33 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.
Logged
knighty
Fractal Iambus
***
Posts: 819


« Reply #34 on: May 19, 2011, 09:45:43 PM »

Nice renders and video! Thank you!
@marius: could you send a video without anaglyph? smiley
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 (actually , only the vertex shader). Hope you will find it useful.
Logged
marius
Fractal Lover
**
Posts: 206


« Reply #35 on: May 20, 2011, 01:12:18 AM »

Nice renders and video! Thank you!
@marius: could you send a video without anaglyph? smiley

@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.
Logged
knighty
Fractal Iambus
***
Posts: 819


« Reply #36 on: May 20, 2011, 04:19:07 PM »

Ah! Thanks! Amazing... Repeating Zooming Self-Silimilar Thumb Up, by Craig
Logged
visual.bermarte
Fractal Fertilizer
*****
Posts: 355



« Reply #37 on: June 04, 2011, 03:33:19 AM »

Menger.Rotors
WATCH OUT, LOUD SOUND

<a href="http://www.youtube.com/v/nxOzSZMAUYE&rel=1&fs=1&hd=1" target="_blank">http://www.youtube.com/v/nxOzSZMAUYE&rel=1&fs=1&hd=1</a>
« Last Edit: June 04, 2011, 05:23:56 AM by visual, Reason: turn off the volume! » Logged
tomot
Iterator
*
Posts: 179


WWW
« Reply #38 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
Logged
Syntopia
Fractal Molossus
**
Posts: 681



syntopiadk
WWW
« Reply #39 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/
Logged
Feline
Alien
***
Posts: 29


« Reply #40 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 smiley -- 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?
Logged
Syntopia
Fractal Molossus
**
Posts: 681



syntopiadk
WWW
« Reply #41 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).
Logged
visual.bermarte
Fractal Fertilizer
*****
Posts: 355



« Reply #42 on: July 12, 2011, 09:38:37 AM »

thanx 2 Kali and 2 Jesse  smiley
Logged
visual.bermarte
Fractal Fertilizer
*****
Posts: 355



« Reply #43 on: July 24, 2011, 01:25:48 AM »



« Last Edit: July 26, 2011, 11:12:04 AM by visual » Logged
darkbrain
Forums Newbie
*
Posts: 2


« Reply #44 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
Logged
Pages: 1 2 [3] 4 5 ... 9   Go Down
  Print  
 
Jump to:  


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

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