Announcement

Collapse
No announcement yet.

[OPEN-SOURCE] Machinery Modelling Toolkit

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

    #31
    nice!

    Is this also something you could use for a gun stabilisation system.
    I've been thinking about how on earth you could do that.

    So while driving, the barrel remains fixed at a certain target, like an aim constraint. Correcing the rotation of the barrel based on the pitch and roll of the main hull.

    I see great use for AI indeed, and maybe ROV's , Drones, Helicopter.

    Comment


      #32
      Originally posted by OldRaven View Post
      nice!

      Is this also something you could use for a gun stabilisation system.
      I've been thinking about how on earth you could do that.

      So while driving, the barrel remains fixed at a certain target, like an aim constraint. Correcing the rotation of the barrel based on the pitch and roll of the main hull.

      I see great use for AI indeed, and maybe ROV's , Drones, Helicopter.
      Yeap, all what you need is an "error" between what rotation should be and what rotation you have now. You could use a single controller or two separate controllers for pitch and yaw, then they can converge with a different speed.
      They way it works is you feed error to controller on each step you want correction to be applied. Then you just get a control output, which is normally is just a float value. The behavior of controller is governed by 3 coefficients which you need to tune. One is responsible on how fast you want to correct error, second removes error accumulating over multiple frames and lastly third removes oscillation. I'll make a tutorial on how to use them.
      Youtube Channel

      Comment


        #33
        Thanks so much for providing an StayUpRight pawn, been trying to find an working example past couple days and all the links before this have been removed/dead.

        Comment


          #34
          Originally posted by King Scott View Post
          Thanks so much for providing an StayUpRight pawn, been trying to find an working example past couple days and all the links before this have been removed/dead.
          You are welcome! Be careful with it, it employs two tricks. High angular damping - otherwise it spins like crazy as pointy base is not good in providing angular friction. One end of the spring is higher then object surface, this makes it more stable as it will pull object slightly up over it's center. Pulling directly to the center will add a lot of oscillations.
          Youtube Channel

          Comment


            #35
            Update on Hovercraft. I've lost a battle to small collision primitives attached to bones. They make it almost impossible to pass over obstacles. Solution is to remove them and add friction manually (I'll make a component for this).
            Steering of the vehicle is done using PID Controller, we just point a direction where we want to go and press W button to provide throttle to the engine, controller does the rest:

            [video is recorded using Camtasia, while I was recording UE4 was behaving really choppy. Any suggestion on what to use for screen capture? I need something reliable to record tutorials later]

            Friction is right now fake and doesn't depend on hovering engine, it's simply done using linear damping. This is going to be fixed with next update or so.
            I've pushed latest version of code to GitHub. Code is very alpha and many things are going to change! Sharing so you could already start using PID Controller as it's rather final but not too well documented.
            Compiled version is here:
            https://www.dropbox.com/s/7koyioj300...craft.zip?dl=0
            Controls:
            1 - posses PID controller example
            2 - posses Hovercraft
            Q/E - Hover engine throttle
            A/D - change desired direction of travel
            W/S - steering engine throttle, keep holding W for controller to steer hovercraft

            EDIT: A bit silly from my side, but hovercraft doesn't benefit from sub-stepping yet. I would need to refactor some pieces of code for that.
            Last edited by BoredEngineer; 02-18-2016, 07:51 PM.
            Youtube Channel

            Comment


              #36
              With the PID controller it seems better controllable

              I use icecream screenrecording software.. never have problems with choppy recordings in UE4. http://icecreamapps.com/nl/Screen-Recorder/

              Comment


                #37
                New version is up. Both git repository and executable are updated. You can grab fresh version from here or first post:
                https://www.dropbox.com/s/55dazkm8q4...ntent.zip?dl=0
                https://github.com/BoredEngineer/MMT_Content

                Tracked vehicle are ported into MMT. They don't use physics sub-stepping yet, but you can already use this repo instead of Tracked Vehicles as most likely any bug fixes will be done here first. Please try them out and tell me if something is broken. There were some legacy code to attach one machine to another, as it was half complete I've removed it. It will be added later with proper implementation.

                As to other additions, Hovercraft's components are now properly made to work with physics sub-stepping. No proper friction component yet, for now friction is imitated using linear and angular damping.
                Added physics sub-stepping visual debugger component, which you can feed debug lines or strings, in sub-step thread, and it will render them right after physics update is finished.

                There were some other changes here and there mostly for organization of folders, naming convention and cleaning.
                Added some simple Main Menu:
                Click image for larger version

