p2or / blender-loom

image sequence rendering, encoding and playback
175 stars 10 forks source link

Turbo Tools v3 integration #58

Closed ss-kuroz closed 1 year ago

ss-kuroz commented 1 year ago

I was wondering if there is a way for me to customize my Command Line when using Render Image Sequence. Is this possible?

I am currently trying to find a way to make Loom compatible with Turbo Tools V3 Here's where you can take a look: https://blendermarket.com/products/turbo-tools-v3---turbo-render-turbo-comp-temporal-stabilizer/docs

According to their document, they stated:

To render from the command line use: Animation:

blender -b "E:\blender\benchmark scenes\classroom\Classroom.blend" --python-expr "import bpy; bpy.ops.threedi.render_animation()"

Still image:

blender -b "E:\blender\benchmark scenes\classroom\Classroom.blend" --python-expr "import bpy; bpy.ops.threedi.render_still()"

btw thank you for developing such a fantastic add-on. I truly adore it.

p2or commented 1 year ago

Hi @kurodapoet,

thank you for your kind words, glad that the add-on is useful for others as well.

I was wondering if there is a way for me to customize my Command Line when using Render Image Sequence. Is this possible?

Usually you don't have to. If the 'render engine' is implemented properly, rendering with Loom should work out of the box for all engines. In this case, it seems to be more of an extension for Cycles, so I don't think there's any chance of getting this to work without seeing the actual code.

However, you can try to replace bpy.ops.render.render() call with bpy.ops.threedi.render_still() in line 3813 as well as line 3815 and see whether this works for the command line. Does this help?

            ...

            if silent:
                # bpy.ops.render.render(write_still=True) 
                bpy.ops.threedi.render_still()
            else:
                # bpy.ops.render.render("INVOKE_DEFAULT", write_still=True)
                bpy.ops.threedi.render_still()

            if frame not in self._rendered_frames:
                self._rendered_frames.append(frame)

            ...

Cheers, Christian

ss-kuroz commented 1 year ago

Hi Christian,

Thank you for responding. I tried to replace it. bpy.ops.render.render() call with bpy.ops.threedi.render_still() in line 3813 as well as line 3815

It was functional, but the rendering process was slow and would often get stuck at around 40-50 frames. (I tested it on two PCs with RTX 3080 and GTX 1080TI, but the outcome remained the same)

I think I'm going to work with the development team of Turbo Tools V3 at this point. If there is a solution, I will add it here.

Thank you again. I hope everything is going well for you.

Best regards, Tai

p2or commented 1 year ago

Hi @kurodapoet,

you're welcome.

It was functional, but the rendering process was slow and would often get stuck at around 40-50 frames.

Generally speaking, Loom only manages which frames to render and there is no real connection to the actual render engine used, is to say that the speed at which the pixels are calculated is part of the engine and there is no interference from my side in this process.

I think I'm going to work with the development team of Turbo Tools V3 at this point. If there is a solution, I will add it here.

Great! I am open to any kind of cooperation and contributions to Loom are welcome, just keep me posted. Closing for now since there is nothing I can do, may reopen at any time.

Cheers, Christian