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

      @chris fullmer said:

      There is no need to separate camera animation from object animation though. It should be regarded as any other object, able to be animated and controlled via the same keyframes, key locations, path contraints, etc that should be available to object animation.

      I can make objects rotate and move. I put some examples on YouTube some time ago. As you will know now it is blocked here, so I can't provide the links. Tags include Sketchup and nameset.

      No key frames were involved, and I remember I could manually pan, zoom and orbit whilst the animation was continuing; that's why I see them as separate.

      @chris fullmer said:

      Its just the web dialog UI that is a daunting task.

      It takes a lot of my time but will get there in the end.

      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
        miikka1978
        last edited by

        I have been following different animation solutions (plugins and extensions) for Sketchup and I think that Sketchers Studio is the most advanced one. Anyway, they seem to have it only for Mac.
        http://sketchersstudio.com/en/

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

          That looks like a program that does animation outside of SU, it just lets you import SU models. We're talking about an actual animation toolset inside of SU.

          @Chris - I remember you already have things animated in the past. I thought it was very cool when I saw it. In that respect, of being able to control the camera while the animation plays in the viewport, I agree. There would need to be a way to choose if the user is in animated camera view mode, or in regular SU view mode. Most modelers handle this by creating an actual camera object (much like the film and stage plugin). You can then animate that physical object. Then you could choose to set the viewport to be looking through that camera, click "play" and you would see the animation through the animated camera lens. Or choose to exit out of that camera into regular SU free cam mode, click "play" and you could watch all animated elements dance around, including the animated camera object, that is not being looked through.

          That is how other programs handle that I am aware of, and it is very succesful. Then you can create multiple cameras and animate them differently, export the rendered movie through various views. Even change the camera in the middle of the animation, so it is like cutting to another view like movies do all the time.

          But all this is dependent on having a way to visualize the animated objects in their animation paths, and alter their paths of animation easily. That is the point of keyframes. You select an object, put the timeline onto frame 1. Record a keyframe for the selected object. Then it knows exactly where it stands at frame 1. Then move the object to where you want it to be at a later frame. Maybe 5 seconds later. Put the frame onto frame 150, record the keyframe for that object and then the animation software interpolates all locations that the object will pass to get from frame 1 to frame 150. To edit the animation, you highlight frame 150, the object jumps to that location, you move the object to where you want it, re-record the keyframe and voi-la, the animation is updated.

          Its just a visualization techinue that makes animation easier to comprehend than pure xyz locations and vectors, which is a very rigid way to animation an object. In the end the software just needs to remember the xyz position and that is all it records, but keyframes help the user enter that data into the software.

          Gee I get excited thinking about it. It would be fairly easy to implement most of this over components and groups by animating their transformation matrix. But animating raw geometry is hard because SU does not keep objectID's across SU sessions. So it is very difficult to keep large amounts of data attached to raw geometry. It requires parsing the entire model and rebuilding that data each time the model is opened. Yeah, wow animating vertices is a monumental task...

          Chris

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

          1 Reply Last reply Reply Quote 0
          • 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
                                            • 1
                                            • 2
                                            • 3
                                            • 2 / 3
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement