PDA

View Full Version : Rendering motion vectors out of Lightwave for ReelSmart Motion Blur



scott.newman.ct
06-28-2017, 02:23 AM
Hi there

Ive been looking around the web, and Ive only managed to find a few out dated and highly complicated posts on this subject.

Im trying to render out a single file motion vector pass to use in After Effects with ReelSmart Motion Blur.

All Ive managed to do is render out separate X and Y vector passes using the features inside Compositing Buffer Export, under the Image Filter tab. But these two separate files seem to be useless for RSMB and I cant find a way to combine them in After Effects.

Im running LW 11.5 on Mac if that is at all relevant.

I would really appreciate any help with this. Im hoping for a simple solution, as scripting and complex node setups really arent an option for me.

For reference purposes - here are images of the scene and the X and Y renders (flying down a valley with mountains).

137203
137204
137205

Sensei
06-28-2017, 02:50 AM
Compositing software needs 2nd (x) image in X-R channel, and 3rd (y) image in Y-G channel.. ?
You can load them in new fresh scene, make quad covering entire screen,
then in Surface Editor, Node Editor make Image node,
use Make Vector,
plug them to X and Y,
plug output from Make Vector to Diffuse Shading.
And render.

scott.newman.ct
06-28-2017, 04:05 AM
Thanks Sensei

Im not understanding 100% here...

Are you saying I need to use the Red channel from the X image, and the Green channel from the Y image? What about the blue channel?

The other problem Im having is that the colourful X and Y images posted above, were saved individually out of Image Viewer. When I choose the save to file option, the X and Y vectors get saved to greyscale images.

Does that sound normal to you?

Thanks again for your help

raw-m
06-28-2017, 10:51 AM
Give this a go: https://youtu.be/C5QiOT84OHE

stiff paper
06-28-2017, 01:07 PM
There's a node setup you can download in this thread:

http://forums.newtek.com/showthread.php?108711-Motion-vectors

I used it back in LW 9.6 to give RSMB compatible motion vectors to an AE compositor, so I know for a fact that it did definitely work in 9.6. Whether it still works in newer versions of LW is anybody's guess.

For some reason, my brain says it needs Pom's Nodes to be installed. My brain could be wrong. It often is. DB&W host Pom's Nodes in the free downloads section of their website.

scott.newman.ct
06-28-2017, 01:49 PM
Thanks Mark

Thats a great video... I had read about EXR Trader in another forum, but without seeing it I was skeptical. Now having seen it in the video I can see its definitely the way to go for a simpleton like myself. I was hoping to find a free solution but I guess Im gonna have to suck it up and get EXR Trader.

The node setup approach is going to take some time to get my head around - I have absolutely no understanding of how it works, or why it works at this stage in my Lightwave journey.

Cardboard - thanks for the link to the node setup. I also got in touch with Lightwave support and they put me on to a similar node setup that I find slightly easier to follow.... here it is here: https://www.youtube.com/watch?v=vUX6F7-BQnA

So it would seem there is no simple and easy solution to get motion vectors for ReelSmart MB out of Lightwave at this point, without buying EXR Trader or putting together a complicated custom node setup. As far as I know RSMB is the only way to work with motion vectors for motion blur in After Effects. Does anyone out there know of any other way to work with X and Y motion vectors for MB in After Effects?

Thanks again for your time and help everyone it is greatly appreciated.

Greenlaw
06-28-2017, 02:36 PM
I can highly recommend exrTrader! I've been using it for many years and it works great for embedding motion vectors. I have to confess I've only used this feature with Fusion's Vector Blur node but I believe there are options to make it work with AE and RSMB.

Also, there are two old plugins that will output an RSMB compatible motion vector pass from your scene. They're easy to use but I'm not sure they're still available or if they work with recent versions of LightWave. A search in these forums should turn them up.

Let me know what you wind up doing. I really should test this myself since I'm using AE more often these days, and the subject even came up at my workplace yesterday.

Ztreem
06-28-2017, 04:58 PM
I use the standard buffer output in lw with layer exr export, motion vectors from these files works perfect in fusion and should work with rsmb also. I have a preset for fusion export somewhere, if I find it I can share it.

scott.newman.ct
06-29-2017, 01:39 AM
Thanks Zstreem

Ive actually been avoiding this subject for years. Im more of a compositor than a 3D guy and I often work with Maya artists who just output the motion vector pass for RSMB and I work with it quickly and easily in After Effects without giving it a second though.

When I have to do 3D on my own projects as a solo artist, Lightwave is my tool of choice. Ive never managed to figure out getting a RSMB vector pass out of LW so Ive always just slapped the standard RSMB plugin onto my 3D layers and let it do its own calculations (which come out OK sometimes).

But now I really want to get to the bottom of this seeing as though I paid for RSMB with the full Pro vector functionality.

RE:Vision Effects got back to me with a solution inside After Effects that seems to work quite well - using the Set Channels effect and pre-comps... although it has quite a few steps and requires you to work in 32 bpc in AE. So not ideal and easy by any means.

Greenlaw, thanks for the suggestions. I checked out the older discussions on this forum and seems some of the plugin links no longer work, or they are Windows only, or for older versions like youve said.

scott.newman.ct
06-29-2017, 01:41 AM
I should probably add that Im exclusively looking for a solution for RSMB inside Adobe After Effects out of Lightwave. Not Nuke, or Fusion.

As far as Im aware, RSMB is the only option for doing XY vector motion blur in After Effects.

gerardstrada
06-29-2017, 05:21 AM
I should probably add that Im exclusively looking for a solution for RSMB inside Adobe After Effects out of Lightwave. Not Nuke, or Fusion.

As far as Im aware, RSMB is the only option for doing XY vector motion blur in After Effects.

Just in case, this is a simplified node setup using db&w Remap node in DP NIF:

https://web.archive.org/web/20140617115130im_/http://lightwiki.com/mediawiki/images/6/6f/Fig37c.png

More info here:

https://web.archive.org/web/20140617115130/http://lightwiki.com/wiki/Multipass_Rendering_with_Filter_Node_Editors#Motio n_Vectors_for_RSMB_.28Update.29



Gerardo

scott.newman.ct
06-29-2017, 08:34 AM
UPDATE: IT IS WORKING!!!!

First of all - thanks again to everybody whos given of their time and experience to try and help me out here.

Gerado - I havnt tried your node setup yet, but I will.

So I finally decided to suck it up and learn how to work with nodes.... I followed the Youtube video link that was sent to me via LW Support (the dwburman video in my 3rd post). Unfortunately that didnt seem to work out for me. See the pictures for the results.

What did work though, was a LW to After Effects workflow sent to me from Pierre at RE:Vision. Again see the picture for the result.

BASICALLY THIS IS WHAT WORKED FOR ME (thanks again Pierre!):

-Rendered to EXR files from LW using the standard Compositing Buffer Export to add X and Y motion vectors to the file
-Inside After Effects, use the EXtractoR plugin (found under Effect > 3D Channel) to extract the X and Y data to two separate instances of the EXR (one for X one for Y)
-Apply an After Effects Shift Channels effect to each instance, and enable only Red Channel for the X instance of your EXR. Enable only Green for the Y instance of your EXR. Other colour channels set to Full Off.
-Make sure After Effects is set to 32 bpc
-Put the X instance layer of your EXR on top of the Y instance layer. Set the Layer transfer mode to Add.
-now add a new solid above these two layers. Make the solid R: 0.5 G: 0.5 G: 0 and set this solid to Screen transfer mode
-this comp is now your motion vector pass and can be used to drive ReelSmart Motion Blur Vectors in another comp
-When you apply RSMB, set Max Displace to 1 and set Vec Scale Y to -1. The blur amount seems to behave as expected.

Thats what worked for me

137235

137236

scott.newman.ct
06-29-2017, 08:42 AM
Good grief! Gerado that is an amazing article in that link. Incredible work.

gra
06-29-2017, 10:18 AM
i was attempting to figure out this exact thing yesterday, so thanks for starting a thread on it.

i found that the solution in scott's post #12 to work great for me. i would add, which maybe obvious to some, is that the motion vector pass needs to be matted with alpha. also to maybe not confuse compositors, it's possible to invert the y motion in the buffer export rather than having to change RSMB's Vec Scale Y to -1.

anybody with better compositing knowledge know what's the purpose of the 50% gray screened layer?

also i tried the dwburman technique from post #6 (https://youtu.be/vUX6F7-BQnA). the node image filter portion works, but when i try to use the compositing buffer with the node pixel filter, the rendered buffers seem to not use the pixel filter. any ideas on why?

djwaterman
06-29-2017, 10:46 AM
Thanks for writing out that description of what worked for you.

gerardstrada
06-29-2017, 07:55 PM
Indeed! nice solution there!



Gerardo

Greenlaw
06-29-2017, 08:47 PM
Awesome! Thanks for sharing that workflow Scott.

I'll try it out and compare the result against what I get from exrTrader and Fusion, and post the images here.

scott.newman.ct
07-03-2017, 06:53 AM
Just in case, this is a simplified node setup using db&w Remap node in DP NIF:

https://web.archive.org/web/20140617115130im_/http://lightwiki.com/mediawiki/images/6/6f/Fig37c.png

More info here:

https://web.archive.org/web/20140617115130/http://lightwiki.com/wiki/Multipass_Rendering_with_Filter_Node_Editors#Motio n_Vectors_for_RSMB_.28Update.29



Gerardo

Hi Gerardo - thanks again for that article. I gave it a read and Ive given your node setup a try (the original one from your article - not the one with the db&w remap node). But it doesnt seem to work for me with RSMB in After Effects. Ive tried it with 8bit/16bit image formats and with FP images and I dont get a correct result.

I would love to get this to work for me with 8 and 16bit image formats for situations where I dont want to composite in 32bit space.

Here are screen shots of the node setup I followed from your article and my result when its applied to the image. Why do you think its giving a different result to my other method?

Thanks again for giving of your time and your help with this

137281
137280
137283
137282

gerardstrada
07-03-2017, 10:34 PM
Why do you think its giving a different result to my other method?
Why do you think I didn't reference the node setup you are trying to use? It was because if you notice, at the beginning of that tutorial it says:

I wrote this article originally called Nah! You can't do that with LightWave... in 2009 for the discontinued HDRI3D magazine

In 2009 we were using LW 9.5/9.6 and unless you are using LW 9.6 these days, that node setup won't work for you :)

I made the node setup with the Remap node some years later, that's the reason why I referenced you that node setup, hoping it might still work for you.

Hope it still helps!



Gerardo

p.s. Michael Wolf suggested to use Remap node but I figured out the node setup with it by myself, so if it doesn't work for you, please don't blame Michael. It would be my fault.

scott.newman.ct
07-04-2017, 07:37 AM
Ah ha! I see - makes sense now, thanks Gerado.

I'm going to give it a try with the remap node setup.

Out of interest, I got in touch with RE:Vision about outputting vectors for RSMB to use in 8 or 16bit/channel colour modes. They say apparently it cannot be done because "some of the motion vectors are negative and these values become zero in 16bit."

Does that sound right? From reading forum posts I got the impression that RSMB and motion vectors can work in 8 and 16bpc modes?

scott.newman.ct
07-04-2017, 08:03 AM
OK - Ive given the remap node setup a try... here are my results below using the FP and non-FP values in the remap node.

