Until now, I’ve been using 2D images to create an asteroid effect in 3D, but it looks flat. Now I’ve managed to create 3D asteroids as shown below (best in full screen). I couldn’t resist adding some YouTube scary music.
This uses a number of techniques, starting with Jmv38’s sphere code, with the vertices warped using Perlin noise, a cratered surface textured on the sphere, and diffuse lighting.
I don’t think I can do too many of these at once, but they look nice!
@Saurabh - YouTube lets you edit videos to add text or music, they have a great choice.
The number of vertices per asteroid varies with size, from about 3,000 to 18,000 (which is way too many, but I’ve been focussing on getting it working - optimising comes next).