Posts Tagged ‘shadows’

Rotating rings with shadows and reflections and a pv3d primitive

September 10th, 2008

I have made this two simulations of rotating rings. First one, is a bit more interactive – you can change position of the camera by dragging mouse cursor. Second one is fully prebuffered, thus you can only click on stage, and watch how the rings are rotating.

Shadows and reflections were made using Andy Zupko’s classes ( blog.zupko.info ). They were also tweaked to look like projected on convex surface.

First demo is a cpu killer, despite some modifications, and prebuffered shadows ( after prebuffering, shadows are animated on the floor plane ). On 1Ghz it will probably have something around 10fps. I could lower the details, but this demo is all about details:)

Second demo is also a cpu killer, but only during the prebuffering phase. It has some details smoothed, and features two animations, chosen randomly after clicking on stage.

To make this demo, I needed genereric model of a ring with proper texture mapping – so i modified cylinder primitive from Papervision3D. To make a new Ring:

new Ring( material , radius , height, subradius , segmentsW , segmentsH , topFace , bottomFace )

material – its for example new ColorMaterial( 0 )

radius – radius of a ring, including wall thickness

subradius – thickness of ring’s wall

segmentsW – more segmentsW, your ring will look less angular

segmentsH – segments horizontally.

topFace , bottomFace – if you dont include topFace and bottomFace, your ring will look like two extruded circles.

You can download this class here to make your own rings ( of course you need Papervision3D too )

ps. I had to disable comments because spambots seems to like this post. Gosh, I hate this lamers who call themselves programmers and writes shit like this…

Tags: , , , , ,
Posted in flash experiments | Comments (5)