Announcement

Collapse
No announcement yet.

Scripted Controllers

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Scripted Controllers

    I am working on a car rig that we created here awhile back. It works well except that Objects must be explicitly named in their respective controllers. This is a problem because copying a rig breaks the controllers. Does anyone have any ideas on making the scripted controlers aware of what object they are on? Seems like it should be possible but so far I am at a loss.
    Eric Boer
    Dev


  • #2
    not into scripting but I passed on your post to a friend who is. See what he says.
    Dmitry Vinnik
    Silhouette Images Inc.
    ShowReel:
    https://www.youtube.com/watch?v=qxSJlvSwAhA
    https://www.linkedin.com/in/dmitry-v...-identity-name

    Comment


    • #3
      cool, thanks Dmitry

      Idealy we would be able to copy the rig and it would still work. My thoughts were that if the scripted controller knew what object it was on then it could find the parts it needed to refererence through the rig hierarchy.
      Eric Boer
      Dev

      Comment


      • #4
        so when you select all, then shift drag (clone make copy) it breaks it?
        Dmitry Vinnik
        Silhouette Images Inc.
        ShowReel:
        https://www.youtube.com/watch?v=qxSJlvSwAhA
        https://www.linkedin.com/in/dmitry-v...-identity-name

        Comment


        • #5
          yep, because the scripted controllers are something like

          Code:
          object1 = $'bmw_front_left_tire'
          object2 = $'bmw_front_right_tire'
          
          object1.rotation.z=object2.rotation.z
          so when it's copied the parts are "bmw_front_left_tire01" or something and the script no longer works.
          Eric Boer
          Dev

          Comment


          • #6
            Eric here is what my friend had to say at this point:

            Okay, there is a pointer in scripted controller, called "This". It points to object, which it is applied to. Do a search in help for "THIS"

            hope that leads to somewhere
            Dmitry Vinnik
            Silhouette Images Inc.
            ShowReel:
            https://www.youtube.com/watch?v=qxSJlvSwAhA
            https://www.linkedin.com/in/dmitry-v...-identity-name

            Comment


            • #7
              Yep, "this" is the answer ( I think, we have a few issues with it to deal with, but it looks promising). I got the same answer on cgtalk.

              Thanks for taking the time
              Eric Boer
              Dev

              Comment


              • #8
                Im curious to know what kind of rig you got. In a sence that I was also making a rig for my bmw long time ago, obviously not as advanced but still... what can it do on automation?
                Dmitry Vinnik
                Silhouette Images Inc.
                ShowReel:
                https://www.youtube.com/watch?v=qxSJlvSwAhA
                https://www.linkedin.com/in/dmitry-v...-identity-name

                Comment


                • #9
                  For automation it:

                  Turns the wheels at the right speed according to the length of the path spline it follows.

                  Steers the front tires also in accordance to the spline it is on

                  keeps the wheels on the ground surface using "rayintersect" so it will roll up and down hills, curbs etc.

                  Rolls the body when accellerating, stopping and turning.

                  It's not suitable for very tight shots but works great for general traffic

                  Eric Boer
                  Dev

                  Comment


                  • #10
                    very nice...did you have issues when parenting rotating dummys to master dummy?
                    my wheels some times would flip irradicly when both the wheel dummy and master dummy would translate.
                    Dmitry Vinnik
                    Silhouette Images Inc.
                    ShowReel:
                    https://www.youtube.com/watch?v=qxSJlvSwAhA
                    https://www.linkedin.com/in/dmitry-v...-identity-name

                    Comment


                    • #11
                      Do you know it?
                      http://www.newplugins.com/Products/VS1_5/CarAndTruck/
                      It work very very fine.
                      =:-/
                      Laurent

                      Comment


                      • #12
                        Maybe a dumb question...but

                        Can we have this once its complete?

                        Thx

                        Comment


                        • #13
                          Dmitry - To be honest I am just getting familiar with it so I am not sure of it's limitations, as far as I know there is no flipping problem, why that would be, I am not sure yet.

                          Priad - Vehicle Sim is very cool, a little too intensive for general work but great for more complex sims.

                          Atljimk - We are talking about sharing some of our tools and scripts, no idea if this might be included.
                          Eric Boer
                          Dev

                          Comment


                          • #14
                            ok dude.
                            =:-/
                            Laurent

                            Comment

                            Working...
                            X