Game Development Reference
In-Depth Information
This small collection of primitives can be useful for a few things though. For
roughing out ideas or a temporary placeholder, using GameObject>Create
Other> to drop in a spare cube or sphere can be a real time saver and allow for an
idea to very quickly be explored. Additionally, there are times when a polygonal
object can be used to control other capabilities of Unity, like particle emitters.
In this tutorial, we will briefly create a few polygonal primitive GameObjects
and then use them to define the attributes of a particle system. The particle
system we are going to create is a low-lying steam rising off the water surface
in this cold and uninviting scene. It will help provide some further movement
to the scene and give it further ambiance.
A quick bit of theory about what particles are. Essentially, particles in Unity
are little tiny billboards or planes (although the mesh can be more complex)
that emit into the scene and always face the camera. This gives the illusion
of volume for things like smoke when these planes are textured with
semitransparent textures. Because the default emission object is a place, the
polycount remains low but great effects are added.
Particles can be effectively used for smoke, fire, sparks, steam, and so on.
Step 1: Create a new Plane. GameObject>Create Other>Plane. This will
create a new Plane object in the scene in the middle of the screen space.
Note this could be in all sorts of weird places, so swap to the Move tool
and move the Plane up to where it can be seen in the Scene view.
Tips and Tricks
Note that when creating one of Unity's polygonal primitives, it only shows
up in the Hierarchy and Scene window (it does not become a prefab
automatically and thus does not show up in the Project panel). It can be
made into a prefab if the object needs to be used again and again after it
has been created, but we'll get to that in a minute.
Step 2: In the Hierarchy panel, name the Plane WaterSteamEmitter .
Rename objects in the Hierarchy by either right-clicking and choosing
Rename, or clicking once, waiting, and then clicking again, or by selecting
it in the Hierarchy and renaming it in the Inspector.
Step 3: Remove the material. Select WaterSteamEmitter in the Hierarchy
panel, and in the Inspector look for the Mesh Renderer section. Expand the
Materials part, and click the target icon next on the Element 0 line. Double-
click None in the Select Material window. The mesh should turn pink.
Why?
There really isn't a hard and fast rule or need to get rid of the material. In
later steps we will be turning off the Mesh Renderer for this GameObject
completely so it won't be seen in the scene; so the current material doesn't
matter much. The reason we are turning it off is the scene is awfully gray,
and when a polygonal GameObject has no material it turns it bright pink,
which makes it very easy to see.
Search WWH ::




Custom Search