Asteroid for Papervision3D

October 30th, 2008 by Slav

In keeping with the space theme from my previous post (and not wanted to leave Starfield entirely empty) here’s another papervision parametric 3D object/component : Asteroid.  Similarly to Starfield, asteroid is textured with pragmatically generated texture, so no need to look for images, it has configurable surface deformation as well and it’s default form it can be simply created and placed in your 3D scene with this only line of code : scene.addChild(new Asteroid());


One nice thing about using perlin noise with “stitch” option turned on is that it creates a seamless texture, so you can rotate your asteroids (or planets) without any visible division lines.

These are the constructor parameters :

Asteroid(asteroidSize, meshDensity, textureSize, continentSize, deformationAmount, darkColor, lightColor)
asteroidSize - size of the asteroid
meshDensity - sphere mesh density - this increases the quality of rendered surface
but also very quickly the number of polygons!
textureSize - width/height of the fractal noise texture bitmap
continentSize - size of the noise - increasing this number will make noise more detailed
deformationAmount - terrain-deformation amount applied
darkColor - dark color of the noise texture
lightColor - bright color of the noise texture

To get the source , right click on the demo and chose “View Source”.

Posted in AS3, papervision

5 Responses

  1. John


  2. Isdi Rahardjo ()

    dear Slavomir Durej

    I ask permission re-displaying your article concerning papervision3D [in] my blog. greeting and thank.

  3. Slav

    Hello Isdi.

    Sure, no problem.

  4. Tutorialy a novinky ze světa Papervision 3D odteď u Nikolaje. | Nohama napevno v oblacich Feet firmly on the cloud

    […] duše, toho času v Londýně Andrej Durej aka SLASH, sice na pv3d pořád nadává, ale jeho experimenty stojí za […]

  5. Normand

    A fascinating discussion is ωorth сomment. Τhere’s no doubt that that you should publish more on this issue, it might not be a taboo matter but usually people do not speak about these issues. To the next! Kind regards!!