• 沒有找到結果。

2013/4/24 Digital Visual Effects, Spring 2013 MatchMove

N/A
N/A
Protected

Academic year: 2022

Share "2013/4/24 Digital Visual Effects, Spring 2013 MatchMove"

Copied!
53
0
0

加載中.... (立即查看全文)

全文

(1)

MatchMove

Digital Visual Effects, Spring 2013

Tzu-Kuei Huang

(kuei@cmlab.csie.ntu.edu.tw)

2013/4/24

(2)

Flowchart

+

Video

CGI Animation

=

Composite Video Input

Output

Matchmove is a technique of estimating camera parameters from an input video sequence so that computer generated imagery (CGI) could be seamlessly inserted into the sequence.

2

(3)

Flowchart (detailed)

Video

Blender

P5-P12

Image sequences

Calibration

Voodoo

P13-P17 Camera parameters

3D models

Blender Edit Pose/Position

P31-P35

Animation

Composit e

Blender

P36-P46

Load

Aid Design P18-P30

Output Video

3

(4)

Environment Setting

• Blender

– Version 2.6.2 http://download.blender.org/release/

– Using version 2.6.6 might get error while running python scripts

• Voodoo

– Version 1.2.0 http://www.viscoda.com/index.php/en/voodoo-download

• Other options

– Free: Blender + ICARUS

– Pay: boujou + 3D Max, boujou + Maya, …

4

(5)

Recipe: Get Image Sequence

• Open Blender

• Load video file:

– Change window type to “Video Sequence Editor”

– Select Add →Movie – Put the strip in Layer 1

• Do sequence:

– Frame

• Set number of frames and resolution of frames

• Choose output file type (Targa)

– Time interval: select start and end of the sequence – Choose output location

• Click “Animation” button

5

(6)

Step by Step: Get Image Sequence

Start up Blender

6

(7)

Step by Step: Get Image Sequence

7 2. Change to Video Sequence Editor

1. Click to change window type

Change window type

(8)

8

Step by Step: Get Image Sequence

Add video

Select

Add  Movie

(9)

9

Step by Step: Get Image Sequence

Select input video

~

1. Select file directory

2. Select input file

3. Add

(10)

10

Step by Step: Get Image Sequence

Edit layers (Right click and drag, left click to set)

1. Delete unnecessary layer (audio)

2. Right-click to drag the strip to the “1st Frame” in Layer 1

(11)

11

Step by Step: Get Image Sequence

Do video setting

1. Set

a. Resolution

b. Start/End Frame

2. Set file types to Targa(TGA) 3. Modify output directory

(12)

12

Step by Step: Get Image Sequence

Render image sequence

Click Animation

You’ll see playing video and

increasing frame number

Finish!

You can find the image sequences in output directory

Back to flowchart

(13)

• Open Voodoo

• Open image sequence:

– Select File  Open  Sequence – Select the first frame

– Set Move Type to “free move”

• Track:

– Click Track button

• Export Python script:

– Select File  Save  Blender Python Script – Save .py file (Blender 2.5x and higher)

13

Recipe: Calibration

(14)

14

Step by Step: Calibration

Use Voodoo to load image sequence

Select

File  Open  Sequence

(15)

15

Step by Step: Calibration

Choose and set sequence

1. Select the first frame (ex: 0001.tga)

2. Select “free move”

(general moving of camera)

(16)

16

Step by Step: Calibration

Tracking features

Click “Track” button

(17)

17

Step by Step: Calibration

Save results to “Blender Python Script”

Select

File  Save  Blender Python Script

Select

“Blender 2.5x and higher”

Select “Export all”

Back to flowchart

(18)

18

Recipe: Import 3D Motions

• Open Blender

• Delete default objects

– Choose the object and press “Delete”

• Load Python Script

– Change Window Type to “Text Editor”

– Select Text  Open Text Block

– Select the .py file (exported from Voodoo) – Click “Run Script”

(cont.)

(19)

19

Recipe: Import 3D Motions

(cont.)

• Load Background Images

– Change window type to “3D View”

– Select View  Cameras  Set Active Object as Active Camera – Load background images

– Set the parameters of background images – Change the view

• View  View Persp / Ortho

• View  Front

• Load models and edit their poses/motions in the video

(20)

20

Step by Step: Import 3D Motions

Delete default objects

Press “a” twice to select all objects, then press “Delete” on your keyboard

(21)

21

Step by Step: Import 3D Motions

Load python script

Change window type to

“Text Editor”

Select “Text  Open Text Block”

Select the Python script exported by Voodoo

(22)

22

Step by Step: Import 3D Motions

Run script

1. Press “Run Script”

2. Return to “3D View”

(23)

23

Step by Step: Show Background Images

Select

“voodoo_render_cam”

Select Voodoo camera

(24)

24

Step by Step: Show Background Images

Show Property Panel

Turn on

“Properties” Panel

(25)

25

Step by Step: Show Background Images

Tick-off

“Background Images”

Press “Open”

Select

the first frame

(26)

Step by Step: Show Background Images

Change

background type

Select

“Image Sequence”

Set

1. Number of frames 2. Start frame (1)

Enable “Auto Refresh”

26

(27)

Step by Step: Show Background Images

Set resolution

Set

1. Number of frames

