alexl
|
 |
« 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
|
 |
« Reply #1 on: May 04, 2011, 05:05:05 PM » |
|
7 fps is slow ? 
|
|
|
Logged
|
|
|
|
|
Lee Oliver
|
 |
« Reply #3 on: May 05, 2011, 02:37:27 AM » |
|
This looks promising, keep us posted on any new developments 
|
|
|
Logged
|
Kalo’smi lokaksayakrt-pravrddho Lokan smahartum-iha pravrttah|
rte’pi twam na bhavisyanti sarve ye’vasthitah pratyanikesu yodhah
|
|
|
David Makin
|
 |
« Reply #4 on: May 05, 2011, 02:53:58 AM » |
|
7 fps is slow ?  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" 
|
|
|
Logged
|
|
|
|
alexl
|
 |
« Reply #5 on: May 10, 2011, 06:13:10 PM » |
|
Several images:  Space Yard.  Seems a lot of construction here   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
|
 |
« Reply #6 on: May 11, 2011, 11:07:54 PM » |
|
Very nice images - I like the final one in particular.
|
|
|
Logged
|
|
|
|
cbuchner1
|
 |
« Reply #7 on: May 12, 2011, 08:32:49 PM » |
|
 These are beautiful!!!
|
|
|
Logged
|
|
|
|
David Makin
|
 |
« 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  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  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
|
|
|
|
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
|
 |
« Reply #10 on: May 14, 2011, 12:51:01 AM » |
|
Any chance of releasing the binary ? (or even the source  Unfortunatelly it requires VERY powerfull system... take a look: http://www.sanbasestudio.com/system.htmlI 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:
http://www.youtube.com/v/RSjWB21PJfs&rel=1&fs=1&hd=1Concerning: give a realtime 3D landscape renderer without any polygons at all Take a look at some of my works:
http://www.youtube.com/v/lkTJL7PZdNY&rel=1&fs=1&hd=1
http://www.youtube.com/v/M-zxQ7tFncU&rel=1&fs=1&hd=1
http://www.youtube.com/v/F7LE7W3n5BI&rel=1&fs=1&hd=1
|
|
« Last Edit: May 14, 2011, 01:30:11 AM by alexl »
|
Logged
|
|
|
|
David Makin
|
 |
« Reply #11 on: May 14, 2011, 03:56:13 AM » |
|
Well I have a new MacPro with dual 2.66GHz 6-core Westmeres and an ATI Radeon HD 5870  CPU (Ultra Fractal) benchmarks here: http://www.shadoworld.co.uk/UF5/Benchmark/Benchmark%20results.htmHowever 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 
|
|
|
Logged
|
|
|
|
David Makin
|
 |
« 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
|
|
|
|
Syntopia
|
 |
« 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
|
 |
« 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 
|
|
|
Logged
|
|
|
|
|