Rizon Posted November 10, 2020 Share Posted November 10, 2020 Hello, I've imported an Houdini alembic file into c4d, added an octane objecttag for motion blur through vertex speed (trail sop velocity data), which worked fine. Now I would like to render out the animation through c4d without motion blur and add it in post in After effects, any hints on how to get the necessary velocity data into AE ? Thanks! Quote Link to comment Share on other sites More sharing options...
Librarian Posted November 10, 2020 Share Posted November 10, 2020 // 2D motion vector output in absolute pixels, lewis@lewissaunders.com July 2018 // Paste this in an Inline Code VOP, enable "Expand Expressions in Code" // Connect a Bind set to "vel", type Vector, to the first input // Set Output 1 Name to "mv", type Vector // Connect the output to a Bind Export set to the name used in Mantra's image planes // Make sure motion blur is enabled on the ROP, even if "Allow Image Motion Blur" is not vector ndcv = toNDC(getblurP(1.0)) - toNDC(getblurP(0.0)); string engine; renderstate("renderer:renderengine", engine); if((engine == "raytrace" || engine == "pbrraytrace") && isbound("vel")) { // When rendering volumes in raytrace mode the getblurP() method doesn't work, but we do the best we can // It's correct for a static camera but there's no way to incorporate camera motion. For simple camera moves // the camera motion vectors can be added to this in comp before the blur is done... to get solid vectors // from a volume the density normally needs to be increased a lot anyway, and rendered as another pass, so // it might be better to just do that pass in micropoly mode :) vector p0 = getblurP(0.0); vector framev = vel / $FPS; vector camerav = vtransform("space:object", "space:camera", framev); ndcv = toNDC(p0 + camerav) - toNDC(p0); } vector res; renderstate("image:resolution", res); ndcv *= set(res.x, res.y, 0.0); \$mv = ndcv; Maybe it Helps who knows ....From Lewis Saunders Quote Link to comment Share on other sites More sharing options...
Rizon Posted November 10, 2020 Author Share Posted November 10, 2020 2 hours ago, Librarian said: // 2D motion vector output in absolute pixels, lewis@lewissaunders.com July 2018 // Paste this in an Inline Code VOP, enable "Expand Expressions in Code" // Connect a Bind set to "vel", type Vector, to the first input // Set Output 1 Name to "mv", type Vector // Connect the output to a Bind Export set to the name used in Mantra's image planes // Make sure motion blur is enabled on the ROP, even if "Allow Image Motion Blur" is not vector ndcv = toNDC(getblurP(1.0)) - toNDC(getblurP(0.0)); string engine; renderstate("renderer:renderengine", engine); if((engine == "raytrace" || engine == "pbrraytrace") && isbound("vel")) { // When rendering volumes in raytrace mode the getblurP() method doesn't work, but we do the best we can // It's correct for a static camera but there's no way to incorporate camera motion. For simple camera moves // the camera motion vectors can be added to this in comp before the blur is done... to get solid vectors // from a volume the density normally needs to be increased a lot anyway, and rendered as another pass, so // it might be better to just do that pass in micropoly mode :) vector p0 = getblurP(0.0); vector framev = vel / $FPS; vector camerav = vtransform("space:object", "space:camera", framev); ndcv = toNDC(p0 + camerav) - toNDC(p0); } vector res; renderstate("image:resolution", res); ndcv *= set(res.x, res.y, 0.0); \$mv = ndcv; Maybe it Helps who knows ....From Lewis Saunders Thanks Tesan! Not yet came too scripting but will give it a try! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.