Announcement

Collapse
No announcement yet.

[ASSETS] [OPEN SOURCE] Tanks, tracks and N-wheeled vehicles

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

    Originally posted by LittleAnt View Post
    I will definitely be exploring the multiplayer rout and vr as well . I'm super happy to help if any of you need anything!
    Thank you! As you can see already, the feedback on how things work and what is clear/not clear or hard to setup is very valuable. For me it's difficult to test all aspects of the "simulation" especially with models that I haven't made myself.
    I need to add a lot of notes. Something like having a root body with its own collision, to get physics running, is rather a necessity. But if it's not mentioned anywhere then you might not even know that it's important. Now I know that this should be added as a note and explained in tutorial.
    Youtube Channel

    Comment


      Originally posted by OldRaven View Post
      What do you mean with non-component based? excuse the dumb question if it is .

      I have not looked into the performance much yet, I'm just curious if in the end the tank under MMT will be suitable to use in a multiplayer environment.
      I will dive into the multiplayer part of UE4 soon as I got a request from a client involving multiplayer.. and that for me is still abracadabra.
      Non-component based is the current setup, where all implementation is in the single class. I don't know how much work have to be done to make it work in multiplayer, but I know that it's rather time consuming to refactor that code. Right now, I'm using component based approach to build a hovercraft and it's much easier to manage complexity and dependency of the code.

      Performance wise, some parts should be moved to c++, but it's really easy to do on per component basis. Meanwhile blueprint's performance can get a significant boost with some of the next updates.
      Youtube Channel

      Comment


        Hi BoredEngineer,
        first of all thanks for your project, it`s impressive work.
        I`m trying to recreate Leopard 2 MBT and I`m having issue with treads - it`s bit similar to silverwolfe`s issue with Centurion wheels: followed by OldRaven`s video and everything was fine until I created treads. In blueprint editor everything looked good:
        Click image for larger version

Name:	treads2.jpg
Views:	1
Size:	43.5 KB
ID:	1100751

        But in game treads looked quite strange:
        Click image for larger version

Name:	treads2a.jpg
Views:	1
Size:	128.8 KB
ID:	1100752

        When I moved treads, splines etc. to "base" position (like in M113) and in editor it looked like this:
        Click image for larger version

Name:	treads1.jpg
Views:	1
Size:	40.7 KB
ID:	1100753

        And in game...:
        Click image for larger version

Name:	treads1a.jpg
Views:	1
Size:	123.4 KB
ID:	1100754

        I read about moving pivot to the center of wheels - so I did, but without effect, treads still are broken. I tried to modify AnimateTreadsSplinecontrolPoints function, but best effect I`ve achieved looked like this:
        Click image for larger version

Name:	treads3.jpg
Views:	1
Size:	117.1 KB
ID:	1100757

        Of course this ruined treads in all other vehicles:
        Click image for larger version

Name:	treads4.jpg
Views:	1
Size:	111.4 KB
ID:	1100756

        I tried to edit other functions, but effects were too messy to show - right now I must admit I`m out of ideas how to set up these treads properly :/
        Will be grateful for any suggestions or clues.

        Comment


          every cv in the curve for the thread has an x y and z coordinate. It's looks like they are not all the same in the horizontal plane.. it sure is a pivot or coordinate misalignment.. now to find out which one.

          I'll check with the tiger , I had the same thing when setting it up.

          Or it could also be a tangent problem.. you need as many tangents for the curve as you have points on the curve

          Comment


            This is the issue with the pivot location of the wheels and sprocket. When I was building M113 I didn't thought about cases when sprocket, idler and road wheel pivots can have different Y coordinate. If you open sprocket and wheel mesh you will see that they have a pivot exactly at their center. Inside of the BP they are aligned as well - they have the same Y coordinate, as far as I remember. Spline control points use X and Y coordinate of the wheels, sprocket and idler to position themselves, which is wrong and should be fixed, but this is just how it is right now.
            Anyway, as a temporary fix. You can change pivots of the wheels and sprockets in your model, in modelling package. Decide where you want to have a center line of your track and then move pivots of wheels and sprocket to the center of this line. Like this for the left side of the tank:
            Click image for larger version

Name:	Pivots_location.JPG
Views:	1
Size:	45.0 KB
ID:	1100759

            So all pivot points should be on the same line. Then re-import meshes and move them around, if their pivot points aligned then they will be on the same Y coordinate.

            EDIT: The way tracks look in editor is misrepresentation as coordinates for spline points are read from the array. In real-time, spline control points are aligned with X and Y coordinate of the wheels, sprocket and idler.
            Last edited by BoredEngineer; 02-18-2016, 09:25 AM.
            Youtube Channel

            Comment


              yes now that you mention it..

              I made sure my wheel pivot is in the exact center of the model, same for the sprocket and idler.. but indeed when you look at it from the top view the center did not line up, so it is important that the pivots line up.

              Still, looking at the images.. I think the The spline coordinates do not match up.

              -Open the spline coordinates array (R and L) in your blueprint and check if the Y coordinates all have the same value.. they should.
              -Check how many elements the array has (in my case 21), then look at the Tangents spline array and check if it has the same number of elements.. it should..

              Comment


                Thanks for your replies, I`ve changed pivots for wheels, idlers and sprockets (now pivots are in line: -154 for left and 154 for right) and checked suspension arrays (Y coords have the same values), made sure that tangents array has the same number of elements (in my case 19), but no effect :/ However, I`ve noticed something - when I`ve moved suspension handlers towards center result was like this - treads were OK, but wheels...:
                Click image for larger version

Name:	treds6.jpg
Views:	1
Size:	111.8 KB
ID:	1100761

                And when I`ve moved suspension handlers back to wheels:
                Click image for larger version

