Animated 3D models of Steam Engines

Show off your FreeCAD projects here!
abdullah
Posts: 3435
Joined: Sun May 04, 2014 3:16 pm

Re: Animated 3D models of Steam Engines

Postby abdullah » Sun Mar 25, 2018 3:24 pm

microelly2 wrote:
Sat Mar 24, 2018 7:38 pm
Placer can now have a group as target or can be the group of parts itself.


https://github.com/microelly2/Animation ... f75de2bb73
Thanks Microelly2.

I cannot make it work properly. I have tried to use both approaches with the same result.

I am trying to make an group of objects rotate about an axis, where the objects are not located at the same placement and none of them is at the origin (0,0,0).

Using a rotator I can move a single object by using the "rot center relative" to true.

When I use a placer, the relative placement of the different objects in a group changes when the animation is run:
relocated_objects.png
relocated_objects.png (126.12 KiB) Viewed 1079 times
It is like if all objects in the group would move its origin to the same location x0,y0,z0.
properties.png
properties.png (54.29 KiB) Viewed 1079 times
properties2.png
properties2.png (51.77 KiB) Viewed 1079 times
I simply do not know how to fill in the placer so as to achieve what I want.
Gears_moving.gif
Gears_moving.gif (274.94 KiB) Viewed 1079 times
This is done with two rotators, and only one gear of the full center body rotates. It also rotates at 1:1 speed gear-pinion, which is wrong as the ratio is 1:2.5, so the big gear should be 0.4 of the rotation speed of the small gear.

Do you know what I am doing wrong?
User avatar
microelly2
Posts: 4690
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Animated 3D models of Steam Engines

Postby microelly2 » Sun Mar 25, 2018 4:47 pm

Here an example
I use two placers for two assemblies with different axes and speeds.
In the first step I move/rotate the components of each assembyl to the right starting position
than I create a compound
the compound is rotated

working with a group of elements is difficult because each of your gears has another axis.
Attachments
rotate_2_parts.fcstd
(21.18 KiB) Downloaded 60 times
abdullah
Posts: 3435
Joined: Sun May 04, 2014 3:16 pm

Re: Animated 3D models of Steam Engines

Postby abdullah » Sun Mar 25, 2018 6:20 pm

microelly2 wrote:
Sun Mar 25, 2018 4:47 pm
In the first step I move/rotate the components of each assembyl to the right starting position
than I create a compound
the compound is rotated
Thanks!! This is key to make it work.

It is a little bit slow, but it started moving:
Gears_Moving_full.gif
Gears_Moving_full.gif (428.17 KiB) Viewed 1054 times
User avatar
microelly2
Posts: 4690
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Animated 3D models of Steam Engines

Postby microelly2 » Sun Mar 25, 2018 6:44 pm

the speed of the animation is still a problem,
my idea is to create meshes of the objects and run the animation with meshes.
this can be by factor 10 faster but first we need the methods to get the meshes or the pivy objects.
But you always have the possibility to write the image frames and create from them a video.

the more interesting task however is to write a control panel to allow shift the gear.


something like this for gearings
https://youtu.be/DT8X8kwSgUA
abdullah
Posts: 3435
Joined: Sun May 04, 2014 3:16 pm

Re: Animated 3D models of Steam Engines

Postby abdullah » Mon Mar 26, 2018 10:13 am

microelly2 wrote:
Sun Mar 25, 2018 6:44 pm
But you always have the possibility to write the image frames and create from them a video.
I had thought of that. I used Peek to record an mp4, which I cut it to a full turn and speedup by 10000% with kdenlive and used ffmpeg to convert it back to gif:

Code: Select all

ffmpeg -y -i diff_full_turn.mp4 -vf fps=5,scale=640:-1:flags=lanczos,palettegen palette.png
ffmpeg -y -i diff_full_turn.mp4 -i palette.png -filter_complex "fps=5,scale=640:-1:flags=lanczos[x];[x][1:v]paletteuse" diff_full_turn.gif
diff_full_turn.gif
diff_full_turn.gif (977.63 KiB) Viewed 1010 times
microelly2 wrote:
Sun Mar 25, 2018 6:44 pm
the more interesting task however is to write a control panel to allow shift the gear.
It would really be nice. I have to think if I go there as the problem is that while you do something you can't do something else :D
abdullah
Posts: 3435
Joined: Sun May 04, 2014 3:16 pm

Re: Animated 3D models of Steam Engines

Postby abdullah » Mon Mar 26, 2018 3:11 pm

Nice is always a video, but it is not under 1 Mb ;)

phpBB [video]


(I give up! How can such a youtube video be embedded in the forum, I have tried like 10 different ways so far, none working... :( )
Last edited by abdullah on Mon Mar 26, 2018 5:20 pm, edited 1 time in total.
User avatar
kkremitzki
Posts: 1985
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

Re: Animated 3D models of Steam Engines

Postby kkremitzki » Mon Mar 26, 2018 3:33 pm

abdullah wrote:
Mon Mar 26, 2018 3:11 pm
Nice is always a video, but it is not under 1 Mb ;)

[youtube]https://www.youtube.com/embed/yD2qIRvFq6g[/youtube]

(I give up! How can such a youtube video be embedded in the forum, I have tried like 10 different ways so far, none working... :( )
Use "video", not "youtube", in your tags:

Edit: removed duplicate video since his post was fixed
Last edited by kkremitzki on Mon Mar 26, 2018 5:24 pm, edited 1 time in total.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
abdullah
Posts: 3435
Joined: Sun May 04, 2014 3:16 pm

Re: Animated 3D models of Steam Engines

Postby abdullah » Mon Mar 26, 2018 5:20 pm

kkremitzki wrote:
Mon Mar 26, 2018 3:33 pm
Use "video", not "youtube", in your tags:
Thanks!!! Much better now :)
atmaja
Posts: 6
Joined: Tue Feb 04, 2020 3:34 am

Re: Animated 3D models of Steam Engines

Postby atmaja » Thu May 14, 2020 4:49 am

Hi Brother,

I have question about animation "Rotator", can I make the toation looks faster?
I have made some screw simulation but the speed very slow.

Thanks :D
User avatar
microelly2
Posts: 4690
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Animated 3D models of Steam Engines

Postby microelly2 » Thu May 14, 2020 5:25 am

atmaja wrote:
Thu May 14, 2020 4:49 am
Hi Brother,

I have question about animation "Rotator", can I make the toation looks faster?
I have made some screw simulation but the speed very slow.

Thanks :D
There is no way to make the running animation faster because for each frame the 3d View has to be rendered.
For complex models this takes time. So the only way to get a fast animation is to record the flow as a sequence of images (use photographer node)
and render the image sequences as a video. However in this case you lose realtime interactivity.

There are still other ways to improve speed:

Use meshes instead of parts
Use grid representation of the faces.
Use models with less details.