Jump to content

Shadow on keyframe animation


DIYMan
 Share

Recommended Posts

https://www.youtube.com/watch?v=aKyXZDDuA7I&t=19s

I am trying to copy this effect. 

In my version after I land I move across in front of a prop which I have placed on its own track.
Below this prop track I have placed a track of me landing. I have then copied this track, of me landing,  and placed it exactly over the other two ensuring that it  is exactly aligned with the bottom track. I have then key framed the top track of me landing and applied a polygon mask over my legs when they pass in front of the prop, using the apply outside the mask function and 100% transparency. I have done this for every frame, 24 in total.
As I step from frame to frame I come to a position when the cursor moves 33 points but the image does not change. If I then check the playback I find that the polygon key frame is following the movement of the top track but the bottom track is now out of sync with the top track so I am seeing a shadow of the bottom track.
Can you help me with this?
Regards Dave.

Link to comment
Share on other sites

Upload and share the PORTABLE project, so someone can check it out. 

http://nch.invisionzone.com/topic/23659-tips-for-getting-help-on-this-forum/

If it contains sensitive material link it in a personal message (PM).  Click the envelope above.  It won't be passed on or retained.  Use FILE|SAVE PORTABLE PROJECT AS, not simply SAVE PROJECT, and don't forget to get a shareable, public link - not one that is restricted.

Link to comment
Share on other sites

https://1drv.ms/u/s!AkcfGiX_ZUvwatIwsHXKkcgWqRk?e=hAYkHx

I hope this has worked.

The process I have followed is

1) From cursor position 1.482 which is the start of the top clip I left clicked on the top clip FX button.

2) I opened the polygon mask.

3) I applied a key frame.

4)I adjusted the polygon shape. As this was just for this help forum  I only made the polygon a rough shape.

5) I adjusted the feather to 0.1, changed the application to outside the mask and applied a 100% transparency effect.

6) I moved the cursor one frame by using the button on the preview window.

7) I clicked add key frame and adjusted the shape and position of the polygon mask.

8 I saved the project in case VP crashed again

9) I repeated steps 6 to 8 for the next 24 frames.

10) I then checked the position and shape of the polygon masks by starting at cursor position 1.482 which is 2:40.705 in the FX window by moving the cursor along the animation line and they where all as I had made them.

11) I then played the clip and it did not work as I had set it up, on checking the shape of the polygon masks they had all changed from being big shapes that fully encompassed me to small masks that only cover a part of my outline.

I hope someone can help as this is driving me batty.

 

Link to comment
Share on other sites

Please clarify what the intended result is to be - legs vanishing as you jump out of frame?

Test plots, frame-by-frame, were inconsistent, with keyframe positions seemingly shifting at will.

See later posts for a probable explanation.

Link to comment
Share on other sites

Thank you

Did you look at the youtube video I started this thread with? The effect is the super hero lands and the impact causes props to move/fall over. He then runs out of shot. As I run forward I want to be running in front of the moving bench. So my problem is why do the key frames change?

1) Am I doing it wrong, I don't think so because I used the same technique to animate the moving bench? 

2) Is there a checkbox somewhere that I have inadvertently turned on or off which governs how the key frames  work?

3) Is it a bug?

Who can I ask to find the answer? 

Regards Dave

Link to comment
Share on other sites

Hi

I have noticed that mask points sometimes "get lost" resulting in a mask that incorrectly changes shape when it is was set up originally to outline a moving object. There are a couple of ideas being looked at that might have a bearing on this behavior. It might be linked to  the frame by frame approach, or perhaps to redundant points in later frames being deleted. The thought being that the data points are presumably stored as lists and deleting a point from a later mask might actually delete the whole list for that point meaning that the mask reverts back to a previous shape. Just a thought and we'll come back in if anything is found.Obviously we will also report anything found to NCH.

Nat

Link to comment
Share on other sites

Hi DIYMan

Following my post above. After a few tests I am fairly sure the mask shape problem it is linked to to the removal of redundant points during the keyframe making process.

Using a simple shape like a star moving across the screen. The object is easily masked with a 10 point outline.....

aa.jpg

