• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

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 23 Nov 2009, 22:45

    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 23 Nov 2009, 22:51

      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 24 Nov 2009, 05:41

        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 24 Nov 2009, 13:42

          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 24 Nov 2009, 21:12

            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 24 Nov 2009, 21:59

              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 30 Nov 2009, 20:06

                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 30 Nov 2009, 20:50

                  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 30 Nov 2009, 22:11

                    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 1 Dec 2009, 10:10

                      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 5 Dec 2009, 08:41

                        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
                        1 / 1
                        • First post
                          9/11
                          Last post
                        Buy SketchPlus
                        Buy SUbD
                        Buy WrapR
                        Buy eBook
                        Buy Modelur
                        Buy Vertex Tools
                        Buy SketchCuisine
                        Buy FormFonts

                        Advertisement