libfive icon indicating copy to clipboard operation
libfive copied to clipboard

Video Example

Open SGSSGene opened this issue 5 years ago • 3 comments

Hey, I have seen your videos of the examples: https://libfive.com/examples/ they look really cool. I would like to reproduce them. How did you create them?

SGSSGene avatar Jan 29 '21 19:01 SGSSGene

I have integrated on a local branch into libfive-studio. Not sure if I am satisfied: Video of gears

SGSSGene avatar Jan 30 '21 00:01 SGSSGene

Yup, looks very similar to what I did.

Here's the patch from when I was recording the videos (several years out of date at this point):

commit 54cbac1baf6e8375602dd9dbdc96021836143526 (render-video)
Author: Matt Keeter <[email protected]>
Date:   Fri Dec 15 17:57:18 2017 -0500

    Spin 3D model for website demo videos

diff --git a/gui/src/background.cpp b/gui/src/background.cpp
index 6989d483..866f1eb3 100644
--- a/gui/src/background.cpp
+++ b/gui/src/background.cpp
@@ -27,10 +27,10 @@ void Background::initializeGL()
     {
         // Data is arranged  x   y   z   r   g   b
         GLfloat data[] = {   /********************/
-                            -1, -1,  0.9,  COLOR(base03),
-                            -1,  1,  0.9,  COLOR(base02),
-                             1, -1,  0.9,  COLOR(base02),
-                             1,  1,  0.9,  COLOR(base02),
+                            -1, -1,  0.9,  1,1,1,//COLOR(base03),
+                            -1,  1,  0.9,  1,1,1,//COLOR(base02),
+                             1, -1,  0.9,  1,1,1,//COLOR(base02),
+                             1,  1,  0.9,  1,1,1,//COLOR(base02),
         };
         vbo.create();
         vbo.bind();
diff --git a/gui/src/view.cpp b/gui/src/view.cpp
index e6705f60..1135140d 100644
--- a/gui/src/view.cpp
+++ b/gui/src/view.cpp
@@ -43,6 +43,13 @@ View::View(QWidget* parent)
     pick_timer.setSingleShot(true);
     pick_timer.setInterval(250);
     connect(&pick_timer, &QTimer::timeout, this, &View::redrawPicker);
+
+    auto t = new QTimer;
+    connect(t, &QTimer::timeout, this, [&](){
+        camera.rotateIncremental(QPoint(1, 0));
+        this->update();
+        });
+    t->start(20);
 }

 View::~View()

mkeeter avatar Jan 30 '21 15:01 mkeeter

Ah! cool! Thank you!

SGSSGene avatar Jan 30 '21 17:01 SGSSGene