Single key frames will follow the outline as it the object moves across the screen. (The mask can be dragged  as a single unit.) This works perfectly. It also works if the object is positioned to change direction. The mask follows it correctly.

If, however after a few keyframes have been generated a NEW point is added to the mask  (here on one of the star arms) ....

bb.jpg

......and an existing point is deleted .... The mask changes shape obviously......

ccc.jpg

.....but the new point can be re-positioned where the deleted one was.  and so apparently restoring the original mask shape....

aa.jpg

As before, the clip can be progressed and the mask position dragged to follow the object the remainder of the distance and keyframes can be set to maintain the positioning. All SEEMS to be well until you play the sequence.

Returning to the start and looking at the star ..it seems OK until you un-tick the Mask Inside box and add a 0% Opacity. to make the background transparent. You will now see that what was a complete star (i.e. the first keyframe) has now lost a point. This IMHO is a bug. It should have remained a full star.

dd.jpg

This seem to infer that  ALL references to the deleted point were lost when that point was deleted.  The thumbnails above show that the replacement point restored the full star but all previous keyframes had lost the original point. 

This finding means that if complicated outlines are masked then points must not be deleted (by re-clicking and deleting) even if they get so close together due to the object getting smaller or changing its shape when they get squashed up together. Otherwise you risk the mask completely changing outline. This can get awkward ....

Nat

 

 

Link to comment
Share on other sites

Hi DIYMan

Posted a note to the devs to see what they think.  Some work and enhancements were made to the mask feature since the Using Mask sticky was created.This included being able to move (drag) and resize the mask without having to redraw it again.

Nat

Link to comment
Share on other sites

Hi

In my star test I simply grab the mask in the centre and drag it to match the moving object (the star) and create keyframes (if required) as it moves. It keeps the same size and outlines the star OK.  The problems arise if the mask has to be reshaped by deleting or adding points. Also in this test as I was adding movement to the star and not following an object in a lower clip it was important to add the effects in the right order. Position keyframes ----Mask keyframes to follow object----Transparency.  If I masked the star first and then started to move it things went wrong. I shall test some of these on an underlying clip rather than an object. (ie make an mp4 of the moving star. I am not sure yet if zoom will work on a mask.

Nat

Link to comment
Share on other sites

https://1drv.ms/u/s!AkcfGiX_ZUvwbzxJ1tVgQOvF2ak

Hi @Nationalsolo

This post was originally created because I had a different problem which is shown on the clip above. I have taken on board your comments about not deleting node points in key frames. 

If you play the attached clip you will see that at key frame positions 2:40.771 to 2:40.804 in the FX window the frame moves but the image does not. After this point the video has moved out of sync to the  polygon masks so a shadow appears on the playback.

Again my process of producing this short section of video is:-

1) open a polygon mask at video cursor position 1.482 which equates to 2:40.705 in the FX window.

2) add key frame

3) adjust mask in full screen

4) exit full screen

5) set feather to .1 and make effects apply outside the mask

6) apply transparent effect set to 100%

7) save project, in case VP crashes

8 move frame to next position by using the next frame button on the timeline and repeat steps 2,3,4,7 and 8

Because of the work involved I have stopped the key frame production at 2:40936 until I find  out how to get over this problem.

Can you help with this please?

Link to comment
Share on other sites

VPJ files are strictly for programming instruction;  they're not playable.  Please SAVE PORTABLE PROJECT AS and upload the resulting folder.  Or, if you want to simply demonstrate the result, upload the exported file.

http://nch.invisionzone.com/topic/23659-tips-for-getting-help-on-this-forum/

If it contains sensitive material link it in a personal message (PM).  Click the envelope above.  It won't be passed on or retained.  Use FILE|SAVE PORTABLE PROJECT AS, not simply SAVE PROJECT, and don't forget to get a shareable, public link - not one that is restricted.

Link to comment
Share on other sites

Hi

