Rendering zoomed-in vector layers is very slow

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
comicalcurves
Posts: 3
Joined: Fri Aug 06, 2004 7:52 am
Location: Australia

Rendering zoomed-in vector layers is very slow

Post by comicalcurves »

I have a fairly simple scene with some vector layers. Each layer has several vector shapes with maybe a few dozen points per shape, so nothing very complex. They use basic colour fills and strokes with no textures or effects.

The project is set to 1920x1080 pixels. If I render the scene at it's normal size it renders at about 10fps. However, if I zoom the camera in (either using the zoom tool or the Track camera) by a factor of about 10 so just one of the shapes is now visible in the screen and fills most of the screen, then each frame now takes about 5 seconds to render! This is 20 times slower!

I assume that this may be because it is actually still rendering the *entire* scene - ie. rasterising the vector objects at what is now 10 times the resolution, even the parts which won't be visible in the 1920x1080 output frame, and then just cropping to the part which is visible in the frame.

If that is indeed the cause for this dramatic slow-down in rendering speed, is there any way to fix it? If not, any idea what's going on?

I have been looking for options but can't find anything which seems to be related to this problem.
comicalcurves
Posts: 3
Joined: Fri Aug 06, 2004 7:52 am
Location: Australia

Re: Rendering zoomed-in vector layers is very slow

Post by comicalcurves »

Ok, I think I have found out what is slowing this down.

There was a style applied which uses two 'shaded' effects. However they are both 'invisible' as the shading colours have an alpha value of 0! Not sure how I ended up with invisible shading - possibly an experiment with animated lighting effects at some point - however, removing these has speeded up the render considerably. It is still a little slower than when not zoomed in but it seems that zooming shading effects is what was causing the real slow-down.
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Re: Rendering zoomed-in vector layers is very slow

Post by chucky »

So shape effects blown up are really slow... Very interesting observation. Thanks for sharing that.
Worth reporting, maybe there's a way to mitigate that.
User avatar
Lost Marble
Site Admin
Posts: 2347
Joined: Tue Aug 03, 2004 6:02 pm
Location: Scotts Valley, California, USA
Contact:

Re: Rendering zoomed-in vector layers is very slow

Post by Lost Marble »

Here's probably what's happening:

Many of the layer effects scale as you scale your layer. For example, if you have layer shading turned on, let's say you set a blur radius of 30 pixels. If you then scale up your layer by 10x, the blur radius goes up to 300 pixels. As you might expect, computing a blur of 300 pixels is much more expensive than 30 pixels. And not just 10x more expensive - the blur is an area effect, and we're talking radius, not width. A 30 pixel radius blur is really like 60 x 60 = 3600 pixels. A 300 pixel radius blur is 600 x 600 = 360000 pixels. 360000 / 3600 = 100 times as many pixels being processed.

One way to get around this is to turn off the "Scale compensation" option in the Layer Settings dialog. That will stop the shading effect from scaling with the layer. This may or may not be visually acceptable for your particular scene, but it will probably help with rendering speed.

It might be nice to have separate "Scale compensation" options for every layer effect, and also for line widths (these also scale with the layer), but there's only one option and it applies to everything in that layer.
Post Reply