P3D - How to build show

This is a distillation of Phil Lavery's http://jmvp.pbwiki.com/How-to-%253A-build-a-show

The Header and Presentation Set Up

A Present3D presentation file is written in XML, which like HTML, uses opening and closing tags between which you place the variable information. You must always ensure that your tags are completed and that there is a space between option in the opening tag or your xml will not parse correctly.

<?xml version="1.0" encoding="UTF-8"?> <!-- Document : fileName.xml Created on : date Author : demonstration Description : demonstration --> <presentation> <duration>1.0</duration> <name>example1</name> <bgcolor>BLACK</bgcolor> <textcolor>WHITE</textcolor> </presentation>

<presentation>
is opening tag for the presentation.
<duration>1.0</duration>
set duration in ...?
<name>example1</name>
sets the name of the presentation.
<bgcolor>BLACK</bgcolor>
sets the background colour for the presentation, this can be changed by using WHITE or by using a RGBA value for the color you wish to use. ie
<bgcolour> 0.1 0.1 0.7 1.0 </bgcolour> for light blue.
<textcolor>WHITE</textcolor>
sets the text colour for the presentation, this can be changed by using BLACK or by using a RGBA value for the color you wish to use. ie
<textcolor> 0.1 0.1 0.7 1.0 </textcolor> for light blue.
</presentation>
remember closing tag xml @EOF

THE HOLDING SLIDE

- Slide Loader (required)
<holding_slide> <duration></duration> <!-- Leave blank --> <background></background> <!-- Leave blank --> <title></title> <!-- Leave blank : image|mov loaded later --> <layer> <image position="0.5 0.5 0.25" scale="0.55">images/image.png</image> </layer> </holding_slide>

THE SLIDE

- Like a Slide in PowerPoint, you compose media (compositing) <slide> <background></background> <!-- optional RGBA : inherits presentation's --> <title></title> <!-- as per holding slide behaviour --> <duration>30</duration> <!-- in seconds --> <key>3</key> <!-- See note following <layer> <image position="0.3 0.9 0.2" fade="0 0 1 1 4 1 6 0" scale="0.5">titles/movie.mov</image> <model coordinate_frame="slide" scale="0.5" >model/model.osg</model> </layer> </slide>

KEY :
This function allows a simulated key press to be implemented into a slide. Any of the Present3D key commands can be used. When using the moveable lighting key command, x and y coordinates can also be used: <key x=0.5 y=0.4>k</key>. <key>c</key> to hide cursor, broken with white.

LAYERS AND OBJECT TYPES

Layers allow a slide to built up by introducing objects into the slide on keypress. They are containers for media objects, including, models, images, stereo images, movies and stereo movies.

<slide> <background></background> <title></title> <duration>30</duration> <layer> <!-- Each slide can have multiple layers --> <duration>15</duration> <!-- Not duration - time offset, when the slide appears (secs.) --> <bullet>text</bullet> <!-- Wotitsez - optionally can be given coords --> <model coordinate_frame="slide">model/model.osg</model> <!-- See Model note following --> <image path="slider.path" fade="12 0 14 1 18 1 20 0" scale="0.35">image.jpg</image> <!-- See img note following -> <image path="slider.path" fade="12 0 14 1 18 1 20 0" scale="0.35">image.mov</image> <!-- stereo image --> <stereo_pair scale_x="1" scale_y="1" fade="18 0 20 1"> <image_left>stereographs/image_l.jpg</image_left> <image_right>stereographs/image_r.jpg</image_right> </stereo_pair> <!-- side by side stereo image or movie --> <stereo_pair fade="0 0.999" position="0.5 0.5 0" rotate="0.01 1 0 0" scale="1"> <image_left region="0.0 0.0 0.5 1.0" >stereographs/movie.mov</image_left> <image_right region="0.5 0.0 1.0 1.0" >stereographs/movie.mov</image_right> </stereo_pair> </layer> <layer> <model coordinate_frame="slide" scale="0.5" >model/model.osg</model> <image path="slider.path" fade="12 0 14 1 18 1 20 0" scale="0.35">image.jpg</image> <image path="slider.path" fade="12 0 14 1 18 1 20 0" scale="0.35">image.mov</image> </layer> <clean_layer> <model coordinate_frame="slide" scale="0.5" >model/model.osg</model> <image path="slider.path" fade="12 0 14 1 18 1 20 0" scale="0.35">image.jpg</image> <image path="slider.path" fade="12 0 14 1 18 1 20 0" scale="0.35">image.mov</image> </clean_layer> </slide>

