• Register

Intelligent Design: An Evolutionary Sandbox is an abstract god game with fully simulated genetics and evolution. In a universe driven by targets, create, design and try to control an evolving ecosystem for a faceless corporation.

Post tutorial Report RSS Building a wormhole effect

For the past week I've been working on a wormhole/portal style effect. In this article I'll describe it and give some basic details on how I made it.

Posted by on - Basic Animation

One of the key activities in Intelligent Design is requesting creatures from an orbiting space station. In the fiction these are teleported in and I wanted to create an effect to show this was happening. The idea was to create a mini wormhole based on simulated black holes, like the ones used in Interstella. Here is the effect I ended up with.

In this article I'm going to break the effect down into three components, the halo, the black hole and the particle drop at the end. This is not meant to be a full 'how to guide' I want to show you the door and you to walk through it. This was made in unity3d without any 3rd party assets.

New wormhole effect


The Halo

The halo was achieved using an edge shaped particle emitter. To get the rotation the emitter is a child of an empty game object, that object has a rotation animation around the axis perpendicular to the edge of the emitter. This does mean in the emitter settings you need to set simulation space to world rather than local. The emission rate of the emitter is based on distance rather than time and since the rotation is a constant speed you get a nice uniform halo. To get the glow and streaks I've used a standard unity material which emits light, with the stretched billboard renderer. Play around with the scales for this, I ended up setting them all to 0.01. Changing the start lifetime, speed, size effect the width of the halo. I've also set the particles to get smaller over their life time.

New wormhole effect


New wormhole effect


The Black Hole

The actual black hole is super simple. It is a sphere which enlarges during the animation. The look comes from using unity's Toon/Basic outline shader.

New wormhole effect


New wormhole effect


The Particle Drop

The particle drop comes from an emitter with many of the same settings as the halo. The shape of the emitter is a sphere the same radius as the end radius of the black hole, with emit from shell selected. The emitter does not play on awake but I have created an event in the black hole animation which tells the emitter to emit 2000 particles in one shot i.e. ParticleSystem.Emit(2000). The settings on the particle system itself are things you can play with to get the effect you want. Collisions are important to enable for this effect. I've added some random velocity initially to each particle, but I keep changing my mind about if it needs it or not.

New wormhole effect


Hopefully this article has given you some ideas. The particle system in unity is really flexible, you just have to play with all the variables. If anyone would be interested in a more detailed video look at the effect let me know. This is not in the current version of Intelligent Design, I'm going to make a similar effect for spawning buildings first.

New wormhole effect


Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: