discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Product Video produced with OpenSCAD

FS
Felipe Sanches
Sat, Jan 23, 2016 11:34 AM

There are many possibilities, but some quick examples of ways you can
mark the licensing of the scripts are:

  • "These scripts are released to the public domain"
  • "These scripts are (c) 2015 Trygon <fullname & email address> and
    are released under the terms of the General Public License, version 3
    or later")

On Sat, Jan 23, 2016 at 9:33 AM, Felipe Sanches juca@members.fsf.org wrote:

It would be awesome to have these SCAD scripts published on GitHub
(https://github.com) with a free license.

On Sat, Jan 23, 2016 at 9:19 AM, Trygon db5765@outlook.com wrote:

Thank you all for your kind words.

Thomas, I used FFmpeg (freeware :) ffmpeg.org) to do all the video
post-processing once I had generated the the image frames using animate in
OpenSCAD. I will give you a much more comprehensive answer when I have a bit
more time - my experience is that FFmpeg is very capable but quite daunting!

Peter, The video comprises a number of separate segments, each generated by
its own OpenSCAD script. These were then turned into video segments and
subsequently glued together using FFmpeg. For most segments the opening
position of the components corresponds to the closing position from the
previous segment so the breaks are not visible.

Cheers,
Trygon

--
View this message in context: http://forum.openscad.org/Product-Video-produced-with-OpenSCAD-tp15783p15833.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

There are many possibilities, but some quick examples of ways you can mark the licensing of the scripts are: * "These scripts are released to the public domain" * "These scripts are (c) 2015 Trygon <fullname & email address> and are released under the terms of the General Public License, version 3 or later") On Sat, Jan 23, 2016 at 9:33 AM, Felipe Sanches <juca@members.fsf.org> wrote: > It would be awesome to have these SCAD scripts published on GitHub > (https://github.com) with a free license. > > > > On Sat, Jan 23, 2016 at 9:19 AM, Trygon <db5765@outlook.com> wrote: >> Thank you all for your kind words. >> >> Thomas, I used FFmpeg (freeware :) ffmpeg.org) to do all the video >> post-processing once I had generated the the image frames using animate in >> OpenSCAD. I will give you a much more comprehensive answer when I have a bit >> more time - my experience is that FFmpeg is very capable but quite daunting! >> >> Peter, The video comprises a number of separate segments, each generated by >> its own OpenSCAD script. These were then turned into video segments and >> subsequently glued together using FFmpeg. For most segments the opening >> position of the components corresponds to the closing position from the >> previous segment so the breaks are not visible. >> >> Cheers, >> Trygon >> >> >> >> -- >> View this message in context: http://forum.openscad.org/Product-Video-produced-with-OpenSCAD-tp15783p15833.html >> Sent from the OpenSCAD mailing list archive at Nabble.com. >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
TB
Thomas Bornhaupt
Sat, Jan 23, 2016 12:32 PM
Hi Trygon,  

I found the function "Animate". Can I change the viewpoint?

Cheers,
Thomas

Am 23.01.2016 um 12:19 schrieb Trygon:

<pre wrap="">Thank you all for your kind words.

Thomas, I used FFmpeg (freeware :) ffmpeg.org) to do all the video
post-processing once I had generated the the image frames using animate in
OpenSCAD. I will give you a much more comprehensive answer when I have a bit
more time - my experience is that FFmpeg is very capable but quite daunting!

Peter, The video comprises a number of separate segments, each generated by
its own OpenSCAD script. These were then turned into video segments and
subsequently glued together using FFmpeg. For most segments the opening
position of the components corresponds to the closing position from the
previous segment so the breaks are not visible.

Cheers,
Trygon



--
View this message in context: <a class="moz-txt-link-freetext" href="http://forum.openscad.org/Product-Video-produced-with-OpenSCAD-tp15783p15833.html">http://forum.openscad.org/Product-Video-produced-with-OpenSCAD-tp15783p15833.html</a>
Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Discuss@lists.openscad.org">Discuss@lists.openscad.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org">http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org</a>

<pre class="moz-signature" cols="72">-- 
Thomas Bornhaupt
Bernard-Humblot-Str. 8a
67434 Neustadt
Tel: +49 (6321) 482260
USt-IdNr: DE185938520
K
KoenigDickBauch
Sun, Jan 24, 2016 2:57 PM

Hi Trygon,

could you please give me the parameter for mencoder or ffmpeg?

best regards
Thomas

--
View this message in context: http://forum.openscad.org/Product-Video-produced-with-OpenSCAD-tp15783p15871.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Hi Trygon, could you please give me the parameter for mencoder or ffmpeg? best regards Thomas -- View this message in context: http://forum.openscad.org/Product-Video-produced-with-OpenSCAD-tp15783p15871.html Sent from the OpenSCAD mailing list archive at Nabble.com.
T
Trygon
Wed, Jan 27, 2016 1:16 PM

Hi Marius,

I did write a lot of library modules and functions to support the main part
scripts, I sent you a portion of this: CylindricalExtrude() - there is a lot
more...

The most useful new feature would be the ability to access raw vertex &
facet information at an arbitrary point in the CSG tree:

shape1=union(){sphere();cube();};
polyhedron(shape1[0],shape1[1]);

and:

shape2=import("Bar.stl");

also, using a module to create a new operator:

module Foo(){
shape1=children();
polyhedron(shape1[0],shape1[1]);
}

Foo() sphere();

I am sure Doug will comment on the syntax for this! ;-)

Cheers,
Trygon

--
View this message in context: http://forum.openscad.org/Product-Video-produced-with-OpenSCAD-tp15783p15919.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Hi Marius, I did write a lot of library modules and functions to support the main part scripts, I sent you a portion of this: CylindricalExtrude() - there is a lot more... The most useful new feature would be the ability to access raw vertex & facet information at an arbitrary point in the CSG tree: shape1=union(){sphere();cube();}; polyhedron(shape1[0],shape1[1]); and: shape2=import("Bar.stl"); also, using a module to create a new operator: module Foo(){ shape1=children(); polyhedron(shape1[0],shape1[1]); } Foo() sphere(); I am sure Doug will comment on the syntax for this! ;-) Cheers, Trygon -- View this message in context: http://forum.openscad.org/Product-Video-produced-with-OpenSCAD-tp15783p15919.html Sent from the OpenSCAD mailing list archive at Nabble.com.
T
Trygon
Wed, Jan 27, 2016 1:42 PM

Hi Thomas,

Quick animation example.

OpenSCAD script:

rotate([0,0,$t*360]) cube(20,center=true);

  1. Check that you have OpenSCAD version 2015.03-2 & have installed FFmpeg
  2. You must save the script above, so that OpenSCAD has a directory to dump
    the animation picture frames to.
  3. Click: View -> Animate (turn on animation)
  4. Enter "Steps" as 100
  5. Enter "FPS" as 25, this does not really matter, if your computer is not
    quick enough OpenSCAD will still generate all the animation frames but the
    output will not be in real time
  6. Check "Dump Pictures"
  7. Wait for "Dump Pictures" to uncheck itself
  8. Click: View -> Animate (turn off animation)
  9. In the directory you saved the script in (step 2) you should have a set
    of 100 sequential animation frame files: frame00000.png -> frame00099.png
  10. assuming you have a command prompt and are in the directory with the
    animation picture files, enter the command:

ffmpeg -start_number 0 -framerate 25 -i frame%05d.png SpinningCube.mp4

  1. Once FFmpeg finishes running, you should now have an mp4 video file
    called SpinningCube that is 4 seconds long (100 frames at 25 frames per
    second).

Cheers,
Trygon

