Jump to content

Wateranimation


tuneful
 Share

Recommended Posts

Hello,

we are making an animation of a valve for one of our customers. We show the 3D valve, and via a button, you can open the valve and let the water flow through it. We thought about making the animation in 3D and export it with blender. But it seems that morphing animations are not exported. So I'm out of ideas right now.

We dont need water behaviour or anything like that. Basicly we just need a mesh, that pushes itself through the valves. The valves can be pretty complex, so we can just use a simple mesh and scale it on one axis or something like that.

Does anyone have an idea, how to visualize a filling animation in babylon?

Link to comment
Share on other sites

Welcome, Tuneful!  First, I don't think the waterfall thing would work well for this issue... but maybe.

Tuneful said:   "The valves can be pretty complex, so we can just use a simple mesh and scale it on one axis or something like that."

Did you mean to say "cannot", there?   (thx for clarification)

I assume that the water must travel in pipes, bend around corners, get narrower and wider, be cut-off-able, etc?

Sometimes, it is wiser to use color-changing... to simulate water moving and filling.  All mesh in BJS allow a "ColorKind" data... per vertex colors... with automatic color-dithering across faces that are defined by different-colored vertices.  (soft color edges between verts of differing colors)

As water travels thru a tube, for example, you would change colorKind data of certain tube points... from gray to blue.  With good math, the coloring would appear to "travel".

Same with filling a tank of some kind.  Begin vertexData colorKind-changing the lower parts of the tank, first.  Then keep changing colors of the tank walls... climbing, climbing, as the tank fills with water.  In 3D land, it might be one of your best choices. 

What you end-up-with... is a few "tools" made to "paint" mesh blue... starting at one end of the mesh, and ending at the other end of the mesh.  SOME cylinder-bending is possible using tubes or heavily-modded standard cylinders [link] [link]... but the same system would be used on those.  Make them turn blue... gradually painting them from one end to the other... using vertexData.colorKind array (vertexData is a "shape-info storage tank" that is a best friend of every BJS mesh - holds a mesh's form, including colorKind data).

Here is a playground that shows some per-vertex colorKind usage.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...