They're here! More Muvipix.com Guides by Steve Grisetti!
The Muvipix.com Guides to Premiere & Photoshop Elements 2024
As well as The Muvipix.com Guide to CyberLink PowerDirector 21
Because there are stories to tell
muvipix.com

Page Turn Using Corner PIN.

Video / Image editing, advanced techniques, computer settings, third party software, shortcuts, workarounds ... share your tips and tricks here.

Page Turn Using Corner PIN.

Postby Chris B » Mon May 11, 2009 4:55 pm

Over in the showcase forum there's a demo of what can be done in PE4 using corner pin. Here's the howto. A spreadsheet is contained in this zip file that can be used to help calculate the effect.

http://muvipix.com/cpg/displayimage.php?pos=-2945

Warnings!

I'm going to start with a few warnings. Firstly this effect makes use of keyframing and multiple tracks (along with some other stuff). I'm going to assume that you are familiar with these concepts. If you're not this probably isn't the best place to learn.

Secondly this stuff is really a bit of a hack to get round the limitations of PE. If you've got After Effects then you're much better off doing this stuff there. Finally there are often multiple ways to perform a given task. This is how I've done it but there are probably optimisations to be made and different ways to approach the problem.

Theory

Previously I've done page turning with the “Basic 3D” effect. Other people have since used the “Flip” transition. The problem with these effects is that you only get limited control over where and how the turn happens.

A while ago I realised that the “Corner Pin” effect could be used to simulate any given 3D transformation of a rectangle. As such using some 3D maths it is possible to calculate the page turns that Basic 3D can't do. This gives us flexibility to (for example) move the pages in the book around or tilt the book at arbitrary angles.

Unfortunately this means we're going to need some basic 3d theory. I'll try and keep it as simple as possible. When we talk about 3d we usually refer to x, y and z axis. These correspond to width, height and depth. We will take 0,0,0 to be the centre of the screen with positive X going to the right. Positive Y going upwards and positive Z coming out of the screen (towards the viewer). We're going to work with a page that initially has the mid point of it's left hand side at 0,0,0. The page will rotate around the Y axis. Most of the actual maths is done by a spreadsheet that I have provided.
Intel Core i7 8700 - 32GB DDR4 - 500GB Evo 970 SSD - 3+2 TB HDD - GTX 1080- MSI Z370 Pro - Win10 64 bit - Cannon HV30 (PAL) - Sony A6000 - GoPro 3 Black
User avatar
Chris B
Moderator
Moderator
 
Posts: 819
Joined: Tue Apr 24, 2007 6:04 pm
Location: UK

Re: Page Turn Using Corner PIN.

Postby Chris B » Mon May 11, 2009 4:55 pm

Creating Pages

Pages come in two flavours, left and right hand ones. You'll need to create these separately for each page turn effect. For any given “turn” there are up to 4 pages involved. Two left and two right. Page 1(left) and 2(right) are visible initially. Page 2 is then turned to reveal page 4(right) underneath it. As some point during the turn page 3(left) becomes visible instead of page 2 and covers up page 1. You probably also need a backdrop image with the book edges. If you're only going to turn the page once then you can use the backdrop to also contain pages 1 and 4. At the very least you should be able to use page 1.

When we create our page turn we need something to turn. This can either be a fixed image — or it can be a video. I'll use the example here that we're creating a video page. When I've done this I used a book template and “drew” on the pages with video or text. This is then exported as an AVI for use later. The pages that are created will be rotated around the edge of the screen. Thus you'll need to wither move the page to one edge or scale it.

In order to make pages there is a certain amount of translation that needs to happen. Part of this allows us to scale the pages. A page that isn't scaled is wider than it is high. (Like the video frame). Most books don't look like that. The spreadsheet has a scaling factor that can be used to change the shape of the book. I would suggest that vertical books are scaled to 200% width and 100% scaling is used for pages that look like video frames. I therefore usually import one of my pages and scale it before re-exporting it. At this point you might consider making the right hand pages run backwards — you'll see why below. You don't have to but it might make things easier. The page is then ready to use.

Note — pages MUST be exactly the same size (in pixels). If a page is not the same size scale it and re-save it.

Understanding the spreadsheet.

Everything that needs to be changed in on the first sheet of the spreadsheet (called “Page Turn”). You shouldn't need to touch the “calculations” sheet. This section explains what the various cells on the sheet do. Note that none of the values are validated — Strange values will produce strange results.

