Papervision 3D Programming Tutorial - Mesh Splitting
See how you can use the Papervision MeshUtil.cutTriangleMesh function to split a mesh into two parts. Demo and source code included.
VIEW THE DEMO
DOWNLOAD THE CODE
New to Papervision 2.0 is the ability to slice a mesh into two parts. If you have every watched the movie Cube then you'll have an idea what I am talking about :). Seriously though, this does have some neat uses. In fact the first time I became aware of this functionality was because of a Papervision demo that allowed you to smash up a pane of glass and then have it shatter and fall to the ground. Unfortunately I can't find the demo again (I'll link to it here if I ever do find it), but it did pique my interest.
This sample application is a little simpler. It shows you the steps you go through when splitting up a mesh. The first stage is to display a regular old mesh. You'll then see a plane showing where the cut will take place. Then we make a call to MeshUtil.cutTriangleMesh, supplying it with the original mesh (any TriangleMesh3D class will do, and our Quake II MD2 model fits that bill) along with the splitting plane. Finally the two new meshes are displayed independently.
While it seems fairly trivial, this process could be used in many ways. You could show a space fighter being destroyed by randomly slicing it up a few times and then having the various pieces explode. You could also use it to demolish a wooden door into a number of splinters with an explosion. As always the possibilities are limited by your imagination (and a low polygon count :P).
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 - Traer Physics
| By mcasperson | in Programming
See how to implement cloth physics in Papervision 3D. Demo and source code included....
-
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...
-
iPhone Resizing a UIImage | By eh9212 | in Programming
How to resize a UIImage in a UIImageView and a UIButton...
-
Threading in dot net 2.0 - separate copy of static variable among different threads using ThreadStatic attribute | By xxris | in Programming
How each thread keeps a separate copy of same static variable using ThreadStatic attribute ....
-
ADAPATIVE ALGORITHM TO FINDOUT DUPLICATE RECORDS | By pinakbhusanmishra | in Programming
Records are list of row that are stored inside database . this is an efficient technique to find out the duplicatin...
-
ALGORITHM TO FIND OUT HIDDENLINKS IN WEBSITES | By pinakbhusanmishra | in Programming
Here we can find out the hidden links in the websites that basically people uses for the browsing ads....
-
PHP and MySQL | By ChaimChaikin | in Programming
PHP is a server side programming language that is used mainly for dynamically creating and mantaining websites. PHP...
-
AS3IsoLib Tutorial Series - Interaction | By mcasperson | in Programming
In this tutorial we add mouse interactivity to the scene....
-
AS3IsoLib Tutorial Series - Camera | By mcasperson | in Programming
In this tutorial we allow the view of the isometric scene to be moved with the mouse....
-
AS3IsoLib Tutorial Series - Height | By mcasperson | in Programming
In this tutorial we show the height of an isometric object by adding a shadow....
-
AS3IsoLib Tutorial Series - Materials | By mcasperson | in Programming
In this tutorial we modify the appearance of the isometric cube at runtime....
-
AS3IsoLib Tutorial Series - Moving Boxes | By mcasperson | in Programming
In this tutorial we add some animated isometric boxes to the scene....








No comments yet.