Asteroid for Papervision3D
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



October 30th, 2008 at 12:11 pm
Awesome
November 16th, 2008 at 7:41 am
dear Slavomir Durej
I ask permission re-displaying your article concerning papervision3D [in] my blog. greeting and thank.
November 16th, 2008 at 2:56 pm
Hello Isdi.
Sure, no problem.
November 20th, 2008 at 12:08 pm
[…] duše, toho času v Londýně Andrej Durej aka SLASH, sice na pv3d pořád nadává, ale jeho experimenty stojí za […]