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.