Você está na página 1de 38

REALVIZ

ImageModeler Tutorial

Legal Notice
Copyright 1999 REALVIZ S.A. All rights reserved.
Information in this document is subject to change without notice. The software described in this
document is furnished under a license agreement or nondisclosure agreement. The software may
be used or copied only in accordance with the terms of those agreements. No part of this
publication may be reproduced, stored in a retrieval system, or transmitted in any form or any
means electronic or mechanical, including photocopying and recording for any purpose other than
the purchasers personal use without the written permission of REALVIZ S.A.
REALVIZ S.A.
Arep Center
1, Traverse des Brucs
06560 Sophia Antipolis
France

www.realviz.com
TRADEMARKS
Image Processing FactoryTM and ImageModelerTM are trademark and registered trademark of
REALVIZ S.A. in France, the USA and other countries. Microsoft and Windows are registered
trademarks of Microsoft Corporation. Other brands and their products are trademarks or registered
trademarks of their respective holders and should be noted as such. REALVIZ Image Processing
Factory product technology was originally developed by the Institut National de Recherche en
Informatique et en Automatique (INRIA, France).

ImageModeler
Instead of modeling complicated geometry, materials and lighting from scratch, ImageModeler
allows computer graphics professionals to tap directly into the richness of the real world. The
software is the first high-end "Image-Based Modeler" to produce virtual 3D models from photo,
video and cinematic images. ImageModeler processes photo images and interprets them to define
a models geometry in 3D wire-mesh. The software then maps textures from the original images
onto the wire-mesh. The resulting 3D model is accurate and highly realistic, and it can be
produced in less time and at much lower cost that conventional computer modeling techniques.
ImageModeler (tm) is the fourth product of the Image Processing Factory.

The Image Processing Factory


The Image Processing Factory is an integrated family of applications that streamline workflow
processes for computer graphics professionals involved in image processing, 3D modeling,
animation or special effects. With the Image Processing Factory, computer graphics professionals
can free their imagination and create!

Other REALVIZ Products


MatchMover
MatchMover is the best "3-D Camera Tracker" available and the only one running stand alone
under both Windows and UNIX. Using new breakthrough technology, MatchMover captures
any live-action camera motion in 3-D (including zoom) by tracking 2-D features in an image
sequence. No additional information is required about the camera or the scene. In addition,
MatchMover calculates the 3-D coordinates of any 2-D features. By exporting this data from
MatchMover to standard compositing and animation software, 3-D objects can be mixed with 2-D
images to create new image sequences. For mixed 2-D and 3-D motion animation, MatchMover
is indispensable!

ReTimer
ReTimer is the ultimate "Time Warper" to slow down or speed up motion sequences. The software
utilizes a revolutionary new method for creating new frames between actual frames in a motion or
still sequence. With this technique, superior-quality high speed and slow speed sequences can be
produced in less time and at lower cost. In addition, ReTimer enables animators to smooth the
motion of hand drawn or computer-generated animation sequences by increasing the number of
frames available for projection. And, fluid motion sequences can be created from a sequence of
just a few photos! ReTimer is a highly effective tool that provides new, easier and less expensive
ways to produce a variety of motion effects.

Stitcher
Stitcher combines horizontally and vertically overlapping photos into stunning wide-angle, highresolution images in seconds. Panoramic images up to 360 X 360 can be exported to 2D
compositing software for creating high-definition, realistic matte paintings and to 3D software for
environment mapping. Of course, Stitcher panoramas can also be exported to ImageModeler for
generating 3D models. In addition, Stitcher allows filming in the panoramic image including
zoom, pan, tilt and roll camera motion. The resulting image sequences can be directly exported to
post-production software packages. Stitcher provides an alternative to on site shooting for
producing large background scenes, and it enables animators to work from high-resolution, very
wide-angle images. Stitcher is ideal software for reducing production costs.

Contents

CONTENTS

INTRODUCTION

CREATING A SIMPLE TEXTURED OBJECT

Getting started

10

Loading the Image Files

11

Calibrating the cameras

13

Adding extra helpers

20

Creating and aligning primitives

23

Extracting the textures

28

Using Extract Plane method

31

