Logo by dainbramage - Contribute your own Logo!

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

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

this forum will stay online for reference
News: Visit the official fractalforums.com Youtube Channel
 
*
Welcome, Guest. Please login or register. March 29, 2024, 01:46:10 PM


Login with username, password and session length


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


Pages: [1] 2 3 4   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: Realtime rendering on GPU  (Read 36168 times)
0 Members and 3 Guests are viewing this topic.
alexl
Safarist
******
Posts: 91


WWW
« on: May 04, 2011, 04:53:09 AM »

Basically I work in the area of generative art. I use the GPU for realtime rendering and very rarely use fractals, they struck me as pretty boring. But two weeks ago I found information about mandelbox... Wow!  I think it is a very interesting approach... So I applied this algorithm in my existing engine and .. look at the result:



The speed is not too impressive - about 7fps on 1920x1080 GTX480 but I'm waiting for a new generation of videocards.

www.sanbasestudio.com
Logged

ker2x
Fractal Molossus
**
Posts: 795


WWW
« Reply #1 on: May 04, 2011, 05:05:05 PM »

7 fps is slow ?  shocked
Logged

often times... there are other approaches which are kinda crappy until you put them in the context of parallel machines
(en) http://www.blog-gpgpu.com/ , (fr) http://www.keru.org/ ,
Sysadmin & DBA @ http://www.over-blog.com/
alexl
Safarist
******
Posts: 91


WWW
« Reply #2 on: May 05, 2011, 02:36:08 AM »

7 fps is slow ?  shocked

Yes, I want to have 30fps smiley

This is demo:
<a href="http://www.youtube.com/v/z18omLWzChE&rel=1&fs=1&hd=1" target="_blank">http://www.youtube.com/v/z18omLWzChE&rel=1&fs=1&hd=1</a>
Logged

Lee Oliver
Fractal Fanatic
****
Posts: 314



« Reply #3 on: May 05, 2011, 02:37:27 AM »

This looks promising, keep us posted on any new developments smiley
Logged

Kalo’smi lokaksayakrt-pravrddho
Lokan smahartum-iha pravrttah|

rte’pi twam na bhavisyanti sarve
ye’vasthitah pratyanikesu yodhah
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #4 on: May 05, 2011, 02:53:58 AM »

7 fps is slow ?  shocked

Depends on the context, but for smooth animation in realtime around 25fps is a generally accepted minimum, though a lot of games in the past used to get away with as low as 10fps and IMHO anything less than that is not "realtime" but just "interactive" smiley
Logged

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

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
alexl
Safarist
******
Posts: 91


WWW
« Reply #5 on: May 10, 2011, 06:13:10 PM »

Several images:


Space Yard.


Seems a lot of construction here smiley


I don't know what it is. Just nice.


It's kind of cave...


Ropes or vines.


It looks like a bark


And the latest one: something in the style of Monet

All these screenshots were taken within one hour. I used the same formula with different parameters (I change them manually).
Speed: 12fps on 1920x1080 (GTX480)


Logged

Syntopia
Fractal Molossus
**
Posts: 681



syntopiadk
WWW
« Reply #6 on: May 11, 2011, 11:07:54 PM »

Very nice images - I like the final one in particular.
Logged
cbuchner1
Fractal Phenom
******
Posts: 443


« Reply #7 on: May 12, 2011, 08:32:49 PM »



These are beautiful!!!
Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #8 on: May 12, 2011, 08:48:47 PM »


All these screenshots were taken within one hour. I used the same formula with different parameters (I change them manually).
Speed: 12fps on 1920x1080 (GTX480)


