I am trying to make a water seen with flash CS3. the idea is not waves. I would to make drips that drip into eachother and slash.

If anyone can help it would be gratefully appreciated.

Dani AI

Generated

This thread describes a nice, contained visual effect: blood drops entering a jar of clear liquid and visually merging/splashing as they settle. laid out the goal and started the AS3 direction — below are concrete, implementable steps that build on that idea and focus on efficient, controllable visuals (no full fluid solver required).

Treat each drop as a small physics agent: position, velocity, radius, color and life. Update with gravity and simple drag, detect close pairs with a spatial hash (grid) for speed, and merge on contact using conservation of area so merges look natural. Example merge math (AS3-style):

// merge droplets a and b
var areaA:Number = Math.PI * a.radius * a.radius;
var areaB:Number = Math.PI * b.radius * b.radius;
var totalArea:Number = areaA + areaB;
var newRadius:Number = Math.sqrt(totalArea / Math.PI);
var newX:Number = (a.x*areaA + b.x*areaB) / totalArea;
var newY:Number = (a.y*areaA + b.y*areaB) / totalArea;
// weighted RGB
var newColor:uint = weightedColor(a.color, areaA, b.color, areaB);

Render merging and “dissolving” by stamping each drop onto a lower-resolution BitmapData buffer and diffusing it with a small BlurFilter plus a mild ColorTransform fade every frame. That creates the look of color spreading into the water without per-pixel fluid math. Example draw loop:

waterBmp.lock();
tempShape.graphics.clear();
for each (drop in drops) {
  tempShape.graphics.beginFill(drop.color, drop.alpha);
  tempShape.graphics.drawCircle(drop.x, drop.y, drop.radius);
  tempShape.graphics.endFill();
}
waterBmp.draw(tempShape);
waterBmp.applyFilter(waterBmp, waterBmp.rect, new Point(), new BlurFilter(6,6,1));
waterBmp.colorTransform(waterBmp.rect, new ColorTransform(1,1,1,0.995));
waterBmp.unlock();

Performance and polish tips: pre-render circle stamps at a few sizes and copyPixels for faster drawing; use object pooling; run heavy filters at a lower buffer resolution or every N frames; spawn fast, short-lived splash particles on impact for the initial splash; and tune blending/alpha to match the visual density you want. For photorealistic fluid dynamics you would need a substantially heavier solver; for a believable, efficient jar effect the approach above will give controllable, artist-friendly results.

Recommended Answers

All 6 Replies

A water scene with drips that drip into each other and splash eh?

Can you describe the scene in any more detail? it's a little vague at the moment!
Where are the drips coming from? Are they just dripping down off of something? Are they splashing into a pool of water? or are they rolling down something? (like raindrops rolling down a window)

Using AS3 you could easily create a simple particle system to deal with creating and animating the drips, but without knowing a bit more about how you want the scene to look and how you want the drips to interact with each other and the rest of the scene, I don't think anybody can be of much help!

Have you tried anything yet? Have you got anything that you can show us? What have you got so far? Need input! Heh heh.

Note: If you're looking for a full 3D fluid simulation in flash, it would require a maths, physics and flash genuis...i.e. not me! heh heh :P

Cheers for now,
Jas.

the idea is to make a particle system indeed. The water is really blood drops in a clear glass jar of water. the blood drifts and smashs into each other, making the drips have somewhat of a splash while they are merging into eachother.

hmmm.....Sounds interesting....This sounds like it will be quite a complex effect.....

Usually I'd imagine that blood dripping into water would gradually dissolve, so i guess you want the blood dripping into the water, perhaps causing a splash as it hits (which could be a separate particle system in itself) and then as the blood sinks into the water, it gradually dissolves and diffuses into the water. As more drips of blood dissolve in the water, I guess you'd want the colour of the water to gradually change.

Given a few days, (as long as my schedule permits) I can probably knock up some kind of very basic AS3 flash particle system tutorial and can then leave you to take that on board and work out the finer points of the exact effect you're after...Producing that effect could take a good deal of work though. But from the sounds of it, if you can pull it off, it should be worth it!

Cheers for now,
Jas.

thanks for your help hope to hear from you soon....

Member Avatar for Member #46692

So what is this a full 3D type animation?

It does not need to be.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.