CREATING A MORE COMPLEX TEXTURED OBJECT

35

Adding more helpers

37

Creating a mesh from the 3D points

38

Extracting the textures

39

Exporting the Model

40

REALVIZ

Introduction
Who should read this tutorial?
This tutorial has been designed to allow any user to quickly become familiar with the image
modeling process using the REALVIZ ImageModeler software.

What is contained in the tutorial?


Please note that you have an online version of the ImageModeler User Guide. You may need to
refer to this Guide during this tutorial session.
This tutorial explains the calibration and two ways to create a 3D object. Theses sections are
divided into successive steps. For each intermediate step, a project file, or simply project, is
supplied (.imf file). By using these supplied projects, you can move directly to the corresponding
step in the tutorial without executing all of the ImageModeler processes.
To access the data associated with this document, go to the Tutorial\Panettone directory.
Both of the sections use the same data.

The Goal of this Tutorial Session


The goal of this tutorial work session is to teach you how to create 3D objects from pictures.
The first section, Box, explains how to create a 3D object from simple geometric primitives. It
presents all the steps you need to follow to be able to generate a textured 3D model.
The second section, Cake, explains how to create a more complex object, and illustrate how to
obtain an automatic meshing when a dense set of points is known.

REALVIZ

Creating a Simple textured object


The goal of this tutorial is to create a simple textured 3D object from 4 still images taken from 4
different viewpoints.
To compute and check the 3D object, follow these five steps:
1. Load the images.
2. Calibrate the cameras.
3. Create and align primitives.
4. Extract the textures.
5. Export the object.

REALVIZ

Getting started
Launch ImageModeler.
The workspace appears in its default configuration.

10

ImageModeler Tutorial

Loading the Image Files


1. Select File Insert Image....

2. Browse the directories to open the Tutorial\Panettone directory.


3. In the Files of type pull down menu, select the JPEG image format (.jpg).
4. Press the Detail button to see the parameters and a preview of the shots.

5. Select the file Image04.jpg and then press Shift and left click on the file Image01.jpg to
complete the selection.
Tips:
The image files were shot with a still camera so they are not interlaced but if you plan to use
interlaced (video) images you can select the appropriate Interlace type radio button.

REALVIZ

11

6. Click on the Open button to load the images.


The images appear in the Image Strip. Verify that you obtain the same as in the following
picture.

Display the images


1. Press Space Bar or click on the

icon to toggle the workspace area to 4 viewports.

2. Drag and drop each image from the Image Strip to a different viewport.

12

ImageModeler Tutorial

Calibrating the cameras


The calibrating process consist in obtaining the parameters of the cameras used to take the shots
(position, focal length...) from the position of points (called markers) viewed by more than one
camera.
The objective here is to define enough markers in as many shots as possible so that
ImageModeler can compute the cameras. After the compute camera process has calculated the
cameras you can then add more helper points (3D points) that are used in the modeling process.
Each point does not need to be visible in all the other shots, but you should try to select points that
are visible in most of them.
Remember that to compute cameras:

Less is more:

Balance:

Place about 10 markers, each representing the same point in each shot. Placing a large
number of markers does NOT assist the compute camera process.

Scatter your markers throughout the shots in order to cover the largest possible area and
avoid placing them all in the same plane.

No groups:

Avoid groups of markers. Unlike the modeling process, placing groups of markers in the
same area does not aid the calibration.

Matching 2D points
1. Click on

icon to select the Edit Markers tool.

2. Use Shift + Right Mouse to create a new marker in shot 1. A magnifier window pops up to
allow you to precisely select the position of the marker.

REALVIZ

13

3. Use Shift + Left Mouse to create the corresponding marker in the other images.

We can not find precisely the Helper 1 in shot 4, since it is not visible.
4. Repeat steps 2 and 3 until you have at least 8 corresponding points between each pair of
images.
The pictures (shot 1 and 3) below show the points you may use to calibrate the cameras.
To place the markers, use points that can be easily found in each shot. For example, you can
use the 4 corners of the mat.
Verify that all your markers are not in the same plane, otherwise there is no 3D information
and the calibration will fail. That is why you should place some markers on the top of the box.

14

ImageModeler Tutorial

Importing the markers


If you choose to import the markers that we have provided to calibrate the camera, you should
delete all your markers before importing them.
1. Select all the markers in the Project View.
2. Press the Delete key.
3. Select File Import....
4. In the Files of type pull down menu, select the REALViZ Ascii Point Tracks format (.rz2).
The file Markers_Calib.rz2 contains the different markers used for the calibration.
5. Select the Markers_Calib.rz2 file.

REALVIZ

15

6. Click on the Open button to import the markers.

Note:
When importing a .rz2 file, to match the points with the images, the images should have been
loaded in the order used when the .rz2 file was saved.
If the points do not match with your images, you should either edit the .rz2 file to change the
frame numbering, or re-load your images in another order.
Instead of importing the markers, you may choose to open the Precalib.imf project, which
contains the Panettone tutorial project at this point.

Creating a Coordinate System


This step is optional, but useful because it allows you to set a coordinate system based on the
helpers. There are several advantages in defining a system of coordinates.
First, the way you define coordinates can make things easier and more intuitive in the next stages.
For example, when you create a 3D primitive or insert a virtual object in the scene, they are
usually placed on a flat surface, such as the ground. In this case, it is very convenient to have two
coordinate axes, say X and Z, set on the plane of the ground. Further manipulations and
placements will be easier.

Tip:
In the Preferences Panel, set the Up axis used for the display so that it is the same as the up
axis defined by your coordinate system.
Second, a wisely chosen coordinate system allows you to very easily impose geometric constraints
on certain points. These constraints define obvious alignments in the scene that are easy to see.
An example of such a constraint might be, all the points on the top of the box are at the same
height above the ground, so they should have the same Y coordinate. These constraints help
improve the accuracy of calibrating the cameras.

16

ImageModeler Tutorial

In this example, you are going to create a coordinate system defining the plane X-Z plane on the
ground. The Y-axis is the vertical axis normal to the ground.

Tip:
If you plan to export the results to a 3D animation package, depending upon the package you
use, define the axis to either have Y up or Z up. The coordinate axis you define in
ImageModeler should be the same as the axis in your animation software to facilitate the
communication between the 2 software.
1. In the Project View, open the Helper Relations folder.
2. Double click on the Coordinate System item to open its property box.
3. Select Helper 1 from the Origin drop-down list to set the origin of the Coordinate System to
the position of Helper 1.

4. Initialize the measurement system (the distance between two chosen points defines the
coordinate system scaling). Enter 5 in the Distance field and select Helper 1, then Helper 2 in
from and to drop-down lists as in the previous picture.
Tip:
If you set the distance between the points Helper 1 and Helper 2 to 5 units, which is the actual
width in decimeters of the mat that is on the ground, the 3D units will all be in decimeters.
5. Click on the Axes tab to open the Axes page of the coordinate systems properties dialogue
box.
6. Select each item of the drop-down list as in the following picture to set the X axis from the
origin (Helper 1) to Helper 2 and Z axis from the origin to Helper 4.

Note:
The third axis is automatically defined to be orthogonal to the first two axes.

REALVIZ

17

7. The Coordinate System that is defined looks like in the following picture :

Calibrating the cameras


Select Camera Calibrate All to calibrate all the cameras.
After a successful calibration, all the parameters of the cameras are known, and the markers are
now 3D points.
As the cameras are known in 3D, the view can be unlocked in order to visualize the scene from
any viewpoint.

18

ImageModeler Tutorial

The better the calibration, the more accurate the 3D reconstruction. The quality of the calibration
is indicated by the color of the shots and the helpers in the Project View. A green color indicates a
good result, yellow is fair and red is bad. The color of the shot is the average of all the points
visible in that shot.

The PostCalib.imf project contains the Panettone tutorial project at this point.

REALVIZ

19

Adding extra helpers


To place a primitive efficiently, we need to create new helpers once the calibration is done. To
place a cylinder on the box, we add new 3D points on its contour. To place these new helpers, you
have to place them in at least two images. Two markers are efficient to obtain a 3D point.

1. Click on

icon to select the Edit Markers tool.

2. Use Shift + Right Mouse to open the magnifier window to create a new marker.

