Cinema 4D Motion Blur

Moderator: SecondMan

User avatar
drisley
Posts: 4
Joined: Thu Sep 19, 2019 12:49 pm

Cinema 4D Motion Blur

#1

Post by drisley » Thu Sep 19, 2019 12:57 pm

Hello,

I've been using Resolve Studio 16 and Cinema 4D for a few weeks now, and love both programs.

I've been trying to output some 3D animation with a separate motion blur pass using an EXR file output then using Vector Motion Blur in Resolve/Fusion. I can't seem to get it to work. At best I'm getting everything blurred.

I set the X and Y to Red and Green respectively, but still everything is blurred.

I tried using this technique, sort of, but it still didn't work (and changed the output video colours to a weird blue).

Does anybody here have experience brniging in 3D files to add the DOF and Motion Blur passes in post using Resolve/Fusion?

Thanks in advance. It seems so much easier in After Effects, but there is no way I want to go to that Adobe software when I'm loving Resolve so much.


User avatar
Midgardsormr
Fusionator
Posts: 1315
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 6
Location: Los Angeles, CA, USA
Been thanked: 120 times
Contact:

Re: Cinema 4D Motion Blur

#2

Post by Midgardsormr » Thu Sep 19, 2019 1:29 pm

No ability to watch that tut at the moment, but I can offer some possibilities. Vector Motion Blur assumes that the vectors are screen-space displacement values. That is, a pixel that has a value of R = 6 means that in the next frame, whatever that pixel represents will be 6 pixels to the right. If the object is moving to the left, the vectors should have negative values.

If you have a vector pass that only has positive values, then it's in the wrong format, and you'll need to do some adjusting to put them right.