2. Resolution

27

(28)

Step by Step: Show Background Images

Set view

Switch view to

“View Persp/Ortho”

Switch view to

“Front”

28

(29)

Step by Step: Show Background Images

Set active camera

Set

Cameras  Set Active Object as Camera

29

(30)

Step by Step: Show Background Images

Check background

You can drag here to see the camera motions

Make sure “voodoo_render_cam” is selected

30

Back to flowchart

(31)

Step by Step: Load Models

Load models

Select

File  Import Wavefront

(you can also use other file format)

31

(32)

Step by Step: Load Models

Set poses / positions for models

You can set the transform of your objects to edit their positions and poses

32

(33)

33

Step by Step: Load Models

Fine tuning

This step needs lots of fine tuning

You can drag here to see whether your tuning is correct or not

(is the object located at the correct position?)

(34)

Step by Step: Set Animation

Set keyframes

1. Select the frame that you want to insert a key frame

2. Select

Object  Animation  Insert Keyframe..

3. Repeat multiple times

Frame 1

Frame 80

Frame 150

34

(35)

Step by Step: Set Animation

Fine tuning

You can fine-tune the

transformation of objects in a keyframe here

35 Back to flowchart

(36)

Recipe: Compositing

• Add image sequence

– Change window yype to “Video Sequence Editor”

– Select Add  Images and select all images – Drag the strip to the “1st Frame” in Layer 1

• Add scene

– Select Add  Scene

– Drag the scene strip to the “1st Frame” in Layer 2

• Set Scene

– Change scene property to “Alpha Over”

– Set parameters of frame and video

• Click “Animation”

36

(37)

Step by Step: Compositing

Set to Video Sequence Editor Add image sequence (Video Channel)

Select

Add  Image

37

(38)

Step by Step: Compositing

This time, select all frames (Press A)

38

(39)

Step by Step: Compositing

Edit Video Layer (Right click and drag, left click to set)

Drag the strip to the

“1st Frame” in Layer 1

39

(40)

Step by Step: Compositing

Add scene layer

Select

Add  Scene  Scene

Edit scene layer (Right click and drag, left click to set)

Drag the strip to the

“1st Frame” in Layer 2

40

(41)

Step by Step: Compositing

Show Properties Panel

Select

View  Properties

Select

Blend  Alpha Over You will

see the Properties

Panel

Set Blend Type

41

(42)

Step by Step: Compositing

Select Premultiply

Enable!

Set scene camera Set scene camera to

“voodoo_render_cam”

42

(43)

Step by Step: Compositing

Check output setting again!

43

(44)

Step by Step: Compositing

Preview your video

Change the viewing type

44

(45)

Step by Step: Compositing

Select output format

File path

Press ! Finish !!

Oh yeah!!

Final Output

45 Back to flowchart

(46)

More Examples

• CSIE Robot

46

(47)

More Examples

47

(48)

More Examples

48

(49)

FAQ

• Voodoo會當掉!

– 拍攝的影片內容差異太大 – 調整tracking的方式

• 為什麼我在Blender中的Background和Feature沒辦法配合

– 記得要設定 Cameras  Set Active Object as Camera

• 3D models的 位置/動作 好難調整…

– 你是對的!

– 多利用座標系相對位置以及不同視角會有幫助, 不過還是需要一些時間 – 設定動作時, 盡量避免大角度或大範圍的 interpolation, 多設一些 key

frames

• 為什麼最後做出來的動畫 Model 是黑的?

– 記得在場景裡加盞燈

• 我該去哪裡找3D models

– 網路上免費資源非常多!

– 例如: http://www.3dm3.com/modelsbank/

http://www.sharecg.com/

49

(50)

FAQ

調整設定

View  controls

50

(51)

FAQ

• Use different views to adjust the positions and poses of objects

Camera view

Front view

Top view Set

view

51

(52)

FAQ

• Add lights

記得開燈!

Add  Lamp

52

(53)

Document

• Blender official website

– http://www.blender.org/education-help/

• Voodoo document website

– http://www.viscoda.com/index.php/en/voodoo- manual

參考文獻

相關文件

Cauchy, Gauss, Laplace, Poisson (from left to right) Cauchy, Gauss, Laplace, Poisson (from left to right)... Poisson and Poisson Process Poisson and

On the course content page, click the function module to switch to different learning activities pages for learning; you can also directly click the "learning activity" in

Now, nearly all of the current flows through wire S since it has a much lower resistance than the light bulb. The light bulb does not glow because the current flowing through it

「幼稚園學券兌現網站」登入頁面下方的超連結為 「Click here to bookmark the KEVRS Login Page」[圖 4] 而非 「Click here to bookmark the School Portal

AR & VR Professional Development Training 19 HKU e-Learning Development Laboratory.. 接著開始編輯目標影像,按下右方的Click to Upload Overlay Or Click to

•  Please select Multiline Text and insert it into the survey. •  Optional item: you can set the minimum and maximum characters count in the edit panel on the right.. Save

⚫ Students should be able to create interactive user selection, such as the 2-level interdependent select list, pull down menu and click-to-expand menu. Students should be able

ii.) On main menu, click on Action and go to Action In-Tray. iii.) Inside Action In-Tray, click on Subject Draft ER Request application and go to ER Request detail. You can