Feature Request (Rendering Engine)

The interface, modeling, 3d editing tools, import/export, feature requests, etc

Moderators: jesterKing, stiv

advs89
Posts: 0
Joined: Wed Apr 26, 2006 10:22 pm
Location: Roanoke, VA, USA

Feature Request (Rendering Engine)

Post by advs89 » Wed Apr 26, 2006 10:39 pm

I was wondering if it would be possible to speed up the rendering process by not rerendering the exact same frame when nothing is being changed (in an animation).

Let me put his a better way:
For example, you are rendernig an animation, with the frames as following:
Frames 1-10--->Nothing moves, camera keeps steady on a static scene.
Frames 11-30--->This time camera moves, and so does other stuff.
Frames 31-40-->Again scene is static, nothing moves at all... just 9 duplicate frames in a row.

My suggestion, is for it to detect when there aren't any changes, using the IPO data, and simply copy from memory the first frame x many times. This way the actual calculation time would be cut, since you would only have to calculate it once and copy it from memory into the next few frames of the buffer.

I don't know if this is possible or not, but I have sat in my chair biting my tongue on several occasions watching it render the same frame 20 times, wondering if there is any way around this.

Thanks for your help,
~ADVS89

hdd
Posts: 0
Joined: Tue Aug 30, 2005 6:24 pm

Post by hdd » Wed Apr 26, 2006 11:06 pm

hi ,
why don't you render from frame 11 ?

my2C
L.

pildanovak
Posts: 18
Joined: Fri Oct 25, 2002 9:32 am
Contact:

Post by pildanovak » Thu Apr 27, 2006 2:50 pm

hey, I've thought about this feature many times, it would be great.
hi ,
why don't you render from frame 11 ?

my2C
because, in animation, you often have some still frames, and there can be many through the animation on different places, so to save you from doing unnecessary work, you just suffer the longer rendering times ...
Otherwise you would have to - set up multiple renders(since you cannot setup a more complicated selection like 0..10, 15..25, 81..281 etc.) and than, you would have to duplicate the frames and rename them correctly by hand, so that the video cutting software you're working with can handle the scene as a single sequence...

I think it would not be really easy to code it, maybe problems could occur with motionblur etc. But it would be great.

LIGHTspeed
Posts: 0
Joined: Tue Apr 25, 2006 11:21 pm
Location: USA

Post by LIGHTspeed » Thu Apr 27, 2006 6:43 pm

I agree with advs89. We have a slow computer, and it would save me a LOT
of render time if frames where nothing moved could be reused.

Just my opinion. :)
"The Lord is my light and my salvation;
Whom shall I fear?" Psalm 27:1

joeri
Posts: 96
Joined: Fri Jan 10, 2003 6:41 pm
Contact:

Post by joeri » Sun Sep 24, 2006 9:35 pm

I remember this being an issue in the old days.
The work to split up a scene into render batches and later glue them together again was a real pain. As far as I know the blender sequence editor is one of the few video editors that let's you create more "first" and "last" frames very easy just for this purpose.
The nice thing of this is that you can edit with scene strips and then render the sequence. This will only render the frames that you want.
For this create scenes with linked objects (or the original as set) to be able to set start and endframes, use thoose scenes to edit in the seq-editor.

Yes it's a bit more work then when blender would be doing it. But this way you've got full control, even when one bit still flips.

kitsu
Posts: 0
Joined: Sun Jun 06, 2004 8:08 am

Post by kitsu » Mon Sep 25, 2006 7:56 pm

Something similar that would be nice is if Blender would track changes at the parts level. So for instance imagine if you are rendering an animation and are using 8 render parts each direction. Now if Blender cached the result for each part then each frame it could check if the current part has actually changed. If the part had changed then go ahead and render it, but if not then just reuse the cached version. By doing a seperate check for each render layer you could even have speedups when things are moving in front of a static background (if you could seperate the shadow/AO/Radiosity/ect. passes that is).

Better yet let the parts be dynamic using an oct-tree or some other space subdivision algorithm to find the largest non-moving regions of the image. Then the user just has to set the max oct-tree resolution...

Caronte
Posts: 76
Joined: Wed Oct 16, 2002 12:53 am
Location: Valencia-Spain-Europe

Post by Caronte » Tue Sep 26, 2006 1:27 am

kitsu wrote:Something similar that would be nice is if Blender would track changes at the parts level...
http://www.blender.org/forum/viewtopic. ... ght=border
Caronte.
"Some Day, All Will Be Digital"
http://www.nicodigital.com

joeri
Posts: 96
Joined: Fri Jan 10, 2003 6:41 pm
Contact:

Post by joeri » Tue Sep 26, 2006 12:58 pm

kitsu wrote:Something similar that would be nice is if Blender would track changes at the parts level. So for instance imagine if you are rendering an animation and are using 8 render parts each direction. Now if Blender cached the result for each part then each frame it could check if the current part has actually changed. If the part had changed then go ahead and render it, but if not then just reuse the cached version. By doing a seperate check for each render layer you could even have speedups when things are moving in front of a static background (if you could seperate the shadow/AO/Radiosity/ect. passes that is).

