[OPEN-SOURCE] Machinery Modelling Toolkit

Well I am also looking in the documentation of Physx SDK .I found PxVehicleDriveTank class there but I cannot decided how to proceed .So did you wrote wrapper around that class? What was your approach?

This could help
http://docs.nvidia.com/gameworks/con…hicledrivetank

There are 2 modes
PhysX tanks currently support two drive models: eSTANDARD and eSPECIAL

Yes, it took me a bit to “decode” what they were on about in that class since this is my first time writing anything like it :P. I extended a class from UWheeledVehicleMovementComponent and overrode the SetThrottleInput and SetBrakeInput so they call two new functions, SetTrackedThrottleInput and SetTrackedBreakInput which take two values, one for each side, and then it’s essentially just a wheeled vehicle, in implementation. When you run the simulation function the PxVehicleDriveTank object requests a few different values since it operates separately on both sides, but that part was simple once I figured it out.

Oooooh see that is what I missed. I have nearly zip experience with UE’s animation BPs and I figured they were the key somehow. Thank you very much!

The scrolling material is a cinch, already played around with that but without the track moving with the wheels, it just looks so … fake! :slight_smile:

Thanks for the help .

Umm one question .Does it mean that your implementation is more like of N wheeled rather than tank simulation itself?

I am trying to use LightTankCPP but I am getting these errorstank.jpg

Most likely it doesn’t have proper tracks setup. Some of the BPs are a mess, I kept them for various reasons, like performance test or they have some parts of code that I can re-use in feature. This BP is one of those.
Use tanks that are placed in the level - those are functional. If you want to experiment with them, just check which BP they are based on and modify a copy of it, so that your changes are not overwritten in feature by the new version.
I’ll clean-up project at some point, but it’s not an easy task as some BPs and classes can’t be simply deleted.

Oh ok thanks

Hello I have implemented simple hovering component from the epic tutorial.I am trying to achieve switchable movement like from tank to hover tank.So what would be the best approach for movement ? Say How would I switch off the tank movement completely so that all the mmt calculation are stopped.Could it be simply through by changing the tick logic ? For movements through key it could be simply through flag I guess that would decide whether to use hover movement or tank movement.

Basically if you don’t want suspension to still work when your tank is hovering just wait till you have a “lift off” so wheels are not stuck in weird positions and then disable physics update functions, like on suspension and friction. You might need to keep updating wheel position, which is easy to go around by adding one branch in skeletal mesh animation update. I can show you how to do it if you have issue with it.

Umm Why ?

Because light tank (LightTankTraceWheelsWithAnimBPPrototype) which contains all latest features, uses skeletal mesh for animation on wheels and suspension. By default, skeletal meshes lag behind simulating parent by 1-2 frames. To eliminate this issue position of wheel bones is updated manually in BP using chain of these functions:
Event MMT Post-Physics Tick -> Update Anim BP -> Update Animation Wheels (called inside of previous function)
If you are not using skeletal mesh then you shouldn’t have this issue.

Thanks for taking the time.Now I get it why I need to update wheel position after I saw the result myself xD

Hi!

Big fan of this project and it inspired me to try and create a tracked vehicle setup myself. But I wonder if you can shed some light on how you get so gorgeous looking tracks?

I’m having loads of issues where if I manipulate the track spline because of changes in the terrain the tracks will shift back and forth.
Also if I make all the tracks point towards the track in front of it to animate the rotation of each track, it will flip over halfway. I’m guessing this would be fixed by somehow explicitly setting the up vector towards the centre of the track loop, but I’m not vector math savvy enough to do that. The rotation at spline point seems to break the moment I start editing the spline in game.

And on top of making this work yours also does physics!

Need to look at the code, but as far as I remember these are the tricks:

flipping of the spline up vector - get Y vector from the Transform you get at some point on the spline. Check sign of the Y vector, when spline flips, Y will change sign, when this happens just add 180 degree rotation.

You can’t remove movement of the links along the spline, when spline is stretched/contracted, completely. But you can mask it. Like the smaller the links, the less visible mismatch is going to be. The other thing is to shift them progressively further away from the spline start and choose spline start closer to the area where it will be the most visible, like an open sprocket for example. In case of something like an Abrams or Leopard you can “hide” most of the mismatch under the top protection skirt as tracks there are barely visible. The point of ground contact is good place as well, as this is where grass and dirt can hide it.
You can always stretch links too, as spline gets longer just stretch links by some small amount.

The other alternative is a rigged mesh and material with animated texture. That thing will just stretch.

It might be easier to look at the old BP implementation first, it doesn’t have features like links alignment to the sprocket but it’s easier to understand. As you figure it out it will be easier to implemented fancier version.

Updated MMT Content and Plugin to 4.19.1 version of UE4.

Amazing plugin! Thank you for update and your hard work, I am going to try out. Is any update in future plans for Ripsaw?

Yes, I want to remove it completely :smiley:
It uses old implementation that lacks features of the new system and less performant. People seam to keep using it as it’s the easiest to tweak so far - single class implementation. New implementation is based on various components and lacks tutorial but it all around superior otherwise.