Animation Workbench: How to Animate Material Flow

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Kadien
Posts: 8
Joined: Tue Jun 14, 2016 8:08 pm

Re: Animation Workbench: How to Animate Material Flow

Post by Kadien »

I dont know if runtime optimization is even necessary, there wont be that much of it.


Dont know if you saw this, I posted it like 1 minute before you made your post.

Kadien wrote:That looks like a good option to me..
Would you mind me sending you the project with a short explanation so you can see for yourself if it's possible this way and a good way to go?

And of course Id have to wait til you have time..
Thank you, you are really helping!
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Animation Workbench: How to Animate Material Flow

Post by microelly2 »

I have some done some tests with a 10.000 points cloud:

here a 750 frames animation: https://youtu.be/mlPLQtUpZXY

generate one frame 0.3 s
animate one frame 0.02 s

so I'm optimistic :)
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Animation Workbench: How to Animate Material Flow

Post by microelly2 »

This is the raw screenrecord of my testcase.
First all frames are computed
Then an automated animation of all slices
And at the end hide/display slices by d dialer selection

https://youtu.be/21LrnJ49oyU
simulation of the flow of a 100 x 100 square point cloud through a tube in 700 fames:
7 000 000 points.

Size of the resulting file: 47 MB
Load time of the generated file: 18 s

The resulting data are good for a real time animation of the flow.
The experiment was limited by the memory of my computer.

I will switch to numpy data management and hope to get a higher count of points.
The other feature will be to display the tracks of some selected points: moving the bourdes and the centroid of a slide.
Kadien
Posts: 8
Joined: Tue Jun 14, 2016 8:08 pm

Re: Animation Workbench: How to Animate Material Flow

Post by Kadien »

hey microelly2,

that looks just like what I need, awesome! I do not think a higher count of points will be necessary.

The material flow will look almost exactly like in this video - https://youtu.be/Tji9HtyegXM
There will be 3 phases of material falling down, just like in that video, but it wont be that dense in any phase.

I also thought about just making the real material flow with this point cloud and let the lower silo fill with material with the slicer/filler option, while the upper silo empties just like that. Wouldn't that be easyer than also animating the filling with the point cloud?

I will be finishing my animation (without material flow) today I think, and would be happy to implement your ideas into it. Just let me know how you/we/I are gonna do it.
I'm really grateful for your help so far! Thank you.

BTW: Whats the best way to turn a FreeCAD animation workbench animation into video material?
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Animation Workbench: How to Animate Material Flow

Post by microelly2 »

Kadien wrote:Whats the best way to turn a FreeCAD animation workbench animation into video material?
There is a photographer node in the animation workbench.
http://freecadbuch.de/doku.php?id=anima ... otographer
it generates one image per frame.
you can postproccess these images to a movie.
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Animation Workbench: How to Animate Material Flow

Post by microelly2 »

some changes in memory management and a vectorized velocity function
https://youtu.be/SdhRFB3LFWU
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Animation Workbench: How to Animate Material Flow

Post by microelly2 »

Added: Reflection and damping on collisions with a( bounding) box.

https://youtu.be/cvqboFWTHBo

I'm optimistic to generalize the method for collisions with more complex models.
see viewtopic.php?f=22&t=16280#p128789
Attachments
bp_031.png
bp_031.png (634.91 KiB) Viewed 1713 times
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Animation Workbench: How to Animate Material Flow

Post by microelly2 »

Added:
flow in a cylinder https://www.youtube.com/watch?v=141WIkmU-kE
some description for the parameters http://freecadbuch.de/doku.php?id=animation:flow
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Animation Workbench: How to Animate Material Flow

Post by microelly2 »

flow in a free form:
bp_041.png
bp_041.png (22.59 KiB) Viewed 1673 times
changing the radial force allows to change the diameter of the flow:

Code: Select all

def simpleforce(x,y,z,p,t=0):
	if z<-20 and z>-140:
		return (-0.01*x, -0.01*y,-0.5)
	if z<=-140:
		return (0.01*x, 0.01*y,-0.1)
	return (0,0,-1)
Post Reply