Present3D Help

The Easy and Powerful Open Source Tool for creating fully interactive 3D presentations for stereoscopic visualisation.

With affordable real time, stereoscopic visualisation now being a reality, why is it not more widely adopted? The answer is simple, hardware is only one part of the equation, traditionally these systems have been run by experienced computer programmers and without these skills it has been either impossible or very expensive to create your own content. Not any more!

 

 

Present3D is a real breakthrough in power, flexibility and ease of use for a stereo visualisation authoring tool. Completely cross platform, the same presentation can go from laptop, to desktop, to multipipe stereo visualisation environment independent of the OS and hardware used and, most importantly, any one can use it! No programming skills required! And it gets better, Present3D allows the creation of seamless presentations that combine, text, bulleted text, backgrounds, images, stereo images, movies, stereo movies, point cloud models, polygonal models (over thirty formats currently supported including massive terrain and vizsim .flt models) and animation paths, all in a real time, fully interactive environment....drop in a model, turn it, zoom in and explore a detail, fly through and around it..... but why stop at just one model, Present3D uses the familiar slideshow format of applications like Powerpoint, so not only can a single slide combine all of these elements, including multiple models, but you can have as many slides as you require. Go from a text and movie introduction, to a fly through of a virtual town, to a full colour laser scan....what ever is required to explain your research, product, topic or design. By using animation paths and the autorun facility you can also build fully interactive stereo kiosks, for medical information, science centres, museums and heritage applications, now the limit is your imagination.

 

You will find links to the helps pages on this site and where to obtain P3D below.

 

The DLF uses P3D for the development of its 3D Presentations and Shows.

 

Download Present3D 

 

Present3D can now be obtained by downloading the OpenSceneGraph from site link below. 

 

OSG  Site  : Download SVN

 

Then go here to obtain instructions for Building OSG and Present3D on OsX

 

We aim to provide binaries shortly that will make the install easier. You will find links here when that happens.

 

 

Links To Present3D Help Pages :

 

How to : build a Present3D Show

 

How to : use Present3D

 

How to : use Present3D Additional Features

 

How to : Screen Capture in Present3D

 

Present3D Keyboard Controls

 

Setup Images for Stereo Alignment

 

WideWindow Configuration Files

 

How to : create a Present3D Menu to start Present3D shows and other apps (page coming soon)

 

How to : SSH login without a Password ( for control of a remote version of P3D)

 

How to : include Paths in Present3D

 

How to : Jump location within Present3D 

 

How to : create side x side stereo movies for use in Present3D

 

How to : edit or create stereo movies in Final Cut Pro

 

How to : edit or create stereo movies in Motion (page coming soon)

 

How to : apply a movie to a Model

 

How to : include a VNC window in a Present3D scene

 

How to : include a Live Streaming Video Feed

 

How to : view Volumetric Data in OsgVolume 

 

How to : include Volumetric Data in Present3D

 

 

 

 

(Development Team members only) : Present3D Development Page 

 

 

Support Present3D

You can support the development of Present3D by making a donation or, if you are a developer, by getting your hands dirty and becoming directly involved..

 

You will find information on making a donation here: Donations

 

To register an interest in becoming involved please contact us: contact

How to : use Present3D Additional Features

PAGE CURRENTLY BEING EDITED :

 

List of Additional Features :

 

Requires OSG 2.9.x and up to date OSG-Data :

 

Additional Tags :

  • hud  tag to have static background or foreground layer : here

  • billboard  tag to have image elements always face the camera : here

  • exit  tag to auto exit show at end of show : here

  • loop tag to auto loop show : here

  • jump tag to jump from one slide to another within a show : here

  • vnc tag to include the display from another computer as a window within a slide scene : here

  • movie tag to include webcam or live camera feed as a window within a slide scene : here

  • env tag to set environmental variables in the xml file : here

  • path tag to set path environmental variables in the xml file : here

 

Additional Features without Tags :

  • audio/video spanning to allow audio or video tracks to span ( continue playing over) multiple slides : here

 

Additional Features that have How To pages :

  • VNC in a window within P3D : page 

  • Movie : Live Video Stream into a window within P3D :  page 

  • Jump within P3D show : page

  • Volume files : in P3D : page

  • Volume files : Viewing and saving  with OsgVolume : page

 

Other features that require additional installations

  • <browser> Browser in a window within P3D : working on Linux :  to be confirmed for OSX

  • <pdf> PDF in a window within P3D : working on Linux :  to be confirmed for OSX

 

Additional Tags and controls :

 

 

HUD :

hud="on" will create a static image or movie file, unaffected by the camera manipulators.

<image hud="on">image.jpg</image>

<image hud="on">video.mov</image>

Can be used within <image>, <stereo_image>, <vnc>, <pdf>, <browser> and  <background>

Possible uses :

  1. To create a static background image or video, while still able to move and rotate other objects in the scene.

  2. To create static foreground elements such as logos.

Known Issues :

  1. It will be possible to push the manipulated object through or clash with these static layers. This is a design issue you should take into consideration.

 

 

Billboard :

billboard="on" will create an image or movie element, that will always face the camera.

<image billboard="on">image.jpg</image>

<image billboard="on">video.mov</image>

Can be used within <image>, <stereo_image>, <vnc>, <pdf>, <browser> and <background>

Possible uses :

  1. To create labels that will move with the object, but always face the camera.

Known Issues :

  1. It will be possible to push a manipulated object through or clash with these billboards. This is a design issue you should take into consideration.

 

 

 

Exit Presentation :

<exit> exit or escape function as a slide and a button/layer tag.

<exit></exit>

<exit>exit_image.jpg</exit>

Usage add exit tag to a layer, on advancing to a layer containing exit P3D will exit immediately.

Possible uses :

  1. On entering final slide of a show with <exit></exit> in a layer, the show will exit to the desktop.  

  2. Where a second show is loaded by using the click to run feature, use of the exit tag on entering final slide in  the second show it escapes back to the previous show

  3. Where a Present3D menu is used to load various shows, use of the exit tag at the end of these shows will bring you back to the menu show.

  4. As with click to run feature, the exit tag can be used with an image or text to create a button to escape back to the previous show.  

#cccccc; back

 

Loop :

<loop> to loop show :  

<loop></loop>

Usage, add the follow to top of the xml file, just  below the presentation tag:


<presentation>
     <loop></loop>

Possible uses :

  1. To create a show that will loop continuously.

 

 

#cccccc; background-color: #cccccc; min-height: 1.0px"> 

 

Jump within a presentation :

<click_to_jump> Used to jump x number slides back or forwards within the current show

<click_to_jump jump="relative" slide="-2" layer="0"></click_to_jump>

Usage: 

like click to run but within the same show, so applied to image/model/text and clicking on will jump x number of slides forward or backward. Or jump to a named slide, this would have the advantage that adding, removing or moving slides would not interfere with these links. 

 

Known issues :

 

Click on object/image/text to load a new presentation :
 
 
 
<click_to_run >/full/path/to/runmyapp present3D pathToFile/pres.p3d</click_to_run>
<image position="0.25 0.75 0.0" scale="0.25">myImages/clickImage.png</image>
 
 
To make this work you will need an edited version of the "runmyapp" file to give the full path to the folder where the runmyapp file is located. 
 
Example runmyapp
 
#!/bin/tcsh
cd /Volumes/groucho/pymol_lectures/lambda_repressor
setenv DISPLAY :0.0 
#export DISPLAY=:0.0
$1 $2
	#!/bin/tcsh
cd /Volumes/volumeName/path/to/runmyapp
setenv DISPLAY :0.0
$1 $2
 
You may need to make the runmyapp file an executable by running chmod
 
 
 
Click on object/image/text to load a new presentation and jump in original presentation :
 
 

 

<click_to_run jump="relative" slide="2" layer="1">full/path/to/runmyapp present3D pathToFile/pres.p3d</click_to_run>
<image coordinate_frame="slide" position="0.25 0.75 0.0" scale="0.25">myImages/clickImage.png</image>

 

 

 

 

 

 

#c

VNC :

 

<vnc> Use the vnc tag within a layer :

 

<vnc>network_address_of_your_Mac</vnc> for example <vnc>192.168.0.5</vnc>

 

