Flint Particle System Forum - Water Flowing Through a Pipe Sun, 26 Dec 2010 17:17:42 +0000 http://flintparticles.org/forum/ Lussumo Vanilla 1.1.10 & Feed Publisher Water Flowing Through a Pipe http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=754#Comment_754 http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=754#Comment_754 Thu, 09 Apr 2009 14:48:08 +0100 TripleH
I'm working on a project to create an animation showing how a combined sewer works. I've used FLiNT to make the rain effect, but I haven't had any luck with what to do for a fluid flowing through pipes.

Basically, what I need to do is show a stream of sewage flowing through a pipe system, then have rain water enter and join the flow (hopefully I'd be able to show the two streams mixing), then the whole thing increasing volume the longer it rains. I've seen that a few people here have experimented using blur filters and bitmap renderers for the fluid, but I don't know if that's the most effective way.

I guess my main question is how can I make the flow follow the pipe system? ]]>
Water Flowing Through a Pipe http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=756#Comment_756 http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=756#Comment_756 Fri, 10 Apr 2009 05:25:07 +0100 kirbysayshi
Not sure it's possible at this stage in Flint. ]]>
Water Flowing Through a Pipe http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=758#Comment_758 http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=758#Comment_758 Fri, 10 Apr 2009 12:56:27 +0100 Richard http://flintparticles.org/forum/comments.php?DiscussionID=167 ]]> Water Flowing Through a Pipe http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=760#Comment_760 http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=760#Comment_760 Mon, 13 Apr 2009 21:35:51 +0100 TripleH
So the first part is checked off. Now I need to make the some of the flows increase in volume over time, as well as getting the rain to collect on a roadway/rooftop. Suggestions? ]]>
Water Flowing Through a Pipe http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=761#Comment_761 http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=761#Comment_761 Tue, 14 Apr 2009 17:57:57 +0100 TripleH
I'm still stuck on how to make the streams increase in volume over time. I've been looking at it, and I think using an addActivity to the emitters can do it, but I'm not sure how to change the desired properties ( emitter size, Steady count, etc. ) with it. ]]>
Water Flowing Through a Pipe http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=764#Comment_764 http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=764#Comment_764 Thu, 16 Apr 2009 08:33:28 +0100 Richard Water Flowing Through a Pipe http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=775#Comment_775 http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=775#Comment_775 Mon, 20 Apr 2009 20:59:49 +0100 TripleH Water Flowing Through a Pipe http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=810#Comment_810 http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=810#Comment_810 Mon, 08 Jun 2009 19:33:24 +0100 TripleH
I switched it to a BitmapRenderer. All the emitters are down to 2-4 particles per second, and the BlurFilter on the renderer produces a much nicer fluid flow look than the DisplayObjectRenderer. I'll post the finished product in the Show and Tell forum when it goes live ( hopefully soon ). ]]>
Water Flowing Through a Pipe http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=812#Comment_812 http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=812#Comment_812 Tue, 09 Jun 2009 16:18:45 +0100 TackleMcClean Water Flowing Through a Pipe http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=957#Comment_957 http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=957#Comment_957 Thu, 05 Nov 2009 00:28:06 +0000 spganne Water Flowing Through a Pipe http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=958#Comment_958 http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=958#Comment_958 Thu, 05 Nov 2009 16:12:03 +0000 spganne Water Flowing Through a Pipe http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=960#Comment_960 http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=960#Comment_960 Thu, 05 Nov 2009 20:46:15 +0000 TripleH
My project does work. I haven't posted it yet because the website still isn't live (isn't government efficient?). There's an accelerate action that can accelerate particles within the zone you define, uses the standard zones (rectangle, disc). You can't really use values that are too high, the calculations start getting very large.

As for going around bends realistically: there's a branch in the SVN called Lines and Collisions that has code for creating BoundingZones out of shapes other than RectangleZones. You can find the updated Flint library here: http://www.visualisations.co.nz/visualise/. Look at posts in May 2009. It really only works well with LineZones though. You pretty much set up the lines how you want the "fluid" to flow and set the bounce to 0 so it follows the line instead of bouncing off of it. Just be careful of intersecting lines, weird stuff happens if they intersect. ]]>
Water Flowing Through a Pipe http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=963#Comment_963 http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=963#Comment_963 Sun, 08 Nov 2009 02:09:37 +0000 spganne Thanks for your response. Sorry to hear your project hasn't been posted yet. Government....less is more IMHO. Hopefully it will be soon for all of us to admire. Thanks for the tips. I've tried to get really methodical to understand all this stuff and built a little tester to play with all the properties of the emitter Position, intialiazer Velocity and then a ZonedAction TargetVelocity action. I'm finding zones very confusing. Perhaps you can clarify a few things for me.
1) I don't understand the coordinate system/reference points:
For example, if I have a stage area that is 400x400 and I want a rectangle zone that is positioned at 10,10 (relative to the top left corner of the stage) and is 50 pixels wide and 100 high, do I specify RectangleZone(left,top,right,bottom) as RectangleZone(10,10,50,100) OR RectangleZone(10,10,60,110). i.e. is the 'right' property the width or the x position relative to the stage origin point?
2) When you specify an initializer Velocity is that relative to the stage origin point or relative to the Position origin point for the emitter?
3) When I want to do a ZonedAction using the TargetVelocity(targetVelocityX,targetVelocityY,rate), is the targetVelocityX relative to the stage origin point or relative to the ZonedAction's zone origin point or relative to the emitters initialized position?

Any/all help you can provide would be greatly appreciated. ]]>
Water Flowing Through a Pipe http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=968#Comment_968 http://flintparticles.org/forum/comments.php?DiscussionID=197&Focus=968#Comment_968 Thu, 12 Nov 2009 07:53:22 +0000 Richard
1. RectangleZone(10,10,60,110) - right is the coordinate for the right edge, and bottom is the coordinate for the bottom edge.

2. It's relative to the particle's initial position. (Really it's not relative to any position because it's a velocity, but when visualizing the zone, picture it relative to the particle's initial position.)

3. It's a velocity. Velocity is speed and direction, which is not dependent or related to any location. It is how fast the particle is moving and what direction it is moving. ]]>