Better yet let the parts be dynamic using an oct-tree or some other space subdivision algorithm to find the largest non-moving regions of the image. Then the user just has to set the max oct-tree resolution...
Good idea. Render the part, do an xor and see if it's black. If it is don't rerender it, if it's not black then maybe something moved in front of a shadow buffer of another part so the shadow changed, if so, then rerender this part. ( :P )

Caronte
Posts: 76
Joined: Wed Oct 16, 2002 12:53 am
Location: Valencia-Spain-Europe

Post by Caronte » Tue Sep 26, 2006 2:40 pm

joeri wrote:...if so, then rerender this part. ( :P )
LoL :lol:

IDEA:
For each part, check if the camera, the lights and the objects showed in that part aren't changed:
If changed any then render the complete part else render only some few distributed lines (5?) of this part and compare with the preview frame, if identical then copy the previus part to this frame and go to the next part else render the remaining lines.

Not 100% accurate but can be an user preferences option ;)
Caronte.
"Some Day, All Will Be Digital"
http://www.nicodigital.com

Pablosbrain
Posts: 254
Joined: Wed Jan 28, 2004 7:39 pm

Post by Pablosbrain » Tue Sep 26, 2006 5:24 pm

make sure it checks for texture changes as a TV object may not have moved but the texture would have.

Caronte
Posts: 76
Joined: Wed Oct 16, 2002 12:53 am
Location: Valencia-Spain-Europe

Post by Caronte » Tue Sep 26, 2006 5:34 pm

Pablosbrain wrote:make sure it checks for texture changes as a TV object may not have moved but the texture would have.
Yes that must be take in account, but anyway when the step where few (5?) lines are rendered find a single pixel diferent, the whole part would be rendered ;)
Caronte.
"Some Day, All Will Be Digital"
http://www.nicodigital.com

kitsu
Posts: 0
Joined: Sun Jun 06, 2004 8:08 am

Post by kitsu » Wed Sep 27, 2006 12:21 am

Actually I was thinking something a bit higher level. Blender has to do some kind of scene initialization before rendering right? Building depth maps/zbuffer, calculating animation deforms, etc. Is there something in the perframe render initialization that can be used to check for changes per bucket?

Meh, I don't know enough about Blenders internal rendering pipeline. Didn't Ton make one of his cool flow charts for the render engine refactor?

oh:
Image
So what happens in do_render_all_options?

Even if you can figure out what is currently on screen you can then check ipos to see how different any keyed channels are since the last frame.

The other option is to do a low resolution, low quality, simplified render to base the comparisons on. Then use those for a per-pixel xor comparison with some allowable standard deviation. Rendering at a tenth of the part resolution should still leave enough pixels to pickup most changes.

So yeah, lots of options for checking if a part needs rerendering. It's probably impossable to make this work for every conceivable situation, but where it did work it could offer a signifigant speed increase :D

Caronte
Posts: 76
Joined: Wed Oct 16, 2002 12:53 am
Location: Valencia-Spain-Europe

Post by Caronte » Wed Sep 27, 2006 12:42 am

kitsu wrote:The other option is to do a low resolution, low quality, simplified render to base the comparisons on
Nice!
kitsu wrote:...but where it did work it could offer a signifigant speed increase :D
It would be like we had a powerfull new computer (for free!) ;)
Caronte.
"Some Day, All Will Be Digital"
http://www.nicodigital.com

joeri
Posts: 96
Joined: Fri Jan 10, 2003 6:41 pm
Contact:

Post by joeri » Wed Sep 27, 2006 1:13 pm

kitsu wrote:The other option is to do a low resolution, low quality, simplified render to base the comparisons on. Then use those for a per-pixel xor comparison with some allowable standard deviation. Rendering at a tenth of the part resolution should still leave enough pixels to pickup most changes.
I'm sure this is an easy task for an external program.
Render your anim at 10%. Get an image parser that xor's all the frames and make the parser create a render batch file.
(damn, forgot about the parts...)

If shadow buffers are no issue you can even use the OpenGL harware renderer as preview renderer.

Anyway,...
Maybe this is a nice extra feature for the timeline. Add markers that indicate sub-start and sub-end frames (and copy the sub-end - substart tweens). So that later some smart algorithm can auto-set-render-markers

(mockup:)

Image

kitsu
Posts: 0
Joined: Sun Jun 06, 2004 8:08 am

Post by kitsu » Thu Sep 28, 2006 2:23 am

This is great stuff! Has anyone posted a feature request on the tracker yet? I'm basically at the limits of my knowledge concerning rendering, and I lack the skills to code this even if I had written renderers before. I think this calls for the man in the Vrrooom jacket!

Maybe we could get the people from the Plumiferos project to ask about it?

Has anyone else even touched the render code since Ton rewrote it for Orange? Maybe for next GSOC we should go scouting for people to work on the internal renderer...

Post Reply