A mask can be re-shaped/resized (provided you don't delete any points) but it can't be zoomed  per se as the mask  is associated with the moving clip and it's the clip that is zoomed. However,  If the object in the clip does not change its shape but just gets larger or smaller, then you can load that clip and mask out the object and then save a snapshot. The transparency will be retained by the png. Loaded back to VP the png can overlaid on the video clip and zoomed and positioned to cover the object in the clip below.

Phaff!

Nat

Link to comment
Share on other sites

Hi

Got your project D/L and had a quick look. (Got to go out but will get back to it later) Playing it through there is something in the "leg" area that misses and quickly stepping through the masks on "Track 1" (others renamed)  it seems that after a few frames it no longer moves to outline the object.Maybe my PC (old vista machine) is slow to update it but  I'll check it out again a bit later when I get back. .

Doesn't look as if you used keyframes for the mask, but, as I said I'll check it out later today.:)  That might be an answer. Looks fun.

Nat

Link to comment
Share on other sites

Hi Nat

I did use key frames. If you look at the animation line you will see a small gap in the key frame markers. The software  put that gap there not me. It's after that gap that the image and the key frames stop lining up.

Regards Dave

Link to comment
Share on other sites

I am still fairly new to video editing and have only done a couple of things using the polygon mask, but I have run into this same problem.

It is not immediately obvious that if you delete a point on the mask, that point is deleted for all keyframes not just the one you are currently working on. I wasted a lot of time figuring out what was happening until I worked it out. The simple way around this is to never delete a point from a mask. Instead move a point that you don't want so that it is at the same position as another point.

It can be a real pain if you have a complex mask shape that you need to animate over a period of time.

I am now much more cautious about adding extra points when not necessary. I found it is very easy to accidentally add points without meaning to, when trying to click and drag an existing point for example.

I haven't tried this but I have just thought that another way around the problem might be to split your clip at the keyframe position. Then you can safely delete points from the second clip without it affecting the first. This might not help if you have key frames with a different shape at every frame, but might be useful if you have some time between key frames and interpolating.

Link to comment
Share on other sites

Hi @phil_the

thanks for the suggestion. According to Nationaosolo (see above) when using key frames in VP you can only use the node points that are set up in the first key frame.

8 hours ago, Nationalsolo said:

Hi DIYMan

NCH confirm that the mask must have a constant number of points  throughout all the keyframes. Polygons with different number of points can not be interpolated.

Nat

Dave

Link to comment
Share on other sites

Hi DIYMan

OK. I can see some frame markers. These seem to keep pace with the image up to the position of the cursor line........

aa.jpg

Beyond that point they stay put.......

bb.jpg

You didn't continue along the whole clip or indeed, to the point where the figure disappears. You actually don't need quite so many mask points as you have and at the end they should all end up on the left edge.

##############################################################

OK.. This is what you need to do....Sound dramatic but it took about 15 mins... (keep your original .vpj file so you can restart if you get lost)

  • Click the FX for your Video Track 1
  • Delete the Polygon mask and the Transparency effect. :o
  • At the Start of the clip open a new mask effect
  • Set the effect red line cursor to the left (start of the clip)
  • In the full frame Clip Preview screen  add about 50 equidistant points around the part of the figure required to be shown.
  • Something like this.....
  • aaa.jpg
  • Create a keyframe.
  • Move the red cursor line along about 1/2 graph square to the right.
  • Grab the mask and drag it left to re-position it to a good fit
  • Move the existing points to re-outline the figure. In this case it doesn't need to be close to the figure apart from the outline near the bench which needs to be a bit more precise. Don't delete any points or add any new ones.
  • Create another keyframe
  • Move the cursor line along to the first vertical line
  • Grab the mask and drag it left again
  • Reset the points.....Dont add any new ones and don't delete any.
  • Continue in the way for the whole clip . You will then have made about 10 keyframes and all the points will now be lined up at the extreme left of the clip preview window. You need no more keyframes. The track image will be totally transparent and everything underneath will be visible.
  • De tick the mask Inside box
  • Add a Transparency effect with 0% Opacity
  • Play the sequence. The figure will land. The bench will rock as the figure moves off to the left.

You can play with the feathering controls etc. but ensure that the mask is fairly accurate on the bench side of the figure so the falling/wobbling bench is not obscured. The mask can be pretty rough elsewhere as the image underneath doesn't move.

If you feel you need more keyframes you can add them in. In my test it didn't seem too bad with 10.

ccc.jpg

Nat

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...