3D asteroids for that scary in-your-face feeling

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!

@Ignatz: those are great! :slight_smile:

That is very cool. The optimisation is less vertices and bump mapping :wink:

Woah… how did you upload with the music?? Beta?

How many vertices did you use for one of those asteroid?

@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).

@Ignatz this is looking very nice, as usual, who know, one day you’ll be able to make a real game out of this :wink:

Great job


Oh I wasn’t aware of that! Yeah that’s a lot of vertices for one mesh… Plus lighting on all of them in real time. How fast does it run?

@Saurabh - it runs surprisingly fast, about 50 FPS

That’s nice!

they look like giant teeth

Really cool. As piinthesky alluded to, could be used to animate teeth flying out of someone’s mouth! End scene of a boxing match?!

@piinthesky - that’s exactly what my wife said - attack of the molars!

Nice! It is true i thought of teeth too.

Very nice! One of the best 3D examples yet. =D>