Open kubo-von opened 4 years ago
Hey @kubo-von I'm guessing these geos have stable topology? Also does it have motion steps? I'll take a look soon, thanks for the test data.
Yeah it's just deformation, no topology changes. The Alembics were exported with 2 motion blur samples from Houdini. I've just checked it's working in Gaffer Arnold:
Hey @kubo-von
This one is a bit of a head-scratcher for me to meet in the middle what Gaffer is sending to the renderer (basically just the shutter open/close frames) and what Cycles wants (shutter open, frame itself and close frames) and the Blender converter code is confusing, so it'll take me a bit of time (fixing transform blur first). My assumption right now is that in the transform case, it only has the open and close values but not the frame itself so it is glitching, I'm experimenting with a simple linear lerp of the two values but this might need to scale better by re-sampling relative to shutter open/close and if there's more samples than just 2.
I've figured out the crash at the end of batch rendering already (turns out you can only modify the default camera and not replace it with your own as it is book-keeping some data that it gives to the device and asserts if there's a mismatch).
Cheers!
Hey @boberfly
Ah right, that explains the glitches with transform I'm getting. Thanks for looking into this!
I've also checked if cycles handles motion blur on meshes with changing topology and it seems not yet, it's waiting for D2388 Some workaround are doable though, like Flip Fluids addon which is adding prev and next frame blenshape deformed by the velocity, this could be even done by users even when exporting the alembic cache once the deformation blur is working.
Cheers!
That's more of a blender-specific patch, you can do something similar today with an OSLCode node that pushes the verts with a velocity primvar.
Anyways, I had the system explained to me clearly and it sounds like I am on the right track, but I'll need to lerp a few verts and matrices (fortunately Cortex rocks and has everything I need to do this).
Some progress: Transform is fixed but I'm not sure if the blur streak should be shrinking with more segments, I need to see what Arnold does here (increasing transform segments) but it seems wrong to me? Anyways, onto deformation now once I get a bit of time again.
Got the fix here: https://github.com/boberfly/GafferCycles/commit/b4366173fe86226e2b6886d4dd615b86c46c4fe3
The parts I'm not too sure about are the multiple motion segments and camera shutter for accuracy against Arnold, but that is hopefully the easier part.
Awesome! Just tested it and seems to be working great.
I wanted to do some more tests with more motion steps (I assume that's what motion segments are?) and compare to Arnold. But could not find where top set these ? In Blender cycles it's per-object attribute. I've tried adding custom "motion_steps" attribute but no luck.
The settings are in a StandardAttributes node. I'm seeing the motion streak shrink with more steps so I am wondering now if Blender does this as it could be a bug in Cycles itself.
Ah, right, sorry, don't know my gaffer nodes well enough yet :)
I see that too in gaffer. It doesn't seem to happen in Blender, but rotating object with one step looks like this there, and the motion steps have no effect what so ever, so it seems it's doing something else under the hood.
On similar rotating object in gaffer I get what I would expect with 1 step:
Fixed: https://github.com/boberfly/GafferCycles/releases/tag/0.18.0
Not sure about the rotational arcs though, might not be working yet.
Awesome, thank you!
Yeah seams the transform motion blur in rotation is still doing linear steps.
Not a biggie, unless you're doing chooppers and propeller planes I guess :D
Here's my simple test scene if it helps: https://drive.google.com/file/d/1rjNI8f5p7ECDBPmgsO_AAmWOAO3w10l4/view?usp=sharing
Hey @boberfly ! It seems deformation motion blur is not working. Test scene: gaffer Sphere animated with transform node, deforming alembic mesh, deforming hair. render:
The sphere is working (probably because it's transform blur, but also it seems like the bbox of the mesh is clipping it ), mesh is not working, the hair I didn't manage to render, when it's in the scene and motion blur is enabled the batch render fails.
Files here: https://drive.google.com/drive/folders/1j53KiEvSqaYjyhjS3wrtUbSx1SSzlZqG?usp=sharing
Cheers!