Hi I am attempting to create a ripple effect (for every hit of a kick drum) on a plane that is going to display an image. Currently I am using a grid sop with a GLSL mat on the geometry comp to distort the grid. I found the code for the frag and vert shaders and notice that it only supports an ambient light which is not producing shadows or specular highlights. Could anyone suggest a way or point me in the right direction? Below is the project.
Actually I would prefer to use a GLSL TOP so I don’t have to render in 3d because I want to apply this effect to my final output (or close to). Would it be possible with a GLSL top?
Also I am getting an error on my render TOP stating that it cannot find the camera comp although there is one and it is working.
thanks
Keith
kick ripple.toe (6.69 KB)
There are bound to be some ripple-y/wave-y fragment shaders around that you could adapt to a GLSL top over you final image. Maybe Markus’s wave comp is a place to start?
[url]Wave Shader - Shared .tox Components - TouchDesigner forum
I think there are even simpler ones around, perhaps you could adapt something from the shadertoy port taht Vincent did:
[url]Mighty awesome GLSL shaders collection not by me - Techniques - TouchDesigner forum
For the shadows, you would have to do something trickier with a fragment shader to get a shadow effect on the flat image. I’m not positive how it is done if you’re using a deforming shader, but you may be able to create a shadow map on a non-ambient light that is placed somewhere off center from the surface.
As for the camera bit, I have been noticing that too, seems like a minor bug in the newer builds.
Thanks archo-p I’ll check out those two examples. Right now I’m doing GLSL tutorial to become more familiar with GLSL.
cheers
Keith
Another good way to see how things are done in Touch is use the Output Shader feature on the Phong MAT. You can see how shadow mapping is done if you output a shader from a shadow setup.
thanks for the tip Malcolm, I got it. I didn’t realize it is possible to export a phong mat to GLSL mat. I just exported the shader to GLSL then modified the vertex shader to displace the vertices based on the height texture. If you have time to look at the code and have any suggestions I would be stoked.
cheers
Keith
kick ripple.toe (11.1 KB)