--
View this message in context: http://forum.openscad.org/Product-Video-produced-with-OpenSCAD-tp15783p15921.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Hi Thomas, Quick animation example. OpenSCAD script: rotate([0,0,$t*360]) cube(20,center=true); 1) Check that you have OpenSCAD version 2015.03-2 & have installed FFmpeg 2) You must save the script above, so that OpenSCAD has a directory to dump the animation picture frames to. 3) Click: View -> Animate (turn on animation) 4) Enter "Steps" as 100 5) Enter "FPS" as 25, this does not really matter, if your computer is not quick enough OpenSCAD will still generate all the animation frames but the output will not be in real time 6) Check "Dump Pictures" 7) Wait for "Dump Pictures" to uncheck itself 8) Click: View -> Animate (turn off animation) 9) In the directory you saved the script in (step 2) you should have a set of 100 sequential animation frame files: frame00000.png -> frame00099.png 10) assuming you have a command prompt and are in the directory with the animation picture files, enter the command: ffmpeg -start_number 0 -framerate 25 -i frame%05d.png SpinningCube.mp4 11) Once FFmpeg finishes running, you should now have an mp4 video file called SpinningCube that is 4 seconds long (100 frames at 25 frames per second). Cheers, Trygon -- View this message in context: http://forum.openscad.org/Product-Video-produced-with-OpenSCAD-tp15783p15921.html Sent from the OpenSCAD mailing list archive at Nabble.com.
TB
Thomas Bornhaupt
Wed, Jan 27, 2016 2:25 PM
Hi Trygon,  

thank you for the description.

My line for ffmpeg is:

ffmpeg -i frame%%05d.png -pix_fmt yuv420p -r 25 XXXX.mp4

I will check your line.

My next step is to make a connection from real video and and openscad video.

  1. convert real film to images (with ffmpeg)
  2. generate openscad images
  3. connect this images (new program)
  4. generate film of images (with ffmpeg)

regards
Thomas

Am 27.01.2016 um 14:42 schrieb Trygon:

<pre wrap="">Hi Thomas,

Quick animation example.

OpenSCAD script:

rotate([0,0,$t*360]) cube(20,center=true);

1) Check that you have OpenSCAD version 2015.03-2 & have installed FFmpeg
2) You must save the script above, so that OpenSCAD has a directory to dump
the animation picture frames to.
3) Click: View -> Animate (turn on animation)
4) Enter "Steps" as 100
5) Enter "FPS" as 25, this does not really matter, if your computer is not
quick enough OpenSCAD will still generate all the animation frames but the
output will not be in real time
6) Check "Dump Pictures"
7) Wait for "Dump Pictures" to uncheck itself
8) Click: View -> Animate (turn off animation)
9) In the directory you saved the script in (step 2) you should have a set
of 100 sequential animation frame files: frame00000.png -> frame00099.png
10) assuming you have a command prompt and are in the directory with the
animation picture files, enter the command:

  ffmpeg -start_number 0 -framerate 25 -i frame%05d.png SpinningCube.mp4

11) Once FFmpeg finishes running, you should now have an mp4 video file
called SpinningCube that is 4 seconds long (100 frames at 25 frames per
second).

Cheers,
Trygon



--
View this message in context: <a class="moz-txt-link-freetext" href="http://forum.openscad.org/Product-Video-produced-with-OpenSCAD-tp15783p15921.html">http://forum.openscad.org/Product-Video-produced-with-OpenSCAD-tp15783p15921.html</a>
Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Discuss@lists.openscad.org">Discuss@lists.openscad.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org">http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org</a>

<pre class="moz-signature" cols="72">-- 
Thomas Bornhaupt
Bernard-Humblot-Str. 8a
67434 Neustadt
Tel: +49 (6321) 482260
USt-IdNr: DE185938520
T
Trygon
Wed, Jan 27, 2016 3:51 PM

Setting the pixel format to yuv420p does ensure better compatibility with
older video players, I specify the libx264 encoder first before requesting a
particular pixel format from it:
-c:v libx264 -pix_fmt yuv420p
I am not sure if this is necessary, but it avoids FFmpeg guessing wrongly.

-r sets the output frame rate
-framerate sets the input frame rate
I was told that it is better to set the input frame rate with images (since
there is no frame rate information, unlike an input video) and the output
will then default to the same (unless you also specify -r !)

Cheers,
Trygon