This will make the vnc window fill the screen in your P3D show. You can change its size, location, fade etc;  just as you would for an image or movie.

 

<vnc   position="0.3 0.9 0.1" scale="0.25" fade="0 0 1 1 4 1" >192.168.0.5</vnc> 

 

Further information on use of vnc can be found here : How to : VNC

 

 

Live Stream :

 

Live Stream into a window within P3D : page

 

<movie>x:y.live</movie> 

 

For use with video capture card or webcam.

 

 

Environmental variable usage and setting, and paths :

 

Usage:

<presentation>

 

<env>OSG_COMPUTE_NEAR_FAR_MODE=COMPUTE_NEAR_FAR_USING_PRIMITIVES</env>

<env>OSG_NEAR_FAR_RATIO=0.00001</env>

 

Path :

 

<path>${DATA_DIR}</path>

<path>${DATA_DIR}/OpenSceneGraph-Data</path>

<path>${DATA_DIR}/Images</path>

<path>${DATA_DIR}/Models</path>

<path>${DATA_DIR}/Earth</path>

 

 

 

#cccccc; background-color: #cccccc; min-height: 1.0px"> 

Click to run and jump :

 

additional option of moving forward x slides in parent show.  Usage - add following options to the click_to_run : jump="realtive" or "absolute" and then slide="num" and layer="num", example:

 

<layer>

<click_to_run jump="relative" slide="0" layer="-1">osgviewer glider.osg</click_to_run>

<image coordinate_frame="slide" position="0.25 0.75 0.0" scale="0.25">Images/lz.rgb</image>

<click_to_run jump="absolute" slide="0" layer="0">osgviewer cow.osg</click_to_run>

<image coordinate_frame="slide" position="0.75 0.75 0.0" scale="0.25">RSVclip.mov</image>

</layer>

 

#cccccc; background-color: #cccccc; min-height: 1.0px"> 

 

 

 

Named slides and jump to named slides :


To name slides and layers you use the new slide_name and layer_name property, and then the add the ability to jump to a slide/layer in response to a key press there is now a <key_to_jump> tag, along with support for use the slide_name and layer_name to reference where you wish to jump to, the old slide="0" and layer="1" numbers still work too, and in theory you should be able to mix and match.

 

There is also a <key_to_run> functionality.

 

You can add multiple <key_to_jump> per layer, and these should be placed right after the <layer> tag, as below.

 

I haven't yet added support for placing the key_to_jump functionality to a whole slide or whole presentation yet, but this should be possible with a bit further work.

 

Note with the key="a" property in the <key_to_jump> you can use a single character alphanumberic value, but if you use 0x prefix it'll assume a hex number, or just numbers and it'll treat it as decimal number. I've tried send these events as a key press from the browser and it works fine.
 

-- example .p3d file.

<presentation>
    <env>P3D_DEVICE=0.0.0.0:8080/Volumes/volumeName/Users/userName/Data/OpenSceneGraph-Data/htdocs.resthttp</env>

    <slide slide_name="chapter one">

        <layer layer_name="section one">
            <key_to_jump key="a" slide_name="chapter one" layer_name="section two"></key_to_jump>
            <key_to_jump key="b" slide_name="chapter one" layer_name="section two"></key_to_jump>
            <imagesequence interaction_mode="USE_MOUSE_X_POSITION" paging_mode="PAGE_AND_DISCARD_USED_IMAGES" >Images</imagesequence>
        </layer>

        <clean_layer layer_name="section two">
            <key_to_jump key="0x20" slide_name="chapter one" layer_name="section one"></key_to_jump>
            <key_to_jump key="0x200" slide_name="chapter one" layer_name="section one"></key_to_jump>
            <stereo_pair scale_x="1.0" scale_y="1.0" paging_mode="PAGE_AND_DISCARD_USED_IMAGES" interaction_mode="USE_MOUSE_Y_POSITION">
                <imagesequence_left region="0.0 0.0 0.5 1.0">Images</imagesequence_left>
                <imagesequence_right region="0.5 0.0 1.0 1.0">Images</imagesequence_right>
            </stereo_pair>
        </clean_layer>
        </slide>


</presentation>

 

 

 

Imagesequence :

 

 <imagesequence interaction_mode="USE_MOUSE_X_POSITION" paging_mode="PAGE_AND_DISCARD_USED_IMAGES" >Images</imagesequence>
        </layer>

 

 <imagesequence interaction_mode="USE_MOUSE_Y_POSITION" paging_mode="PAGE_AND_DISCARD_USED_IMAGES" >Images</imagesequence>
        </layer>

 

 

Http control :

 

To use Http control you need to add the following enviromental variable to the header of the presentation that will be controlled. Below <presentation> tag, but above slide or holding slide tags.

 

The path below will need to be modified to point to your OpenSceneGraph-Data folder.

 

<env>P3D_DEVICE=0.0.0.0:8080/Volumes/volumeName/Users/userName/Data/OpenSceneGraph-Data/htdocs.resthttp</env>

 

 

Then to control from a remote browser, open a browser window and enter the IP address of the host machine with the :8080 port number added to it, for example :

 

http://192.168.0.10:8080

 

You should now get a simple control panel that will alllow control of your presentation from a browser window.

 

 

OSC Control :

 

 

 

 

Audio spanning :

 

audiospan - media spanning multiple slides

 

audio spanning section ; to allow audio tracks to span multiple slides. 

 

This is now supported by just adding movie (with audio) to each slide/layer that needs the audio/movie, and P3D will now spot that there is continuity between slides/layers and will leave the media playing without restarting it.  This functionaity works without any new tags, it also does away with the need for clean_layers.

 

Mailing List :

 

For additional support please join the Present3D list here :

 

http://lists.present3d.osgforge.org/listinfo.cgi/p3d-users-present3d.osgforge.org 

<presentation> 

   <loop></loop>
   

 

 

Using Present3D

Using Present3D

Start a Presentation as normal using the on screen menu or the P3D loader application. You can also start from the command line :

  

Starting a Presentation using the command line

Open terminal and "cd" change directory to the location where the Present3D presentation file is located. Then run using the command:

present3D file.xml

The presentation file.xml will be loaded.

 

Moving through your slides

The following key commands will allow you move throw the presentation slides in different ways.

The left and right arrow keys allow movement back and forward through the slide in a presentation.

The up and down arrow keys allow movement through the layers in each slide.

The "g" key will start the presentation running in auto-play mode.

The "h" key will stop a presentation running in auto-play mode.

The "n" key will auto step through the slides and their layers.

The diagonal keys beside the "help" and "del" will jump between the first and last slide respectively.

The "p" key will pause all rotations and movies.

The "o" key will resume all rotations and movies.

The "r" key will reset the slide, so all movies/animations will start from the beginning.

The "c" key will hide the cursor.

The escape key will exit Present3D

 

Interacting with objects

A three button mouse is useful when interacting with presentation content. However a single button mouse can be used, and the modifier keys "alt" and "command" can be used to replicate the middle and right buttons respectively.

The three buttons do as follows:

Right button with up and down movements will cause the object to zoom in and out respectively.

Left button will object to be rotated.

Middle Button will move the position of the object in 3D space.

The "space" key will reset the object to its default position.

The "l" key toggles dynamic lighting on and off.

The "k" key will allow you to move the light source if your model has normals.

The “w” key will change the model to wireframe view

When using Volumetric data, the "a" key separates the data by luminance and the "t" key will increase the transparency of the volumes layers.

When using Point Cloud data. the "+" and "-" keys will increase and the decrease the point size of the data.

 

Manipulators

Present3D has four main manipulators, Trackball, Flight, Drive and Terrain.

Using the Trackball Manipulator

This is toggled on or off by using the "1" key.

This works as described above.

 

Using the Flight Manipulator

This is toggled on or off by using the "2" key.

The left mouse button will cause acceleration and the right mouse button will cause deceleration or a backwards movement. Clicking both the left and right mouse button will cause an emergency stop.

The up and down mouse movements will cause a decent or lift motion respectively.

The left and right mouse movement will cause a banking left and right respectively.

To move straight centre the mouse on the screen.

 

Using the Drive Manipulator

This is toggled on or off using the "3" key.

The left and right mouse buttons will cause acceleration and deceleration respectively.

The left and right mouse movements will cause a left and right turn respectively.