First, you need to subtract 0.5 from the entire vector image. If your vectors are in a separate file (it sounds like they are, if you're using R and G for the displacement channels), then you can just use a BrightnessContrast node to do this. Set Brightness to -0.5, and your vectors will be centered around 0.

Next, your vectors are probably normalized—that is, they originally covered a range of 0-1 instead of the much larger pixel displacement values the tool expects. You can use the Scale control of the Vector Motion Blur node to multiply the vectors, making them large enough to affect the image.

Now, remember, this is just a guess because I don't know what you've actually rendered. If you could share a frame here, I could offer guidance that is more specific and more likely to be accurate.


User avatar
Millolab
Fusioneer
Posts: 154
Joined: Wed Oct 24, 2018 6:26 am
Been thanked: 37 times

Re: Cinema 4D Motion Blur

#3

Post by Millolab » Thu Sep 19, 2019 1:43 pm

Can you share your vector pass and beauty? One thing i can suggest is to use a channel booleans (bol) to copy the red and green values in the vector X/Y channels.
Once you did that you should set Vector X/Y in the VectorMotionBlur node.


User avatar
SecondMan
Site Admin
Posts: 3778
Joined: Thu Jul 31, 2014 5:31 pm
Answers: 7
Location: Vancouver, Canada
Been thanked: 146 times
Contact:

Re: Cinema 4D Motion Blur

#4

Post by SecondMan » Thu Sep 19, 2019 1:51 pm

And here's a quick example of two ways to connect the passes to the VectorMotionBlur node to generate your motion blur. One is as @Millolab suggests, and one is with the 2 separate images going into the VectorMotionBlur directly. Check the second tab of the ChannelBooleans node for how to copy the vectors to the Vector X and Vector Y channels.

Code: [Select all] [Expand/Collapse] [Download] (WSLsnippet-2019-09-19--13.47.55.setting)
  1. {
  2.     Tools = ordered() {
  3.         Image = Background {
  4.             ViewInfo = OperatorInfo { Pos = { 275, 49.5 } },
  5.             NameSet = true,
  6.             Inputs = {
  7.                 TopLeftRed = Input { Value = 0.058212 },
  8.                 TopLeftBlue = Input { Value = 0.882 },
  9.                 ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" } },
  10.                 EffectMask = Input {
  11.                     Source = "Mask",
  12.                     SourceOp = "Ellipse1"
  13.                 },
  14.                 TopLeftGreen = Input { Value = 0.506352672 },
  15.                 Height = Input { Value = 1080 },
  16.                 Width = Input { Value = 1920 }
  17.             }
  18.         },
  19.         Ellipse1 = EllipseMask {
  20.             ViewInfo = OperatorInfo { Pos = { 275, -49.5 } },
  21.             Inputs = {
  22.                 ClippingMode = Input { Value = FuID { "None" } },
  23.                 Height = Input { Value = 0.14690824091929 },
  24.                 MaskHeight = Input { Value = 1080 },
  25.                 Width = Input { Value = 0.14690824091929 },
  26.                 MaskWidth = Input { Value = 1920 },
  27.                 Center = Input { Value = { 0.500520833333333, 0.460185185185185 } },
  28.                 Filter = Input { Value = FuID { "Fast Gaussian" } },
  29.                 PixelAspect = Input { Value = { 1, 1 } }
  30.             }
  31.         },
  32.         Vaector = Background {
  33.             ViewInfo = OperatorInfo { Pos = { 440, -49.5 } },
  34.             NameSet = true,
  35.             Inputs = {
  36.                 TopLeftRed = Input { Value = 20 },
  37.                 ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" } },
  38.                 EffectMask = Input {
  39.                     Source = "Mask",
  40.                     SourceOp = "Ellipse1"
  41.                 },
  42.                 TopLeftGreen = Input { Value = 20 },
  43.                 Height = Input { Value = 1080 },
  44.                 Width = Input { Value = 1920 }
  45.             }
  46.         },
  47.         ChannelBooleans1 = ChannelBoolean {
  48.             ViewInfo = OperatorInfo { Pos = { 440, 49.5 } },
  49.             Inputs = {
  50.                 EnableExtraChannels = Input { Value = 1 },
  51.                 Background = Input {
  52.                     Source = "Output",
  53.                     SourceOp = "Image"
  54.                 },
  55.                 ToAlpha = Input { Value = 4 },
  56.                 ToGreen = Input { Value = 4 },
  57.                 Foreground = Input {
  58.                     Source = "Output",
  59.                     SourceOp = "Vaector"
  60.                 },
  61.                 ToYVector = Input { Value = 1 },
  62.                 ToXVector = Input { Value = 0 },
  63.                 ToBlue = Input { Value = 4 },
  64.                 ToRed = Input { Value = 4 }
  65.             }
  66.         },
  67.         VectorMotionBlur1 = VectorMotionBlur {
  68.             ViewInfo = OperatorInfo { Pos = { 440, 148.5 } },
  69.             Inputs = {
  70.                 Input = Input {
  71.                     Source = "Output",
  72.                     SourceOp = "ChannelBooleans1"
  73.                 },
  74.                 XScale = Input { Value = 5 }
  75.             }
  76.         },
  77.         Ellipse1_1 = EllipseMask {
  78.             ViewInfo = OperatorInfo { Pos = { 692.068237304688, -48.8887786865234 } },
  79.             Inputs = {
  80.                 ClippingMode = Input { Value = FuID { "None" } },
  81.                 Height = Input { Value = 0.14690824091929 },
  82.                 MaskHeight = Input { Value = 1080 },
  83.                 Width = Input { Value = 0.14690824091929 },
  84.                 MaskWidth = Input { Value = 1920 },
  85.                 Center = Input { Value = { 0.500520833333333, 0.460185185185185 } },
  86.                 Filter = Input { Value = FuID { "Fast Gaussian" } },
  87.                 PixelAspect = Input { Value = { 1, 1 } }
  88.             }
  89.         },
  90.         Image_1 = Background {
  91.             ViewInfo = OperatorInfo { Pos = { 692.068237304688, 50.1112213134766 } },
  92.             NameSet = true,
  93.             Inputs = {
  94.                 TopLeftRed = Input { Value = 0.058212 },
  95.                 TopLeftBlue = Input { Value = 0.882 },
  96.                 ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" } },
  97.                 EffectMask = Input {
  98.                     Source = "Mask",
  99.                     SourceOp = "Ellipse1_1"
  100.                 },
  101.                 TopLeftGreen = Input { Value = 0.506352672 },
  102.                 Height = Input { Value = 1080 },
  103.                 Width = Input { Value = 1920 }
  104.             }
  105.         },
  106.         Vaector_1 = Background {
  107.             ViewInfo = OperatorInfo { Pos = { 857.068237304688, -48.8887786865234 } },
  108.             NameSet = true,
  109.             Inputs = {
  110.                 TopLeftRed = Input { Value = 20 },
  111.                 ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" } },
  112.                 EffectMask = Input {
  113.                     Source = "Mask",
  114.                     SourceOp = "Ellipse1_1"
  115.                 },
  116.                 TopLeftGreen = Input { Value = 20 },
  117.                 Height = Input { Value = 1080 },
  118.                 Width = Input { Value = 1920 }
  119.             }
  120.         },
  121.         VectorMotionBlur1_1 = VectorMotionBlur {
  122.             CtrlWZoom = false,
  123.             ViewInfo = OperatorInfo { Pos = { 857.059875488281, 140.387237548828 } },
  124.             Inputs = {
  125.                 XVectorChannel = Input { Value = 0 },
  126.                 Vectors = Input {
  127.                     Source = "Output",
  128.                     SourceOp = "Vaector_1"
  129.                 },
  130.                 XScale = Input { Value = 5 },
  131.                 Input = Input {
  132.                     Source = "Output",
  133.                     SourceOp = "Image_1"
  134.                 },
  135.                 YChannel = Input { Value = 1 }
  136.             }
  137.         }
  138.     }
  139. }

User avatar
drisley
Posts: 4
Joined: Thu Sep 19, 2019 12:49 pm

Re: Cinema 4D Motion Blur

#5

Post by drisley » Thu Sep 19, 2019 3:15 pm

Wow, thanks all for your input! Such a helpful forum! :D

The coding is over my head, I'm unsure what to do with that. :( I'm still a noob (I used Lightroom and Vegas over 15 years ago, but never did this type of post motion blur).

I put the beauty and EXR passes into a zip file here if you want to try? This is just a 20 frame lower res output with the most motion from what I'm working on. The zip file is about 280 MB though. :shock:

https://we.tl/t-UuPH20JAAX

I really appreciate this. Maybe the Fusion in Resolve Studio can't do this properly?


User avatar
AndrewHazelden
Fusionator
Posts: 1534
Joined: Fri Apr 03, 2015 3:20 pm
Answers: 8
Location: West Dover, Nova Scotia, Canada
Been thanked: 100 times
Contact:

Re: Cinema 4D Motion Blur

#6

Post by AndrewHazelden » Thu Sep 19, 2019 3:35 pm

drisley wrote:
Thu Sep 19, 2019 3:15 pm

The coding is over my head, I'm unsure what to do with that. :(

You should copy that block of text from the WSL forum and paste it into the Resolve Fusion page or Fusion Standalone "Nodes" view area. This snippet of text will then turn automatically into nodes that are pasted directly into your composite.

This type of snippet is called a "macro" in Fusion and can also be saved into a plain text file on your hard disk with the .setting file extension added. When you drag a .setting file from your Desktop folder into your Nodes view area it adds a collection of pre-set nodes into the comp.

Inside your Fusion user preferences folder it's possible to store your own collection of macros by placing them in the "Fusion/Macros/" sub-folder.

If you install the "Reactor" package manager from the Steakunderwater site you will see dozens of macros listed that can be added to the Fusion page, along with scripts, and other free assets.

Last edited by AndrewHazelden on Thu Sep 19, 2019 4:11 pm, edited 2 times in total.

User avatar
SecondMan
Site Admin
Posts: 3778
Joined: Thu Jul 31, 2014 5:31 pm
Answers: 7
Location: Vancouver, Canada
Been thanked: 146 times
Contact:

Re: Cinema 4D Motion Blur

#7

Post by SecondMan » Thu Sep 19, 2019 3:36 pm

drisley wrote:
Thu Sep 19, 2019 3:15 pm

The coding is over my head, I'm unsure what to do with that.

Click on "select all", copy to clipboard (CTRL-C), then paste in your Fusion Flow View (CTRL-V).

It's not code as in you don't need to read any of it. Nodes settings in Fusion are stored as plain text data, so you can easily exchange setups for example. Yay :)

