Archive for January, 2010

Quick Tip : Unity Particle System Nebula

Posted in Quick Tips, Unity on 2010/01/27 by duck

Here’s a quick way to create a “nebula” effect without any code at all:

  • Create a default particle system from the menu in Unity’s UI
  • Delete just the “Particle Animator” component
  • Check the “One Shot” option in the emitter settings

Now you have a static set of particles. The min & max emission controls how many particles there are (you should probably set them both to the same value, unless you want a random value somewhere between the two). The default particle textures are already fairly suitable as they are have a fuzzy glow look. Try these values for a very quick nebula-like effect:

  • Min size: 0.1
  • Max size: 0.7
  • Min & Max emission : 200

You might want to set one of the ellipsoid size dimensions smaller than the others, to give it a sort of oval shape instead of spherical. And of course you couldĀ  use some custom particle textures, colour variations, and adjust the size to fit your game.

When I tried this, I found that having two particle systems in the same location worked really well, where the first particle system serves to show the larger blobby white areas, and the second particle system has the size values turned right down so that the particles are tiny specks, and the emission values turned right up (to 2000 or so).

Using two particle systems

The settings for the first particle system are:

  • Min Size: 0.3
  • Max Size: 3.5

And for the second particle system:

  • Min Size: 0.01
  • Max Size: 0.03

And apply these settings to both systems:

  • Emit: On
  • One Shot: On
  • Simulate in world space: off
  • Min Emission: 2000
  • Max Emission: 2000
  • Ellipsoid: X:8, Y:4, Z:8

Then add the second system as a child of the first system (by dragging the 2nd onto the 1st in the hierarchy). Because they are not set to simulate in world space, you can then just rotate the parent particle system and the whole nebula will rotate including the tiny dots in the child particle system.

(until I sort out proper hosting for my unity files on this blog, you’ll have to make do with pretty pictures and video!)


Duck’s Quick Tips : Intro

Posted in Quick Tips on 2010/01/22 by duck

While going about my daily business (mainly coding in Unity 3D), unless we’re going through some sort of crunch point at work, I often spend a little bit of time each day “sharpening my saw“. That is, doing something that’s not directly related to the current main job, but theoretically makes me better at doing my job.

Sometimes it’s looking into a section of the manual or API that I’m less familiar with. Sometimes it’s reading up on developments in the technologies that surround my field of work. Sometimes it’s helping out with a question or two on the Unity forums, or the IRC channel (which are both places that I go looking for help myself too, sometimes). This often results in “saw-sharpening” because my favourite type of questions are the ones where I sort of know the answer, but I have to quickly look up / test out that knowledge to confirm it. This has the effect of hardening what was vague knowledge of a particlar area into a small chunk of concrete experience, which effectively adds to the array of tools and know-how that I have at my disposal when approaching my own work.

In this new “Quick Tips” category, I’m going to be documenting these short & sweet nuggets of information. In effect, this is a kind of excuse to get a bit more content posted here in the tiny amounts of spare time that I have. They won’t be full tutorials, they might not be useful to everyone, and they will almost certainly vary wildly between beginner and advanced levels – but if you’re interested in the occasional sharpening of your Unity blade, please feel free to subscribe or follow!