20

ImageModeler Tutorial

When a new marker is created, a blue guiding line appears in all the viewports displaying other
shots. This guideline is the line joining the selected pixel and the optical center of the camera used
to shoot the picture. As each 3D point is the intersection of all the guidelines, it becomes easy to
place the corresponding point in the other shots, as they are along the guideline.

3. Use Shift + Left Mouse to create the corresponding marker in one other image. By pressing
the Ctrl key, you snap the point along the guideline. You only have to find the right place on it.

The new guideline automatically appears, and the marker is now a 3D point. You can check in
a third shot if the 3D point is correctly placed.

REALVIZ

21

The ReadyToBuild.imf project contains the Panettone tutorial project at this point.

22

ImageModeler Tutorial

Creating and aligning primitives


1. Select Model New Primitive Mesh Cylinder to create a new cylinder.

2. Double click on the object item in the Project tree to view its properties.
3. Change the subdivisions parameters to modify the geometrical attribute of the cylinder and
smooth its shape.

4. Click on the

icon to enter the object selection tool.

5. Click on the

icon to enter in the Translate tool.

6. Click on the

icon to enter in the Wireframe mode.

7. Click on the object to select it.

REALVIZ

23

8. Ctrl + Shift + Click on the light blue cube of the manipulator and drag it to any top vertex of
the cylinder to place the manipulator on it. The blue cube represents the center of the
manipulation. It is also called pivot.

9. Ctrl + Click on the light blue cube of the manipulator and drag it to the helper on the top left
of the box (helper "Box 1") to place the cylinder on it.

As the object moves relatively to its pivot, we can easily snap any vertex of the cylinder to any helper.

24

ImageModeler Tutorial

Note:
The Shift key is used to move the pivot.
The Ctrl key is used to snap.

10. Click on the

icon to enter in the Scale tool.

11. Drag the green cylinder on the right of the manipulator to proportionally scale the X and Z
coordinates of the cylinder. Note that the pivot remains fixed.
12. Drag the green cylinder on the top of the manipulator to scale the height of the cylinder.

REALVIZ

25

13. We will adjust the size of the cylinder when it has been correctly oriented.
14. Click on the

icon to enter in the Rotate tool.

15. Drag the green circle of the manipulator to rotate the cylinder around the Y axis.

26

ImageModeler Tutorial

16. Repeat the steps 9 to 12 with different images until you are satisfied with the position of the
cylinder.

The ReadyToTexture.imf project contains the Panettone tutorial project at this point.

REALVIZ

27

Extracting the textures


There are three options to extract the textures: quick extract, face by face and by plane. The quick
extract does not generate any new image, the texture is directly taken from the shots without any
perspective correction. It is used to preview the scene. The face by face extraction generates one
texture image per face. It is best suited for sharp objects. The plane export generates one texture
map for a group of faces. This mode needs more user manipulation, but it generates fewer files
that can be very easily edited.

1. Click on the

icon to enter the object selection tool.

2. Select the cylinder.


3. Select Texture Extract Face by Face to create a texture for each face of the cylinder.
4. Click on the

icon to show the texture in the active view.

Notice that some unexpected effects occur : the top is not uniform and the image of the cake
appears over the texture of the box.

To guide and improve the texture extraction, we will create some stencils.
The stencils are mattes used to force ImageModeler to either use the stenciled area of the image to
extract the texture (green stencil), or conversely to avoid using this area (red stencil). Even if you
define a red stencil, the texture can be extracted from it, if the texture cannot be viewed in other
shot.

1. Click on the

icon to enter the Stencil On tool.

2. Drag the shot 2 from the image strip to a viewport.


3. Shift + Left Click to draw a stencil on the top of the box. This indicates that the texture will be
extracted from there.

28

ImageModeler Tutorial

4. Press Enter to close the stencil.

5. Click on the

icon to enter the Stencil Off tool.

6. Drag the shot 3 from the image strip to a viewport.


7. Shift + Left Click to draw a stencil on the part of the cake that masks the box. This indicates
that the texture will not be extracted from there.
8. Press Enter to close the stencil.
9. Repeat steps 6 to 8 with the shot 4 to obtain the stencils as shown on the following picture.