The "6" and "9" will cause an upwards or a downwards look.

 

Using the Terrain Manipulator

The right mouse button and push up/pull down to zoom in/out.

The left mouse button and move the mouse to translate the models position.

The middle button to rotate or travel over the surface of the model, when close in terrain following will be enabled.

 

Other key Commands

The "z" key will start recording a motion path. Pressing "Z" (shift-z) will stop the recording.

The "f" key will toggle between full screen and windowed mode.

 

 

P3D Keyboard Controls

 

Letter Keys :

 

  • a : The "a" key, with volumes, in combination with mouse movements, will modify the data by      changing the alpha clipping value.
  • c : The "c" key will hide the cursor.
  • d : The "d" key used with the mouse will change the sample density of volumetric data
  • e : The "e" key toggles texturing on and off.
  • f : The "f" key will toggle between full screen and windowed mode.
  • g : The "g" key will start the presentation running in auto-play mode. 
  • h : The "h" key will stop a presentation running in auto-play mode.
  • k : The "k" key, in combination with mouse movement, will allow you to move the light source if your model has normals.
  • l : The "l" key toggles dynamic lighting on and off.
  • m : The "m" key will capture a screenshot, while "M" will capture a series of frames until "M" is pressed again. See "How to screen capture" section for more info.
  • n : The "n" key will auto step through the slides and their layers.
  • p : The "p" key will pause all rotations and movies.
  • o : The "o" key will resume all rotations and movies.
  • r : The "r" key will reset the slide, so all movies/animations will start from the beginning.
  • s: The "s" key will bring up OSG stats.
  • t : The "t" key, with volumes, in combination with mouse movements, will modify the data by changing the transparency. 
  • u : The "u" key will update a running presentation with any changes that have been made to the xml file or content.
  • v: The "v" key steps through the volume rendering modes of default, lit, iso and mip.
  • w : The “w” key will change the model to wireframe view, then points, then back to normal.
  • z : The "z" key will start recording a motion path. Pressing "Z" (shift-z) will stop the recording.

 

Other keys :

 

  • The left and right arrow keys allow movement back and forward through the slide in a presentation.
  • The up and down arrow keys allow movement through the layers in each slide.
  • The diagonal arrow keys  will jump between the first and last slide respectively.

 

  • The "spacebar" key will reset the object to its default position.
  • + or - When using Point Cloud data. the "+" and "-" keys will increase and the decrease the point size of the data.
  • The escape key will exit Present3D

 

Numbers :

 

     Present3D has four main manipulators, Trackball, Flight, Drive and Terrain.

 

  • 1 : Trackball manipulator.
  • 2 : Flight manipulator.
  • 3 : Drive manipulator.
  • 4 : Terrain manipulator.

 

  • 6 : used in combination with Drive manipulator "3" and mouse to Look Down.
  • 9 : used in combination with Drive manipulator "3" and mouse to Look Up.

 


 

Mouse :

 

  • Right button with up and down movements will cause the object to zoom in and out respectively.

  • Left button will rotate the object.

  • Middle Button will move/translate the position of the object in X and Y axis.


 

Further info on using keys and manipulators can be found here : How to : use Present3D

 

.

How to : build a P3D show.

Building Shows

This page is a brief summary of how to build a Present3D presentation incorporating many different files and formats.

 

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>

 

Lets break this down and out the usage of each of the components:

<presentation> is opening tag for the presentation.

<duration>1.0</duration> sets the duration of the presentation for when the show is used in auto-run mode.

<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> is the closing tag for the presentation, this should be placed at the end of the presentation xml file.

 

The Holding Slide

These are used as a loading slide for the presentation.

<holding_slide>

<duration></duration>

<background></background>

<title></title>

<layer>

<image position="0.5 0.5 0.25" scale="0.55">images/image.png</image>

</layer>

</holding_slide>

We will again Break this down into its component parts:

<duration></duration> A holding slide has no specific duration as it will stay on screen as long as the presentation is loading, therefore the duration should be left blank.

<background></background> Leaving this blank, the slide will assume the background color set for the presentation.

<title></title> This will add a title text to the slide. This uses osgText library from the OpenSceneGraph. This can be left and a image or movie used instead see later.

<layer> This is the opening tag for the layer onto which your content is entered. See layer section, For a full description of the layer function.

<image position="0.5 0.5 0.25" scale="0.55">images/image.png</image> This links the required file for the slide, an image is best, position sets the position on screen and scale will scale the image to the required size, for a full description of positioning and scaling see later section.

</layer> This is the closing tag for the layer.

</holding_slide> This is the closing tag for the Holding slide.

 

Known issues:

Present3D supports both presentation files with the .p3d and .xml extensions. However the holding slide is only supported when the .xml extension is used.

 

The Slide

This is where all the cool stuff happens, this behaves much like a Slide in PowerPoint or any other presentation tool, you can group a number of different files and file types together to get your desired effect.

 

<slide>

<background></background>

<title></title>

<duration>30</duration>

<key>3</key>

<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>

 

Break the slide down:

<slide> is the opening tag for the slide.

<background></background> as in the holding slide, the background has been left blank as this slide is using the background colour set for the presentation. This can however be changed by using BLACK, WHITE, or an RGBA value

<title></title> the title function behaves the same as in holding slide.

<duration>30</duration> this sets the duration in seconds the slide will stay on screen for during an auto-run show.

<key></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>.

</slide> is the closing tag for the slide.

Known issues:

When using the <key>c</key> to hide this cursor, will not take effect when used with another <key></key> tag.

 

Layers and Object types

Layers allow a slide to built up by introducing objects into the slide at a key press. Within each layer there can be as many different objects as required including, models, images, stereo images, movies and stereo movies.

 

<slide>

<background></background>

<title></title>

<duration>30</duration>

<layer>

<duration>15</duration>

<bullet>text</bullet>

<model coordinate_frame="slide">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>

<!-- 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>

 

Breaking the layer down we get:

<layer> and </layer> are the respectively the opening and closing tags for the layer. Each slide can have as many layers as the user requires.

<duration>15</duration> This functions allows multiple layers to used when using an auto-run presentation. This set the time in second until this layer will appear on screen.

Each layer can have several different objects types incorporated into them.

<bullet>text</bullet> this function is used to add standard bullet points into a layer. This text can be positioned using the usual function or will be auto positioned it no position coordinates are given.

<image>images/image.jpg</image> this function is used to display an image or movie in a layer, all that is required is a correct path to the file. On an image or movie, paths, scaling, rotation, positioning and fades can all be applied, further details are in the Effects section.

Stereo Images and movies can also be incorporated by using the <stereo_pair> and </stereo_pair> opening and closing tags as shown above. Any scaling, positioning or other effects are declared in the opening tag for the stereo pair, so that the effects are applied to both sources equally. Between these opening closing tags, the <image_left></image_left> and <image_right></image_right> functions are used to set the 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 the left and right eye image as shown above.Note: When using stereo movies always use side by side format.

<model coordinate_frame="slide">model/model.osg</model> allows a model to be incorporated into a layer. The coordinate_frame, in the model opening tag, allows a model coordinates to change depending on the start position. There is two options for this, "slide" or "model", with the the slide coordinate system the model will be relative to the slide, "model" the coordinate system will be relative to the model. The model system is useful when using large scale walkthrough models as start positions and paths are relative to the actual model.

A full list of supported file formats can be found here.

<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.

mages or movies with alpha channels, must have a fade of between fade="0 0.1" and fade="0 0.999" applied to then to allow the alpha channels to be recognized.

 

Effects

On the any of the objects that are incorporated into a show can have effects such as start position, scale, fade, rotation.

 

<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" The scale effect, scales an media relative to their native size. This is a multiple of its native size, i.e 0.5 is 50% of is native size where as 250 is 250 times larger than its native size. The functions scale_x="0.5" and scale_y="0.3" can also be used to scale differently in the x and y axis.

position="x y z" This sets the position at the which the objects is loaded into the slide. The position is from the centre of the media, this is the same for all types. The x y z, values are relative to the bottom left hand corner of the screen, i.e at position="0 0 0" the centre of the media will line up the the bottom left hand corner and at position="0.5 0.5 0" will be at the centre of the slide. These value vary between -1 and 1. The z value is for setting how far out of or into the screen media will be positioned in stereo or when layering images or models.

