Forums > MaxMSP

particles and blur effects

September 2, 2013 | 11:53 pm

I’m trying to learn about particles and shaders. I think I have most of the basics down. The PartyLights recipe and a few other patches I’ve found in this forum have has been very helpful for me.

For reference:

I have a question though.

How would you add an "un-blurred" object to the middle of PartyLights? I’m imagining blurred particles flying around a sphere that has not been blurred. Of course I can just naively add a gridshape object to the patch but then the sphere just hovers above the videoplane. How do you get the blurred particles to fly in front of and behind the un-blurred sphere?

A few forum posts have touched on this question. For example:
But I can’t say that I fully understand the solutions being discussed.

I’m hoping someone can provide an example or point me in the right direction so I can know where to start reading.


September 6, 2013 | 4:11 pm

there is probably some complicated solution involving capturing depth to a texture and custom shaders, however the simple solution involves using two objects, one capturing post-processed objects, and one capturing normal objects.

there are two options, depending on your scene and desired results.
the first option is to duplicate post-processed objects in the normal node, and the second is to duplicate normal objects in the post-processed node.

either way, for the duplicated objects, you simply need the geometry captured with no materials or lighting, and @color set to 0 0 0 0. this will provide proper occlusion in the rendered textures.

finally, you can simply alphablend the two textures using’s.
the order the videoplanes are rendered is important, and controlled via the @layer attribute.

i’ve attached a basic example using the first technique, and modified the party-lights recipe with a rendered using the second technique.

experimenting with the videoplane @blend mode will give different results.

September 8, 2013 | 6:56 pm

Cool. Thanks Rob. That’s a clever solution. I assumed that this would require a custom shader but it’s nice to see that it does not. Although after reading Andrew’s shader tutorial I’m now inspired to begin exploring shaders anyways!

Viewing 3 posts - 1 through 3 (of 3 total)

Forums > MaxMSP