sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Animation in SketchUp

    Scheduled Pinned Locked Moved Developers' Forum
    58 Posts 10 Posters 8.8k Views 10 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • chrisglasierC Offline
      chrisglasier
      last edited by

      I am just suggesting animation can be another multimedia report machine-generated from the same data or criteria used for locating components and making Gannt and PERT charts ... as opposed to animation created with key frames for a video. So it would need to be restricted to animating components.

      For example, an animation of constructing a building over a year could be examined over different time periods and spans and react to input of data relating to start, completion and suspension. It only becomes fixed when the data is fixed - maybe never, if the model is passed on for use by the building owner.

      With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

      1 Reply Last reply Reply Quote 0
      • M Offline
        MartinRinehart
        last edited by

        @chris fullmer said:

        Its just a visualization techinque that makes animation easier to comprehend than pure xyz locations and vectors, which is a very rigid way to animation an object.

        Actually, it's a very flexible way to animate (tho maybe not so user friendly). Here's the actual flight.rb that did my first taxi/takeoff. Note the acceleration in the first ten seconds and the climb in the next 30 seconds.

        
        # flight.rb
        
        n
        bp = i '/models/biplane'
        none
        
        for i in 1..5
            m bp, [2*i, 0, 0], 2
        end
        
        for i in 6..20
            m bp, [8, 0, (i/3-2)], 2
        end
        
        

        When I first "flew" my biplane, I stood at the origin and watched it fly away. Later I moved out to just before the end of the flight. A little spec took off from the airport; turned into a biplane as it approached and damn near hit me at speed. Very scary! Think Hitchcock.

        I'm abandoning my Timer class (UI.timer-based, but Java-like, with start() and stop() methods and a Runnable object) because I want to have several things (including the camera) animated at once. Multiple timers will probably eventually get out of synch. It lived for less than 24 hours after it's first use. Sad.

        I'm writing a Conductor class. Any object wanting to animate must register (before time 0) with the conductor (pass a reference to a callback) for a specific time interval. During that interval the conductor (again, UI.timer based, but only one timer) will pass frame ticks back to the registered object(s). What the object does is not the conductor's problem. (If your stupid anti-virus program starts a full scan in the middle of your animation, all animatees will be slowed together but will still be in synch.) Will fit very well with a timeline-based keyframe approach.

        I loved Pixero's detailed UI design. Does anyone else have even a sketch? How about SketchUp as a UI modeling tool? How about a 3d UI? How about 3d camera(s) that you position/move around your model?

        Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

        1 Reply Last reply Reply Quote 0
        • chrisglasierC Offline
          chrisglasier
          last edited by

          Somewhere amongst Martin's Uncle Holly speak you can find something sensible but contorted like: "During that interval the conductor (again, UI.timer based, but only one timer) will pass frame ticks back to the registered object(s)." This is better explained somewhere I can't find at the moment, but it's important. Will post again when found.

          With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

          1 Reply Last reply Reply Quote 0
          • J Offline
            Jim
            last edited by

            Why wouldn't you want to use Scenes to define the keyframes?

            Our (vaporous) dialog would allow defining what happens to objects between the keyframes (scenes): sets the number of frames (or seconds), easings, etc.

            But there is more types of animation than moving - what about rotation? color? model time (shadows)? focal length?, etc.

            You do not want to just move objects, you want to animate the properties of objects (meant in a Ruby context.)

            Properties include things such as .transformation of Groups, colors (.blend) can be animated, Page properties (i.e. fog). Any property in the SketchUp app for which setter and getter methods can be created can also be animated using the same framework; if the framework is written in a general way.

            So if a Group has a .transformation (and matching .transformation=) property - you want to animate it's transformation as opposed to it's position. So an object needs setter and getter methods for the property to be animated. If they do not exists, they can be added to the object; as in the Camera; which for whatever reason lacks direct manipulation via a Transformation.

            I posted a couple code snippets that are the beginnings of such a system: http://forums.sketchucation.com/viewtopic.php?f=180&t=25119

            Hi

            1 Reply Last reply Reply Quote 0
            • J Offline
              Jim
              last edited by

              But please don't use timers - use the Animation class. Renderers already support it for rendering animations - I'm not sure they can hook into timer-based anims. My snippet in the previous post uses the Animation class.

              Hi

              1 Reply Last reply Reply Quote 0
              • thomthomT Offline
                thomthom
                last edited by

                For my usage - animation would only be relevant if it would be possible to render it.

                Thomas Thomassen — SketchUp Monkey & Coding addict
                List of my plugins and link to the CookieWare fund

                1 Reply Last reply Reply Quote 0
                • Chris FullmerC Offline
                  Chris Fullmer
                  last edited by

                  How exactly do renderers work with object animation - like in Sketchyphysics? How can they capture that movement?

                  In my camera recorder script I ended up making a scene for each frame of the animation so that a renderer would be able to process scenes. But how can they use animation information? Is it something most of them have built in and it just a matter of writing the code according to their standards? Or do they have to implement object animation for each plugin that comes along and offers its own animation solution?

                  chris

                  Lately you've been tan, suspicious for the winter.
                  All my Plugins I've written

                  1 Reply Last reply Reply Quote 0
                  • J Offline
                    Jim
                    last edited by

                    @chris fullmer said:

                    How exactly do renderers work with object animation - like in Sketchyphysics? How can they capture that movement?

                    I don't kow the answer to that. SketchyPhysics does use the Animation class, and I assume uses the physics engine to do the heavy calculations needed.

                    They must be able to hook into that animation from the c/c++ code, since there can only be a single animation active at a time.

                    Hi

                    1 Reply Last reply Reply Quote 0
                    • PixeroP Offline
                      Pixero
                      last edited by

                      I see two different ways to do animation in SU. Both good in their own way:

                      1. Fly around in realtime with something like LightUp's Tourtool mixed with Chris Fullmers Record camera. Then enhanced with a way of manually adjusting curves to reposition camera/object.

                      2. Keyframe based animation with a timeline. Maybe a tool to drag and rotate the camera to the right position. A bit like the walktool but dragging instead of pushing the camera for better control. Maybe even adjustable curves in the UI like most animation software have. (I know you can draw curves like that with javascript.)

                      1 Reply Last reply Reply Quote 0
                      • chrisglasierC Offline
                        chrisglasier
                        last edited by

                        @chrisglasier said:

                        Will post again when found.

                        Looping: Single vs. Multiple vs. Fixed Timelines, amongst other things.

                        Also the demo - Click and drag to create more.

                        With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

                        1 Reply Last reply Reply Quote 0
                        • chrisglasierC Offline
                          chrisglasier
                          last edited by

                          @jim said:

                          Why wouldn't you want to use Scenes to define the keyframes?

                          Our (vaporous) dialog would allow defining what happens to objects between the keyframes (scenes): sets the number of frames (or seconds), easings, etc.

                          Sorry I missed this probably because of the vapor pouring from my brow.

                          The dialog basically deeply nests components and scenes in multiple collections, and records what components appear in what scenes, purchase orders and so on. All of this I am sure could be helpful in creating a conventional animation, but what I am more interested in is using it to create "living" 3D reports. Imagine a project manager having an automatically updating AR model sitting on his desk instead of huge piles of drawings, site reports, change orders and so forth.

                          So I shy away from keyframes - not because I think they are wrong but because I want to see how far I can get towards what I described.

                          With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

                          1 Reply Last reply Reply Quote 0
                          • M Offline
                            MartinRinehart
                            last edited by

                            @jim said:

                            But there is more types of animation than moving - what about rotation? color? model time (shadows)? focal length?, etc.

                            I've got my Conductor running. He's Timer based. I'll see if I can switch him to Animation.

                            He calls the run() method of objects that register during an interval they request. What your object's run() does is up to your object: move, rotate, scale, fly, explode ...

                            I've had nothing but issues with materials. Do simple colors work w/o Bug Splats?

                            Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

                            1 Reply Last reply Reply Quote 0
                            • Chris FullmerC Offline
                              Chris Fullmer
                              last edited by

                              Yup. I use colors in many scripts and I've never plsatted from them. Though I've never had a texture splat on me either, so it might just be a workflow thing?

                              Lately you've been tan, suspicious for the winter.
                              All my Plugins I've written

                              1 Reply Last reply Reply Quote 0
                              • M Offline
                                MartinRinehart
                                last edited by

                                @chris fullmer said:

                                Yup. I use colors in many scripts and I've never plsatted from them. Though I've never had a texture splat on me either, so it might just be a workflow thing?

                                Thanks. We're off topic. I'll reraise this as Wood Cherry Original.

                                Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

                                1 Reply Last reply Reply Quote 0
                                • thomthomT Offline
                                  thomthom
                                  last edited by

                                  @martinrinehart said:

                                  I've had nothing but issues with materials. Do simple colors work w/o Bug Splats?

                                  I remember from another thread that you demonstrated that you used entity.material = 'materialname', correct? Have you tried instead doing entity.material = model.materials['materialname']

                                  I've also never had problems working with materials, textured or not, in SU ruby.

                                  Thomas Thomassen — SketchUp Monkey & Coding addict
                                  List of my plugins and link to the CookieWare fund

                                  1 Reply Last reply Reply Quote 0
                                  • Chris FullmerC Offline
                                    Chris Fullmer
                                    last edited by

                                    For animation, I do appreciate where your coming from on this Chris. Database driven animation is very important. I would love to see the two work side by side, maybe even hand in hand 😄 I'm sure they can, since its all just about the computer knowing when to start and stop an animation for specific object. It doesn't care if the markers are recorded in frames or days. I think a masterful GUI would be able to handle it all.

                                    Chris

                                    Lately you've been tan, suspicious for the winter.
                                    All my Plugins I've written

                                    1 Reply Last reply Reply Quote 0
                                    • J Offline
                                      Jim
                                      last edited by

                                      In reply to #1

                                      Another reason not to use a SketchUp timer is that is is an integer timer - it will round decimal values to the nearest whole number.

                                      #2 - that is a solid way to do it. Yes, scaling does not work when interpolating the matrix. I never got around to trying to animate the scale of a Group/Instance.

                                      Hi

                                      1 Reply Last reply Reply Quote 0
                                      • thomthomT Offline
                                        thomthom
                                        last edited by

                                        @jim said:

                                        Another reason not to use a SketchUp timer is that is is an integer timer - it will round decimal values to the nearest whole number.

                                        Do we have other timer options?

                                        Thomas Thomassen — SketchUp Monkey & Coding addict
                                        List of my plugins and link to the CookieWare fund

                                        1 Reply Last reply Reply Quote 0
                                        • J Offline
                                          Jim
                                          last edited by

                                          When using the Animation class, you call view.show_frame(delay) with an optional delay argument. The question is if this delay can be fractional seconds, or is limited to whole seconds. If whole seconds, then you still will not be able to control the in-model frame-rate (which is really not important because the output frame-rate can be set.)

                                          Hi

                                          1 Reply Last reply Reply Quote 0
                                          • chrisglasierC Offline
                                            chrisglasier
                                            last edited by

                                            @thomthom said:

                                            Do we have other timer options?

                                            Don't you find this a good basis. Instead of dots in DOM you can do it to components in Sketchup.

                                            With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 1 / 3
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement