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!
Replies
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.
Hope that helps.
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.
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 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
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.
First you need a static mesh with the butterfly, just like deels up above. You need that v in there. If you made each at 45 deg to the floor, itd 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. Id 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, Id next plays a orbit model on it. Set your offsets small something like 5 units, and let it spin in all axiss. 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, youll need to turn the mesh to match the rotation speed of the larger orbit.
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.
It goes over creating a firefly type effect.
http://eat3d.com/free/dust_particles
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
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?
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 dont 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 0s 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 dont 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.
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
Cheers
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 that will make the mesh get smaller and then bigger. then make to 1. this will make it loop back to the original size.
depending on the use of said fx, you'd make the specific choices on how it was set up
edit: i solved my problem by simply by puting 0,2 in rate and removing the burst.
depends on what you are using it for on how to build it, but for you right now, either way is good.
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.
[ame="http://www.youtube.com/watch?v=PuMUQX1R7iE"]UDK Butterfly Particles - YouTube[/ame]
Using standard particles and a material that distorts the UVs towards the centre, producing a slow "flap".
well, here is my result for the moment.
This part I'm not clear on. Could I get some clarification? Just starting to learn Cascade, and most of what I'm learning is from forms like this, so I thank you all for your help.
http://lmgtfy.com/?q=sine+wave
What you do is you use a sine wave on the Z (blue) curve.
I did, but for some reason it stays within 1 second. I'm not sure how to extend it for the full 10 seconds or how to add points for wing flaps, or even to speed up the wing flap for that matter. he does one really slow flap, then nothing.
p.s. thanks for the condescension, beginners love that stuff
then as you said it does one long slow flap, so you have to put in more points. you just hold crtl and click the line to add a point.
now you will need to figure out in advance how many flaps you want. well you might not know what will look good, so guess. say 10. that means you will click on the line at every second marlk. then in the gaps you well add the same number of additional points so you can move them up and down as per your flap needs. you will repeat the same pattern all the way down the line. then you can say... if thats too many or not enough and add or subtract sections of the flap. yes this is a pain in the ass. if you need to do an uneven set of flaps, then i suggest you sit and do the math to figure out where to put the first set of clicks. eyeballing it sucks, and looks bad. just do the math if you have to.
you can bump the x and y too to give it some extra wiggle and shape, but it wont really be noticed mouc.. but you can polish it down as far as you need.