How to : use Present3D Additional Features



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="on" will create a static image or movie file, unaffected by the camera manipulators.

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

<image hud="on"></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"></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.



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 :  


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


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>


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
cd /Volumes/groucho/pymol_lectures/lambda_repressor
setenv DISPLAY :0.0 
#export DISPLAY=:0.0
$1 $2
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>










<vnc> Use the vnc tag within a layer :


<vnc>network_address_of_your_Mac</vnc> for example <vnc></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" ></vnc> 


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



Live Stream :


Live Stream into a window within P3D : page




For use with video capture card or webcam.



Environmental variable usage and setting, and paths :








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:



<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"></image>



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


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

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





Imagesequence :


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


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



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.





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 :


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 :