Animated 3D models of Steam Engines

Show off your FreeCAD projects here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Animated 3D models of Steam Engines

Post by abdullah »

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 2474 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 2474 times
properties2.png
properties2.png (51.77 KiB) Viewed 2474 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 2474 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
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Animated 3D models of Steam Engines

Post by microelly2 »

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 122 times
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Animated 3D models of Steam Engines

Post by abdullah »

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 2449 times
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Animated 3D models of Steam Engines

Post by microelly2 »

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
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Animated 3D models of Steam Engines

Post by abdullah »

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 2410 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
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Animated 3D models of Steam Engines

Post by abdullah »

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
Veteran
Posts: 2515
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: Animated 3D models of Steam Engines

Post by kkremitzki »

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
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Animated 3D models of Steam Engines

Post by abdullah »

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

Re: Animated 3D models of Steam Engines

Post by atmaja »

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
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Animated 3D models of Steam Engines

Post by microelly2 »

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.
Post Reply