User Tools

Site Tools


particle_effects_5_of_6_meshes_and_globes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

particle_effects_5_of_6_meshes_and_globes [2014/08/23 20:27] (current)
gytfunke created
Line 1: Line 1:
 +====== Part 5: The Mesh/The Globe ======
  
 +
 +
 +So far all of the particles we've seen rely on either the Billboard or Billboard Up setting for their primary effects. Both of these effects create effective, but 2D effects. Next we're going to take a look at how to add 3D elements using meshes.
 +
 +
 +A Torchlight 2 Vanilla example of a skill that uses a 3D mesh to enhance its effects is Storm Hatchet. The hatcher portion of the power seen at the lower left is an actual Axe mesh that is loaded into the particle effect and hurled at the enemy.\\
 +
 +[[http://​imageshack.com/​i/​fvho1gp|{{http://​imageshack.com/​scaled/​800x600/​571/​ho1g.png}}]]\\
 +
 +
 +Building on our techniques from creating other effects makes using a 3D mesh within a Particle simple. In fact, unconsciously we've already //been// using meshes of a sort to display our images*, if we think of the Billboard as a flat sheet of paper with an image drawn on it displaying directly at the camera, and a Billboard Up as another sheet of paper with an image on it facing upward. The meshes we are about to use follow the same principles: an image is drawn on them, they just aren't flat.
 +
 +(*Okay, if you're a 3D tech purist, a Billboard is not //​actually//​ the same as a flat mesh in terms of resources used or implementation. But you can pretend it is for our purposes. :) )
 +
 +
 +Below I've loaded an example of Storm Hatchet'​s missile. I'm ignoring for now the trail of lightning that follows the axe (which would need to be its own tutorial) and looking only at the axe model.\\
 +
 +[[http://​imageshack.com/​i/​nrgu5hp|{{http://​imageshack.com/​scaled/​800x600/​855/​gu5h.png}}]]\\
 +
 +**Particle:​**
 +
 +MESH - media\models\weapons\_axes\axe03.mesh ​  This is a reference to the Axe mesh we will be using for our particle. It's just as simple as finding the mesh we want to use and putting it in this field.
 +
 +RENDER TYPE - "​Entity World" ​  ​Selecting Entity World allows us to use a 3-D model that we can rotate to our heart'​s content, as we will be doing here.
 +
 +RENDER STYLE - "​Normal" ​  In this case the Axe model already has an associated "​skin."​ This won't be the case for every model we load. But since the Axe does, we can just pick the Normal RENDER STYLE and it will show up as desired.  ​
 +
 +EMITRATE - 1  We only want 1 axe for this purpose. But there'​s no reason you can't have 10 if you want them. There'​s also no reason you couldn'​t use one in a Particle Ring or as a Village Billboard or as a Flashbomb, or as anything really. :) The possibilities are endless.
 +
 +
 +**Emitter:​**
 +This is completely unchanged from the Village Billboard for this purpose. But again you could change it to whatever you need. Want a circle of Axes that follow the character? Easily doable by combining this technique with the Particle Ring from post #3. 
 +
 +
 +**Affectors:​**
 +It wouldn'​t make sense for the Axe to not flip handle over blade after being thrown. This is accomplished using a Geometry Rotator affector. (We saw a different type of rotator earlier, the Texture Rotator. Geometry Rotators rotate the mesh, Texture Rotators rotate the texture/​skin if you are using one, which will in just a moment. Not to get too far ahead of ourselves, but in fact you can combine the two, and a Texture Rotator affector will actually cause the texture to spin //on the mesh.// ​
 +
 +
 +Now, what if we want to get a little fancier and change up the appearance of the axe? That's easy to do too. 
 +
 +
 +**Changing the skin.**
 +To change the skin of our axe all we need to do is change the TEXTURE field. The axe will then render using the image we specify. The example below uses a pattern I selected at random from MEDIA\PARTICLES\TEXTURES\PATTERN. As you can see, instead of a flat image like with previous particles we get an image painted onto the axe.\\
 +
 +[[http://​imageshack.com/​i/​nmkcbbp|{{http://​imageshack.com/​scaled/​800x600/​850/​kcbb.png}}]]\\
 +
 +
 +What if we want to get fancier and have like, a ghost axe that uses the Additive method. Again, this is doable. Below I've changed the RENDER TYPE of the same axe above to Additive. Spooky!\\
 +
 +[[http://​imageshack.com/​i/​05b5ydp|{{http://​imageshack.com/​scaled/​800x600/​5/​b5yd.png}}]]\\
 +
 +
 +In fact, the weird ghost axe effect seen there is used pretty frequently in the game, often with a pattern mapped onto a very simple shape like a sphere, half sphere or other basic shape. For example, part of the "​globe"​ effect used by the Engineer skill Force Field is a spherical mesh with a hazy pattern mapped onto it, set to Additive. The mesh is then given a spin using a Geometry Rotator Affector.
 +
 +(If you've been following this series so far, you'll also see another familiar technique used by Force Field, around the character'​s feet. The particles chasing each other in a circle are a pure example of a Particle Ring, as described in post #3.)\\
 +
 +[[http://​imageshack.com/​i/​07p1wdp|{{http://​imageshack.com/​scaled/​800x600/​7/​p1wd.png}}]]\\
 +
 +
 +If you would like to experiment, you can find lots of basic meshes in MEDIA\MODELS\PRIMITIVES. Another placed to look is MEDIA\PARTICLES\MODELS. In the second location, you can find a number of the half spheres and rings used by various effects throughout the game. 
 +
 +
 +Just to show an example, below I just changed the mesh from the axe to a basic Cone found in the primitives folder:\\
 +
 +[[http://​imageshack.com/​i/​cb3lhlp|{{http://​imageshack.com/​scaled/​800x600/​443/​3lhl.png}}]]\\
 +
 +
 +
 +The final recipe (recipe assumes you only want one mesh):
 +
 +
 +  RENDER TYPE - "​Entity World 
 +  FRAMES HIGH and FRAMES WIDE - 1 (usually) ​
 +  RENDER STYLE - Normal OR (with a custom texture) Alpha OR Additive ​
 +  TEXTURE - If desired
 +  LIFE TIME - 0   (for meshes that last forever) or pick a value
 +
 +Emitter: ​ (this assumes we only want one mesh)
 +  TYPE OF EMITTER - Point
 +  VELOCITY - 0
 +  NUM LOOPS - 1 
 +  KEEP LOCAL - True (usually)
 +  NO EXPIRATION - True
 +  EMITRATE - 1 
 +  EMITDURATION - 0
 +
 +Affectors (optional):
 +  Geometry Rotator - Rotates the //mesh//
 +  Texture Rotator - Rotates the //​skin/​texture//​
particle_effects_5_of_6_meshes_and_globes.txt · Last modified: 2014/08/23 20:27 by gytfunke