sketchucation logo sketchucation
    • Login
    โ„น๏ธ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Path following AI

    Scheduled Pinned Locked Moved SketchyPhysics
    11 Posts 3 Posters 1.1k Views 3 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.
    • W Offline
      Wacov
      last edited by

      In sketchyphysics ๐Ÿ˜„

      Just thought I'd make anyone who hasn't recently graced the WH aware of this. I've developed a system that lets cars (or boats) drive themselves around a course. It supports multiple routes, and multiple vehicles very easily, and there's a detailed tutorial for installing it on models. I'll be building on top of this basic system to allow more complex behaviours, and the tutorial and up-to-date info can be found at:
      http://sketchupusers.freeforums.org/easy-ai-now-with-tutorial-t73-10.html#p945

      http://sketchup.google.com/3dwarehouse/cldetails?mid=3096a836877fb9af6cd8ad826e9017b8&prevstart=0

      1 Reply Last reply Reply Quote 0
      • E Offline
        Ecuadorian
        last edited by

        Thank you, I render videos from time to time so it'll be totally worth to learn how to do this. ๐Ÿ‘

        -Miguel Lescano
        Subscribe to my house plans YouTube channel! (30K+ subs)

        1 Reply Last reply Reply Quote 0
        • D Offline
          Davidfi1
          last edited by

          Very nice - Cool

          Could be nice to have a tool bar for more easy use.
          The "nodes" could be in flag shape, and outomatically named ect...
          ( set to "ignore" )

          Thank you
          David.


          Node flag

          1 Reply Last reply Reply Quote 0
          • W Offline
            Wacov
            last edited by

            Toolbar... ok, here you go:
            AI Tools.zip
            Same deal as normal plugins, unzip in your plugins folder. To register a vehicle as AI, select all parts, including hidden parts, and use the 'Set AI' tool. To auto-number your nodes, create them in order (that's important), select them all, and use the 'Number route' tool. It removes existing numbers in the name, so you can re-use the tool, after adding extra nodes, for example.

            http://sketchup.google.com/3dwarehouse/cldetails?mid=3096a836877fb9af6cd8ad826e9017b8&prevstart=0

            1 Reply Last reply Reply Quote 0
            • D Offline
              Davidfi1
              last edited by

              WOW !!! - It is beautiful - incredible model !!!
              Still need more instruction on how to use the Toolsbar for all the tasks.
              I am missing the tool for inserting the script to the "floor" and seting the motors control.

              P.S.
              I don't understand the name AI - what does it stend for?
              Nice job !
              Thank you.

              1 Reply Last reply Reply Quote 0
              • W Offline
                Wacov
                last edited by

                AI... Artificial intelligence. Just the sweeping term for computer-controlled opponents, the main intention of the system. With the floor, you need SP3 X Apr2 or above, and the 'ontick' field will be visible under properties in the UI, with an object selected. Just copy/paste the main code from the tutorial into there. I found out how SP stores the ontick scripts though, so I could automate that as well. Setting the motor controllers, again, in the UI, paste the command into the motor's controller field.

                And you're welcome ๐Ÿ˜„

                http://sketchup.google.com/3dwarehouse/cldetails?mid=3096a836877fb9af6cd8ad826e9017b8&prevstart=0

                1 Reply Last reply Reply Quote 0
                • D Offline
                  Davidfi1
                  last edited by

                  Hi Wacov
                  I think I did every thing correctly
                  Could you check why the Red car does not move correctly?

                  Thank you.
                  david.


                  RedCar

                  1 Reply Last reply Reply Quote 0
                  • W Offline
                    Wacov
                    last edited by

                    Looks like you didn't register all parts of the car... select everything, every part of it, including wheels, steering assembly, everything with an AI-controlled joint inside, and use the AI registration tool. After that the axes of the car are wrong, but that's easily fixed, and covered in the tutorial.

                    http://sketchup.google.com/3dwarehouse/cldetails?mid=3096a836877fb9af6cd8ad826e9017b8&prevstart=0

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      Davidfi1
                      last edited by

                      Didn't work
                      Could you post a working demo done with the tut?
                      same model a little bit cleaner
                      Thanx.

                      1 Reply Last reply Reply Quote 0
                      • W Offline
                        Wacov
                        last edited by

                        You presumably exploded and re-grouped the main body, so its ontick field is empty ๐Ÿ˜„

                        Here's a couple of example models, they both use slightly outdated code though:
                        http://sketchup.google.com/3dwarehouse/details?mid=63cfe4da6cd759a3d36844afc91c4691
                        http://sketchup.google.com/3dwarehouse/details?mid=5cba40fd49a9606c6cd8ad826e9017b8

                        http://sketchup.google.com/3dwarehouse/cldetails?mid=3096a836877fb9af6cd8ad826e9017b8&prevstart=0

                        1 Reply Last reply Reply Quote 0
                        • D Offline
                          Davidfi1
                          last edited by

                          Wacov
                          I took your model and replaced the parts inside with the ones in my model.

                          The only problem now is to make my Track "Obey the traffic laws" ๐Ÿ˜„
                          Well - I would like it to stay in the correct lane....

                          The problem is I do not understand what is going on.
                          It would be grate if you could explain what I should do

                          AI Red Track
                          P.S it takes about 15 seconds to start after I press run - Is it normal?
                          Thank you.
                          David.

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

                          Advertisement