
OpenFrameworks - Vertex noise + Depth of Field
1 year ago
This is is a recent technical study. it's basically some vertex noise applied to a sphere. I wanted to create the dissortion using texture lookups. I placed the texture 3 times in the top-left to show that it's horizontally tileable (but not vertically to save performance). Thats necessary to make sure that there are no hard edges in the dissortion. The sphere itself is procedurally textured with a simple stripe pattern.
The DoF effect is based upon Angelo "Encelo" Theodorou GLSL implementation of the algorithm discribed here:
ati.amd.com/developer/shaderx/ShaderX2_Real-TimeDepthOfFieldSimulation.pdf
You can download his shaders here:
encelo.netsons.org/programming/opengl
I modified some parts to fit my purposes. In this example I kept the focal range really small. I guess its not the best way to present a Dof on only one dissorted sphere. But I think both effects put together are quite interesting.
The DoF effect is based upon Angelo "Encelo" Theodorou GLSL implementation of the algorithm discribed here:
ati.amd.com/developer/shaderx/ShaderX2_Real-TimeDepthOfFieldSimulation.pdf
You can download his shaders here:
encelo.netsons.org/programming/opengl
I modified some parts to fit my purposes. In this example I kept the focal range really small. I guess its not the best way to present a Dof on only one dissorted sphere. But I think both effects put together are quite interesting.
-
Vimeo: About / Blog / Developers / Jobs / Community Guidelines / Community Forums / Help Center / Site Map / Merchandise
/ Get Vimeo




Previous Week
would you mind explaining briefly how did you manage to make the noise wrap seamlessly?
and thanks for those links. very cool stuff :)
local.wasp.uwa.edu.au/~pbourke/texture_colour/spheremap/
to dissort the texture so that it wraps around the sphere without any dissortions at the poles. Last but not least I blended pixels from the right to the left of the texture to make it horizontally tileable. It's actually the bottleneck of that technique since I think the way I generate the texture is where I can improve most on the performance. I was a little bit lazy though. this still runs easily with 60 fps.
about the tileable noise, i remember seeing somewhere online about a special perlin noise algorithm that could make wrappable noise so that you could make a seamless transition between the values at one end to the values at the other end. but if i understand correctly you just made sort of an average of the pixels at both ends to make them tileable? or did you use a special noise?