Papervision 3D Programming Tutorial - Transparency

Posted Feb 14, 2009 by mcasperson / comments 0 comments / Print / Font Size Decrease font size Increase font size

Learn how to make Papervision 3D objects transparent with this tutorial. Demo and source code included.

VIEW THE DEMO
DOWNLOAD THE CODE

Transparency can be achieved in Papervision quite easily by changing a default parameter in the MovieMaterial constructor. The parameter called transparent (which is the second parameter in the MovieMaterial constructor) is set to false by default. This is because transparent materials are more computationally expensive than opaque ones. However if you do need to make a material transparent all you need to do is set this parameter to true.

The sample application displays the animated MD2 dragon model from the last sample, and adds a skybox. The Dragon is semi-transparent by default, but you can toggle between a transparent and opaque material using the checkbox in the top left hand corner.

The transparent material itself is coming from a PNG instead of the original JPG. This is because JPG’s don’t support an alpha channel. If you need a good ((and free) tool for modifying images check out paint.net.

Go back to Papervision Tutorials

Check out these other Papervision examples:

Loading and Displaying a 3D Model

Particle Systems with Flint

Modify Textures At Runtime

WOW Physics

Shading

Effects

Animated Textures

Mouse Selection

Texture Smoothing

Transparency

Animations

SkyBox

Environment Mapping

3D Text

BitmapViewport

3D Spectrum Analyser

Depth of Field

Casting Shadows

Photo Cloud

Photo Slide

Rate this Article:

Be the first to rate me.


* You must be logged in order to leave comments, please login or join us.

Comments

No comments yet.



Bookmark and Share
Sign up for our email newsletter
Name:
Email: