Dynamic "Effects," Like in Photoshop, but Dynamic

edited November 2013 in GLSL / Shaders

I'm new to all this. I'm looking either for a library or an easy way to add dynamic "effects" to my sketches, to make them look more professional / interesting. For example, I have a text sketch, and I want to make the text glow (maybe make the glow pulse, e.g.). Do I have to start getting into shaders? What's the easiest way to start messing around with this kind of stuff?

Answers

  • Hello, there is a tutorial about shaders in Processing that might be useful. It is not a resource about the shading language itself (there are several online guides and tutorials about that, for example here and here), but at least it should give you an idea of how to start incorporating custom shaders into your Processing sketches. Also, Processing comes with some shader examples, they are under Examples|Topics|Shaders.

  • Do you think that using shaders is the way to go? The simplest way to go? Also, I see that there are shader examples, but I don't see a shader library. Do I need to be using opengl with processing and then find some shader library to plug into that? (thank you for the help).

  • I'd say that is not the simplest way to go. Right now, Processing offers a PShader class and a number of functions that allow you to load glsl shaders into your sketch (as long they follow some naming conventions discussed in the tutorial). There is no need of a shader library, I think, because all the functionality required to handle GLSL shaders is already built into the core. What it missing, though, is a more comprehensive collection of shaders that could be used in Processing, although procedural effects of the type you find in GLSL sandbox and shadertoy are relatively easy to port into Processing (some of the examples show how to do that).

    My opinion would be that if you need to implement complex real-time effects, specially for large-resolution settings, and you are interested in learning GLSL, then using shaders could be a good option. There is a relatively steep learning curve involved, but the results are probably worth it. However, you don't need to use shaders to achieve visually interesting results with Processing, people have been using it over the years without shaders and there are innumerable examples of amazing work.

  • Is there any way to import effects generated through After Effects into processing?

  • I don't think you can do that, at least in a direct way. I'm not familiar with After Effects, but my impression is that the effects are provided as plugins which are implemented using a variety of methods (most likely the After Effect SDK, but seems that there are other ways like Quartz Composer or Pixer Bender, this article gives some details).

    But for sure, you cannot load After Effects plugins into Processing. One possibility could be that if a plugin was written with Pixel Bender, and you have access to the Pixel Bender code (which has a syntax based on GLSL) then porting it as a GLSL shader and therefore loading into Processing is possible. But still wouldn't be very straightforward.

  • First of all, THANK YOU. I think I'm going to try to use the native shaders, and see what I can do. You've said that many people have used processing to create very graphically polished looking work without getting into shaders deeply. Are there resources and tutorials for that somewhere? How to add glows, blurs, transparencies, like design in processing with lots of examples... I'm in the middle of learning processing (shiffman), but that's basic functional stuff, not art/graphics.

  • edited November 2013 Answer ✓

    Generative Design is a great and beautiful book. It reads more like a cookbook than a primer for visual programming tough. Since you are still learning, that might not be the best choice. I definitely recommend it for inspiration though!


    Here are some other resources for Processing beginners:

    Processing hour of code (Daniel Shiffman) http://hello.processing.org/editor/

    Funprogramming (Abe Pazos) http://funprogramming.org/


    For shaders:

    Steven Wittens' excellent introduction to 3D computer graphics (a recommended prerequisite)

    An introduction to pixel shader programming with a nice collection of interactive examples. http://pixelshaders.com/

    The needle (that's where I started) http://thndl.com/?1

    Shadertoy (for the brave) http://www.shadertoy.com

    This comprehensive GLSL tutorial (already mentioned by Andrés) http://www.lighthouse3d.com/tutorials/glsl-core-tutorial/glsl-core-tutorial-index/

    The OpenGL machine (if you like to be scared) https://www.opengl.org/documentation/specs/version1.1/state.pdf


    And for inspiration:

    OpenProcessing http://www.openprocessing.org/

    Creative Applications http://www.creativeapplications.net/

    Triangulation Blog http://www.triangulationblog.com/

    F.A.T. http://fffff.at/

Sign In or Register to comment.