Hi, i'm animating a mole, he's sleeping. The zeds coming from his mouth following a spline path constraint to above his head. The problem being is that well they don't fade out in Unity. I was wondering if anybody had any tips and the know-how on this subject. Any help will be greatly appreciated!
In advance sorry if the quality of the video is bad. The issue seen (albeit not greatly due to the video) is the dragging of the z's after reaching the top :S
[ame="
http://www.youtube.com/watch?v=Q0TRJp8z7MY"]Sleeping Mole Animation Test Unity3D - YouTube[/ame]
edit: thanks monster for the embed tip
![:) :)](https://polycount.com/plugins/emojiextender/emoji/twitter/smile.png)
Also I'm using 3ds max for the animation.
Replies
[ame="
Here are some options:
EDIT - It was material.color.a
material.color.a (or similar) can be scripted. Attach a script to the emitter or something, and fade it.
So:
instantiate (Z prefab, which is a plane - NOT the Unity plane with 200 tris - with texture and shader with transparency)
....time.deltatime (delaying code, etc etc etc)
........material.color.a (fade to 0).
............if shader.fuckup = true
...................destroy (Z prefab)
............else
...................destroy it anyway (after the time)
Or, you could do it the right way, and use particle emitters and since it's a simple movement, try this:
(you will need a:
Particle Emitter (ellipsoid/mesh)
Particle animator (otherwise they don't do squat)
Particle Renderer)
particle emitter (ellipsoid)
particle size (initial size you want)
emissions (3 or 4)
Energy (1-2 or something)
simulate in worldspace (no)
world velocity
x 2
y 3
z 0
force
x -2
y 1
z 0
(the x velocity will make it go left at the start, then the x force will make it bend right after a bit - play with these. The y velocity and force will make it go up and increase in speed just enough so they separate when they expand)
size grow (0.1)
animate colours (yes)
colour
white 100%a
white 100%a
white 100%a
white 100%a
black 0%a
Particle sorting (billboard (shouldn't need to be sorted, they don't overlap and additive usually plays ball)
Max particle size (2) - this lets the particles get bigger as you get close, but not too big they look bad
Material
Particle: Additive
(tint - leave white)
(texture)
Thank you so much for the help! I'll definitely try this out. At the moment i have to animate the mole parachuting in paratrooper style!
Just apply a rigidbody and a collider to the mole, and push it out of a plane.
Then make a parachute, apply another rigidbody and collider, and crank the drag way up. It might stay right-side up, who knows.
[ame="
I think if i tweak this some more it will look better. The paratrooper isn't finished as i havent finished the animation and texture, for the texture, i've used a modified Toonshader to allow alpha transparency and backfacing, although the culling is a bit dodgy. Not too sure why.
Then I think maybe make the ellipsiod range smaller (the bottom part of the ellipsoid emitter bit, there is a range thing, should default to 1/1/1 and min range 0. Try .2/.2/.2, min .1
Backfacing with Unity's toon shader can be a bit dodgy. It has hard edges when it should have soft edges, and has a continuous outline where it should have a break. I's basically the Paul Walker of the shader world. Just copy the faces and flip normals in your 3d program, at least then you can pretend to be a Vin Diesel.
EDIT: if you need a toon-like appearance and don't need the outline, but want some alpha blending, try Transparent > Cutout > Soft Edge Unlit. Mess with the slider, it should be easy to figure out what it does. It's also got backfacing, too/