B3 & B4 — These are the size of your video.
B6 & B7 — The rotation of the book. The Y rotation is what turns the page so can't be set. These are constant for the page turn.
B8 — A constant used to calculate perspective. Not usually used
B9 — The total number of frames that a page turn will last.
B5 — Vertical scale. Use 1 for books higher than wide and 0.5 for wider than high (or somewher in between)
E8, E9 & E10 — The offset if 3d space for the centre of the book. The book will need to be st least as far away from the camera as it's page size (so Z must be less than -B3)
G8, G9 & G10 — The movement of the page during the turn (again in 3d space).
B12 — J20 are the individual coordinates for the corner pin parameters at each of the keyframe numbers.
B24 — C31 are the coordinates for the background image for start and finish frames.
Intel Core i7 8700 - 32GB DDR4 - 500GB Evo 970 SSD - 3+2 TB HDD - GTX 1080- MSI Z370 Pro - Win10 64 bit - Cannon HV30 (PAL) - Sony A6000 - GoPro 3 Black
User avatar
Chris B
Moderator
Moderator
 
Posts: 819
Joined: Tue Apr 24, 2007 6:04 pm
Location: UK

Re: Page Turn Using Corner PIN.

Postby Chris B » Mon May 11, 2009 4:56 pm

Doing the page turn.

Firstly populate the spreadsheet with the appropriate x,y and z locations for your page. You can also assign a movement value — but I'd leave that for a second try. Try the values that are already present in the sheet first off.

Firstly place your background image on the timeline and then apply the corner pin effect to it. Use the values given on the sheet (you can copy paste) to stretch it to be the right shape. If it's going to move during the turn then you'll need to keyframe the last frame as well. At this stage you'll have a good idea of how the finished product will look. Now is the time to adjust angles etc in the sheet before moving on to the pages.

If page 4 does not form part of the backdrop now is the time to place it on the timeline. Place this on the timeline above page one and apply (in this order) Crop and Corner PIN. Adjust the Crop settings to leave only the page visible. Because I'm using a page template with the book background I need to crop off the edges. Set corner PIN using the initial values for frame 0.

Above this place page 2 on the timeline. Again add Crop and corner PIN. Set corner PIN using the initial values for frame 0. Create a keyframe at this point. Now step through creating keyframes using the values from the sheet to create the turn at the correct frame values. At some point the page will turn so far that it appears backwards. I.e. It's turned past the point where you should be able to see it. Now we can add page 3. For books that face directly at the camera this point will be half way. The page will literally disappear at the mid point.

Page 3 goes above page 2. Add the page with a bit of overlap. Now go to the second to last keyframe on page 2 then select page 3. This keyframe is the same “frame number” as the one on page 2 so use the same values. Keyframe the rest of the turn.

You now need to trim page 2 and page three so that they follow each other. I tend to leave them on separate video tracks just have 3 start where 2 ends just in case I need to adjust anything later. In addittion to the copy and corner pin effects page 3 requires a “horizontal flip” before the crop effect. I have found that selecting linear interpolation for all the keyframes often gives the best results — but you mileage may vary.
Intel Core i7 8700 - 32GB DDR4 - 500GB Evo 970 SSD - 3+2 TB HDD - GTX 1080- MSI Z370 Pro - Win10 64 bit - Cannon HV30 (PAL) - Sony A6000 - GoPro 3 Black
User avatar
Chris B
Moderator
Moderator
 
Posts: 819
Joined: Tue Apr 24, 2007 6:04 pm
Location: UK

Re: Page Turn Using Corner PIN.

Postby Chris B » Mon May 11, 2009 4:57 pm

Problems PE4 gave me.

I don't know if this is specific to PE4 however it did cause me a problem. When you step through you newly constructed page turn everything's fine — until you come to render it (with Enter). Then suddenly the first half of the turn seems to jump about all over the place. It seems that PE4 is unable to keyframe a corner pin where the image goes from being wide to narrow. Instead it jerks the anchor points around. The trick is to keyframe from narrow to wide. You can do this by opening up the keyframes on your track and simply swapping them around. (Which ones you swap depends on how many frames there are within the first half of the turn).

Of course you then have a page that moves the wrong way so you need to reverse the video with time stretch. This can be a bit tricky (and now you see why you rendered it backwards above) to get the right bits in the right place. I have to do it by trial an error since my brain can't quite grasp it :(. However once you're done then you've got a lovely smooth page turn looking great.

Final Words.


This has been quite an effort/journey for me and I hope that someone else finds it useful without having to go through as much of the pain. The above looks complicated but once you get going it's quite quick to add pages. Last time I posted something about page turns it was a quick write up. I hope that the above is clearer than before! All feedback is appreciated and if you have problems making this work then do drop me a line on the forums.

Chris B
Intel Core i7 8700 - 32GB DDR4 - 500GB Evo 970 SSD - 3+2 TB HDD - GTX 1080- MSI Z370 Pro - Win10 64 bit - Cannon HV30 (PAL) - Sony A6000 - GoPro 3 Black
User avatar
Chris B
Moderator
Moderator
 
Posts: 819
Joined: Tue Apr 24, 2007 6:04 pm
Location: UK

Re: Page Turn Using Corner PIN.

Postby Paul LS » Mon May 11, 2009 5:09 pm

Well Chris, thanks for the great work and effort you have put into this. I have a project coming up shortly where I will use this technique. Hopefully I will report back with successful results... :-D
Paul LS
Super Contributor
Super Contributor
 
