View Full Version : Butterflies/Birds in UDK?
10-24-2010, 11:21 PM
Hey guys, was just looking around for some refs for a project I'm working on, and an idea to add glowing butterflies that kinda hover around a small area or scattered around the map came to mind.
Thing is, I don't really know how I'd tackle something like this. Any suggestions would be great!
A particle emitter, that emits meshes that are little four-poly animated mesh butterflies?
Or maybe a particle emitter that emits single-poly particles with an animated texture on them?
I'm just kidding, I haven't developed for Unreal since the previous gen. I bet r13 could tell you, though.
10-24-2010, 11:37 PM
for the butterflies, I would create an animation in Max or a 3d app, and render out a looping animation and use that as animated sprites. That way in the particle system you could make them move at different speeds and they wouldn't all look the same in movement anyways. I've done this on a couple of projects.
Hope that helps.
10-24-2010, 11:39 PM
Made this for a different engine a while ago, the mechanics are the same. It would have a 3 frame animation which moves the 2 polys using the middle edge as the pivot. Then you can have a particle emitter move them around properly.
butterflies are easy, you don't even need to animate them right as they have so fast movement its ok to have 4 frames of them and let them switch randomly, it gives an even more natural look to the particle system
its not really needed to use anything but a 2tris particle that is facing to the camera, as the movement isn't that smooth that you'd recognize. what i did for Airborn was a butterfly like DEElekgolo (http://www.polycount.com/forum/member.php?u=25547) animated that in max and rendered out the frames into a particlesubuv sheet
for birds it us highly dependent on how close you can get, if you want just a flock of birds flying far far away to crowd the sky a bit, particles will do a pretty decent job. the only thing i found annoying when i did that, was that i couldn't get the single particles to have some random offsets in the animation, so what happens is, that all birds are in synch :X
10-25-2010, 12:04 AM
It's awesome that we have alpha's/decals for stuff like that. XD
10-25-2010, 12:12 AM
for birds it us highly dependent on how close you can get, if you want just a flock of birds flying far far away to crowd the sky a bit, particles will do a pretty decent job. the only thing i found annoying when i did that, was that i couldn't get the single particles to have some random offsets in the animation, so what happens is, that all birds are in synch :XMultiple emitters in the emitter.
10-25-2010, 01:44 AM
@Lee3dee, DEElekgolo, Neox, Lamont: Hey guys thx for the explanation. So I texture a plane like the example above, animate it, then render it? So would that mean my butterflies would appear as flat planes? I still haven't dived into Cascade just yet, but I suspect I will need to very soon. Team and I are wondering if 3D particles are possible, or if all particles are like small billboards.
Multiple emitters in the emitter.
didn't work either, they all have been in synch, even if i changed some of the parameters, they spawned differently but the anim was still in synch. so if i wanted to change that, i had to use a different texture for the different emitters with offsett anim frames.
Those are decent ideas, but let me give you some cascade specific advise on how to get this done.
First you need a static mesh with the butterfly, just like deel’s up above. You need that v in there. If you made each at 45 deg to the floor, it’d be perfect.
Place the mesh into an emitter in cascade, also place your shader in a mesh material module.
Adjust the spawn rates so you have 0 in the rate and 1 in the burst.
Give it a life time long life time like 10 seconds. Now you should have one butterfly spawning at the origin.
Next you want to animate the wings, drop a size scale module in the stack. You want a constant curve type on this. Now keep your x and y at 1 across the whole thing, add points and put a sine wave on the z curve. Set it up for the full 10 seconds [out to 10 on the curve grid] each time you want the wings to flap you feed to put in points on the curve. I’d suggest one up and down every .1-.25 seconds, but adjust as you see fit.
Now you have a flappy butterfly, depending on what you want to do with it, I’d next plays a orbit model on it. Set your offsets small something like 5 units, and let it spin in all axis’s. This will give the butterfly some jumpy movement to match its flapping.
now give it some velocity and you can make it float along. Chain another orbit and you can make it go in a circle or swarm a particular spot.
You might experiment with mesh rotations and mesh rotation rates depending on what you are trying to do. If you want to do the circleing ones, you’ll need to turn the mesh to match the rotation speed of the larger orbit.
10-26-2010, 02:28 AM
r13: Thats terrific! Will try when I have the time, will post to let you know how it works out. Thx again!
10-26-2010, 08:50 AM
Okay been following your suggestion step by step, but I'm stuck at the part where I lock the X & Y at a constant value and edit the Z value, but I'm not quite sure how to work the graph editor. Any tutorials on how to use it?
I managed to click the curve icon next to the "Size Scale" in the stack. I hid the other two axis so only the Z is showing, but i can't seem to edit the constant value that it has.
10-26-2010, 09:24 AM
Maybe this video will help?
It goes over creating a firefly type effect.
10-26-2010, 09:34 AM
Excellent vid, thanks a lot metalliandy! still cant quite figure out how to edit the curve though.
You need to change the distribution type. Hit the blue arrow and select constant curve.
Then set the graph info to the curve editor. Hold control and click the line. Move each of the axis up to 1. Hide x and y and the start adding more nodes on the z
And yes I know all this assumes you are looking at cascade as you read it.
10-27-2010, 07:18 AM
Wow, great topic! I've never done no particle effects, except for 2d some time ago, and, man, it feels great.) They really make your environment alive and make you just want to stare more and more.)
Thanks for all the info guys and especially, r13, but I've got one more question for you:
Orbit gives your meshes different trajectories to fly around on, but meshes rotation is independent from it's movement and direction. What I mean is that butterflies don't necessarily face the direction they are flying in and that looks kinda strange at times. I added a rotate over time thingy, but it's obviously is not a perfect fit.
So my question is (even though most players, I think, wouldn't notice) is there a chance to make your particle "face" the direction it's moving in?
there is two ways to get your bfly to face the direction of its travel...
The easiest is to set the screen alignment [under emitter options] to velocity. Then give the bfly a little push maybe 25-50 and it should wobble and flap along in one direction facing that direction. When set the alignment to velocity, you don’t get to use any of the rotation or direction options as the velocity alignment is overriding all else. This means make sure your mesh is pointing at the X positive direction; this is the orientation it sees at the default. So if you make it go a different direction, it will turn the mesh and face that direction.
The more difficult way to to match mesh rotations with orbit rotations and you can absolutely get them to match up… mostly. Cascade is very frame rate sensitive, so if you have a ton of crap going on in the scene, its possible [they will] that your timings will get off. Anyways the best way I can explain this is be explaining how to set up a simple version of it.
Take your bfly mesh and stick it in a new emitter. Give it an initial mesh rotation and initial mesh rot rate modules. Set the initial rotations, to zeros. This should be a single bfly sitting at the origin. Give it a life time of one second. Make the emitter loop with a 0 in the emitter loops slot.
Now give the blfy a initial rotation rate of 1 on the z axis, and 0’s on the others. Your bfly should be spinning once per second now.
Add an orbit module. There is 3 sets of inputs in there. Set each one to constant distro. We don’t want any change or variations for this exercise.
On the orbit offsets, set y to 100 and x and z to zero. On the rotations, set them all to zero. On the rotation rates, set z to 1 and x and y to 0.
You should have a circling bfly that faces its direction. Now vary things like spawn size, position, lifetime, etc etc and you can get a convincing flock of butterflies.
10-28-2010, 09:41 AM
I learned something new in UDK, thanks r13!
Adam L. Gray
09-24-2011, 12:34 AM
Well then, I figured I might as well use this thread since it's relevant to r13's guide here.
I seem to be having a problem when following this thing. Everything is working perfectly fine, and I get to the step where I change the distribution type to a constant curve. But when I do, the particle mesh dissapears. And it won't come back again until I either disabled or deleted the size scale module.
I tried adding points to the curve and made sure it weren't all set to 0, in terms of scale. But nothing, anyone that has any clue as to what might be the cause? :x
when you change the distro type it usually wipes the previous values and sets them to defaults of a 0 or 1 value depending on what you are working with.
Since you also say are messing with the size scale, i'm gonna assume you have some mismatched values here. keep the size scale off for now as you mess with it, it'll just make things more difficult in figuring it out.
now you want to make your initial size values a constant value, not a curve. also i'd suggest clicking the box that makes all values the same as the x value for simplicity for now. [yes initial size can use a curve and that's good for more advanced stuff] pick a value so you can see it as you expect.
now use a size over life module and stick a curve distro in it. now this module works as a scalar function on your initial size values. [scalar equals a multiply of a value] that means if you set your value at 1, then it is the same size. so you want to adjust the axis curve[s] that will make the mesh get smaller and then bigger. then make to 1. this will make it loop back to the original size.
09-25-2011, 08:13 PM
won't a particle butterfly disappear when the particle dies?
09-26-2011, 02:21 AM
You can set individual particle lifetime to be infinite, or you can have the particles clip through the ground plane before spawn / death to hide the changing.
yes, of course it will... there are ways to either continually spawn a new one or simply make it last longer or forever.
depending on the use of said fx, you'd make the specific choices on how it was set up
06-08-2012, 05:43 AM
i'm really sorry to dig this up but i need help, i have been following what R13 said but i can't manage to get less than 1 butterfly to spawn, there is always another particle spawning after. I set the spawn rate to 0 and the burst to 1 but it still spawn more than one particle between thos 10 seconds interval.
06-08-2012, 06:02 AM
Òðàäèöèîííûå ïðåçåíòû äëÿ ñåìüè è äðóçåé ïîäíèìàþò...
06-08-2012, 06:13 AM
would be nice if you could go troll somewhere else. thank you.
edit: i solved my problem by simply by puting 0,2 in rate and removing the burst.
you could have also solved it by keeping the burst but lowering the time the entire emitter takes.
depends on what you are using it for on how to build it, but for you right now, either way is good.
06-09-2012, 05:39 PM
at the begining i wanted my particle emiter to emite a single butterfly, flying around without end in my scene,but having some butterfly poping randomly in the scene isn't really shocking.
By the way, thanks a lot r13, your mini tutorial was really helpfull, I wouldn't have though it would be possible to animate my BF with a size scale module.
06-09-2012, 05:47 PM
I did this:
UDK Butterfly Particles - YouTube
Using standard particles and a material that distorts the UVs towards the centre, producing a slow "flap".
06-09-2012, 06:20 PM
butterfly test - YouTube
well, here is my result for the moment.
06-11-2012, 02:22 PM
The butterfly needs to flap quicker, be a little smaller, and move more erratically. I think you're fundamentally there and just need those tiny little tweaks.
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.