I have noticed that OpenCL4Java is on version 1.4beta by now and that my examples were crashing when running on a GPU device. Today i took the time to do something about it. I have downloaded the new version and have updated the examples to run with 1.4beta. Everything seems to work just fine now, if you have a different opinion, please do let me know.
Since Star Wars(tm) (so i’ve read), texture-based techniques have been used to improve the detail on planar and easily curved surfaces. The one i’m talking about here is called Greebles. Apply an heightmap texture on a surface and on a per-pixel basis, geometry is generated acoording to the pixel’s intensity. By doing it you get more detailed surfaces without having to model every little part by yourself, making things more interesting, realistic and much more appealing.
To achieve this i’ve picked Vertex Texture Fetch. It allows you to access texture data on the vertex shader. Pass a texture to the vertex shader and offset the surface vertices by the pixel’s intensity. To improve the looks, bump-mapping with multiple lights have been used. Everything presented here is generated on the GPU, even the objects. Runs nicely on a Nvidia 8200M. Lots of space for improvement.
I have played with 3d stereoscopic in the past but never got to make someting good. This is still not the time sorry, but… i think its worth the post and the time. So what do we have here ?
The technique used is called ‘off-axis frustum’ a.k.a the “right way”, courtesy of Paul Bourke. If you want to read more about it you should pay a visit to his website.
2 images are rendered from 2 different point of views, creating two images with some little differences between them. The off-axis frustum means the point of view might not lie on the perpendicular line to the ‘view-area’. These 2 images are then sent to a simple shader that takes the R channel from the left-eye buffer, the GB channels from the right-eye buffer and then mixes it into a single stereo image. This is the color glasses compositing method, but it sure is possible to just send both images down the two adapters of your videocard and get the same 3d feeling (with colors) using an Head-Mounted Display or a multi-projector system of some kind.
After releasing Deep’s source code, i thought to myself i could also release an old production of mine, Sunflower.
Sunflower is a visual non-interactive application a.k.a. demo, feat. music from Four Tet.
Deep is a demo created by me and Filipe “ps” Cruz. Following it’s subtle success and a few requests, i thought it would be useful to make it’s source code public. Hope you enjoy it, and make sure you watch the demo.
It should be easy to get it rolling, but if you get problems, read the “readme.txt” file and make sure you have installed the dependencies. Once that is done, open the project and run it. Don’t forget to let me know if you liked it. Have fun.