Close Show/hide page

{zero point nine} personal experiments, etc.

A Papervision 2.0 alpha example

Thumbnail - Click me Click to run demo

I drew up this example a few weeks ago to learn about the new features in Papervision 2.0 alpha. If you're thinking of looking into the new version, then hopefully you'll find the supplied source code below of some use. I used the code from this screencast on unitzeroone.com as a starting point.

The source code has example usage of the following things...

  • Setting up and rendering a simple 3d scene
  • Materials that take a light source, found in the org.papervision3d.materials.shadematerials package (GouraudMaterial, PhongMaterial, CellMaterial, FlatShadeMaterial, EnvMapMaterial). And CompositeMaterial, too, which is pretty useful as well.
  • Shaders (EnvMapShader)
  • Multiple viewports (used here to create the reflection on the floor)
  • Simple user interaction using InteractiveSceneManager (clicking on a ball makes it bounce)

I wanted to throw all the example materials into the scene at the same time in order to compare their appearance, etc., so you may find the demo to run quite slowly...

Source code

* Note that this source targeted the Papervision 2.0 alpha, and won't compile on more up-to-date versions without making a few adjustments...

View or post a comment