Previous topicNext topic

disadvantages of turning off double buffering (or vsync)

Questions, comments, feedback, etc.
Post Reply
blackdot
Posts: 528
Joined: Sun Jul 06, 2014 10:18 pm

disadvantages of turning off double buffering (or vsync)

Post by blackdot »

hey ho. i'm currently experimenting with using prerendered videos in magic. when i make a clip at 30fps, it's clearly not very smooth in magic, which runs at 60fps by default here. when i render my clip as 60fps, it "mostly" runs smooth in magic, but often the 60fps of the video and the 60fps of magic get "out of sync" and the unsmoothness is as clearly visible as if i was using the 30fps video again, kinda like a hickup. the only way to work around this is either to turn of vsync or turn of double buffering (which itself disables vsync too i assume), which both makes my fps peak to the thousands, allowing for really every frame of the 60fps video to show.

my questions:
- what are the disadvantages of turning off double buffering ?
- waht are they for turning off vsync exept tearing?
- is the "throttle" option the same thing as a manual fps clipper? meaning a 12ms (with my calculations that should be 16.6ms, but 12ms seem to result in 60fps) throttle is essentially about the same as a vsync that tops at 60fps?
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: disadvantages of turning off double buffering (or vsync)

Post by Magic »

Yeah, this is a somewhat complicated issue. Here are a few quick thoughts but we can go into more detail if necessary.
- what are the disadvantages of turning off double buffering ?
The main disadvantage is that some modules work best when locked to 60fps. I've tried to make it so that Magic will work the same at any fps, but as an example, the Trails module looks different at higher fps's (no way around it). Also, some other third-party effects (like FFGL plugins or GLSL shaders) assume 60fps and don't look right otherwise.

This becomes especially important if you export a movie. If Magic was running at a high fps (> 60) when you were creating your project, but you export the movie at 60fps, it might look different.
- waht are they for turning off vsync exept tearing?
None except tearing, but personally I hate tearing, so I would never run Magic with Vsync off (in double-buffering mode). But tearing doesn't happen in single-buffering mode, which is why I have the option for it.

Really the only reason I have the Vsync toggle is so you can benchmark the performance of your scenes if you want.
- is the "throttle" option the same thing as a manual fps clipper? meaning a 12ms (with my calculations that should be 16.6ms, but 12ms seem to result in 60fps) throttle is essentially about the same as a vsync that tops at 60fps?
Yes, sort of. The throttle just adds a delay to intentionally slow down the fps. So if you need a 12ms throttle to get 60fps, it means your scene is taking 4 or 5 ms to render (16.6 - 12). So it depends on the scene. Mainly I added this feature so you can slow down the rendering if your processor is getting pegged.
blackdot
Posts: 528
Joined: Sun Jul 06, 2014 10:18 pm

Re: disadvantages of turning off double buffering (or vsync)

Post by blackdot »

ok, thanks a lot. but in this case, if i dont export videos and dont use any framerate-dependant modules, there is no world-shattering downside to turning double-buffering off, as long as i keep vsync on?

@throttle: ah that explaines the difference, thanks.
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: disadvantages of turning off double buffering (or vsync)

Post by Magic »

but in this case, if i dont export videos and dont use any framerate-dependant modules, there is no world-shattering downside to turning double-buffering off?
Correct. Keeping those caveats in mind, there is no downside. The world will remain fully intact. :)
as long as i keep vsync on
Actually, on most graphics cards, Vsync is ignored (and not necessary) when double buffering is off. So it really doesn't make a difference which way it's set.
blackdot
Posts: 528
Joined: Sun Jul 06, 2014 10:18 pm

Re: disadvantages of turning off double buffering (or vsync)

Post by blackdot »

Okay. Many thanks for the clarification.
Post Reply