PDA

View Full Version : Help with using Blockbuster & Masktools


R3Z
16th January 2009, 07:13
Hello All :)

I am trying to learn how to use use masktools to manipulate the output or "detail areas" that blockbuster uses in order to create a fake film gran effect. Instead of using bright and dark areas with levels, i would like to try and distribute grain among areas of less detail. I would like to have three layers (small grain, medium and large).

So far i figure i need to run BlockBuster and then use a MT_makediff to isolate the area that Blockbuster has earmarked as an area to manipulate. So i am guessing that would be something like (oh i am embaressed);


SmallGrain_Dist = source.Blockbuster(detail_min=1,detail_max=25, method="noise")
Diff_Sm = mt_makediff(Source, SmallGrain_Dist, U=2,V=2)
Small_Grain = Diff_sm.Addgrain()


I would then need to merge the "mask" like;

mt_merge(source,Small_Grain,Diff_sm,luma=true)


Am i vaguely on the right track ? I dont think i am because all i can get is a frame that looks brighter when i try that.

I find the masktools ideas very complex, i honestly dont understand much of it even after reading countless threads. I eventually want to make a function out of it, so this is all a steep learning curve :)

Any help greatfully appreciated :)

R3Z
19th January 2009, 05:13
Sorry to bump my own thread :( But i am wondering whether it is indeed possible to use blockbuster to isolate areas and then add grain to them ?

I have been reading up and searching like crazy but i havent found anything yet. Any help greatlly appreciated.

Cheers

Sagekilla
19th January 2009, 06:04
Uhm, I think what you want to do is:


SmallGrain = source.BlockBuster()
Diff = mt_makediff(source, SmallGrain, U=3, V=3)
Grain = source.AddGrain()

mt_merge(source, Grain, Diff)

Not 100% sure at the moment, but I believe that's what you'd do.

R3Z
20th January 2009, 04:02
Uhm, I think what you want to do is:


SmallGrain = source.BlockBuster()
Diff = mt_makediff(source, SmallGrain, U=3, V=3)
Grain = source.AddGrain()

mt_merge(source, Grain, Diff)

Not 100% sure at the moment, but I believe that's what you'd do.

Thanks for your reply Sagekilla :)

The more i have been looking, I dont think i can do what i would like with blockbuster unless i modify the source code to enable gauss blurred grain. Conversely i could try and use a plugin that exposes quants per frame. Does one such exist ?

I will keep looking.

Cheers,

R3Z

Sagekilla
20th January 2009, 22:00
I don't know of any plugins or filters that expose the average q of a frame. You'd need to have a bitstream that has the quants included, along with a source filter that passes it along as some form of hints (like MPEG2Source's hints=true for ColorMatrix ;)).

In short: I'd say such a filter doesn't exist right now. Would be immensely handy for a denoising filter though :)