DasGrain v1.8
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Fabian Holtz
Semiautomatic regraining tool.
Requirements:
12.2, 12.1, 12.0, 11.3, 11.2, 11.1, 11.0, 10.5 or later
Linux, Windows
12.2, 12.1, 12.0, 11.3, 11.2, 11.1, 11.0, 10.5 or later
Linux, Windows
07 Mar 2021
32972
Thanks for the meme, edgyvfx!
Tired of matching grain manually? Me too!
DasGrain takes the pain out of the re-graining process by automatically adapting the plate grain to your comp.
For areas where the original grain doesn't work, you can generate a new grain that is based on the original grain.
Having a good degrain is crucial for this tool!
Long and boring demo here: https://vimeo.com/284820390
Please let me know how it works for you or if you have any questions. I'm always happy to help! :)
Unfortunately DasGrain doesn't work with Nuke Indie and Nuke NC due to their Python and Blinkscript limitations.
v1.8
- updated UI and many of the tooltips (let me know what you think!)
- fixed a fundamental bug in the per channel range script
- added a metadata knob to choose between plate and comp
- added a threshold, so that a sample has to contain at least 10 pixels to be used
- deleted the colorspace choice in the two colorspace knobs so on first load it will be set to whatever is the default space in your config rather than potentially error.
- updated Python scripts to be Nuke 13 compatible
- fixed and improved many minor things
special thanks to Erwan Leroy for his feedback!
v1.7
- added stereo option to generate different grain per view
- added colorspace menu
- couple of bug fixes and improvements that accumulated in the last year (aka I didn't keep track, but it's better now!)
v1.5
- added Help tab (with setup steps and Troubleshoot button)
- reordered, improved and removed some functions (check the tooltips and the updated video)
- bugfixes
- copy/pasting now roughly a million times faster
v1.4
- fixed bug (due to a missing link in the last version, only frame 0 was being analysed. This could've led to issues if degrained plate and plate had different start frames)
- minor improvements
v1.2
- Bugfixes
- tech improvements
- added luminance grain compensation and new DegrainHelper node
- layout improvements
Please login in order to download these files.
Comments
"ERROR: Group1.Multiply 6.value: Nothing is named "parent.luminance""
Because of this error, I tried to use it by setting it as a gizmo. When I change to gizmo and use it, when I open Nuke again, the DasGrain connection is disconnected, so it is difficult to use. Can I get the gizmo file that doesn't disconnect to my mail?
Thank you for sending it to naji83naver.com
Even if the analyze can take a bit I still feel like I save a lot of time, and definitely my nerves :)
Beste Grüße aus Berlin,
Lucas
If you have any idea how to make it more intuitive let me know!
Thanks, Fabian!
One thing that we've run into is that when we try to copy and paste this node between scripts (maybe they use the same plates or something) that it crashes nuke. Not sure if this is to do with some sort of python callback that messes it up, but it would be awesome to see this fixed in a later version!
Sorry for the late reply. To be honest I'm not sure what could cause this, there are definitely no plate related callbacks in there.
A friend of mine had problems with crashes in the beginning as well. The solution for him was to import it into nuke and export it again. There were no crashes when he used the version he exported himself.
Hope that helps. :)
Brandon
Really happy to see how it's spreading and that it's useful!
When I hit analyse, it starts from frame 1 even though my footage starts from 1001. How do I solve this?
Don't worry about that. I'm re-ordering the analysis frames internally to be next to each other, starting at frame 0 :)
Thank you for sharing your tools, it's wonderful!
I just can't understand one thing, I hope you can help me with that.
If I using Scatter in Replace tab, I can do some kind of grain plate, but how can I add a grain plate to denoised image? I tried to use Merge with Plus but I'm not sure it's correct or not?
Thank you!
Did you set the output (in the dropdown menu at the top) to regrained comp?
Alternatively, 'plus' will give you the same result as long as the output is set to adapted grain.
If you haven't yet, I recommend watching the demo on vimeo as well :)
Let me know if you have any other question!
Thank you for your answer.
Yeah, I have seen the demo twice :)
I just think maybe 'plus' it's not correct for adding the grain. The Grain node from Nuke using an expression for adding grain to the image.
Here this expression.
For the red channel:
max(minimum.r,r+(2*Ar-1)*(r*red_m+black.r))
For the green channel:
max(minimum.g,g+(2*Ag-1)*(g*green_m+black.g))
And for the blue channel:
max(minimum.b,b+(2*Ab-1)*(b*blue_m+black.b))
Maybe this can be a little bit correct than just 'plus' operator.
Thank you!
don't worry, 'plus' is correct. The expression in the Grain node is controlling the grain response based on the 'intensity', 'black' and 'minimum' knobs of the node. DasGrain calculates and uses the actual response curve for the shot and therefore doesn't need those knobs or the expression.
Cheers!
I assume you use Neat Video? My first suggestion would be to have a look at the user guide and watch the tutorials. In my experience many people don't know how to get a good noise profile or how exactly temporal filtering works.
Temporal filtering can definitely help getting a better result, but be aware of its limitations. Aggressive temporal filtering may seem like it's doing a good job, but it can lead to warping around moving objects. This will cause additional difference between degrain and plate, which reduces the analysis quality and introduces unwanted detail in the regrain.
I like to connect DasGrain to the live ReduceNoise node, set the output to 'original grain' and play around with the radius and threshold to see how far I can go.
Hope this helps :)
Thanks again for posting the great tool
Job well done Fabian.
I have a question/featur e request though. I usually like to keep my original noise, where I did not change the plate. You already have a replace mask built in, but the input has to be set manually. Why not generate this mask by looking at the denoised plate and comp difference? A checkbox for that and a threshold slider would do the job I guess.
I'm not using a difference key because I don't think that it's a universal way to generate a replace mask. (Just because the values of the comp are close to the plate doesn't mean that I want to keep the plate grain and vice versa)
I could of course add it as an option, but DasGrain probably has too many sliders and buttons already.
My suggestion would be to just make your difference key setup, connect it to the mask input and save it with DasGrain in your toolsets.
Anyway, for the projects I worked on we always tried to keep as much plate grain as possible and only replace it in areas, where the plate is actually changed. Since no degrain is perfect, it also brings back plate detail, which is a nice bonus effect.
Having said that, we have been encountering some issues with das_grain corrupting scripts, we tracked it down to linux not liking the non-asci characters found in the 'testimonial' section. Could you do a point update that removes this section? Thanks!
Occasionally we'll get dancing white pixels in the result. This can remedied by clamping the blacks of the plate and degrained plate to 0. Just thought I'd share and maybe there's a cleaner solution from within the tool itself?
That sounds like the response curves might not be accurate. If you want you can send me just the node the way it is used in your script by email and I'll have a look.
You are right, clamping the blacks is not a clean solution.
I have started to use DasGrain but I a, running into the following problem. When I applied the scatter button I get the attached image. Any thoughts?
David
https://www.dropbox.com/s/gyyvp23yx72cbvn/Scatter.png?dl=0
Not entirely sure. I'd say stretched pixels are normally an indicator of bounding box issues. But without seeing your script it's hard to tell.
Error: RuntimeError: Group1.VoronoiS catter.error: increase sample box size or decrease cell size
any ideas?
Error: RuntimeError: Group1.VoronoiS catter.error: increase sample box size or decrease cell size
any ideas?
It's a built in error to prevent the voronoy cells from breaching the bounds of the sample region. Does it only fail in Deadline? It shouldn't work in the GUI either.
I would like you to ask permission to use Dasgrain in our studio located in Bangkok.
my studio requests a permission email from the author of the tool.
however, I could not be able to reach you in any way.
please let me know if you could allow our studio to use your tool in production.
Thank you!
Best wish,
Chucheep Chaipoon
Chucheep.chaipoongmail.com
Write me there and mention the name of the company please.
the first option should be whatever you project settings are (so I guess ACES 2065?) and the second should be set to the camera native linear color space. If it's an Alexa plate it should be Arri linear Alexa Wide Gamut.
BTW DasGrain v1.7 on Nuke 10.0v2 was located on top of the script before I fixed it by removing 2 lines 359 and 360
in_colorspace linear
out_colorspace linear
DasGrain2.VoronoyScatter.Voronoy.VoronoiNoise:Error compiling kernel for GPU
Any idea how to fix this?
TheFoundry broke blinkscript in the 12.1 update (only on windows), so if someone use the quite common ‘normalise’ function, it won’t compile on the GPU.
So to fix your use go into the "dasgrain" group (s button in node); dive deeper and go into the VoronoiScatter group; find Voronoi Noise -> Kernel Tab -> disable GPU
Thanks a lot Fabian the GPU knob in next release will be much appreciated.
HUGE FAN of your tool btw
Thanks so much!
I have artists in my team using dasGrain and they are facing the same issue regularly. Their script's size double each times they save it until Nuke cannot open it anymore.
We discovered that the culprit is dasGrain. For some reason it is filling the script with characters. In such cases I have to edit their nuke files and delete the dasGrain section.
We are working on centOS 7 and faced this issue on all versions of Nuke since 10.5v1.
Thanks for your help
https://imgur.com/IfKRX3H
please use the latest version, it should be fixed in there.
Thanks for the quick reply
Thanks for the quick reply
Thanks for your help.
I'm using nuke indie and, if I press Analyse, a warning error appears saying:
'NoneType' object has no attribute '__getitem__'
And it doesn't permit me to analyse, Anybody knows what's happen?
Thanks!
I would like to know more detail about v1.7.
Please explain.
When and how ?
Firtsly thanks for sucha wonderfully useful tool.
We are having issues rendering DasGrain on our deadline farm.
v1.4 works fine but 1.8 throws up errors on any internal node that has a parent. expression back to the dasgrain group.
An example of such an error being Group1. Multiply6.value : Nothing is named "parent.luminan ce"
any ideas why that may be?
first of all, thank you very much for this amazing tool!
Unfortunately we're experiencing the same issue Mark mentioned after updating to v1.8.
On our deadline farm we get the error message using Nuke 12.1v5 and dasGrain 1.8:
Group1. Multiply6.value : Nothing is named "parent.luminance"
Any hint about how to fix this would be greatly appreciated :)
Thanks again!
thank you for getting back to me so quickly!
We switched from 1.4 straight to 1.8 as far as I know, I'll confirm that and try older versions as well.
So far it appears that we have to save dasGrain as Gizmo to get rid of that error and get a "Error: FailRenderExcep tion : NameError: knob testimonial does not exist" instead.
I will continue testing and let you know in case I find something.
I tried DasGrain v1.8 with Nuke 13.0v1.
It works completely fine, but every time I reopen a script all the connections to the gizmo are cut off. I can reconnect them and render, no problem. But the connections keep getting lost.
Did someone else has this issue?
Thanks for this amazing tool.
I'm having the same issue in 12.2v5. I turned it into a .gizmo so I could install it on our menus and once I reopen the scripts everything is disconnected. This doesn't seem to happen if I copy and paste it from the .nk file downladed from nukepedia. Weird.
Did you find any solution?
i don't know very well nuke configuration.. ..i can just modify init.py and menu.py.
andwhat about you? did you find any solution in the meantime?
i don't know very well nuke configuration.. ..i can just modify init.py and menu.py.
andwhat about you? did you find any solution in the meantime?
First, thank you very much for your amazing work on Dasgrain, very impressive and powerful!
I would like just to report a little bug in your script in a specific case (on Dasgrain v1.8 with Nuke 11 or 12). When i click on "analyze", i have this error : "min() arg is an empty sequence".
The reason why is because there is a red.matte layer in my script, so the script generates a curveTool in red.matte and not in rgb.red. I am not very familiar with Python, but i changed "curve_tool\['c hannels'].setVa lue(channel)" with this : "curve_tool\['c hannels'].setVa lue(\"rgb.\{\}\ ".format (channel))", to force the analyze in rgb.red, rgb.blue and rgb.green and now it seems to work.
Cheers
I'll add it in the next version.
The last version I see it in is V1.4?
Yes, it only needs one frame. Having the range just led to more user errors and wasn't really necessary.
ERROR: Group1.Multiply 6.value: Nothing is named "parent.luminance"
When I roll back to DG v14 there is no problem. Is this something that can be addressed in the newest version? I would love it!
I talked to our TD about this when people first started reporting this error. He said it's hard to say without being there but it might be caused by how your farm is set up. As in what kind of errors cause it to fail and what it ignores.
He couldn't explain where the Group1 name is coming from though...
Sorry about that but without having Deadline available troubleshooting is hard. If you have some time to spare feel free to write me a Mail. Maybe I can get you to try a few things to narrow it down.
Nuke's Py check button shows this: "ERROR: name 'parent' is not defined". I feel like Nuke doesn't like that expression, but ignores it when rendering locally for some reason. Are you able to troubleshoot the error at that level?
I apologize if I sound ignorant at all. I'm certainly not a coder. Thanks for your feedback!
If you want to send me an email, I can send you the latest version where I made a few changes to some callbacks. No idea if it makes a difference, but callbacks would be one of the things I'd investigate.
awesome tool i like a lot!!!!
pls if you have a never version ready with this Problem solved ..release:)
We do have the same Problem while rendering over Deadline.
Local render no problem.
many many thanks
greetings
First of all thanks a MILLION for DasGrain. If I had to choose only one external plugin/gizmo to have installed it would be DasGrain, hands down.
That being said I'm running into a weird problem. I've turned the DasGrain node into a gizmo so I could install it in our small 5 computer pipeline and we could recall it from the menus using the Tab key. The thing is, when we add it to our scripts via the menus, and close the script once we reopen the script the DasGrain node is disconnected from all the pipes! This doesn't happen if we copy and paste the node from the .nk downloaded from the Nukepedia. Any ideas?
We are running Nuke 12.2v5 BTW.
Anyways, thanks again for your amazing, almost-voodo-ma gic plugin!
Yes, we found the solution. Send me an email and I'll send you a fix :)
Question do you have a road map for DAG grain for Nuke13.1
thank you so much for this great tools
Thank you so much for this amazing tool!
I'm working in Nuke 13.1v1. It works fine until selecting the activate scatter button, and then it crashes Nuke every time. I tried Guillaume Blabla's swapping out the line of code trick but it didn't work.
Many Thanks
Thanks for letting me know. I'll look into it once I get my hands on Nuke 13.1.
As changing other filter, Nuke is not crashing.
(Is it nuke's bug? in 13.0v5 is not)
I hope this your help.
Nuke13.1.v1
Mac OS Mojave
I forgot to mention It's running on an IMAC Pro with OS Big Sur
each time i open a scene that use dasgrain i find the node inputs no more attacched to their source....does anyone experiment this weird behaviour?
Did you turn the group into a gizmo? As a group it shouldn't happen. If you want an update that works as a gizmo as well send me a mail.
just an update about the crashing, Foundry confirmed that there is a bug with the STMap node in Nuke 13.1 which I hope they will fix in the next version: https://support.foundry.com/hc/en-us/articles/4412411756690
If you have NukeX, you can replace the STMap node inside DasGrain -> VoronoiScatter with a C_STMap (make sure the filter is set to impulse), that seems to work.
That definitely stopped the Nuke crashing when selecting scatter, but now the grain isn't moving. Any idea why that might be?
Thanks!
I haven't found a solution for the deadline issue. It's weird, many people seem to be using DasGrain and deadline without any problem
Nuke 13.1v1 for MAC
Try updating Nuke.
Nuke 13.1v1 for MAC
"ERROR: Group1.Multiply 6.value: Nothing is named "parent.luminance""
The problem lies within the Nuke plugin for Deadline. Prior to rendering on Deadline the Nuke plugin remaps file paths in your Nuke script. In order to remap your file paths, the plugin replaces all "\" with "/" in the text of the Nuke script, remaps the paths, and finally saves out a temporary Nuke script to render. The problem with this behavior is that there are Python scripts embedded in the DasGrain Group with new line characters "\n" and maybe some other valid uses of "\" that become corrupted in the temporary render script. You may be able to fix these issues at the source Fabian by attempting to eliminate all "\" in your Python expressions.
For those of you looking for a solution now here is what you can do:
1. Copy the Nuke plugin in your deadline repo from "plugins/Nuke" to "custom/plugins/Nuke".
2. Open "custom/plugins /Nuke/Nuke.py" and change line 404
FROM:
self.pathMappin gWithFilePermis sionFix( sceneFilename, self.TempSceneF ilename, ("\\[","\\", "_TCL_ESCAPE_") , ("_TCL_ESCAPE_" , "/", "\\[") )
TO:
self.pathMappin gWithFilePermis sionFix( sceneFilename, self.TempSceneF ilename, (), () )
By replacing this line you are preventing Deadline from replacing "\" with "/" and therefore preventing the DasGrain Group from being corrupted. I'm actually surprised that I haven't run into this issue with others tools on Deadline because the way they are haphazardly doing string replacements here is very dangerous!
i have tried more than once to solve it with no luck, cannot understand what have to do...
i have tried more than once to solve it with no luck, cannot understand what have to do...
I don't get a error message, but when I'm looking in the adjustment tab, the r,g,b channels are a constant of 0.
I don't get a error message, but when I'm looking in the adjustment tab, the r,g,b channels are a constant of 0.
Fantastic tool, we are currently facing some issues on the farm in my studio.
Some sections on the farm when using masks are getting stuck, producing static noise, but rendering in GUI mode works fine. It is just on the farm when this happens. Checked on Nuke 12 and Nuke 13.
DasGrain-1.8 is working correctly with Nuke-13.2v5 here.
One small bug report I would mention though.
If you open Nuke, create a DasGrain node and close Nuke.
The following errors are raised in the terminal:
ERROR: oCIOColorSpace. out_colorspace: Nothing is named "OCIOColorSpace1"
ERROR: oCIOColorSpace. in_colorspace: Nothing is named "OCIOColorSpace1"
Those errors do not seem to interrupt others exit handlers but I'm still early testing this so can't be sure yet.
Best,
I have also been having this issue, does anyone know the cause or the fix? Thanks! J.
I have a problem when I press the "Analyse" button, I get an error which reads "name 'xrange' is not defined. Tnx for helping!
same here
i have same problem
""ERROR: Group1.Multiply 6.value: Nothing is named "parent.luminance""
Because of this error, I tried to use it by setting it as a gizmo. When I change to gizmo and use it, when I open Nuke again, the DasGrain connection is disconnected, so it is difficult to use"
Thank you for this great tool!
Thanks
Is it possible to get it into gizmo format or how does that even work?
i really do not know how to solve this, and why ever this happen!!
Maybe with new update they will fix it.
Maybe with new update they will fix it.
Gizmo {
Change this line to:
Group {
Save the file and it should now work
So far the tool has been amazing. At our current project though Dasgrain gives us completely wrong graph values. Either exremely high values or the graph is just a flat line and it doesn't do anything. We are using the latest version.
Would it be difficult to implement a change in the nodes color after clickling "Analyze"? We would love the node's color to go from red (initial state) to green (after analyzing) in the node graph. We use DasGrain a lot in copied scripts and sometimes forget to "Analyze" before rendering. This would save a lot of time and frustration :)
until/if an update is released from v1.8, you may try to hit the Analyze button again after you activate the scatter.
going inside the group twice, DasGrain > VoronoiScatter > VoroNoise, and adding a RotoPaint node just after the VoroNoise, with something like a small rectangle with all frames lifetime revealing the bg0 itself may do the trick [trying to force a buffered cache instead of the usual nuke cache here].
- but as soon as I wanna use an external grain plate everything breaks again. Guess I will will stick with 15.0.4 until Fabian updates DasGrain. Cheers
Do you have more info on this? Nuke cache/buffered caches etc? Neither disabling GPU acceleration nor the RotoPaint method works for me (Nuke 15.1) and curious to know if you have docs/resources on what does/doesn't update whichever cache (and what the difference is, ha)
my adress is martoyangmail.com
Thnaks
my adress is martoyangmail.com
Thnaks
my adress is martoyangmail.com
Thnaks
Try this method :
Preference > Performance > Hardware
plz tick the disable blink cache
cheers
cheers
Is there anyway to fix it?
I am currently using NukeX 15.0
Is there anyway to fix it?
I am currently using NukeX 15.0
When pressing "Analyze":
'NoneType' object is not subscriptable
When pressing the "Troubleshoot" button:
'NoneType' object has no attribute 'lastFrame'
RSS feed for comments to this post