Posts: 3064
Joined: Sat Feb 10, 2007 11:21 am
Location: Southampton, UK

Re: Page Turn Using Corner PIN.

Postby Bob » Mon May 11, 2009 6:26 pm

As Paul said, thanks for the great work and effort you've put into this. I've got After Effects, but this will be great for those that don't.
User avatar
Bob
Moderator
Moderator
 
Posts: 5925
Joined: Wed Feb 21, 2007 4:49 am
Location: Southern California, USA

Re: Page Turn Using Corner PIN.

Postby Helen » Mon May 11, 2009 6:40 pm

Thanks Chris,
This will come in very handy
Helen
=D>
User avatar
Helen
Premiere Member
Premiere Member
 
Posts: 632
Joined: Tue Feb 20, 2007 8:14 pm
Location: Brisbane, Australia

Re: Page Turn Using Corner PIN.

Postby Chuck Engels » Mon May 11, 2009 7:36 pm

Amazing work Chris, thanks for putting this all together.

I will have a book opening tutorial later this month, mine is a bit more simple and doesn't look near as nice as Chris'
1. Thinkpad W530 Laptop, Core i7-3820QM Processor 8M Cache 3.70 GHz, 16 GB DDR3, NVIDIA Quadro K1000M 2GB Memory.

2. Cybertron PC - Liquid Cooled AMD FX6300, 6 cores, 3.50ghz - 32GB DDR3 - MSI GeForce GTX 960 Gaming 4G, 4GB Video Ram, 1024 Cuda Cores.
User avatar
Chuck Engels
Super Moderator
Super Moderator
 
Posts: 18153
Joined: Sun Feb 11, 2007 10:58 pm
Location: Atlanta, GA

Re: Page Turn Using Corner PIN.

Postby John 'twosheds' McDonald » Tue May 12, 2009 12:04 am

I copied your original 'basic 3D' page turn, Chris, and have used it often. Now I have a new method to try. Many thanks. :-D
AMD Ryzen 3900x 12C/24T, ASUS x570 mobo, Arctic Liquid Freezer ll 280, Win11 64 bit, 64GB RAM, Radeon RX 570 graphics, Samsung 500GB NVMe 980 PRO (C:), Samsung 970 Evo SSD (D:), Dell U2717D Monitor, Synology DS412+ 8TB NAS, Adobe CS6.
User avatar
John 'twosheds' McDonald
Moderator
Moderator
 
Posts: 4237
Joined: Mon Feb 19, 2007 11:57 am
Location: Cheshire, UK

Re: Page Turn Using Corner PIN.

Postby momoffduty » Tue May 12, 2009 3:49 pm

Thanks for all of the time & effort you put into this how to. Downloaded the spreadsheet & copied and pasted the above instructions onto a Doc. Will try this out in Pro. Thanks Again!
aka Cheryl
Intel i7 3770, Windows 7 Pro w/SP1, 64 bit, Intel 520 Series SSD, 32G RAM, 2 – 2T RAID, (1T external), GTX 550 Ti graphics
User avatar
momoffduty
Moderator
Moderator
 
Posts: 7591
Joined: Thu Feb 22, 2007 10:43 am
Location: near St. Louis

Re: Page Turn Using Corner PIN.

Postby Chris B » Tue May 12, 2009 4:04 pm

:???: ... But you've got After Effects - which has got (I hope) to be easier than this.... :???:
Intel Core i7 8700 - 32GB DDR4 - 500GB Evo 970 SSD - 3+2 TB HDD - GTX 1080- MSI Z370 Pro - Win10 64 bit - Cannon HV30 (PAL) - Sony A6000 - GoPro 3 Black
User avatar
Chris B
Moderator
Moderator
 
Posts: 819
Joined: Tue Apr 24, 2007 6:04 pm
Location: UK

Re: Page Turn Using Corner PIN.

Postby Bob » Tue May 12, 2009 4:38 pm

Chris B wrote::???: ... But you've got After Effects - which has got (I hope) to be easier than this.... :???:


Definitely easier.
User avatar
Bob
Moderator
Moderator
 
Posts: 5925
Joined: Wed Feb 21, 2007 4:49 am
Location: Southern California, USA

Re: Page Turn Using Corner PIN.

Postby momoffduty » Tue May 12, 2009 7:48 pm

Chris, don't have AE.....Vernon has my copy and I got his Panini maker by mistake.
aka Cheryl
Intel i7 3770, Windows 7 Pro w/SP1, 64 bit, Intel 520 Series SSD, 32G RAM, 2 – 2T RAID, (1T external), GTX 550 Ti graphics
User avatar
momoffduty
Moderator
Moderator
 
Posts: 7591
Joined: Thu Feb 22, 2007 10:43 am
Location: near St. Louis


Return to Tips and Tricks 


Similar topics


Who is online

Users browsing this forum: No registered users and 6 guests