image
path to the image or mov. On an image or movie, paths, scaling, rotation, positioning and fades can all be applied. See: EFFECTS (below) stereo_pair - Stereo Images and movies. Scaling, positioning or other effects declared in the opening tag for the stereo pair and applied to both sources.
image_left/image_right
paths to the left and right eye image or movie. Slide-by stereo images and movies can also by using the region="" function in the opening tag of both left and right image as above.
Note: When using stereo movies always use side by side format.
model coordinate_frame
= slide|model
slide coordinates are relative to the slide,
modele coordinate relative to the model - useful for walkthroughs as start positions and paths are relative to the actual model.
<clean_layer> and </clean_layer>
are the respective open and close tags for the clean layer function. Clean layers allow a new layer in the slide in which only the the objects linked in the clean layer are displayed in the new layer, unlike the layer function where all the objects on the previous layers are still displayed. The objects linked within a clean layer behave the same as they do with in a normal layer, however rotations and paths on objects started in a previous layer will not be reset on a new clean layer, they will continue normally.

Known bugs and issues:

There are several threading issue with movies introduced in clean layer. All movies must be applied to every clean layer or this movie will not be closed when the slide is changed. These movies can however have a fade of fade="0 0" applied to them in the layer which the movie is not to be seen. Also the looping function can not be used on a clean layer as the movie will not exit properly and will continue to play until the presentation is exited. Images or movies when alpha channels, fade must be non-zero - between fade="0 0.1" and fade="0 0.999" for alpha channels to be recognized.

SUPPORTED FORMATS

MODEL FORMATS

OpenFlight .flt, TerraPage .txp, 3D Studio .3ds, LightWave object .lwo, LightWave scene . lws, Alias Wavefront .obj, COLLADA .dae, OpenSceneGraph ascii osg, OpenSceneGraph binary ive, Performer .pfb, Inventor .iv, VRML .wrl, Quake model .md2, Point stream . 3dc, .ac3d, DirectX scene file .directx, Designer Workbench .dw, Geo .geo,

MOVIE & IMAGE FORMATS

: tga , tiff , QuickTime , rgb , pic , png , psd , pnm , bmp , dds , gdal , gif , jp2 , jpeg , mpeg

FONT FOMATS