And then Ive included the version using standard LW buffer export and EXtractoR in After Effects for comparison. Personally, I think the LW buffer export is the way to go with RSMB in After Effects. I cant speak for Nuke or Fusion... but in AE these are the results I got.

Thanks again to everyone who generously gave of their time and patience - this has been a massive and valuable learning experience for me.

137292
137293
137294
137295

gerardstrada
07-05-2017, 12:14 AM
Out of interest, I got in touch with RE:Vision about outputting vectors for RSMB to use in 8 or 16bit/channel colour modes. They say apparently it cannot be done because "some of the motion vectors are negative and these values become zero in 16bit."

Does that sound right? From reading forum posts I got the impression that RSMB and motion vectors can work in 8 and 16bpc modes?
Well, when I sent the DP Nodes technique to RE:Vision Effects 8 years ago they were very thankful by the setup and results. Guess you might have misunderstood what they said about 8/16 bpc formats (or probably the customer support person didn't understand your question) because what you say contradicts the purpose of the MaxDisplace parameter in its own tool and what they say in their own website about the maths for mapping negative values to full positive ones to conform to their format. at least that's the way it worked before compositing packages were floating point compatible. Nowadays the scaling is not necessary, but still possible. The negative values mapping is still necessary though. Thing that the Ae setup you posted is not doing. If you ask me, results are more correct in linear space, which makes fp domain more suitable. In the node setup I shared, I had to map negative values to positive, but for 8/16-bpc processing, the right value is in dependency on the camera motion, resolution and bit-depth. Some people mapped much higher values (254) when working at lower bit-depth and this is the reason why tools compatible with RSMB allowed you to select a mapping range.


As for your results, have the idea there's something odd there. As commented previously, motion blur is an effect that should be added in linear space, that would be the first thing I'd check (you didn't mention this in your description, so I assume you are working in non-linear space). I'd check also if you are not using negative Y Vector Scale parameter with the DP Filter output, because with the DP Filter technique, we don't need to invert any values in Ae, we don't need also to setup the "pre-compose" each time we have to use RSMB since the node setup can be saved as preset in DP NIF and use it every time we need to output RSMB-compatible format.

There's something strange there because I've tried the method you described in Ae and I got this:

https://s3.postimg.org/3stlb07j7/Ae-setup.jpg

We can see this doesn't correspond with the color scheme of RSMB format, which according to RE:VisionEffects looks like this:

http://revisionfx.com/images/faqs/motion_vector_alpha_2.gif

The setup you described is giving me this result (notice I'm using the negative Vector Scale Y as you commented):

https://s22.postimg.org/mwicjbpht/Ae-setup-result.jpg

camera is moving forward from right to left, but there is as if the camera would kind of spinning around from left to right, or something like that.

With DP Filter method working in proper linear floating point space we get this:

https://s7.postimg.org/x8ftqvg0r/DPFNE-result.jpg

The result not only looks consistent with the actual camera motion but also the RSMB image really conforms with the color scheme of RSMB format:

https://s22.postimg.org/5021mu8dt/DPFNE-setup.jpg

but if you like the unconventional format you get in Ae you may get the same thing with DP Filter as well. Saying just in case the differences we are seeing may be due to RSMB has changed its coordinates format in v5.x (still using V4.x here), but they had warned, I guess.



Gerardo

scott.newman.ct
07-05-2017, 01:31 AM
Gerardo, I think you might be correct about there being differences in the newer version of RSMB. I should have mentioned Im running RSMB v5.0.3

In the last e-mail from RE:Vision support they mentioned this: "You can't because some of the motion vectors are negative and these values become zero in 16 bit.
The only way would be for someone to revive one of the 2 shaders that used to exist and allowed to save all this in a 16 bit integer image."

Not quite sure which old shaders he is referring to here? But maybe its a difference between v4 and v5 as youve said.

And yes - you are absolutely correct. I was working in After Effects's default non-linear colour space in 32 bpc.

That purple and blue motion vector frame you posted - are you saying thats the result you got in AE using the EXtractoR technique?

That landscape render of yours looks awesome, how did you create that? Is it procedural? Very cool

gerardstrada
07-05-2017, 05:58 AM
They talk as if they were referring to direct usage of motion Vectors with RSMB in 16-bpc (integer) image. In such case, we can not use them directly, we need to map them and scale them (either in LW or in Ae). Probably the person who responded didn't know about we are able to conform to RSMB format with DP Filters as well.

The old filters they refer are these:

https://www.lightwave3d.com/assets/plugins/entry/motion-vectors/
https://www.lightwave3d.com/assets/plugins/entry/rsmb-export/

I know one works correctly and the other not. But don't remember which one, sorry.

I haven't used EXtractoR because I got this result when exporting together with RGBA buffer:

https://s9.postimg.org/7oxmmiyxr/EXt_R-issue.jpg

So I exported each motion vector to image directly. But I repeated the whole procedure again by exporting the XY motion vectors without RGBA buffer and used EXtractoR, so no transparency errors, though I still get the purple and blue image:

https://s16.postimg.org/wamzm8tit/Ae-setup_EXt_R.jpg

however the result looks exactly like with DP NIF setup now!

https://s22.postimg.org/vlqhdjjyp/Ae-_New-result.jpg

Have the idea reason why you were not getting same results is because a gamma correction function handles differently negative values. The format we get with this method doesn't look anything like what RSMB recommends though. Guess it works the same in linear space precisely because the negative values are preserved in linear fp processing. But if it works, who cares? :) So I'm attaching a node setup that replicates what you are doing in Ae:

https://s21.postimg.org/tkrmggx07/Ae_Replica.png

If you don't have to invert the Y vector in Ae, I'm proposing this setup

https://s9.postimg.org/d99xawh7z/Ae_Replica_Y.png
(haven't tested extensively so use it at your own risk)

The RSMB pass will look like this:

https://s1.postimg.org/n0fmd0wvj/Ae-setup_Y.jpg

However I still recommend the original setup I shared. For working in lower bit-depth spaces, you'll need that setup because in such case we need to map negative values in order to work with integer positive values anyway. With HD or UHD resolutions, you might want to map values around -254,254 as recommended by their website.

As for the landscape, I'm almost sure it was shared by a LW user in these forums (probably Erikals?), sorry don't remember but if anyone knows please do let me know to credit him properly. As for the retro-reflection moon shading, I shared the node setup in this thread:

http://forums.newtek.com/showthread.php?143700-How-to-make-a-retroreflective-surface&p=1408304&viewfull=1#post1408304

Hope some of this helps!



Gerardo

mummyman
07-05-2017, 08:32 AM
UPDATE: IT IS WORKING!!!!

First of all - thanks again to everybody whos given of their time and experience to try and help me out here.

Gerado - I havnt tried your node setup yet, but I will.

So I finally decided to suck it up and learn how to work with nodes.... I followed the Youtube video link that was sent to me via LW Support (the dwburman video in my 3rd post). Unfortunately that didnt seem to work out for me. See the pictures for the results.

What did work though, was a LW to After Effects workflow sent to me from Pierre at RE:Vision. Again see the picture for the result.

BASICALLY THIS IS WHAT WORKED FOR ME (thanks again Pierre!):

-Rendered to EXR files from LW using the standard Compositing Buffer Export to add X and Y motion vectors to the file
-Inside After Effects, use the EXtractoR plugin (found under Effect > 3D Channel) to extract the X and Y data to two separate instances of the EXR (one for X one for Y)
-Apply an After Effects Shift Channels effect to each instance, and enable only Red Channel for the X instance of your EXR. Enable only Green for the Y instance of your EXR. Other colour channels set to Full Off.
-Make sure After Effects is set to 32 bpc
-Put the X instance layer of your EXR on top of the Y instance layer. Set the Layer transfer mode to Add.
-now add a new solid above these two layers. Make the solid R: 0.5 G: 0.5 G: 0 and set this solid to Screen transfer mode
-this comp is now your motion vector pass and can be used to drive ReelSmart Motion Blur Vectors in another comp
-When you apply RSMB, set Max Displace to 1 and set Vec Scale Y to -1. The blur amount seems to behave as expected.

Thats what worked for me

137235

137236

Can you show your AE comps screen shot for this part: ? Thanks! Looks promising!

Inside After Effects, use the EXtractoR plugin (found under Effect > 3D Channel) to extract the X and Y data to two separate instances of the EXR (one for X one for Y)
-Apply an After Effects Shift Channels effect to each instance, and enable only Red Channel for the X instance of your EXR. Enable only Green for the Y instance of your EXR. Other colour channels set to Full Off.
-Make sure After Effects is set to 32 bpc
-Put the X instance layer of your EXR on top of the Y instance layer. Set the Layer transfer mode to Add.
-now add a new solid above these two layers. Make the solid R: 0.5 G: 0.5 G: 0 and set this solid to Screen transfer mode

erikals
07-05-2017, 09:11 AM
not my landscape i think, though it looks quite similar :)
https://www.youtube.com/watch?v=DKLxZ5aqcWY

thanks for sharing RSMB tricks! https://redcountyrp.com/forum/images/smilies/oldtimer.gif

scott.newman.ct
07-05-2017, 09:56 AM
Mummyman - Ive put together this very basic screen recording to show you how I got it working in After Effects. Sorry there is no audio:


https://www.youtube.com/watch?v=HzxSPagOYY4

Gerardo, thanks for the node setup and all the information! Like you said - "If it works, who cares" Hehe!

I would like to understand everything Im doing... and someday I will. But for now just getting it to work is enough.

Thanks again for everything. I hope this post is able to help out some other Lightwave/After Effects users out there.

mummyman
07-05-2017, 09:57 AM
Hey! Thank you, Scott. I'll check it in a little while. Much appreciated.


Just watch... AWESOME, indeed! Thanks!

gerardstrada
07-06-2017, 11:45 AM
Erikals, It looks pretty similar. Interesting experiment, btw!

Scott, Thank you for the video! I've realized why I was getting the blue and purple result. It was because I was using RGB=0.5 for the Screen Solid instead of RG=0.5 and B=0. My mistake! Sorry. This is what I get after inverse-multiplying by the right values:

https://s11.postimg.org/7k71u3blf/Ae_Corrected.jpg

Curiously, results are exactly the same than before and what we got with DP Filter without inverting Y value:

https://s13.postimg.org/zad1w9ik7/Ae-_Y-inversed.jpg

Anyway, if you want to simplify your setup in Ae and skip the Shift Channels filter, you can go in this way when using EXtractoR:

https://s14.postimg.org/vlc5jvblt/EXtracto_Rsetup.png

Just pick Motion.X for Red channel and Motion.Y for Green channel, use (copy) for all other channels and the layer will automatically get the right colors. You can use also Solid Composite to simplify your setup to just a single layer :)

There's also a way to get exactly the same output we get with DP Filter, so one don't have to invert Y channel. It's also a 1 Layer solution:

https://s14.postimg.org/sis8qxpld/New_Ae_Setup.png

1. Extract X and Y Motion Vectors from EXtractoR as mentioned before.
2. Add 3 Solid Composites filters with the following settings:
- First: Color: 0.5,-0.5,0.0 / Blending Mode: Multiply
- Second: Color: 0.5,0.5,0.0 / Blending Mode: Add
- Third: Color: 1.0,1.0,0.0 / Blending Mode Exclusion

That's all!

Output:
https://s9.postimg.org/u40uk4jwv/Ae-_New_Meth_Result.jpg

Result:
https://s4.postimg.org/9ydwme0q5/Ae-_New_Method.jpg

Just in case, this is another way to get the same output in DP Filter:
https://s22.postimg.org/uor9runcx/RSMB-_NIFsetup.png



Gerardo

Danner
07-06-2017, 05:02 PM
If anyone ever disputes we have the best community I'll just point them to this thread.

scott.newman.ct
07-07-2017, 01:44 AM
Thanks Gerado - thats brilliant. Just using one instance of EXtractoR makes way more sense. I tested it out and it works perfectly like you say - but I just used one solid composite layer of R 0.5, G 0.5, B 0 set to screen. The colorful vector image looks a bit different, but because RSMB disregards the blue channel I dont think it matters, only the values in R and G seem to count.

137313

I dont understand what your three solid composite layers are doing? Why three colours?

gerardstrada
07-07-2017, 10:44 AM
Maybe you are getting different color scheme because your alpha should be set to (copy) as well. though glad it's working fine!

My setup has 3 solids because it tries to conform exactly to RSMB format without the need to invert the Y vector. By default motion vectors come from negative (-1) to positive (+1) values, and we need to map that to a 0-1 range for scaling later. I'm terrible on maths so for me it's easier to explain this through images:

https://s18.postimg.org/wc008lrkp/solids.png

The first gradient represent our values ranges from -1 to 1. In order to convert that to a range from 0 to 1 we need first to scale down by half the range or multiply by 0.5 (this is what the first solid does, represented by the second gradient). Now our range goes from -0.5 to +0.5.

So then we need to shift or "displace" the whole range by a half, so all is from 0 to 1, this is made by adding 0.5 to move the whole range forward (this is what our second solid does, represented by the third gradient).

Finally, we need to invert the resulting range (but only X and Y channels, not Z), so we subtract the range from 1 (this is what our third solid does, represented by the fourth gradient).

And that's essentially the logic behind those numbers ...I guess :)

So if let's say you want to "prepare" this output to work in 16-bpc, you may add an Exposure filter just after the EXtractoR filter and scale down the vectors by let's say -5 or -6 stops (working always at 32-ppc linear space) and save that to work later in lower bit-depth. Think doing it with DP Filter may be easier.



Gerardo

scott.newman.ct
07-08-2017, 02:41 AM
Thanks Gerado - for some reason changing the alpha has no effect at all. I think in the EXtractoR plugin, the "copy" setting doesnt mean off, it means no change. So essentially its setting R to X and G to Y and leaving the blue channel unchanged. I cant find a setting for OFF in EXtractoR, but if I apply a Shift Channels effect after it and then set Blue to FULL OFF then I get the correct looking result.

But keeping the blue channel on has no effect on RSMB - I think it completely ignores the blue channel.

From what Ive seen there is no way to get RSMB to work in 16 bpc or 8 bpc

gerardstrada
07-08-2017, 08:31 AM
I think it makes sense blue channel is not taken into account, seeing that only Red and Green channels are used for X and Y vectors. Anyway, if it works and it's simpler... :)

RSMB indeed works in 8-bpc / 16-bpc, it's just that the scaling down of the RSMB vector data image should be set up from linear floating point space (32-bpc) then exported and finally loaded in your 16-bpc project.



Gerardo

scott.newman.ct
07-08-2017, 01:12 PM
What version of RSMB and After Effects are you working with? Have you got it to work correctly in 8/16 bpc?

Ive tried the node setups out of LW, Ive tried exporting the linear FP export out of a 32 bpc project with no luck. Every time I apply the RSMB effect in 8 or 16 bit in After Effects it just turns to a mess.

gerardstrada
07-08-2017, 02:28 PM
As mentioned before, you need to scale down the motion vectors before exporting for 16-bpc. i.e. in Ae you could go in this way:

https://s18.postimg.org/bs8yf4q6x/RSMBscaled.jpg

Or in DP Filter in this way:

https://web.archive.org/web/20140617115130im_/http://lightwiki.com/mediawiki/images/6/6f/Fig37c.png

or in this way:

https://s23.postimg.org/bxyi9q27f/RSMB-16-settings.png

Then when using it in linear 16-bpc with the default RSMB settings we got same results than working in linear 32-bpc:

https://s16.postimg.org/jd2im3dt1/RSMBsettings.jpg

Hope it helps!



Gerardo

raw-m
07-09-2017, 11:07 AM
Enjoying you research, most of which has gone well over my head :D Slightly OT but I notice on all these results, including mine, you're getting jaggy edges around the alpha area. Is that a limitation of RSMB or does everything suffer from that?

mewnow
07-09-2017, 11:47 AM
Gerardo: Would you share some love on specular function (http://forums.newtek.com/showthread.php?139606-Specular-Highlights/page3&highlight=Specular+Highlights)?

gerardstrada
07-11-2017, 10:18 AM
raw-m, haven't noticed jaggy edges with RSMB. At least my sample image has very low AA passes - around 5 or so.

mewnow, concepts have been already proven in that thread.



Gerardo

Axis3d
07-11-2017, 01:40 PM
I followed your video tutorial. I notice that there seems to be an alpha channel clipping the edges of the model from blurring correctly. Around 3:02 in the video. The edges of the mountain tops should be soft and blurred, but seemed to be clipped by an alpha channel. I tried this setup with an object in the center of the frame, which is rotating. The blurring is happening, but within the non-blurred alpha channel of the object. Any ideas?137355

gerardstrada
07-11-2017, 03:59 PM
For alpha-enabled layers, same alpha has to be applied for vectors image as well. Just pre-compose your RSMB vectors image with the convenient alpha matte layer.

http://help.revisionfx.com/resource/78/single/



Gerardo

Axis3d
07-12-2017, 12:05 PM
Awesome. Thanks. That worked.

KSTAR
07-27-2017, 07:58 PM
Hi Greenlaw I am a Fusion user and want to begin using motion vectors buffers in Fusion. I have been reading lots of the threads on the subject going back several years. My impression is that using motion vectors out of LW via exrTrader or the native LW buffers in Fusion with the native vector motion blur node seems a lot easier and hassle free compared to trying to work with them in AE with RSMB or Fusion with RSMB. Am I correct in that assumption? If so are there any drawbacks or compromises using Fusion and the native motion vector blur node vs AE or Fusion with RSMB?

m.d.
07-27-2017, 09:49 PM
RSMB was originally developed to simulate motion blur via optical flow....and at the time it was one of the pioneers. This is done through tracking of every pixel (or subsample) and applying optical flow generated vectors to effect a blur.
RSMB oflow can work on live footage/or footage rendered without vector pass, that is it's advantage. OFLOW MB will artifact though....and it cant work on stills...for that you need vectors

They both can do motion blur via vectors...however fusion seems to have a more compatible standard vector pass, while RSMB is a little more specific workflow.
I would always use vector pass motion blur if possible over OFLOW techniques, as they are way faster....have no artifacts, and have 1 sample per pixel.

The only thing you are paying for with RSMB is OFLOW MB....which AE has had native for a few years now....and can be done in fusion studio using the dimension vector generators plugged into the vector blur node.....
So IMHO RSMB is basically obsolete....as reflected in their pricing

Greenlaw
07-27-2017, 09:50 PM
Yeah, it's pretty easy to do with exrTrader and Fusion. You just output the EXR straight out of LightWave and plug it into a Vector Blur node in Fusion, and it works. If you've added a preset to name the channels correctly (in exrTrader,) Fusion will recognize that you have motion vector data in the render and automatically appy it in the Vector Blur node. No need to set up special buffer nodes in LightWave or extract the channels like you have to in AE for RSMB.

In certain situations, artifacts may potentially result with post-procesed motion blur but that would be the case with either method. There are always workarounds though, and most of the time, it's really not an issue when you properly break out the scene elements.

IMO, the time you save compared to in-camera motion blur makes it totally worth it. And if the post blur fails, you can still fall back to the 'real' thing.

I've been meaning to throw a tutorial together to show how it works. I'll try to make that happen over the weekend.

m.d.
07-27-2017, 09:51 PM
double post

Greenlaw
07-27-2017, 09:53 PM
The only thing you are paying for with RSMB is OFLOW MB....which AE has had native for a few years now....and can be done in fusion studio using the dimension vector generators plugged into the vector blur node.....
So IMHO RSMB is basically obsolete....as reflected in their pricing
When I'm using AE, I find it's good to have both. AE's native Pixel Motion Blur can be super slow compared to RSMB and it can't use vector data. But it does produce different results from RSMB, sometimes better results. Typically, I'll use RSMB first and if it produces bad artifacts, I'll switch to Pixel Motion Blur.

m.d.
07-27-2017, 09:59 PM
options are always good :)

When RSMB was $500....it was a bit expensive. But for $150 its nice to have on the side.

KSTAR
07-27-2017, 10:48 PM
A tutorial would be awesome! providing your schedule allows it of course :)

I could only find two Fusion based vector motion tutorials on YouTube one was for Cinema 4D which gets into the needs for using expressions in Fusion to make the vector motion pass usable due to how Cinema 4D outputs the pass. The other was for Corona Render, so the two tutorials differed somewhat. A Lightwave tutorial with specifics to exrTrader such as altering settings in the processing tab, do you need to flip channels in Fusion, differences from using the native LW buffer export, etc. would be helpful and I'm sure highly appreciated from the LW Community.

daforum
07-28-2017, 12:26 AM
Tutorial +1 :thumbsup:

gerardstrada
08-02-2017, 08:50 PM
Agree with Greenlaw, RSMB sometimes work better than native solutions.
And talking about options, a vector motion blur option for LW is also DP VectorBlur:

https://s1.postimg.org/hspskd6hb/DPVector_Blur.jpg

which in my sample at least offers pretty much same results than RSMB:

https://s3.postimg.org/f0f5n7iwz/RSMB.jpg

Fusion's Vector Motion Blur node in this case blurs also a bit the background geometry but it's a good option as well:

https://s1.postimg.org/dr0cwmazj/Fusion.jpg



Gerardo

Danner
08-03-2017, 07:13 AM
I noticed that extra blur in fusion, so I went back to Afterfx. Does anyone know how to get rid of it? I really enjoy working in fusion even if I'm still faster in AfterFx.

50one
08-03-2017, 08:17 AM
Speaking of DP kit/nodes - noticed these haven;t received any updaes in a long time are they still being bug fixed?

gerardstrada
08-03-2017, 09:05 PM
Danner, the aliased edges seem to be an issue for Vector Motion Blur node in Fusion, so you might render at double/quadruple (no AA) and resize or you can render as usual and try by using a bit of VaryBlur in the Vectors image. Later can use an UnsharpMask in the result to get back the crispness:
https://s3.postimg.org/tguet2msz/Fusion_VMBs.gif

50One, at least DP Filters have been upgraded recently. There was recently a memory fix in Pixel Node Editor and just yesterday Denis improved the sample evaluation of DP VectorBlur :)