rotate="º/s x y z" This allows an object to be rotated on the screen. The variables are, "º/s x y z". The first term, is number of degrees of rotation, the next three terms are defining in which axis this rotation is applied (0 being not applied, 1 being applied). The rotation is applied around the axis, i.e. a rotate="60 0 0 1" will cause the object to rotated 60 degrees from left to right on the screen. Multiple 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" Rotation allows an object to be spin on screen. The variables are, "º/s x y z". The first term being number of degrees rotated per second, the next three are in which axes the rotational motion is applied (0 being not applied, 1 being applied). 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. Multiple rotations can also be applied to an object usingrotation1,rotation2, and rotation3

looping="ON" This effect allows a movie or animation path to be looped within a slide. This can be either "ON" or "OFF".

fade="t % t %" This allows media to be faded onto and off of the slide. The variables are, "t % t %", where t is time in seconds from the time the layer is loaded, % is a value between 0 and 1, being 0% visible to 100% visible respectively. i.e fade="0 0 3 1" at the moment the layer loads, time 0 the media is not visible and at 3 seconds the media will be completely visible. This is a gradual transition between 0 and 3 seconds. There is no limit as how many of these time and visibility pairs can be added to each media item.

 

Text & Fonts

Text can be used in a slide both as body text using the <paragraph> tag and as bulleted text using the <bullet> tag. Truetype fonts can be used and charatcter size  and position can be set, but if not given defaults will be used.

<paragraph font="myfont.ttf" character_size="0.3" position="0.1 0.5 0.08"> My Text </paragraph>

<bullet font="myfont.ttf" character_size="0.3" position="0.1 0.5 0.08"> My Text </bullet>

Fonts are, by default, in a fonts folder within the OpenSceneGraph-Data folder but a path can be included within the tag to point at other locations.

If moving a presentation from one machine to another, remember to move a copy of any fonts used.

 

 

Paths

In any slide the media item can have paths applied to them so that movement effects can be applied to item, as well as automated fly through for large models and any other movement that is required to happen in a slide.

 

<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>

 

These four types of path are dependent on an external file with either a .path, .material or .rotation_path extension. These paths can be applied to any of the support media types.

1. path="name.path" This path requires a file with the 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 

 

The first column represent time from the point the animation path starts. The second, third and fourth columns represent x y z position coordinates respectively. The fifth, sixth, seventh and eighth columns represent the x y z w quaternion coordinate respectively. A time offset can also be applied to path_time_offset="2" the variable is the number of seconds from time the slide is loaded.

 

2. animation_material="name.material" This path requires a file with the extension .material. This allows the colour and alpha of an object to be altered over time. An example of this file type is:

 

0 1 1 1 0

2 1 1 1 1

6.5 1 1 1 1

7 1 1 1 0 

 

The first column represent time from the point the animation path starts. The second, third and fourth columns represent r g b a values respectively. A time offset can also be applied to an animation material using animation_material_time_offset="2" the variable is the number of seconds from time the slide is loaded.

 

3. path="name.rotation_path" This path requires a file with the 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

 

The first column represent time from the point the animation path starts. The second, third and fourth columns represent x y z position coordinates. The fifth, sixth and seventh represent x y z pivot point coordinates. The eighth and ninth columns represent rotation coordinates, azimuth (from north) and elevation (from horizon) respectively. The tenth column represents look distance.

 

4. camera_path="name.path" This path requires a file with the extension .path. This type of path movies the camera rather than the object, this is well suited to automating a fly through of a large model. This can easily be done by opening the model on its own, Present3D (not as part of an xml) and by pressing the z key, this will start recording the users movements, so stop the recording press Z (shift-z). There will be a file saved_animation.path created. Remember when using this path for fly through to set the model coordinate frame to model.

 

Menus and Interactive Presentation

Present3D also allows for interactive menus and other items to be created which allow other presentation and application to be started locally or remotely through SSH.

<?xml version="1.0" encoding="UTF-8"?>

<!--

Document   : menu.xml

Created on : 

Author     : 

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 [at] host [dot] local /path/runmyapp present3D file.xml &amp;</click_to_run>

<bullet>Button</bullet>

<!-- locally -->

<click_to_run>/path/runmyapp present3D file.xml &amp;</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 .

New Features : Present3D continues to be developed and a list of new features can be found on this page : How to : use Present3D Additional Features

 


Mailing List :

For additional support please join the Present3D list here :

http://lists.present3d.osgforge.org/listinfo.cgi/p3d-users-present3d.osg...

How to : P3D Paths

  

Present3D paths file explanations

 

1) Path

 

path="name.path"

 

0 0 0 -4 0 0 0 1

7 0 0 0 0 0 0 1

8 0 0 2 0 0 0 1

 

first column - time

 

2,3,4 position: x y z

 

5,6,7,8 quaternion: x y z w

 

can be used with a time offset : path_time_offset="2"

 

 

2) Animation Material

 

animation_material="name.material"

 

0 1 1 1 0

2 1 1 1 1

6.5 1 1 1 1

7 1 1 1 0

 

first column - time

2,3,4,5 are colour and alpha : r g b a

 

 

can be used with a time offset : animation_material_time_offset="2"

 

3) Rotation path

 

path="name.rotation_path"

 

This is the one used for the Mars sequence.

 

 

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

 

 

1 : time

2,3,4 position: x y z

 

5,6,7 pivot point: x y z

 

8,9 rotation: azimuth (from north) elevation (from horizontal, up is

+90 degrees)

 

10 look distance:

 

 

4) Camera Path

 

camera_path="name.path"

 

Capture a camera path by pressing "z" key to start and "Z" to stop - it will write the file "saved_animation.path" in the current directory.

 

 

 

How to : create side x side stereo movies

Present3D Help

Creating side by side stereo movies in QuickTime

 

Present3D is great for displaying stereo. Stereo movies however should always be used in side by side format. This page will go through how to produce side by side stereo movies in QuickTimePro.

 

  1. Open both the left and right eye movie files in QuickTimePro.
  2.  Choosing the right eye movie, use the Select All then Copy functions from the edit menu.
  3.  Now click on the left eye movie, use the "Select All' and then use the Add to Selection and Scale function from the edit menu. Both movie will now be directly on top of each other.
  4.  Now open the Show Movie Properties from the window menu: The left eye movie will be Video Track 1, and the right eye will be Video Track 2. Select Video Track 2 and click the Visual Setting tab. Now using the Offset, change the the first value to width of the video file. In the Player window both video tracks should be side by side.
  5. Now Save and a side by side stereo movie has been sucessfully created.

 

 

How to : edit or create stereo movies in FCP

Although Final Cut Pro doesn't have any built in tools for working with stereo 3D, the following two tools can make the process of creating your stereo 3D feature much, much easier. However, if you want to do it all manually, the final section shows you how to setup a side by side viewer in FCP.

PluralEyes for Syncing Your Clips :

Before you can do very much you need to sync your left and right eye footage, along with any audio track if that has been captured separately. If you are using consumer, or even prosumer cameras, then this can be a real chore.  Singular Software have a solution for this, their PuralEyes software will automatically sync both video and audio in FCP, ready for you to crop and then take onto the next stage..

Watch the tutorials here.

The Stereo 3D Toolbox :

Once you have your synced video clips then Tim Dashwood's Stereo3D toolbox makes it so much easier to view and fix convergance issues, colour balance and then output to the format that you want.

You will find the tutorials here.

Creating a Side by Side viewer in FCP :

If you use the tools above then you shouldn't need to use this setup, but it's useful to know, just in case.

You can create a stereo movie sequence for side by side stereo by doing the following :

Open Final Cut Pro..

Go to menu bar FCP and scroll down to Audio Video settings..

Then in the Summary tab select the correct preset for your material...

Now open the Sequence Presets tab, find ticked preset, check it is correct (as previous step) and then click on the Duplicate button at the bottom of the window.

Now to change the Frame Size..

First click on the Aspect ratio button and select Custom, now double the width of your frame. This will allow you to have both your right and left movies side by side in the FCP viewer.

Click ok.

Now create a new Project - menu bar/File/New Project

Now add your clips to this project in your FCP Browser window..

