by Kevin Goldsmith

Created

November 15, 2007

I’ve been working on the next version of the toolkit and I’m hoping it will make a bunch of you hydra developers happy. I’ve rolled in a lot of feature requests from the forums and the big news is that it should work on ALL supported platforms (OS 10.4.10+, XP, Vista) REGARDLESS OF YOUR VIDEO CARD. We’re still tuning CPU performance, so if you don’t have a supported graphics card, the performance won’t be stellar, but it will let you start playing with Hydra. I’m hoping to have it out to you all some time next month.

We have made a language change to Hydra that will be in this next release. It is small, but it will break any existing filters. Sorry about that, but at the moment, this is a technology preview after all. I’ll include a script we wrote that will fix up your hydra files automagically. The change is that images are now parameters. This is a small change, but it has a big effect. Images will now be available by name in kernel scope instead of EvaluatePixel scope and that means that they can be used in per-frame functions like EvaluateDependents and the region reasoning functions more simply.

Here’s an example of the old and new syntax:

kernel OldSyntax
{
parameter float k;

void evaluatePixel(
in image4 foreground,
in image4 background,
out pixel4 result)
{
pixel4 fp = sample( foreground, outCoord() );
pixel4 bp = sample( background, outCoord() );

result = mix( fp, bp, k );
}

region needed(
region output_region,
int input_index,
region input_DOD[])
{
if (input_index == imageIndex( background ))
return input_DOD[ imageIndex( background ) ];
else
return output_region;
}
}

kernel NewSyntax
{
parameter float k;
input image4 foreground;
input image4 background;
output pixel4 result;

void evaluatePixel()
{
pixel4 fp = sample( foreground, tCoord() );
pixel4 bp = sample( background, tCoord() );

result = mix( fp, bp, k );
}

region needed(
region output_region,
imageRef input_image)
{
if( input_image == background ) )
return dod( background );
else
return output_region;
}
}

As always, we always want to hear what you think. Either reply here or on the forum.

[Updated 11/19/07 to fix a typo made under the influence of too much caffeine]