REALVIZ

29

The Stencil_On_Off.imf project contains the Panettone tutorial project at this point.
To correct another unexpected effects, we place another stencils as shown in the following picture
:

30

ImageModeler Tutorial

Using Extract Plane method


The Extract Plane method calculates an average plane from the selected faces and creates a unique
texture in this plane. The advantage of this method is that it limits the number of textures in order
for example, to be edited.
We will divide the cylinder in 5 parts. Each one corresponds to a texture file. The following
picture shows these parts.

1. Click on the

icon to enter the Face selection mode.

2. Click on the

icon to activate the flat display.

3. Click on the

icon to enter the Selection tool.

4. Shift + drag to select faces or Shift + click to select face by face.


5. Ctrl + drag to unselect faces or Ctrl + click to unselect face by face.

REALVIZ

31

6. Repeat steps 3 and 4 to obtain the following selection in the shot 3 :

7. Select Texture Extract Plane to create the texture (be sure that no rear faces are selected
and that the object remains selected).
8. Repeat steps 3 to 6 for each parts of the cylinder. You can notice that the faces where the
texture has been extracted appear in violet.
9. We obtain the following model :

The Textured_Box.imf project contains the Panettone tutorial project at this point.

32

ImageModeler Tutorial

Creating a more complex textured object


The goal of this part is to produce a 3D model of the cake in the Panettone project.
To get a quick and rough model of the cake, we could model it with a cylinder (as done
previously). But, to be more precise and more realistic, we will generate a set of 3D points on the
cakes shape, and then use the automatic mesh generation available in ImageModeler.
The 3D model is automatically built from the set of helpers.

Adding more helpers


To automatically create the mesh, more helpers are needed. The form of the 3D model depends of
the position of the helpers. The more dense the set of points, the more realistic the generated mesh.

1. Click on

icon to select the Edit Markers tool.

2. Use Shift + Right Mouse to create a new marker. Place it on the cake.

3. Use Shift + Left Mouse to create the corresponding marker in another image. By pressing the
Ctrl key, you snap the point along the guidelines.
4. Drag (while the Ctrl key is pressed) the cursor to the corresponding place.

5. To place these new helpers, you only need to place it on two images.
6. Repeat steps 2 and 3 to create as many points as you need to create a realistic mesh of the cake.
The file Panettone.rz2 contains the different helpers used to build the 3D model of the cake.
The ReadyToSculpt.imf project contains the Panettone tutorial project at this point.

REALVIZ

35

Creating a mesh from the 3D points

1. Click on the

icon to enter the helpers Selection tool.

2. Select the helper "Panettone 1" in the project tree.


3. Shift + Click on the helper "Panettone 250" in the project tree to select all the helpers used to
build the 3D models.
4. Select Model Wrap to create the 3D model. The following picture shows the results using
Wrap or Carve & Sculpt.

The wrapped method creates a convex shape enveloping the set of points, while the carved
method uses all the points, allowing the creation of concave objects. However, the wrapped mesh
looks smoother and realistic enough for our needs. For example, with a human face, it would be
better to use Carve & Sculpt. When using the carved method, while no other tool is selected, the
sculpt tool is active. This tool allows you to add or to remove 3D pieces of the object.
The SculptDone.imf project contains the Panettone tutorial project at this point.

36

ImageModeler Tutorial

Extracting the textures

1. Click on the

icon to enter the object selection tool.

2. Select the object.


3. Select Texture Extract Face by Face to create a texture for each face of the mesh.
4. Click on the

icon to show the texture in the active view.

5. We obtain the following model:

The FinalMeshes.imf project contains the Panettone tutorial project at this point.

REALVIZ

37

Exporting the Model


1. Select File Export As to export the model.

2. Enter the name of the file.


3. Select the format you wish to export from the Save As Type drop-down list.
4. Click on the items you wish to export.
5. Click on the Save Button.
Note:
When running the demo version of ImageModeler , you are not allowed to export your data.
We have provided already exported data from this tutorial to allow you to check the results in
your 3D animation package or in a VRML browser.

38

ImageModeler Tutorial

Você também pode gostar