Then double click on your first left clip, it will open in the Viewer, in the Viewer, click on the Motion tab, and change the Centre to -X (where X is half the width of your materials frame ie a quarter of your new double width viewer)

Now double click your first right clip, and as above, except change the Centre to X (where X is half the width of your materials frame ie a quarter of your new double width viewer)...

Now you can drop these clips on to individual video channels on the FCP timeline and they should come up side by side in the viewer... you can now sync your clips by moving in the channel.... it can be easier if you go to the bottom right of the timeline window, click and hold down the forward arrow, and select both Show Filmstrips and Audio Waveforms...

You can create a stereo movie sequence for side by side stereo by doing the following :
Open Final Cut Pro..
 
go to menu bar FCP and scroll down to Audio Video settings..
then in the Summary tab select the correct preset for your material...
now open the Sequence Presets tab, find ticked preset, check it is correct (as previous step) and then click on the Duplicate button at the bottom of the window.
 
Now to change the Frame Size..
first click on the Aspect ratio button and select Custom, now double the width of your frame. This will allow you to have both your right and left movies side by side in the FCP viewer.
click ok.
 
Now create a new Project - menu bar/File/New Project
Now add your clips to this project in your FCP Browser window..
then double click on your first left clip, it will open in the Viewer, in the Viewer, click on the Motion tab, and change the Centre to -X (where X is half the width of your materials frame ie a quarter of your new double width viewer)
 
Now double click your first right clip, and as above, except change the Centre to X (where X is half the width of your materials frame ie a quarter of your new double width viewer)...
 
Now you can drop these clips on to individual video channels on the FCP timeline and they should come up side by side in the viewer... you can now sync your clips by moving in the channel.... it can be easier if you go to the bottom right of the timeline window, click and hold down the forward arrow, and select both Show Filmstrips and Audio Waveforms...

Installing Present3D on OSX

Page still in process of being written.. still..

Installing from Binary :

At this time (Dec 2010), there isn't an up to date binary available, but as soon as there is, it will be available for download from here.

Building from Source :

Present3D is now part of the OpenSceneGraph source so a download of the code from the SVN repository will get the most up to date code, but before you do that you need to make sure you already have the following :

1)  Developer Tools :

If installed you will have a folder called Developer which has Xcode 3.x.x application, if not then you can either install from your system disk or download from the Apple site.

2) Cmake :

The OSG currently uses Cmake to generate either make  files or an Xcode project depending on your preference.

Cmake can be downloaded from here : http://www.cmake.org/cmake/resources/software.html

You want the Mac OSX Unversal .dmg

Current version is 2.8.3

Download and install as normal.

 

Now you are ready to download the OSG.

3) OpenSceneGraph:

To download the osg open a shell (Terminal window)  navigate to your User home directory by typing

cd ~

then return key

and then cut and paste in the following and press return:

svn checkout http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk OpenSceneGraph

Once that has finished downloading you should now have a folder in your User/your user name directory called OpenSceneGraph, which has all of the downloaded files.

Now you need to download the OSG data files into the same home directory ( not the OpenSceneGraph, but the same one where that is installed) by cutting and pasting in the following to your shell and pressing return.

svn checkout http://www.openscenegraph.org/svn/osg/OpenSceneGraph-Data/trunk OpenSceneGraph-Data

 

At this point, you could start the build process, but you will be missing a few extra libraries that we will want to use to enable volume rendering and vnc window support, so lets go ahead and get those, if you don't need volume rendering or VNC window support you can skip this part and go to item 7 below.

4) Insight ToolKit :

You can download ITK from here : http://www.itk.org/ITK/resources/software.html

Download the 3.14 release. There seems to be a problem with the most recent version 3.20 building and 3.14 is the last known version to work, I will try the other more recent versions and update this if more recent ones build.

Once it has downloaded you will want to move the folder to the same User home directory as for the OSG and then open the Cmake application that was installed in your applications folder at 2 above.

Now you need to set up Cmake to find the source you want it to use and where you want it to put the make files it creates. So, for both use the browse button to find and select the InsightToolkit folder you just moved or , once you have the location in the top box  you can copy and paste into the box below.

Now you are ready to let Cmake do its work, so hit the Configure button, wait till it's finished, if the main window shows red then you may need to make some configuration adjustments, but you can just hit configure again and when that is finished hit the Generate button and again wait till it's finished. You now have generated a make file that will allow you to install the Insight Toolkit.... so now you need to do that...

Go back to your shell and navigate into the InsightToollkit folder/directory by typing (changing the folder name to match yours)

cd ~/Insight_folder_name

Now we need to make and install by typing the following commands  followed by return key :

make

Once that has finished

sudo make install

you will be asked for an admin password enter that and again press return.

Once that has finished you will have installed the Insight Toolkit. If there is a build error then you may need to go back to Cmake and make a configuration change the error should give a hint to what that might be... and then go back through the process again.

 

5) DCMTK

Download and install : DCMTK.dmg

This has been created with  MacPorts port dmg filename command and will be placed in the usual location for all MacPorts files : /opt/local/

6) LibVNC

Don't do this unless VNC window is needed,  as edits to other files are required to avoid build problems. See Temp Fix below.

Download and install : LibVNCServer.dmg

Temp Fix :

Use BBedit (or your normal editor ) to edit the following files:

In OpenScenGraph/src/osgplugins/vnc edit the file ReaderWriterVNC.cpp on line 22 with a new path to rfb directory /opt/local/include/rfb/rfbclient.h  and then save,

 

then in the directory  /opt/local/include/rfb/

 

open rfbclient.h and edit paths to the following files :

 

rfbproto.h to /opt/local/include/rfb/rfbproto.h 

keysym.h to /opt/local/include/rfb/keysym.h 

 

and then save,

 

now open  rfbproto.h and edit the path to the following files :

 

rfbconfig.h to /opt/local/include/rfb/rfbconfig.h

rfbint.h to : /opt/local/include/rfb/rfbint.h 

and then save,

This has been created with  MacPorts port dmg filename command and will be placed in the usual location for all MacPorts files : /opt/local/

 

7) OSG

Open the Cmake application that you installed earlier into you Applications folder.

Now you need to set up Cmake to find the source you want it to use and where you want it to put the make files it creates. So, for both use the browse button to find and select the OpenSceneGraph folder in your User home directory, or once you have the location in the top box  you can copy and paste into the box below.

Now you are ready to let Cmake do its work, so hit the Configure button, the main window will show red and there are some changes that you need to make ;

Build_OSG_Applications  :  box should be ticked

Build_PRESENT3D_WITH_SDL : box should be un-ticked

CMAKE_OSX_ARCHTIECTURES  : should say i386 only! Remove other options.

CMAKE_OSX_SYSROOT : should be : /Developer/SDKs/MacOSX10.6.sdk ( if you are building on 10.6 and 10.5.sdk if building on 10.5).

 

FREETYPE_INCLUDE_DIR_freetype2 : should have a path : /usr/local etc.. if not, see item 9 

FREETYPE_INCLUDE_DIR_ft2build : should have a path : /usr/local etc.. if not, see item 9 

FREETYPE_LIBRARY : should have a path : /usr/local etc.. if not, see item 9 

ITK_DIR : should be : /usr/local/lib/InsightToolkit

OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX :  must be changed to  : imageio

OSG_GL3_AVAILABLE : should be  : un-ticked

OSG_WINDOWING_SYSTEM : should be changed to : Cocoa

now hit Configure button again...

..wait till it's finished and then hit the Generate button and again wait till it's finished. You now have generated a make file that will allow you to install the OSG,  so now you need to do that...

Go back to your shell and navigate into the OSG  folder/directory by typing (changing the folder name to match yours)

cd ~/OpenSceneGraph

and then type 

make

and press return.... and then wait...

...and once that is finished, assuming you had no errors, you have finished building the OSG and Present3D. 

Handy Hint :  You can speed up the make process by giving permission to use more than one core by adding -j x where x is the number of cores. So in my case, with 8 cores, that would be : make -j8

Another Handy Hint : Should you get an error and it is obvious that it is from a non essential library, then you can continue the build by adding  -i which will ignore the error, so that would now make the command :

make -j8 -i

But beware, as this will not only ignore the first error that stopped the build, but also any subsequent errors, should there be any.... however, at least you will know the full extent of your problem.