--
View this message in context: http://forum.openscad.org/Product-Video-produced-with-OpenSCAD-tp15783p15931.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Setting the pixel format to yuv420p does ensure better compatibility with older video players, I specify the libx264 encoder first before requesting a particular pixel format from it: -c:v libx264 -pix_fmt yuv420p I am not sure if this is necessary, but it avoids FFmpeg guessing wrongly. -r sets the output frame rate -framerate sets the input frame rate I was told that it is better to set the input frame rate with images (since there is no frame rate information, unlike an input video) and the output will then default to the same (unless you also specify -r !) Cheers, Trygon -- View this message in context: http://forum.openscad.org/Product-Video-produced-with-OpenSCAD-tp15783p15931.html Sent from the OpenSCAD mailing list archive at Nabble.com.
F
fractorr
Wed, Jan 27, 2016 7:48 PM

FFMPeg is pretty cool, I was able to create a video from several animations
(25) captured from Open SCAD and stitch them altogether to make one video.
Not nearly as bad ass as your video but it worked well for what I was after.

--
View this message in context: http://forum.openscad.org/Product-Video-produced-with-OpenSCAD-tp15783p15947.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

FFMPeg is pretty cool, I was able to create a video from several animations (25) captured from Open SCAD and stitch them altogether to make one video. Not nearly as bad ass as your video but it worked well for what I was after. -- View this message in context: http://forum.openscad.org/Product-Video-produced-with-OpenSCAD-tp15783p15947.html Sent from the OpenSCAD mailing list archive at Nabble.com.
PF
Peter Falke
Wed, Jan 27, 2016 10:01 PM

It would be cool to put your video and, if your willing, your code up, as
an exaple on the OpenSCAD website.

2016-01-27 20:48 GMT+01:00 fractorr fractorr@gmail.com:

FFMPeg is pretty cool, I was able to create a video from several animations
(25) captured from Open SCAD and stitch them altogether to make one video.
Not nearly as bad ass as your video but it worked well for what I was
after.

--
View this message in context:
http://forum.openscad.org/Product-Video-produced-with-OpenSCAD-tp15783p15947.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

It would be cool to put your video and, if your willing, your code up, as an exaple on the OpenSCAD website. 2016-01-27 20:48 GMT+01:00 fractorr <fractorr@gmail.com>: > FFMPeg is pretty cool, I was able to create a video from several animations > (25) captured from Open SCAD and stitch them altogether to make one video. > Not nearly as bad ass as your video but it worked well for what I was > after. > > > > > -- > View this message in context: > http://forum.openscad.org/Product-Video-produced-with-OpenSCAD-tp15783p15947.html > Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
RW
Rob Ward
Wed, Jan 27, 2016 11:56 PM

I second that, it is rather inspiring.

On 28 January 2016 9:01:16 AM AEDT, Peter Falke stempeldergeschichte@googlemail.com wrote:

It would be cool to put your video and, if your willing, your code up,
as
an exaple on the OpenSCAD website.

2016-01-27 20:48 GMT+01:00 fractorr fractorr@gmail.com:

FFMPeg is pretty cool, I was able to create a video from several

animations

(25) captured from Open SCAD and stitch them altogether to make one

video.

Not nearly as bad ass as your video but it worked well for what I was
after.

--
View this message in context:

Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

I second that, it is rather inspiring. On 28 January 2016 9:01:16 AM AEDT, Peter Falke <stempeldergeschichte@googlemail.com> wrote: >It would be cool to put your video and, if your willing, your code up, >as >an exaple on the OpenSCAD website. > >2016-01-27 20:48 GMT+01:00 fractorr <fractorr@gmail.com>: > >> FFMPeg is pretty cool, I was able to create a video from several >animations >> (25) captured from Open SCAD and stitch them altogether to make one >video. >> Not nearly as bad ass as your video but it worked well for what I was >> after. >> >> >> >> >> -- >> View this message in context: >> >http://forum.openscad.org/Product-Video-produced-with-OpenSCAD-tp15783p15947.html >> Sent from the OpenSCAD mailing list archive at Nabble.com. >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> > > >------------------------------------------------------------------------ > >_______________________________________________ >OpenSCAD mailing list >Discuss@lists.openscad.org >http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org -- Sent from my Android device with K-9 Mail. Please excuse my brevity.