Tuesday 28 February 2012

more UNITY - let's figure out how it works

So, to create a particle you need three bits to make it work. 
But, first you gotta create an empty to put the particles into.


1

2

3

Hello particles!! :)



click the little symbol to change the style of the particle 


messing around with the particle emitter you can change size, energy and emission to name afew




 squashs it kinda changes the size. makes it all the same level.



tangent velocity - like explosion out kinda - look at screenshot



local velocity - like rocket grenades it will be attached to the axis - you must parent the particle together with an object. 


angular velocity - makes things rotate such as for smoke and magic effects. as it gets bigger it rotates at the same time looking more realistic 



 one shot - like it says one particle shot like a grenade 

Colour - You can change the colour of the particles, for example FIRE - red's to yellow's and everything else in between creates a balanced colour for the particles making them look more realistic.






World velocity- 
a force thats pushed upon the particle system - im pushing those particles up horizontally down etc…




rnd velocity - like fire for example pushes it out to the left and right sides a little bit


force - does what it says forces the particles out

size grow - want something like fire to get larger - constrains it in every direction



below - you can create like a bounce for like waterfalls and add water splash to make it more water like


ALPHA CHANNELS
 Using an alpha channel to animate small things such as fly's buzzing and wings of a seagull far away...

make your photoshop more professional first -
when working with textures in game make sure colour mode is rgb.
resolution should be 72 
width and height should be the power of 2 (divisible by 2)
background contents - theres a little button you can make it come up with the grid thing to create alpha channels with straight away. or delete the background so it's transparent and the grid appears. 


you can change the rulers to read in pixels - which is what we need for unity


now change the grid unity style - change to pixels as well


also change the guild line every into 32 then change it to pixels


if you can't see the grid, maybe thats because it's not turned on


 When your ready to go draw whatever you want onto the four faces 


make sure you have it over the box layer then hold alt and right click - 







then save as into your asset folder - make sure you save as 32 bits because its an alpha channel as save as a targa!!


Now to import the asset into UNITY to use

create a new material -


change the shader for your material to what you see below. 


import the new asset. drag it onto the little box on the right or you can select and find it in the box thing that opens


then from the project folder drag it onto the actual particle 



VIOLA!!! :D 


Note's - after you've done all the stuff to make an alpha channel in photoshop then saved it sorted out the shader etc...
make sure you drag in from the project file onto the actual particle.

4096 x 4096 - maximum texture size in unity

TIPS

explosion fireworks starting point of a camp fire pixie dust effect - emitter 

mesh particle - set cottage on fire use this launches off fire

sleeted in editor make sure tick in emitter is on - if you cant see a particle 

wanna make something like lingering fog you'd have it on for 60 seconds energy. 
space ships landing lights - particle system in games

the more particles you render the lagyer it gets

refresh - stop play come back again


One more thing - if you wanna keep something to use in another level like a lamp for example - create prefab then drag it into project part. 


No comments:

Post a Comment