Night Sky in VR Tutorial – Day 8 – #DaysInVR

This is part of #DaysInVR series. View All VR Projects

Yesterday, we learnt how to create public speaking VR with teleprompter.

Night Sky in VR

Demo | Source

Today we’ll see how to create night sky in VR complete with a shooting star. We’ll be using similar particle technique we used in raining in VR tutorial. However, we’ll also supplement it with GPUParticleSystem to create more particles with GPU power!

Adding stars to our scene

We’re going to create a geometry with different vertices and then draw points in those places. This will act as our stars. We’ll use PointsMaterial and Points to create our stars.

Once we add particles to our scene, we’ll able to view the stars. You can try to move around the geometry or camera to create travelling through space effect.

Adding shooting star

We’ll be using GPUParticleSystem to generate a huge number of particles using GPU. We have to provide options to GPUParticleSystem to specify how the particles will be generated.

Inside our animate function, we’ll set the position of the particles to move the group like a shooting star.

You check the full source to understand how it is done.

Follow me

Rison

Building Viewport to help developers to build VR apps easily.
Follow me

Latest posts by Rison (see all)

Leave a Reply

Your email address will not be published. Required fields are marked *