Gerardo

Skywatcher_NT
09-01-2017, 03:39 AM
Hi,

is it possible to get the 'backward' motion vectors at the same time as the normal motion vectors out of lightwave ?
As if the scene is played in reverse.

thnx

stiff paper
09-02-2017, 07:47 AM
is it possible to get the 'backward' motion vectors at the same time as the normal motion vectors
Not to the best of my knowledge, no.

MVs are best done as a separate pass anyway. It's extremely quick to render and your MVs can be much better quality.

What you can do is make a duplicate of your scene in which you turn off practically everything in your render. (So, turn off Raytrace Shadows, Raytrace Reflection, transparency, refraction, occlusion, depth buffer, render lines, etc. Set Shading Samples and Light Samples each to 1. Disable GI. Delete all the lights and set the last one to 0%. Be sure to turn off saving the render.) The only thing you need to leave switched on is the motion blur. Motion blur still renders when everything else is turned off. This will give you a quick to render Motion Vectors pass. You don't save the render (because it's black), you just save your compositing buffer MVs.

Doing this allows you to turn up the motion blur settings far, far higher than you would if you were doing a full render, so you get nice, high quality MVs. Dithered and 16 passes is a good place to start, but increase the passes and F9 until you like the quality/time balance.

To get "backwards" motion blur just set Blur Length to negative values (-50%, for example).

