Shortly after I posted my tutorial on creating a Starfield with Away 3D Lite I tried to see how much I could improve performance with Away 3D 4.0, which was Flash 11 and in Beta stage at the time. I got caught up with finishing Donut Get! and working on Unity stuff and forgot about making a post about the demo. Here’s a post about that Away 3D 4.0 demo I made.
This was inspired by playing Kid Icarus on 3DS. During the flying segments, you’re always flying through clouds which is a great effect. I think they do something similar to this, where the clouds are 3d slices of a cloud which you pass through.
I created the clouds with noise. To get “3D slices” I used a 3d Perlin noise generator by Ron Valstar. The regular Flash noise class lets you generate noise on X and Y axis, this allows you to move in the Z axis to create slices.
View the tutorial demo here: http://blog.sokay.net/stuff/starfield2/
I used Sprite3Ds for the cloud slices, hoping that that would allow me to use a greater amount of cloud slices. In this demo I’m using 12 separate Sprite3D instances. It takes a while to generate the noise at the beginning, I don’t think this noise generator anywhere near as fast as Flash’s internal one unfortunately. I spent a long ass time adjusting the Generator and settled on this result which I felt was looking pretty good, rather than just settling for something that was fast to generate.
Sprite3D displays like a billboard/plane in 3D space that is always pointed towards the camera. The problem with Sprite3D is that it’s displayed as a point in space, and if the point isn’t within the camera viewport, it doesn’t display at all. You can see this issue as you rotate the camera to the side. I tried a list minute fix to change it to planes but I couldn’t get the planes to display. It may have something to do with the scale of the scene, the slices are like 15,000 width. Not spending any time trying to figure it out so good luck with it if you wanna try!