Name:	treads8.jpg
Views:	1
Size:	137.6 KB
ID:	1100762

                Maybe I`m wrong, but it looks like treads shape is connected with suspension handlers, just like wheels?
                Last edited by hidden11; 02-18-2016, 10:44 AM.

                Comment


                  Are all the Y values of the wheels, suspension handle, idler AND sprocket the same? (for one side, for example the Right side)

                  Comment


                    Originally posted by hidden11 View Post
                    Thanks for your replies, I`ve changed pivots for wheels, idlers and sprockets (now pivots are in line: -154 for left and 154 for right) and checked suspension arrays (Y coords have the same values), made sure that tangents array has the same number of elements (in my case 19), but no effect :/ However, I`ve noticed something - when I`ve moved suspension handlers towards center result was like this - treads were OK, but wheels...:
                    [ATTACH=CONFIG]79282[/ATTACH]

                    And when I`ve moved suspension handlers back to wheels:
                    [ATTACH=CONFIG]79283[/ATTACH]

                    Maybe I`m wrong, but it looks like treads shape is connected with suspension handlers, just like wheels?
                    Wheels follow suspension handles I know it's a mess of dependency. OldRaven is right you need to place suspension handles where you want your wheels to be. Can you open your wheel in asset browser and take a screenshot such that we can see the grid and center of the wheel?

                    Another thing to check is parenting, in M113 everything is parented to the root body there is not other hierarchy, if you have any like a scene component to move all wheels at the same time, it might effect it as well.
                    Youtube Channel

                    Comment


                      Here`s wheel wireframe screenshot:
                      Click image for larger version

Name:	tread_wheel.jpg
Views:	1
Size:	38.6 KB
ID:	1100769

                      I experimented with lot of setups and something quite unexpected happened - when I placed wheels, sprockets, idlers and suspension handlers in line and edited suspension array I achieved this:
                      Click image for larger version

Name:	treads11.jpg
Views:	1
Size:	136.4 KB
ID:	1100770

                      This gave me idea - I`ve edited in array all spline nodes without suspension handler (near sprocket and idler), what in editor looked like this:
                      Click image for larger version

Name:	treads11.jpg
Views:	1
Size:	136.4 KB
ID:	1100770

                      But in game...:
                      Click image for larger version

Name:	treads14.jpg
Views:	1
Size:	119.9 KB
ID:	1100773

                      Looks fine and behaves properly, but for me it looks like placeholder
                      Sorry for messed pictures, my bad.
                      Attached Files
                      Last edited by hidden11; 02-18-2016, 11:37 AM.

                      Comment


                        So wheels are on the line with spline (blue line I guess), is it the same for the sprocket and idler?
                        Youtube Channel

                        Comment


                          Ok I need to fix this mess. The idea would be to govern XY position of spline by it's relative coordinates to the root body, so their Y coordinate in array would be 0, which mean a single array could be used for both sides. I'll take out all this horizontal alignment of the spline. Alignment of the wheel to suspension will stay for now, otherwise it distorts movement of the spring.
                          Youtube Channel

                          Comment


                            Fixed in the latest version. It's on GitHub already. Just a simple test that it works:
                            Click image for larger version

Name:	Spline_XY_independent_position.JPG
Views:	1
Size:	63.7 KB
ID:	1100790

                            Y coordinates for spline control points is read from array. The changes are in A_TrackedVehicle>AnimateTreadsSplineControlPoints and they look like this:
                            Click image for larger version

Name:	Spline_XY_independent_position_BP.JPG
Views:	1
Size:	176.7 KB
ID:	1100791
                            So one can fix it locally without syncing with source.

                            Wheels are still following suspension handle so you can do things like set suspension Y rotation to 30 degrees, then spring will be pushing wheel diagonally instead only vertically. This is the point where X coordinate of spline control point can dynamically change, so only Y coordinate is fetched from the array. Originally Y coordinate was read from the wheel, so that you can rotate suspension in two axis, if you want to setup it as V shaped with some degree of chamber. But it's easy to change to such behavior by connecting wires in the function above.
                            Youtube Channel

                            Comment


                              In case someone missed it. Tracked vehicles were ported into Machinery Modelling Toolkit:
                              https://forums.unrealengine.com/show...elling-Toolkit

                              Further development will happen there. First priority for tracked vehicles is to get them working with physics sub-stepping and then split into components.
                              Youtube Channel

                              Comment


                                Yes, and in case some missed it over there.. I will be moving my CV90 and Tiger example to MMT also.

                                And when the tracked vehicle components are integrated or added to MMT I will do a revision if needed of the video tutorials on setting up a tracked vehicle.

                                Comment

                                Working...
                                X