More
See all Show me
23. GLSL Webcam Ripples
9 months ago
18. OpenFrameworks - Vertex noise + Depth of Field
1 year ago
12. Processing - Grow Study
2 years ago
9. the nerd side of life
2 years 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.

Credits

17 Likes

  • Rui Madeira plus 1 year ago
    hi. this is really nice!

    would you mind explaining briefly how did you manage to make the noise wrap seamlessly?

    and thanks for those links. very cool stuff :)
  • moka 1 year ago
    well what I did is that I created a simple rect perlin noise texture which changes every frame. Afterwards I applied the algorythm described at the bottom here:
    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.
  • Rui Madeira plus 1 year ago
    thanks. the stuff about map correcting the texture is really interesting. i was just recently making experiments with texture mapping a sphere so this will be very useful.

    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?
  • moka 1 year ago
    no I averaged them. I also tried the method you said for some direct tileable noise. But thats slower because it needs 4 noise calls for each pixel and not only one. Since my texture is only for dissortion its not really important how it looks like :).
  •  
  • Rui Madeira plus 1 year ago
    great! thanks for all the info :)
  •  
This conversation is missing your voice. Take five seconds to join Vimeo or log in.

Advertisement

2 Related collections

Photos

Statistics

  •  
    plays
    likes
    comments
  • Total
    plays 831
    likes 17
    comments 5
  • Dec 2nd
    plays 4
    likes 0
    comments 0
  • Dec 1st
    plays 6
    likes 0
    comments 0
  • Nov 30th
    plays 13
    likes 2
    comments 0
  • Nov 29th
    plays 6
    likes 0
    comments 0
  • Nov 28th
    plays 12
    likes 0
    comments 0
  • Nov 27th
    plays 6
    likes 0
    comments 0
  • Nov 26th
    plays 2
    likes 0
    comments 0
  • Nov 25th
    plays 1
    likes 0
    comments 0
Previous Week

Downloads

Please join Vimeo or log in to download the original file. It only takes a few seconds.