Posts: 7,153
Threads: 601
Joined: 2015 Jan
Thanks: 1081
Given 1466 thank(s) in 963 post(s)
Country:
Code: ############################################################################################
### GrainPlate 1.0: add real grains to your clip! ###
### ###
### Usage: GrainPlate(clip, strenght) ###
### where strenght range goes from 0 (clip untouched) to 1 (max strenght) ###
### ###
### Just add your own grain plate, there are many free to download over the web. ###
### Hints: NEVER upscale/downscale a grain plate; choose one with the same size of your ###
### clip, or bigger; choose only REAL film grain, and not recreated. ###
### ###
### AviSynth script made by spoRv (http://blog.sporv.com) - Created: 2014-06-18 ###
### Updated: 2016-12-29 ###
### ###
### Creative Commons 4,0 - Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) ###
### Link to the licence page: https://creativecommons.org/licenses/by-sa/4.0/ ###
############################################################################################
function grainplate (clip clip, "strength") {
strength = default( strength, 0.25)
grain=avisource("putyourowngrainplatefilehere.avi")\
.crop(0,0,clip.width,clip.height).loop.trim(0,clip.framecount-1)
return overlay(clip.tweak(bright=1),grain,mode="softlight",opacity=strength) }
Warning: check the brightness settings with the grain plate you decide to use; it must be raised to be the same of the source without grain plate applied!
deleted user
Unregistered
Thanks:
Given thank(s) in post(s)
Thx!
For those who only have monochrome grain plates like myself, I modified it a bit:
Code: function grainplate (clip clip, "strength") {
strength = default( strength, 0.25)
g=AVISource("04-MED_CLEAN.avi")
g=MergeRGB(g,UnalignedSplice(g.trim(g.framecount/2-1,g.framecount-1),g.trim(0,(g.framecount/2)-1)),UnalignedSplice(g.trim(g.framecount/3-1,g.framecount-1),g.trim(0,(g.framecount/3)-1)))
grain=g.crop(0,0,clip.width,clip.height).loop.trim(0,clip.framecount-1)
return overlay(clip.tweak(bright=1),grain,mode="softlight",opacity=strength) }
Basically, this applies a delay to the grain plate, once by -50% and once by -33%. Then it merges the RGB from the normal grainplate, the -50% delayed one and the -33% delayed one.
This is helpful because a monochrome grainplate doesn't really do much to help with chroma blocking. Also, a monochrome grainplate gives an unrealistic result for anything but black-and-white film, as we all know film consists of color layers.
This isn't 100% realistic, as film doesn't consist of RGB layers, but it's good enough for me.
Edit: Just make sure the duration of your grainplate is divisible by both 2 and 3, else some weird results may occur.
Posts: 646
Threads: 75
Joined: 2015 Feb
Thanks: 1149
Given 406 thank(s) in 227 post(s)
Country:
I want to start playing with this script. Where can I find a nice grain plate video?
Posts: 7,153
Threads: 601
Joined: 2015 Jan
Thanks: 1081
Given 1466 thank(s) in 963 post(s)
Country:
It was A LOT of time ago when I got some nice free plates, so I can't remember, except for gorillagrain; some google-fu with "grain plates" should bring some, though!
Posts: 646
Threads: 75
Joined: 2015 Feb
Thanks: 1149
Given 406 thank(s) in 227 post(s)
Country:
Oh yes how very lazy of me. Google-fu should have been my first port of call! I found a free clip called "Holy Grain". Might not be the best but will get me started. Thanks.
Posts: 7,153
Threads: 601
Joined: 2015 Jan
Thanks: 1081
Given 1466 thank(s) in 963 post(s)
Country:
Yep, IIRC it was nice, too!
Posts: 759
Threads: 35
Joined: 2018 Feb
Thanks: 651
Given 1071 thank(s) in 405 post(s)
Country:
2021-02-20, 01:16 AM
(This post was last modified: 2021-02-20, 06:57 AM by bronan.)
Thanks for this! Combined it with the free grain plates at https://tdcat.com/downloads/filmgrain and got some nice results! Uploaded a quick comparison using a Super 16mm plate here:
https://www.screenshotcomparison.com/comparison/11250
Those grain plates are at 24fps so for 23.976 films you will need to modify the one line to:
grain=avisource("putyourowngrainplatefilehere.avi").AssumeFPS("ntsc_film")\
Posts: 492
Threads: 22
Joined: 2017 Dec
Thanks: 51
Given 244 thank(s) in 167 post(s)
Country:
2021-03-04, 03:40 AM
(This post was last modified: 2021-03-04, 03:41 AM by SpaceBlackKnight.)
That grain plate for Dirty Pair looks ace! Wish the bozos at Q-Tec and Sunrise left the grainy scans alone instead of sandblasting them "to look closer to the cels".
Posts: 222
Threads: 17
Joined: 2021 Oct
Thanks: 17
Given 77 thank(s) in 64 post(s)
Country:
2023-07-18, 10:08 PM
(This post was last modified: 2023-07-18, 10:09 PM by Bilbofett.)
(2020-09-30, 07:48 PM)spoRv Wrote: It was A LOT of time ago when I got some nice free plates, so I can't remember, except for gorillagrain; some google-fu with "grain plates" should bring some, though!
I have 8/16/35, fine/medium/coarse, 1080, 4k, literally hundreds. 23.976, 24, 25, 29.97, they were all free (incl. Gorilla Grain).
Let me know if you'd like them
|