: (via freetype) - TrueType and more. ( I d/ld Freetype binary and dependencies for win in W:/Software

EFFECTS

Objects can have effects such as start position, scale, fade, rotation. e.g...
<model coordinate_frame="slide" scale="250" position="0.5 0.5 0" fade="0 0 3 1" rotate="60 1 0 0">model.osg</model> <model position="0 -26078137 0" coordinate_frame="model" rotation="1 0 0 0.2">model.ive</model> <image position="0.5 0.5 0" fade="0 0 1 1" scale="1" looping="ON" >movie.mov</image>

EFFECTS AND THEIR USAGE:

scale="0.5"
is a factor (multiplies the native size) scale_x and scale_y can also be used. Is there a scale_z?
position="x y z"
Centre of the media relative to the bottom left hand corner of the screen.
0 0 0 centre of the media will line up the the bottom left hand corner
0.5 0.5 0 aligns at the centre of the slide.
Range beween -1 and 1 z>0.2 doesn't work - gets too close for the illusion to work.
rotate="º x y z" <deg> <booleanX> booleanY> <booleanZ>
The rotation is applied around those axes set true (who's axis, Screen or Object? I guess Object.) rotate="60 0 0 1" will cause the object to rotated 60 degrees from left to right on the screen.
.
rotate1|2|3
split-rotates can also be used so positioning in multiple axis is easier, i.e rotate1="60 1 0 0" rotate2="75 0 1 0" rotate3="25 0 0 1" , will rotate the media 60º in x, 75º in y and 25º in z.
rotation
="°/s x y z" <deg per sec.> Rotation allows an object to spin. Rotation is around the centre of the respective axis, i.e a rotationrotation="60 0 0 1" in the z axis will cause a rotational motion from left to right on the screen.
rotation1|2|3
Split-rotates for ease rotatation1|2|3 can also be used.
looping="ON"
Loop a movie or animation path to be looped within a slide. "ON" or "OFF"
.
fade="t % t %"
This allows media to be faded onto and off of the slide. t = secs. from start; % = normalised percentage 0 - 1 (=100%) t and % are pairs - there can be a string of them, there is no limit to the number of pairs in an expression. i.e fade="0 0 3 1" at the moment the layer loads, media is not visible and at 3 seconds the media will be completely visible. This is a gradual transition between 0 and 3 seconds.

Paths

Media objects can have motion paths (external files) applied to them for translates and flythroughs. <model path="name.path" path_time_offset="2">model/model.ive</model> <image animation_material="name.material" animation_material_time_offset="2">movie.mov</image> <model path="name.rotation_path">model.osg</model> <image camera_path="name.path">image.jpg</image>

Four path types:

a .path, .material or .rotation_path extension. (What's the 4th path type?) These paths can be applied to any of the supported media types.

1. path="name.path"
extension .path. An example of a file like this is
0 0 0 -4 0 0 0 1 7 0 0 0 0 0 0 1 8 0 0 2 0 0 0 1 Col 1 - Secs. from animation start ( start is given in path-time-offset ) 2,3,4 - x,y,z (normalised) 5,6,7,8 - Quaternion x y z w (Duh!?? What!?)
---
2. animation_material="name.material"
extension .material. Controls colour and Alpha. 0 1 1 1 0 2 1 1 1 1 6.5 1 1 1 1 7 1 1 1 0 col 1 - Secs. from animation start ( start is given in path-time-offset ) 2,3,4,5 - rgba
3. path="name.rotation_path"
extension .rotation_material. These paths a path to be applied to an object that is spinning. An example of this type of file is: 0 0 0 0 -0.3 0 0.01 0 0 0.05 5 0 0 0 0.2 0 0.1 10 0 0.09 20 0 0 0 -0.1 0 0.4 190 0 0.6 24 0 0 0 -0.2 0 0.4 230 0 0.8 29 0 0 0 -0.3 0 -0.8 280 0 3 Col 1 - Secs. from animation start ( start is given in path-time-offset ) 2,3,4 - x,y,z 5,6,7 - pivot_point (x,y,z) 8 - Rotation azimuth (form North) 9 - Rotation elevation (from Horizon) 10 - Look distance.
4. camera_path="name.path"
extension .path. Moves the camera for flythroughs. Set model-coordinate-frame to 'MODEL' when using these paths. To record a path, open the model separately P3D (not as part of a presentation); Press 'z';; Mae your moves; Press 'z' again to stop recording. The file "saved-animation.path" is created.

Menus And Interactive Presentation

Present3D also allows menus for remote (SSH) access to presentations and utilities.

The examples given are for Mac. I use PuTTy's Plink - a command line ssh utility for windows. How: W:/ref/reference/sshPuTTy.txt
Currently following this page (translating it to Windows: http://www.openscenegraph.org/projects/Present3D/wiki/Support/ssh
<?xml version="1.0" encoding="UTF-8"?> <!-- Document : menu.xml Created on : Author : John Montgomery Description: Menu for local file --> <presentation> <name>Opticore Menu</name> <bgcolor>BLACK</bgcolor> <textcolor>WHITE</textcolor> <slide> <background></background> <title>Demo Menu</title> <layer> <!-- remotely --> <click_to_run>ssh user@host.local /path/runmyapp present3D file.xml &</click_to_run> <bullet>Button</bullet> <!-- locally --> <click_to_run>/path/runmyapp present3D file.xml &</click_to_run> <image>images/image.png</image> </layer> </slide> </presentation>

The menu file works on due to the <click_to_run></click_to_run> function. This will run an external script allowing other application to be launched. The object that follows the click to run function is used as a clickable button which enables the click to run. This can be any of the Present3D supported media files. To launch another Present3D xml presentation a file called runmyapp is need to allow the xml file to be launched. This file should be place in the directory along with the xml presentation file. This file looks like: cd /full/path/to/file/directory setenv DISPLAY :0.0 #export DISPLAY=:0.0 $1 $2
The purpose of this file is set the point at which the present3D file.xml command is applied, also sets up the display setup as this may vary when using remotely. This file should not have any extension.

When using a menu remotely, it is recommended that ssh automatic login is used, detail can be found here.

Summary

Present3D offers the ability to produce presentation within minutes that would up till very recently have taken teams of programmers months to produce. This amazing presentation tool allows users to showcase their work and creatively in the best possible light. Also with the ease at which complex stereo presentation can be produced with Present3D, stereo is now easily within the reach.