Edit:
Forgot to say - turn off antialiasing also.

gerardstrada
09-06-2017, 01:17 AM
If by 'backward' motion vectors you mean negative motion blur as Cardboard is pointing out, you can also invert X,Y vectors in DP filter. At least works with RSMB node setup.



Gerardo

Skywatcher_NT
09-07-2017, 01:19 AM
Hi thanks for the replies.
I used the nodes from this thread and it worked perfect ( thnx Gerardo ! ) but now I need the 'backward vectors' ( like if the scene is played in reverse ).
What I did was this :

137844

It looks almost correct but I'm not sure.
I made a 'reverse' scene ( animation in reverse ) and the result is ok for a cube but with a character there are tiny differences
compared to the node output.

gerardstrada
09-07-2017, 02:48 AM
Glad it's helping!

For backward vectors I would try this one:

https://s26.postimg.org/n207dac6h/Inv-_RSMB.png

in the case of the node setup you are using, it would be something like this:

https://s26.postimg.org/r0xew40tl/Inv-_RSMB2.png

that's the inverse of what RSMB actually needs.



Gerardo

Skywatcher_NT
09-07-2017, 03:35 AM
Gerardo, thank you for the quick reply ! I'll try it out.

Skywatcher_NT
09-07-2017, 06:12 AM
Well, the comp guy tells me the forward and backward vectors don't match. Any thoughts ?

