Hi, does anyone know how to take an image sequence and for each frame, set each pixel value to that pixel's max value over all of the previous frames?
For example, on frame 25 out of 50, each pixel would be set it its respective max over the range 1-25
Thanks!
Compositing - Max value over time
2700 5 1- KMcNamara
- Member
- 228 posts
- Joined: Dec. 2012
- Offline
- jparker
- Member
- 286 posts
- Joined:
- Online
- jparker
- Member
- 286 posts
- Joined:
- Online
- KMcNamara
- Member
- 228 posts
- Joined: Dec. 2012
- Offline
- animatrix_
- Member
- 4520 posts
- Joined: Feb. 2012
- Offline
Hi,
You can use something like this:
vector current = cinput ( 0, PL, AI, IX, IY, F );
if ( F > 1 )
{
for ( int i = 1; i < F; ++i )
{
vector prev = cinput ( 0, PL, AI, IX, IY, i );
current = max ( current, prev );
}
assign ( Cr, Cg, Cb, current );
}
Either paste inside Inline Code VOP or Snippet VOP. If you want to prototype more conveniently, you can also use the Inline VEX Filter COP here:
https://www.orbolt.com/asset/animatrix::inlineVexFilter::1.00 [orbolt.com]
You can use something like this:
vector current = cinput ( 0, PL, AI, IX, IY, F );
if ( F > 1 )
{
for ( int i = 1; i < F; ++i )
{
vector prev = cinput ( 0, PL, AI, IX, IY, i );
current = max ( current, prev );
}
assign ( Cr, Cg, Cb, current );
}
Either paste inside Inline Code VOP or Snippet VOP. If you want to prototype more conveniently, you can also use the Inline VEX Filter COP here:
https://www.orbolt.com/asset/animatrix::inlineVexFilter::1.00 [orbolt.com]
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
- KMcNamara
- Member
- 228 posts
- Joined: Dec. 2012
- Offline
-
- Quick Links