Excellent work ! Any chance of releasing the binary ? (or even the source wink

I have an awful lot of catching up to do with respect to 3D hardware, I'm working on it though.
At the moment I'm just trying a combined diamond-square/perlin noise algorithm in the hope that once I've got it fast enough simply rendering in 2D to a texture I can then use an adapted form of DE to give a realtime 3D landscape renderer without any polygons at all, though if that's asking a little too much I could easily convert to using a multi-resolution mesh method instead wink
Am still working on the design for the initial format of a UF-like GPU program - I'm deliberately sticking to a format that will work on iPad/iPhone (and other mobile devices if anyone wants to convert from iOS) as well as OSX (and Win7/Linux if anyone wants to convert).
Logged

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

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
eiffie
Guest
« Reply #9 on: May 13, 2011, 06:56:14 PM »

I would be happy to get 12 of those frames per minute on my GPU. And I second the call for at least releasing a section of the pixel shader - like maybe the occlusion and lighting?? Great stuff anyways.
Logged
alexl
Safarist
******
Posts: 91


WWW
« Reply #10 on: May 14, 2011, 12:51:01 AM »

Any chance of releasing the binary ? (or even the source wink

Unfortunatelly it requires VERY powerfull system...
take a look: http://www.sanbasestudio.com/system.html

I can show the formula (first image):

vec4 sphere(vec4 z)
{
   float r2 = dot(z.xyz,z.xyz);
   if(r2<2.0)
      z*=(1.0/r2);
   else   z*=0.5;

   return z;

}
vec3 box(vec3 z)
{
   return clamp(z, -1.0, 1.0) * 2.0 - z;
}

float DE0(vec3 pos)
{
   vec3 z=pos-from;
   float r=dot(pos-from,pos-from)*pow(length(z),2.0);
   return (1.0-smoothstep(0.0,0.01,r))*0.01;
}

float DE2(vec3 pos)
{

   vec4 scale = -20*0.272321;
     vec4 p = vec4(pos,1.0), p0 = p;  
   vec4 c=vec4(param[31].w,param[32].w,param[33].w,0.5)-0.5; // param = 0..1

     for (float i=0;i<10; i++)
   {
      p.xyz=box(p.xyz);
      p=sphere(p);
      p=p*scale+c;
     }

   return length(p.xyz)/p.w;
}

float DE(vec3 pos)
{

   float d0=DE0(pos);   
   float d2=DE2(pos);

   return max(d0,d2);
}

 
Record:
  <a href="http://www.youtube.com/v/RSjWB21PJfs&rel=1&fs=1&hd=1" target="_blank">http://www.youtube.com/v/RSjWB21PJfs&rel=1&fs=1&hd=1</a>


Concerning:
give a realtime 3D landscape renderer without any polygons at all

Take a look at some of my works:

<a href="http://www.youtube.com/v/lkTJL7PZdNY&rel=1&fs=1&hd=1" target="_blank">http://www.youtube.com/v/lkTJL7PZdNY&rel=1&fs=1&hd=1</a>

<a href="http://www.youtube.com/v/M-zxQ7tFncU&rel=1&fs=1&hd=1" target="_blank">http://www.youtube.com/v/M-zxQ7tFncU&rel=1&fs=1&hd=1</a>

<a href="http://www.youtube.com/v/F7LE7W3n5BI&rel=1&fs=1&hd=1" target="_blank">http://www.youtube.com/v/F7LE7W3n5BI&rel=1&fs=1&hd=1</a>

« Last Edit: May 14, 2011, 01:30:11 AM by alexl » Logged

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



Makin' Magic Fractals
WWW
« Reply #11 on: May 14, 2011, 03:56:13 AM »

Any chance of releasing the binary ? (or even the source wink

Unfortunatelly it requires VERY powerfull system...
take a look: http://www.sanbasestudio.com/system.html


Well I have a new MacPro with dual 2.66GHz 6-core Westmeres and an ATI Radeon HD 5870 smiley
CPU (Ultra Fractal) benchmarks here:

http://www.shadoworld.co.uk/UF5/Benchmark/Benchmark%20results.htm

However I'm hoping to get at least "interactive" speeds (say 5 to 10 fps) for my 3D fractal shader 2 rendering on the iPad and iPhone - not including all the bells and whistles with respect to lighting of course wink


Logged

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

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #12 on: May 14, 2011, 04:04:32 AM »



I can show the formula (first image):

vec4 sphere(vec4 z)
{
   float r2 = dot(z.xyz,z.xyz);
   if(r2<2.0)
      z*=(1.0/r2);
   else   z*=0.5;

   return z;

}
vec3 box(vec3 z)
{
   return clamp(z, -1.0, 1.0) * 2.0 - z;
}

float DE0(vec3 pos)
{
   vec3 z=pos-from;
   float r=dot(pos-from,pos-from)*pow(length(z),2.0);
   return (1.0-smoothstep(0.0,0.01,r))*0.01;
}

float DE2(vec3 pos)
{

   vec4 scale = -20*0.272321;
     vec4 p = vec4(pos,1.0), p0 = p;  
   vec4 c=vec4(param[31].w,param[32].w,param[33].w,0.5)-0.5; // param = 0..1

     for (float i=0;i<10; i++)
   {
      p.xyz=box(p.xyz);
      p=sphere(p);
      p=p*scale+c;
     }

   return length(p.xyz)/p.w;
}

float DE(vec3 pos)
{

   float d0=DE0(pos);   
   float d2=DE2(pos);

   return max(d0,d2);
}


OK, I'm new to shader code but so far I've found nothing to indicate that the OpenCL compilers do auto-inlining - am I missing something ?
Logged

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

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



syntopiadk
WWW
« Reply #13 on: May 14, 2011, 08:29:57 AM »

OK, I'm new to shader code but so far I've found nothing to indicate that the OpenCL compilers do auto-inlining - am I missing something ?

I think the code is GLSL (given the 'vec3' type). GLSL compilers will do agressive inlining and loop unrolling, so there is no need to do this manually. It is possible to get the GPU assembly using Nvidia’s Cg SDK, if you want to check the compiler output. I am guessing OpenCL will perform the same kind of optimizations.
Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #14 on: May 14, 2011, 12:12:14 PM »

OK, I'm new to shader code but so far I've found nothing to indicate that the OpenCL compilers do auto-inlining - am I missing something ?

I think the code is GLSL (given the 'vec3' type). GLSL compilers will do agressive inlining and loop unrolling, so there is no need to do this manually. It is possible to get the GPU assembly using Nvidia’s Cg SDK, if you want to check the compiler output. I am guessing OpenCL will perform the same kind of optimizations.


Thanks, given that info I will be doing a test shader fragment to check if inlining is done automatically on the devices I'm interested in (and to what extent) - to be honest I never even trust the documentation with respect to this sort of thing because it's often out of date or even completely wrong - in the past that even goes for documentation from Intel, and for many others it's nothing unusual wink
Logged

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

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
Pages: [1] 2 3 4   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Realtime rendering/optimisations Mandelbulb Implementation « 1 2 » Enforcer 15 18148 Last post October 04, 2010, 09:27:41 AM
by keldor314
realtime rendering with gl shader Movies Showcase (Rate My Movie) sleeplessmonk 2 1925 Last post October 12, 2014, 09:04:47 PM
by SeryZone
Mandelbulb in 3d realtime for VR The 3D Mandelbulb Chillheimer 0 4817 Last post January 08, 2016, 06:40:38 PM
by Chillheimer
GeoKone.NET :: Realtime Recursive Geometry Generator Multi Platform inDigiNeous 4 10239 Last post April 24, 2016, 08:29:56 AM
by inDigiNeous
3D Fractal Realtime Rendering Fractal Programs okankoese 1 6476 Last post November 19, 2017, 08:05:06 PM
by knighty

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.388 seconds with 27 queries. (Pretty URLs adds 0.015s, 2q)