|
OpenCL RayTraced Quaternion JuliaHi! From this site: http://www.gamedev.net/community/forums/topic.asp?topic_id=553643 I went to this other http://www.cs.caltech.edu/~keenan/project_qjulia.html where I found this http://developer.apple.com/mac/library/samplecode/OpenCL_RayTraced_Quate... Compile the aplication, its a nice OpenCL RayTraced Quaternion Julia-Set. In Keenan Crane's web site says there is the open GL Code can be ported to any other lenguage. Is it possible to take the code GLSL in QC? Don't miss this site eather http://frictionalgames.blogspot.com/2009/11/fractional-fun.html and watch some videos! cheers!
|
Hiya,
I did a GLSL port of Keenan's Julia renderer a while back, in fact. http://machinesdontcare.wordpress.com/2008/05/01/quaternion-julia/
I'll share the QTZ if you're interested.
a|x
I've seen the quarternion julia raytraced in glsl before, so yes (check out IQ's blog: http://www.iquilezles.org/www/articles/juliasets3d/juliasets3d.htm ).
But anyway, how about we get the mandelbulb running in QC instead? IQ made a not-realtime-but-interactive-speed version, another guy has done it with voxels in realtime:
http://www.icare3d.org/blog_techno/gpu/gigabroccoli_the_mandelbulb_into_...
Sure I am interested! :D
How come the apple app is in real time and in QC isn't?
The last link @ the first post you can find a mandelbulb app http://unbirthgame.com/MathFuncRenderer-Mac.zip but it requires OpenAL 'Audio open cl' http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx I found broken package so I can't use it, if some one can use it, let me know!!
Thank's!
Yeah, it's extremely low quality though judging by the video. And it's slow in higher quality. Besides, how do we apply our own effect chains to it? :)
Here you go. It's not very fast though...
a|x
Great stuff! Runs pretty realtime here too, so long as the window's not too big. No major slowdown with shadows too :)
It's lacking a way to rotate the object though - any ideas? :)
Yeah, it stubbornly resists any Trackball manipulation for a start of, the only means of rotation is through the orbit axis and in effect all else is like a 2D canvas, with which one can produce interactive results , x, y position.
if you could get the modelview matrix and pass that in somehow you could get it to 'obey' the trackball patch.
Ah.. I think this might be an early version. It took me ages to work out how to rotate the thing. I eventually did it by creating my own custom rotation matrix in JavaScript, then passing that in as 4x vec4s (or 16 floats). I will try and find the later version later today. Having said that, isn't there a Kineme GL Tools patch to fetch the gl_ModelViewMatrix? Or I might be imagining it...
Either way, you still need to pass a 4x4 rotation matrix into the GLSL shader to rotate the texture coords and camera position in the Vertex Shader.
a|x
You need to change the splitter 360 to 1, a full rotation range is from 0 to 1. :D
You're right about the ranges there. There's something definitely weird about the rotation, though. I've just had a look at it, and there's definitely something not right there. It actually looks quite interesting, having said that. It kinda turns itself inside-out as you rotate it.
I think I failed to notice before, because on my old laptop, it was taking several seconds to render each frame, so I didn't really get a feel for how the controls worked at the time.
I'll have to have another look when I get a chance (don't have time right now, sadly).
a|x
That's because the actual geometry that the the Julia set is rendered into is a simple 2D GLSL Grid. To rotate the set, you have to manipulate the texture coordinates in the GLSL Vertex Shader.
a|x