Page MenuHome

Compositor locks up when input is an unrendered render layer.
Closed, ResolvedPublic

Description

In the attached blend file is a node graph setup which renders and composites fine out of the box. Following the instructions in the blend file causes the compositor to lock up.

I'm having trouble isolating which node in the tree is causing the lockup as I couldn't recreate the freeze using fewer of exactly the same node types. The node setup is basically 2 iterations of a 5x5 similarity blur (sometimes called a smart blur) which takes a Z and Normal input. Neighbouring pixels are included in the bokeh for each pixel if they have a similar Z and normal value. I couldn't recreate the freeze with a single iteration of 3x3 similarity blur, for example, which uses exactly the same nodes, but just many fewer. This makes me think that the freeze-up is somehow due to the number of nodes, or the time they take to execute?

I'm hoping that backtracing to reveal which node the compositor is continuously looping over will show this?

The instructions in the blend can reliably cause the freeze by getting the user to change the input to an unrendered render layer, however I have also managed to recreate the freeze by simply reconnecting inputs right at the front of the tree.

Event Timeline

Man that's an epic node setup! I can't really grasp why this all was created, but trying to do this with smart design of re-usable groups might be a suggestion :)

I found a quicker way to reproduce with this file a hanging Blender.

- delete the connections from the render layer nodes to the node system
- Add a new Composite Output node, and connect this to the render layer node
- Then set the render layer name "DONTRENDER" - press F12, and it hangs.

The node system then hangs in some kind of eternal loop trying to figure out the render resolution: (part of stack trace)

#92 0x000000010090dbfb in InputSocket::determineResolution (this=0x11b698f90, resolution=0x1169e2480, preferredResolution=0x1169e2488) at COM_InputSocket.cpp:60
#93 0x0000000100970f43 in MixBaseOperation::determineResolution (this=0x11b698ea0, resolution=0x1169e2560, preferredResolution=0x1169e2568) at COM_MixBaseOperation.cpp:80
#94 0x000000010090e68e in OutputSocket::determineResolution (this=0x11b699020, resolution=0x1169e2560, preferredResolution=0x1169e2568) at COM_OutputSocket.cpp:46
#95 0x000000010090dbfb in InputSocket::determineResolution (this=0x11b6993c0, resolution=0x1169e2560, preferredR

Obviously - the render layer doesn't exist (not rendered) so the compositor should return gracefully immediate.
Trying to recreate this from startup works fine (2 render layers, 1 disabled, connect to output)

I've not done anything in this code yet, so cannot be of further assistance. Jeroen Bakker (owner of code) is with holidays currently.
I know Sergey has been working here too, so I'll ask him if he can figure this out easily, otherwise we just assign to Jeroen and wait a week or so.

Work-around for now: doing a render or composite with a disabled render layer is easy to avoid in a workflow :)

Oh a question: I've been working on correct "DPI" controlled scaling of the UI in Blender.

I noticed that all your nodes in the file overlap - was it edited that way? Or do you have some kind of user preference that makes it draw OK...

Hi Ton,
All those nodes were created with a (customisable) python script, they aren't so much designed for user interaction, just raw speed!

Thanks for forwarding this on.

[OFF TOPIC]
In designing this node system I've noticed some strange compositor performance issues as well. I'm not sure who its best to get in touch with about these?
I found that sometimes adding a flat blur with zero radius / zero effect in the middle of my node tree would cause a huge speed up. If I remember rightly some nodes, for example a flat blur, require all nodes which they depend on to be fully calculated before any nodes which after the flat blur can be calculated?

For example: I have N parallel routes made up of mixes, math etc, in which pixels can be evaluated individually rather than as a whole image. These N routes then meet together at one pinch point. Then the routes head off again over M different parallel routes before being finally combined. Blender seems to then recalculate all of the N parallel routes M times (NxM) rather than realising that the N routes can be calculated up to the pinch point, then the M routes calculated afterwards (N+M). So for example with a zero effect flat blur at the pinch point, my composite time is around 5 seconds. Without the flat blur, my composite time shoots up to around 1 min 15.

When I encounter this sort of problem in AfterFX I workaround by "precomping" which causes everything up to that point to be rendered to a flattened image, then treats this as a new image sequence. Obviously this is a bit of a hack around. I'm not sure how node dependencies in the compositor work, but am happy to answer question and help investigate this further.
[/OFF TOPIC]

That's for Jeroen to answer to... there's indeed a pre-compile stage for compositing to handle a balanced tile-based execution order.
Your setup might be an interesting test case for this feature.

I didn't realize it was all python generated this. Wouldn't it be much easier to have a python node, which can internally call the set of composite nodes or so?
We also want to check on a real C/C++ plug-in API one day.

Hi Ton,
No the node tree was built and arranged with python, It was just a quick fix so I didn't hit the 10000px limit (discussed last night).

They draw with overlap for me too.

I did notice the character size in the text editor get smaller relative to the character spacing between 2.64 and 2.65 though which makes it slightly harder to read - more white space between characters. I'm not sure if this was intentional? Noticed on Windows XP, Server 2003 and Vista.

Thanks

Fixed in svn rev53310. Thanks for the report, closing.

Sergey Sharybin (sergey) changed the task status from Unknown Status to Resolved.Dec 24 2012, 2:34 PM