Name:	Main_Menu.JPG
Views:	1
Size:	49.1 KB
ID:	1100971


                Feedback and ideas are welcome!
                Youtube Channel

                Comment


                  #38
                  Thanx!

                  I will be moving over my CV90 and Tiger build from the tracked vehicle blueprint and use the MMT build from now on.

                  Comment


                    #39
                    Thx, maybe a little tutorial when 4.11 out?

                    Comment


                      #40
                      Originally posted by zip View Post
                      Thx, maybe a little tutorial when 4.11 out?
                      Sure, Zip! I was thinking about a complete tutorial of hovercraft when it's done. To show all steps how to build it from ground up. But perhaps a series of shorter tutorials is needed. Something like this:
                      #1
                      - How to add plugin into your own project
                      - How to make simple physics driven actor
                      - How to enable and use physics sub-stepping
                      - How to package project

                      #2
                      - Why physics sub-stepping is important
                      - Using controllers and applying forces during sub-stepping
                      - Design considerations for components and actors

                      Then do something about hovercraft. I don't know if this is optimal, maybe some other subjects are of more interest to you?
                      Youtube Channel

                      Comment


                        #41
                        I think this is a good list for tutorial(from easy stuff to hard..) and if true, I'm personally is more interesting in a tank(track vehicle) tutorial))), but of course any tutorial is good

                        Also i have a suggestion-- for example if there a wheels control system, can it have output transform pin(with wheel position/rotation/scale for using these parameters in animation BP for creating realistic suspension) from wheel control node?

                        Comment


                          #42
                          Originally posted by zip View Post
                          I think this is a good list for tutorial(from easy stuff to hard..) and if true, I'm personally is more interesting in a tank(track vehicle) tutorial))), but of course any tutorial is good

                          Also i have a suggestion-- for example if there a wheels control system, can it have output transform pin(with wheel position/rotation/scale for using these parameters in animation BP for creating realistic suspension) from wheel control node?
                          Sure! Hovercrafts air cushion skirt is animated like that. For each bone of skeletal mesh there is an "air pressure thruster" component. Each of such components calculates where bone should be and location is send to animation blueprint.
                          Youtube Channel

                          Comment


                            #43
                            Btw : How did you move the M113 over to MMT?
                            Did you re-setup the whole thing? Or did you import the Blueprint from the N-Wheeled project and did some minor tweaking?

                            Just in case I do something stupid, or re-doing things I don't need to re-do

                            Comment


                              #44
                              Thx, super... but can this truster nodes be using for creating 4 wheeled vehicles(cars)?, and how about using skeletal mesh for main tank body? i see is easy way to have a invisible physics box slot (it collide with world, have some weight )looking close to real tank body and inside this box we put physics disable(maybe enable on some parts) skeletal tank mesh body(with animation BP that drive wheels and suspension from truster nodes) , i thing this method use Epic in standard vehicle class(they separate visual body and physics body), but standard vehicles physics is very bad.... but for setup its very easy!!!

                              Comment


                                #45
                                Originally posted by zip View Post
                                Thx, super... but can this truster nodes be using for creating 4 wheeled vehicles(cars)?, and how about using skeletal mesh for main tank body? i see is easy way to have a invisible physics box slot (it collide with world, have some weight )looking close to real tank body and inside this box we put physics disable(maybe enable on some parts) skeletal tank mesh body(with animation BP that drive wheels and suspension from truster nodes) , i thing this method use Epic in standard vehicle class(they separate visual body and physics body), but standard vehicles physics is very bad.... but for setup its very easy!!!
                                Well, those thrusters are very specific to Hovercraft, that's why they are not placed with the rest of the reusable components in the folder.
                                Swapping static mesh to skeletal mesh always can be done. It's a matter of how things are wired but there isn't much difference in setting bone position or component position. The major difference is reusability of the assets. Anyway let's wait for component based release of the tanks and see from there.

                                Btw, OldRaven's tutorials on how to setup tank are valid in MMT, I don't think there is any major difference in how to use it.
                                Last edited by BoredEngineer; 02-25-2016, 04:52 PM.
                                Youtube Channel

                                Comment

                                Working...
                                X