Hi there.
Is it possible to create a custom Render Engine (bpy.types.RenderEngine), inheriting or extending Eevee instead of coding a complete external engine?
What I want to do is –sort of– simple, just render a number of subframes in eevee, and average them into a single image, to achieve full object based motion blur, easily and fast.
I already wrote an addon (very hackish btw GitHub - g3ntile/eevee_motion_blur: Script to render in Blender EEVEE with motion blur) that does that: It creates a panel that uses eevee to render the subframes, average them and saves the result to disk. It achieves a beautiful smooth motion blur that works with object animation, particles, deformation, physics, and everything with interpolated animation, about 5 times faster than cycles .
But I ran into a couple of issues:
-
The script freezes Blender until it finishes (I couldn’t make it cancelable, due to my limited coding skills :-S . I’m learning to use modal operators hoping to solve that at least).
-
I can’t give feedback to the user about the progress of the render (via status bar, panel, etc). If I write to the status bar, it ignores all writes until the script is finished. I send the output to the console, and it works ok there of course. While that is enough for myself (I use my addon in production with no issues), but for average users it’s annoying; not everyone checks the console, and they just see Blender freeze with no update and start to panic.
I thought that creating a Custom Render Engine that just uses Eevee is a more elegant solution that may solve both issues and integrate better into Blender (without messing with a patch for Eevee, for which I completely lack the coding skills).
Is that possible somehow?
(something like:
class myCustomRenderEngine(bpy.types.RenderEngine, whatever_className_Eevee_has):
"""I extend both RenderEngine AND Eevee yay!"""
)
Thank you very much! And sorry if this is a silly question
ps: I tried switching the render engine to EEVEE inside the render() method of the customRenderClass (silly and hackish, I know) and it crashes really bad.