Added in 1 minute 8 seconds:
What Andrew said.


User avatar
AndrewHazelden
Fusionator
Posts: 1534
Joined: Fri Apr 03, 2015 3:20 pm
Answers: 8
Location: West Dover, Nova Scotia, Canada
Been thanked: 100 times
Contact:

Re: Cinema 4D Motion Blur

#8

Post by AndrewHazelden » Thu Sep 19, 2019 4:02 pm

@SecondMan You said it more elegantly, in fewer words, and with hotkeys too. :bowdown:


User avatar
drisley
Posts: 4
Joined: Thu Sep 19, 2019 12:49 pm

Re: Cinema 4D Motion Blur

#9

Post by drisley » Fri Sep 20, 2019 12:46 pm

Ok baby steps here. I can't tell you all how much I appreciate the time you've taken to help me. :D

I brought in the tiff sequence and exr sequence into Media Pool:
Image

I have the tiff sequence in my timeline:
Image

And I copied your code into Fusion like this and now have the media, and two vector nodes going on:
Image

Now I'm unsure how to proceed from here. :lol:

User avatar
AndrewHazelden
Fusionator
Posts: 1534
Joined: Fri Apr 03, 2015 3:20 pm
Answers: 8
Location: West Dover, Nova Scotia, Canada
Been thanked: 100 times
Contact:

Re: Cinema 4D Motion Blur

#10

Post by AndrewHazelden » Fri Sep 20, 2019 2:32 pm

In the future, if you are rendering your beauty and motion vector channels to the same EXR image files, you could use the "Reactor" package manager provided script called "hos_SplitEXR_Ultra" to separate out each of the individual image channels for you from the selected Loader node in the Nodes view. :)

In Reactor the "hos_SplitEXR_Ultra" script is found in the "Scripts/Comp" category.

User avatar
drisley
Posts: 4
Joined: Thu Sep 19, 2019 12:49 pm

Re: Cinema 4D Motion Blur

#11

Post by drisley » Fri Sep 20, 2019 2:35 pm

Thanks!

You know what? After all this, I discovered the motion blur effect in the Color tab that seems to work well without any sort of nodes or even an EXR pass. I had tried it once and didn't see any results, but now it was fine. Wow. LOL.

This is a good learning experience. I'm going to focus on learning Fusion Nodes after my project is done!

Thank you guys!