gerardstrada
09-07-2017, 05:21 PM
Here the backward node setup exactly match up with what we got when using negative mblur.

Look, this is the RSMB result with positive mBlur (original node setup):
https://s26.postimg.org/i282tsodl/orig_SRMB.png

This is what we get when setting negative motion bur (same node setup):
https://s26.postimg.org/kkyd87zhl/orig_RSMBnegmblur.png

And this is what we get with positive motion blur and backward node setup:
https://s26.postimg.org/kkyd87zhl/orig_RSMBnegmblur.png



Gerardo

Skywatcher_NT
09-11-2017, 08:09 AM
Still having troubles to get the 'backward' vectors.
What we see here is for a negative motionblur. And yes, the node gives the same result ( thanks for checking again ).
In fact, if I'm not mistaking you can do that also in comp by making e.g. the X vector ( red ) negative ?
But when I reverse the scene ( so it plays the anim from 0 to x but then backward ) there's a different outcome for the vectors
and I don't know if it's possible to get them via nodes this way. In a simple scene I can just mirror the animation ( e.g. 0 becomes 100 and 100 becomes 0 ).
But for more complex scenes it' s a bit much ...
Hope there's still a solution !

gerardstrada
09-11-2017, 11:18 PM
Still having troubles to get the 'backward' vectors.
What we see here is for a negative motionblur. And yes, the node gives the same result ( thanks for checking again ).
In fact, if I'm not mistaking you can do that also in comp by making e.g. the X vector ( red ) negative ?
Yes, theoretically is in that way, but in practice people tend to do this in their final compositing project, and there it might not be the same by depending on your CM settings. In such case your comp guy would need to take care about color management to solve first the RSMB pass. So for avoiding unnecessary complexities in comp, I'd recommend solving it with DP Filter in LW beforehand.