Before you can jump in and start using Present3D, you will need to set up your shell environment and we cover that in the next section...

 

8) .tcshrc file

By default Terminal opens a Bash shell, but out of long use and sheer habit I use Tcsh, so this section is going to assume that you are happy to make the change to the tcsh shell and that if you are a seasoned bash user, that you will know how to adapt what follows to suit the bash environment.

So, if not already open, open the Terminal application, now open it's preferences (Terminal/Preferences) and in the Startup section, where is says : Shells open with: select the second option : command (complete path): and edit the box below so that it says :

/bin/tcsh

and that's it, open a new shell and it should now say tcsh on the window header... you can close the preferences. 

Now, there are various paths and environmental variables that we want to have set automatically when we open the shell, and for this we create a .tcshrc file. The dot in front of the name means that this is a hidden file and once saved you will only be able to see it with an editor that will allow you to see such files... you could use Dashcode that comes with the Xcode tools, but my preference is BBedit from Bare Bones Software and a free 30 day trial can be downloaded from here : http://www.barebones.com/products/bbedit/  but TextWrangler, also from Bare Bones is cheaper I believe and so may be worth considering.

Now we need to create or add to your .tcshrc file. 

Download this example : dot_tcshrc  file and either add to your existing or save as .tcshrc  to create a new one.  The system will ask are you sure you want to use the prefix .  say yes!
 
Now you need to find and replace all instances of username and change to the username of the home folder that you saved the OSG etc into above.
 
This file is where you set the defaults for how Present3D will be setup to display on your screens. Here you control size of screen, whether stereo is on or off and what stereo driver is required. You can also select which widescreen config will be used and which cursor.
 
OsgConfig
 
OsgConfig files allow control of the size and proportions of the window that will be displayed on your desktop. This is most often used when wanting to create a single graphics context that will stretch across two displays rather than each of the display being rendered individually and potentially loosing stereo sync when handling large datasets.
 
If not required just comment out the following line in the .tcshrc file or include a setenv in the header of your .xml show file. To comment out use a # in front of the line.
 
#setenv OSG_CONFIG_FILE /Users/username/osgconfigs/wideWindow1024.cfg 
 
Download example osgconfig folder and put in same folder/directory as OSG etc above : osgconfig

 

9) MacPorts

When you look through the OSG Cmake window you will see references to a number of other libs that may or may not be useful. Ones to avoid at this time are FFmpeg and Xine as these tend to cause build problems and aren't required if the CoreVideo  plugin is installed, which it is by default.

One that you should already have is  Freetype2 but if the lines :

FREETYPE_INCLUDE_DIR_freetype2

FREETYPE_INCLUDE_DIR_ft2build

FREETYPE_LIBRARY

have -NOTFOUND against them, then you could use MacPorts to download and install this lib. (or download the ,dmg file from here : FreeType2 )

MacPorts can be downloaded from here : http://www.macports.org/install.php

Once installed you can use the command line in terminal to do the download and install process, however, I find it handy to have a GUI for this, and so I use the free Porticus application that can be downloaded from here : http://porticus.alittledrop.com/download.html

Once downloaded and installed you should open the Porticus app and do a SelfUpdate which is found on the main menu under Ports. You will probably be asked for you password during this process. 

You should now be able see that the All Ports folder in the sidebar of the Porticus window is listing over 7,400 ports available. Select that folder and then in the search bar enter the name or part of the name of the library that you want to install, in this case you should type freetype and then select the freetype 2.4.3 or later option that is listed, then hit the install button on the window menu bar... you will then be given some options, tick the universal box and then install.

If you do add libraries you will then need to go back to the Cmake and configure once again, make sure that the library that you have added now has a path against it along the lines of /opt/local/xxxx instead of the -NOTFOUND that was there previously. If it hasn't updated you can tell Cmake to start from scratch again by throwing away its cache (Menu bar /File/Delete Cache) but you will then need to make all the changes that we did in section 7 once again. 

10) Colour Lookup Tables (CLUT)

Without a colour lookup table CT and MRI data will be displayed in greyscale. At this point, CLUT are little more than a text file that you can edit by hand to control colour and alpha values for particular densities of the original data. However, with the next round of funding it is intended to create an interactive GUI driven application that will allow you to visually define the colour, contrast, exposure and crop the data before saving for use in Present3D.

A folder with some sample CLUT can be downloaded here and a copy saved either in the same location as your .xml "show" file or in a single standard location like the osgconfigs folder, remember to include the full path to the CLUT file in the xml file.

Download : Sample CLUT File

11) Sample Shows (shows still to be added/uploaded)

For information on how to run Present3D shows and what keys can be used go : here.

Download : Sample_Show  folder : This  includes two shows: setup.xml includes some grids for projector alignment with passive stereo systems, polariser adjustment screen and a skull dataset that should help confirm that the "eyes" are the correct way round. The second show, sample.xml includes some pointcloud datasets captured by a laser scanner, some stereo movies and an example of a movie applied to a sphere. Once the folder has been downloaded and unziped, open a terminal window and "cd" into the folder, then type :

present3D setup.xml

or

present3D sample.xml

You can move through the show by using either the "n" key or left and right arrow keys. You can rotate, pan and zoom,  either by using a 3 button mouse or by holding down the mouse button, or mouse button plus "alt" or mouse button plus "ctrl" keys.

Download : Sample Volume Show : This show includes a CT scan which is being rendered using the different methods possible, this can be changed interactively by pressing the "v" key. Transparency can be controlled by holding down the "t" key and moving the cursor up and down the screen. Data can be removed by density by holding down the "a" key and moving the cursor up and down the screen.

Once the folder has been downloaded, open a terminal window and "cd" into the folder, then type :

present3D volume.xml

You can use this same command to open any Present3D show just replacing volume.xml with the actual name of the .xml file that you want to open.

A good source for test volume datasets can be found here : CTDATA

at this point only use those that have the Modality listed as CT. We are working on solving the problem with the other modalities and will update this when it is fixed.

For information on how to build a Present3D show go : here

AttachmentSize
osgconfigs.zip9.29 KB
colour_255.zip8.01 KB

Present3D Help : Using Frame Renderer

How To : Use the Present3D Frame Renderer

This page give a brief description of how to use the Frame Renderer tool to capture image sequences for use with the new imagesequence interactive format.

 

-----Currently being written----

Setup Images

 

Setup grids for 4x3 format screen

 

 

 

<slide>

   <duration></duration>

      <background></background>

      <title></title>

      <layer>

 

      <stereo_pair scale_x="1.0" scale_y="1.0" >

             <image_left>images/gridgreen.jpg</image_left>

             <image_right>images/gridred.jpg</image_right>

         </stereo_pair>

<paragraph position="0.15 0.85 0.05" character_size="0.06">Stereo set up</paragraph>

      </layer>

   </slide>

 

 


Put the following grids in a folder called images or rename the path above. 

 

 

 

 



 

 

Grids for 5x4 format screen

 

<slide>

   <duration></duration>

      <background></background>

      <title></title>

      <layer>

 

      <stereo_pair scale_x="1.0" scale_y="1.0" >

             <image_left>images/gridgreen54.jpg</image_left>

             <image_right>images/gridred54.jpg</image_right>

         </stereo_pair>

<paragraph position="0.15 0.85 0.05" character_size="0.06">Stereo set up</paragraph>

      </layer>

   </slide>

 

 


Put the following grids in a folder called images or rename the path above. 

 

 

 



 

Polariser setup image 

 

 

<slide>

   <duration></duration>

     <background></background>

     <title></title>

      <layer>

      <image>images/polariser.jpg</image>

     </layer>

   </slide>


Put the following image in a folder called images or rename the path above. 

 

To setup polarisers. Blank one of the projectors and close one eye (with polarised glasses on) now adjust the filter on the other projector till you get the white circle as dark as possible. Now do the same for the other projector with the other eye closed.

 

 

 

 

WideWindow Config Files

 

 

4 x 3 Format 

1024 x 768 : wideWindow1024

1280 x 960 : wideWindow1280

 

5 x 4 Format

1280 x 1024 :

 

Addition to Configuration files to control pixel depth and anti-aliasing :

DEPTH_SIZE 24

