Papervision 3D Programming Tutorial - Traer Physics
See how to implement cloth physics in Papervision 3D. Demo and source code included.
VIEW THE DEMO
DOWNLOAD THE CODE
When I first player Hitman - Code name 47 I remember being impressed by the cloth physics in the game. The way the cloth moved around the character as he walked through a curtain gave the game a fluidity that I had never seen before. These days dynamic physics is almost expected in a 3D game. But while there are a few physics engines available for Flash (WOW and APE), they seemed quite basic or limited to 2D, and I never really saw an impressive physics demonstration.
I then came across a Java physics engine called Traer. The demos were simple, but kind of cool, and so I asked myself - why not do it in Flash? And so one Java decompiler and a few hours later and here is the result.
Unfortunately performance isn't great. The java version used a fast inverse function that I couldn't see how to replicate in ActionScript. However the code did port across with very few other changes, so you can use the documentation at the Trear homepage as a reference for the Actionscript version.
To test the physics I reproduced the cloth simulation example. Just click on the screen and you'll move one of the corners of the sheet. Even though it is slow, I think it is a pretty cool example of what is possible with Papervision and the Flash platform in general. Eventually I'd like to also replicate a few more of the java Traer examples.
Go back to Papervision Tutorials

-
Papervision 3D Programming Tutorial - Creating a Papervision Component
| By mcasperson | in Programming
See how Papervision can be packaged into a SWC Flash component, which allows you to drag and drop Papervision into ...
-
Papervision 3D Programming Tutorial - 3D Image Transitions
| By mcasperson | in Programming
Implement 3D image transitions with this Papervision demo . Source code and online example included....
-
Papervision 3D Programming Tutorial - Environment Mapping
| By mcasperson | in Programming
Learn how to implement environment mapping with Papervision....
-
Papervision 3D Programming Tutorial - Terrain
| By mcasperson | in Programming
Learn how to create a realistic looking terrain mesh and texture that can be imported into Papervision. Demo and so...
-
How to Create a Search Feature with PHP and MySQL | By Junedseo | in Programming
Developing a robust, interactive and engaging Web site involves many different avenues, such as interactive pop-out...
-
What Is Hacking? | By faris_jayz | in Programming
It is not that difficult to hack into a computer system. The most popular definition for hacking is the act of obta...
-
How do I enable JavaScript in browser? | By myjobs | in Programming
way to enable the javascript in different types of browser....
-
How to Set Up a Local Development Environment in Ubuntu | By havard | in Programming
Learn how to set up a local development environment in Ubuntu that set up your websites on the fly....
-
XA Transaction - Solution for Transaction More Than One Database | By H4d1 | in Programming
Have you ever think that it's too difficult for making database transaction in two different places (or databases) ...
-
Away3D Programming Tutorial - Environment Material | By mcasperson | in Programming
See how to use the EnviroBitmapMaterial to create a real time reflective look in Away3D. Demo and source code inclu...
-
Away3D Programming Tutorial - Primitives | By mcasperson | in Programming
See how easy it is to use the build in primitive shapes supplied with Away3D. Demo and source code included....
-
Away3D Programming Tutorial - Mouse Interaction | By mcasperson | in Programming
Learn how to respond to mouse events in Away3D. Demo and source code included....
-
Away3D Programming Tutorial - Effects | By mcasperson | in Programming
See how you can add the standard Flash filters to any Away3D object to easily create advanced effects. Demo and sou...
-
Away3D Programming Tutorials - Getting Started | By mcasperson | in Programming
Learn how to get started with the Away3D Flash 3D engine with this detailed, step by step tutorial. Demo and source...








No comments yet.