But when I reverse the scene ( so it plays the anim from 0 to x but then backward ) there's a different outcome for the vectors
and I don't know if it's possible to get them via nodes this way. In a simple scene I can just mirror the animation ( e.g. 0 becomes 100 and 100 becomes 0 ).
But for more complex scenes it' s a bit much ...
This might be due to the motion blur could be off-centered.


Hope there's still a solution !
If you want to get exactly same results when going forward and backwards you need first to center mblur for each frame. i.e: you might want to try a Shutter Open value of -25% if the Blur Length is set to 50%.



Gerardo

scott.newman.ct
03-05-2018, 07:37 AM
An update to this thread with LW 2018:

Ive just purchased LW2018 and Ive been messing around with instancing and outputing motion buffers.

I have to say Im impressed and happy with the results so far. LW2018 handles instancing SO much faster and to a much higher instance count on my same old machine. Scenes that were un-workable and slow are totally managable now.

And outputing the motion vectors is very easy in the render setting tabs. I find I still have to use the same technique inside After Effects to "decode" and use the motion vector output (as in my Youtube video a few posts back).

But all in all the workflow and results are way better in my opinion. Heres a scene with terrain and one plant/bush that has 3 million instances over a 30 square kilometer area. The motion blur is being done in After Effects using EXtractoR plugin along with Reelsmart Motion Blur.
140520

Chrusion
03-15-2018, 09:57 AM
Scott,

Thanks for bumping this up to 2018 level. I found it very useful. Now that 2018 has multilayer buffer export to OpenEXR, your vid tutorial plugged right in.


Put the X instance layer of your EXR on top of the Y instance layer. Set the Layer transfer mode to Add. I found the order to be irrelevant. Add is Add no matter which comes first.


now add a new solid above these two layers. Make the solid R: 0.5 G: 0.5 G: 0 and set this solid to ScreenThis is the layer I don't understand. Why is the 50% yellow offset layer needed? I mean, what does the yellow data do to the vector info contained in the red and green channels? Wait... I'm not sure, but since the blue channel was set to the respective X/Y channels in the Extractor step to make a grayscale image, then that blue "data" captured in both the X and Y layers (shifted to red and green, respectively) must be "cancelled" out by Screening the opposite hue, yellow. Am I close? But why only 50% saturation? Oh, never mind. At 100% saturation (255, 255, 0), the Screen algorithm sees only the full 100% yellow. Interesting. 50% it is, but again, just confirm that yellow is needed to nullify the blue component added when extracting to make each vector a grayscale.

Ignore all that. After working with 2018, where you can export the XY motion vectors to EXR with X already mapped to R, Y to G, and B = 0, I found that the 50% yellow offset layer isn't needed. When using a separately saved XY exr image (or sequence) directly in RSMB, I get a blur that's twice as much as the extracted and color shifted version. The raw XY exr image does not have a yellow cast to it, so I disabled the yellow screen layer in the extracted version and the blur was exactly the same as the direct XY exr. I'm pretty sure this is because the motion buffer in a multi-layer EXR doesn't have any blue in it to begin with that needs to be cancelled by a yellow offset layer.

scott.newman.ct
03-16-2018, 02:19 AM
Thanks Chrusion

I gotta be honest with you - Im not much of a maths guy, so I never really understood what was going on with that funny "50% yellow" screen layer. The only reason I was using it was because the technique had been shown to me that way by a guy from Re:Vision software.

Im sure there must be a way to just drive motion blur in Reelsmart with the straight motion vectors right out of LW2018 - instead of using the crazy EXtractoR plugin workflow.

But bottom line - the EXtractoR plugin workflow works and gives the correct result even though its a bit painful and time consuming.

Chrusion
03-16-2018, 08:25 AM
Im sure there must be a way to just drive motion blur in Reelsmart with the straight motion vectors right out of LW2018 - instead of using the crazy EXtractoR plugin workflow.My apologies for the confusion when I said:
After working with 2018, where you can export the XY motion vectors to EXR with X already mapped to R, Y to G, and B = 0, I found that the 50% yellow offset layer isn't needed. When using a separately saved XY exr image (or sequence) directly in RSMB... I was thinking this was clear in that you CAN use XY Motion data straight out of LW directly in RSMB without having to do the extractor and color shift processing. Just enable Motion in the Buffers tab of Render Globals, then set up the Standard Output to save the Final Render as RGB to desired 24-bit format and the Motion output set to OpenEXR RGBFP. The EXR will have X already mapped to Red and Y to Green. Blue will not be output, so no need to compensate with the 50% yellow screen layer in a separate comp in AE. Simply toss the RGB and EXR sequences in a single comp and add RSMB to RGB layer set to use the EXR layer below it. Max offset = 1, RGB channels = 1, Blur = 2 to 4 as desired. Oh, and set the color management tab in Interpretation properties for the EXR sequence to enable the checkbox for "keep RGB as is (or similar wording)."

Greenlaw
08-14-2018, 12:28 PM
Reviving this old thread because I'm finally trying out LW 2015.3 motion vectors for After Effects and RSMB Pro. I'm using the AE setup from Scott's video, and seeing something odd that I can't figure out.

My initial tests worked fine. I made a cube that moves in a square pattern, and tumbles along one side of that pattern. I don't have exrTrader at work, so I set up the export using LightWave's native Channel Buffers, and saved out an .exr sequence. In AE, I set the project to 32bpc, assembled the moVec precomp as described in the video, and added an Adjustment layer to the main comp and appled the effect with the suggested settings above the RGB layer. The motion blur looked correct to me. Next, I made a couple of variations of this test and it still looked good.

Then I tried it on an actual production scene depicting a vehicle zipping wildly through a city environment. In this case, I rendered a 'lightless' version of the scene with the motion vectors and depth channels enabled. I had disabled all ray-tracing effects because I already had an RGB render available and I didn't want to wait all day for buffer channels that didn't need any lighting. I imported the output to AE and setup the moVec precomp. Up to this point, everything looks okay to me.

Next, I added the Adjustment layer over the RGB render and added the RSMB Vector effect. The motion blur is applied to the scene, I think the directions look good, but he edges of the vehicle are not being blurred.

At first I thought this was an alpha channel issue but the channel buffer render has both the vehicle and city environment in the same render, so there is no visible alpha.

Any thoughts? Sorry, I can't show what I'm working on but I was wondering if anybody here has encountered this and knows what I'm doing wrong here.

One thing I'm noticing is that the RGB values in the moVec precomp sometimes have weird values like 1e+002. That doesn't seem right but I don't see how that effects the vehicle edges either. I can't spend a lot of time on this so fishing for some ideas.

Thanks in advance for any help.

Greenlaw
08-14-2018, 12:36 PM
One difference between my tests and the production scene is that, in the tests, the objects have no background. I would think this shouldn't be an issue for the production scene though...without an alpha to clip anything, shouldn't the vectors just smear the pixels over the edges.

The odd pixel value mentioned above has me thinking maybe there are some extreme values going on in this render that prevent the vectors from 'crossing' the edges of the fg object. Does that make sense?

Greenlaw
08-14-2018, 12:42 PM
Oh, I just noticed something else: Occasionally, a foreground environment element passes in front of the vehicle. This object will be blurred correctly against the background but in the region that passes in front of the vehicle, the edge of the FG object is not blurred, just like the edge of the vehicle.

Something is definitely messed up here.

Greenlaw
08-14-2018, 12:44 PM
I'll see if I can re-create this in a generic example after I get home and upload it here.