The window configuration file has been updated to include control for setting pixel depth using the DEPTH_SIZE setting. By default this should now be 24, but can also be changed to 16 or 32 bit as required.

 

SAMPLE_BUFFERS,

SAMPLES 2

Anti-aliasing can now be set by changing the SAMPLES value from the default of 2 to a higher value, however increasing this value may have an impact on performance.

 

.

AttachmentSize
wideWindow1280.cfg_.zip1.82 KB
wideWindow1024.cfg_.zip981 bytes

How to : Include a VNC Window

  

Present3D Help :


 

 

You can now include a VNC window within your P3D presentation. This has a huge number of uses and we are using this feature to get the results from our voting system, which runs on our MacBook Pro, into a P3D, 3D school show, running on our MacPro.

 

 

 

Adding VNC into your P3D show :

 

This can be very simple, just use the following tag within a layer.

 

<vnc>network_address_of_your_Mac</vnc>  for example <vnc>192.168.0.5</vnc> 

 

on the Mac you can also use the Mac name : <vnc>myMac.local</vnc> 

 

This has the advantage of working even if the network address of the Mac has changed, as long as both machines are on the same network.

 

You may find that a password is required to connect, if so, you can add the password tag :

 

<vnc password="mypassword">myMac.locall</vnc> 

 

The above will make the vnc window fill the screen in your P3D show. You can change its size, location, fade etc;  just as you would for an image or movie.

 

<vnc password="mypassword"  position="0.3 0.9 0.1" scale="0.5" fade="0 0 2 8 1 10 0" 

>myMac.local</vnc>

 

With some VNC servers you might find that there is a colour change issue this can be resolved by adding the options="value" control. Possible values are : "RGB", "RGBA", "BGR" and "BGRA".

 
<vnc password="mypassword" options="BGRA" >myMac.local</vnc> 
 
You can also swop from RGB to BGR by using options="swop" 
 
<vnc password="mypassword" options="swop" >myMac.local</vnc> 
 
 

Using Vine VNC :

When working with our voting system we use VIne VNC server.  This is a free application that allows you to remorely view and control your Mac by using a VNC client on another Mac or PC. 

 

Vine VNC will work with any VNC client and once you have it installed you can test that it is working by going into Safari on the remote Mac entering the following url which uses the network address of the Mac (host) running Vine VNC Server.

 

vnc://network_address_of_your_Mac  for example vnc://192.168.0.5

 

or vnc://myMac.local

 

or you could use any VNC client.

 

If Vine VNC doesn't work, then open its preferences and check that the portnumber has been set to 5900 and ensure that neither OSX Screen Sharing or Remote Management are enabled in System Preferences/Sharing.  Once it is working you can open your display preferences and adjust the display settings. 

 

 

Using Screen Sharing or Remote Management :

You can also use either OSX Screen Sharing or Remote Management, as an alternative to Vine VNC and I think the image quality is slightly better. To do this you will need to enable them in System Preferences/Sharing. However, one downside is that you will have a login window in the first slide that has a vnc window of each presentation.p3d/xml file that you load. This is why we currently use Vine.

 

 


 

 

Known Issues :

 

  1. Loss of VNC connection will cause your P3D show to exit.
  2. Colour within the VNC window can be altered dependant on the VNC server, this can be fixed by using the appropriate options="value" as shown above.
  3. Moving objects in the scene can become slow.
  4. Fade tag not working in current build (1/2/13)

 

Current Workarounds :

 

  1. Use the <click_to_run> tag to open slides where you want to use VNC as a new show on top of your "base" show. 
  2. Use the options="value" fix above.
  3. Design the show/slide so you don't need to move it.

How to : Jump within P3D

Present3D Help

 


 

How to jump within a P3D show by using the "jump" tag.

 

This is best used in combination with the <exit> tag at the end of any show opened on top of a base show.

 

 

 Jump 

 

Enables jumping within the same show. It is applied to image/model/text and clicking on will jump x number of slides forward or backward. Or jump to a named slide, this would have the advantage that adding, removing or moving slides would not interfere with these links.
 
Usage:
 
           <layer> 

          <click_to_jump jump="relative" slide="-2" layer="0"></click_to_jump>

 

          <image coordinate_frame="slide" position="0.25 0.75 0.0" scale="0.25">Images/lz.rgb</image>

          </layer>

or

 

 

Jump within base show and open a new show on top.

This allows you to jump from a slide in your base show and fire off a new show, but when you exit that show, you come back to a different location within the base show. This allows complex non-linear shows to be created.

 

This is best used in combination with the <exit> tag at the end of any show opened on top of a base show.

 

Usage - add following options to the click_to_run : jump="realtive" or "absolute" and then slide="num" and layer="num", example:
 
          <layer>

          <click_to_run jump="relative" slide="0" layer="-1">osgviewer glider.osg</click_to_run>

          <image coordinate_frame="slide" position="0.25 0.75 0.0" scale="0.25">Images/lz.rgb</image>

          </layer>

 

          <layer>

          <click_to_run jump="absolute" slide="0" layer="0">osgviewer cow.osg</click_to_run>

          <image coordinate_frame="slide" position="0.75 0.75 0.0" scale="0.25">RSVclip.mov</image>

          </layer>

 
 

How to : Apply a Movie to a Model

 

Applying a Movie to a Model:

 

Using .obj Files 

 

Create your model with a known texture/s that you want to replace, lets call it "picture.jpg" or "picture.png" if using alpha channels. Save or export as a .obj file. 

 

Convert the .obj file to a .osg by using the osgconv function:

 

 % osgconv file.obj file.osg

 

replacing  "file" with the name of your model.

 

Now open  "file.osg"  in a text editor (BBEDIT) and search for - file "picture.jpg" or file "picture.png" and replace with the name and relative path from the P3D xml file to the  .mov file that you want replace the texture with.

 

file "models/movie.mov" 

 

There is one other change that you need to make to allow your model to display correctly.

 

search for : diffuseColor and you will find it is set as follows :

 

diffuseColor 0 0 0 1

 

change this to

 

diffuseColor 0.8 0.8 0.8 1 

 

You can now test your model by running your P3D show. It will not work with OsgViewer.

  

Note that movies may need to be flipped horizontally and vertically to appear correctly - this can be done easily in Quicktime Pro.

How to : Include a Live Stream

 

Present3D Help


 

How to include a live stream from a capture card or WebCam 

 

In terminal/shell type : 

 

osgmovie --devices

 

    If you have any live feed devices associated with a QuickTime

    driver then this will spit out some command line options and

    associations.

    It will also spit out any pseudo Windows VDIG wrapped Direct

    Show devices in the same way

 

eg: ...

     4:1.live    Blackmagic HDTV 720    Intensity HDTV 720p 59.94

    ...

     1:4.live    Hauppauge WinTV 418 Video Capture

                (4&E384A6E&0&48F0)    S-Video 3 UYVY @ 720x480

    ...

 run osgmovie and pass it a "pseudo" file name that will be

   translated by the plug-in to point at an input device eg

 

osgmovie x:y.live

 

within Present3D the layer tag would be :

 

<movie>x:y.live</movie>

 

 

 

How to : Install DCMTK for Volume Rendering

Present3D Help

 

 

Installing DCMTK on OS X to enable loading of DICOM files

 

 

Option 1 :

Install from MacPorts. This is easy and it usually works. Currently the Fink version seems to be broken.

Remember you will need to add the relevant paths to your .tcshrc file. Closing the sidebar (small arrow above) will make it easier to read this bit)

 

setenv PATH /usual_stuff_here/opt/local/bin:/opt/local/lib:/opt/local/include:/opt/local/share:/opt/local/sbin:${PATH}

 

and you will need to add a environmental variable to set the path to the dicom.dic file :

 

setenv DCMDICTPATH /opt/local/lib/dicom.dic 

 

Info on this here :

osg-users [at] lists [dot] openscenegraph [dot] org/msg22776.html">http://www.mail-archive.com/osg-users [at] lists [dot] openscenegraph [dot] org/msg22776.html

http://www.mevis-research.de/~meyer/dcmtk/docs_352/dcmdata/datadict.txt

 

Current Issues :

 

When building the OSG, cmake reports the following missing files :

 

     DCMTK_imagedb_INCLUDE_DIR-NOTFOUND 

     DCMTK_imagedb_LIBRARY-NOTFOUND 

 

These files are no longer required by the current version of DCMTK 3.5.4

 

 

 

 

Option 2 :

 

Download the source and compile yourself :

 

If you choose to do this, then these pages might help :

 

http://forum.dcmtk.org/viewtopic.php?t=1372

How to : Create DCMTK OSX Universal Binary

 

Good luck :-)

 

How to : Use OsgVolume with Volumetric Data

 

Viewing a volume using OsgVolume

 

There are currently two methods of building volumes for use in Present3D or directly in OsgVolume.

These methods are determined by the source data.  If you have dicom files (.dcm) then follow the Dicom method, if you have .jpg, .tiff etc then use the Non-Dicom method. Both can be saved as .osg or .ive files and then loaded in Present3D.

So why would you use OsgVolume rather than Present3D?

  1. It can be very helpful to preview a volume before including it in your Present3D xml file
  2. If a volume isn't loading in Present3D using OsgVolume will test that it is a valid volume file.
  3. To preprocess your volumes. For example, to create volumes from non-dicom files and save as a .ive file, so that it will load faster.

For information on including volumes in Present3D go here.

 

Dicom Files :

To view a volume from a folder (directory) of dicom files you will use the osgvolume command.

First, in your terminal window, you will need to navigate to the directory that has the folder that you want to use...

cd main_volume_directory/directory_that contains_the_folder_of _dicom_files

Then use osgvolume to load the folder you want use :

osgvolume directory_that_has_the_dcm_files

For example, I have a directory called test_volume that has 250 sequentially numbered test_volume_xxxx.dcm files. I would therefore use

osgvolume test_volume

This will allow you to test that the dataset is working as expected before going any further. If you don't get the expected results, then open the folder and check how many files/slices there are, as your graphics card might be limiting the number of slices that can be handled to 256, 512, 1024 or larger... make a copy of the folder and reduce the number of files to each of these limits in turn, until it works. For example, the ATI 4870 on the Mac should display 1024 512x512 slices.

In certain circumstances, the slice distance may not be read correctly, this can be rectified by using the x, y or z Multiplier function as appropriate :

osgvolume test_volume --zMultiplier 1.5

 

Using Osirix to Prepare Files for Present3D

It is possible to prepare files in Osirix  and then Export to .jpg or .tif. Doing this does mean you loose the ability to load the folder directly in Present3D and you should use the procedure below for Non Dicom files. 

However, the advantage of this workflow, is that you can use all Osirix's tools to colour, smooth and clip the ROI and then export for use in Present3D.

 

Non Dicom Files :

Unlike the Dicom files where you load the directory/folder that holds the files, with the non-dicom procedure you need to be in the directory/folder  and use the --images wildcard as below :

osgvolume --images *.tif  --zMultiplier 1.5 --replace-rgb-with-luminance

where .tif is changed to the appropriate extension and the zMultiplier (could also be xMultiplier  or yMultiplier depending on the original data) is changed to suit your data slice distance.

If your files are colour, the above will display them in greyscale, to solve this change  --replace-rgb-with-luminance to --replace-alpha-with-luminance

So you would do :

osgvolume --images *.tif  --zMultiplier 1.5 --replace-alpha-with-luminance

 

 

Using osgvolume with colour transfer function 

It is possible to use a Colour Look Up  Table (CLUT) to colour your volume data to improve readability. This is done using a transfer function and requires  both the --tf (or --tf-255) command plus the name of the text file that has the list of CLUT values saved as a .tf file : 

osgvolume folder_with_dicom_files --tf colour.tf

or

osgvolume --images *.tif  --zMultiplier 1.5 --tf-255 colour.tf  

Where colour.tf is a text file with the appropriate CLUT values.

 

Saving as  .osg or .ive file :

The volume can be saved as a .osg file by adding the -o followed by the name you wish to give your new file, as follows :

osgvolume --images *.tif  --zMultiplier 1.5 -o volume.osg

Please note, that a volume.dds file will also be created and this is referenced by the .osg file , so both files should be kept together. Saving as a binary .ive solves this problem as well as loading faster.

So to convert your .osg file to a .ive file do :

osgconv volume.osg volume.ive

The volume.ive or .osg can then be used in P3D using the model tag.

 

Using in Present3D

You can load and view the resulting volume either by creating a P3D xml file with your volume and other data or just by using present3D on the command line, so type :

present3D volume.ive

and this will load your volume. You can now use the the a, t and d keys along with mouse movement, to interact with the volume. You can also use the v key to move through the four rendering techniques.

If you want to include your volumes in Present3D then go : here for further information

 

 

Making A Script To Create A .Osg Volume file :

Create a script as below substituting .tif for the image type you are using ie: .jpg .png etc. 

To create the script open a new document in BBedit (or other text editor) and paste the following text (modified with the commands you require) into it

#!/bin/sh

osgvolume --images *.tif   --zMultiplier 1.5 -o volume.osg

echo make volume complete

exit 0

and save it into the directory where your image files are, with a name like:

make_volume

then change permissions of the file - use terminal and go to the directory and do:

chmod +x make_volume

Now if you type :

./make_volume

this will create a file called volume.osg and a volume.dss image file.  Both the .osg and .dds file will need to be used together.  One loads the volume.osg file, and this volume.osg will reference the volume.dds file for you.

 

 

 

 

Other command line options

 

for help :  osgvolume --help

Usage: osgvolume [options] filename ...

Options:

-h or --help Display this information

-s <numSlices> Number of slices to create.

-n Create normal map for per voxel lighting.

--clip <ratio> clip volume as a ratio, 0.0 clip all, 1.0 clip none.

--compressed Enable the usage of compressed textures.

--compressed-arb Enable the usage of OpenGL ARB compressed textures.

--compressed-dxt1 Enable the usage of S3TC DXT1 compressed textures.

--compressed-dxt3 Enable the usage of S3TC DXT3 compressed textures.

--compressed-dxt5 Enable the usage of S3TC DXT5 compressed textures.

--images [filenames] Specify a stack of 2d images to build the 3d volume from.

--maxTextureSize <size> Set the texture maximum resolution in the s,t,r (x,y,z) dimensions.

--num-components <num> Set the number of components to in he target image.

--r_maxTextureSize <size> Set the texture maximum resolution in the r (z) dimension.

--s_maxTextureSize <size> Set the texture maximum resolution in the s (x) dimension.

--t_maxTextureSize <size> Set the texture maximum resolution in the t (y) dimension.

--modulate-alpha-by-luminance For each pixel multiply the alpha value by the luminance.

--replace-alpha-with-luminance For each pixel m Set the alpha value to the luminance.

--shader Use OpenGL Shading Language.

--xMultiplier <multiplier> Tex coord x mulitplier.

--yMultiplier <multiplier> Tex coord y mulitplier.

--zMultiplier <multiplier> Tex coord z mulitplier.

--xSize <size> Relative width of rendered brick.

--ySize <size> Relative length of rendered brick.

--zSize <size> Relative height of rendered brick.

____

 

DICOM Reference Links

 

DICOM Information Sources :

 

http://www.dclunie.com/

 

http://www.dclunie.com/medical-image-faq/html/part8.html#DICOMImageSa

 


DICOM Data

 

Osirix DICOM sample datasets :

 

http://pubimage.hcuge.ch:8080/ 

 


 

 

How to : ssh login without password

This assumes that you have at least two machines, a host machine and a remote machine (the one that you want to log onto). Please note you do need to have a user account on both machines with the same name.

 

On the host machine open terminal at the prompt (you don't type the % below) type the following :

 

% ssh-keygen -t rsa

 

This will generate a pair of public keys, one stays on the host machine and the other is moved to the authorized keys directory on the remote machine.

 

So using bbedit, navigate to your user home directory :

 

/Users/your_users_name

 

and from there to the :

 

.ssh directory

 

- this is a hidden directory so you may need to change your bbedit to "Show" all files ( at the top of the window, below the menu bar)...

 

.. and open the file:

 

id_rsa.pub

 

Or using terminal :

 

% cd /Users/your_users_name/.ssh

 

% bbedit id_rsa.pub

 

 

copy the the complete line of text you find here and paste

into the " authorized keys" file found in the same place on the remote machine. If this file does not exist, just create a file with this name.