Jump to content

Landing legs in 1.1


Recommended Posts

Well, I have some really simple legs in my MEM mod.  They probably shouldn't have any suspension, they just fold out from a heat shield.  I've been trying to get them to work in prerelease 1.1, but they seem subject to enormous phantom forces.  I tweaked and tweaked the various modules, but it didn't matter what I tried, the always launched the craft at truly impressive speeds.  So I switched all the wheel/leg modules for ModuleAnimateGeneric.  Good news, that now seems to animate the colliders that it should, so it's workable as very simple legs.  But, also subject to huge phantom forces.  Which means the huge phantom forces aren't part of the wheel/leg modules.  They're just a lot more common with legs for some reason.

Posting this here so anyone chasing down strange phantom forces in leg modules knows they can probably stop looking so closely at the leg module settings.  I don't have a solution, just a teeny bit of problem isolation.

Link to comment
Share on other sites

On 05/04/2016 at 9:25 AM, TiktaalikDreaming said:

Well, I have some really simple legs in my MEM mod.  They probably shouldn't have any suspension, they just fold out from a heat shield.  I've been trying to get them to work in prerelease 1.1, but they seem subject to enormous phantom forces.  I tweaked and tweaked the various modules, but it didn't matter what I tried, the always launched the craft at truly impressive speeds.  So I switched all the wheel/leg modules for ModuleAnimateGeneric.  Good news, that now seems to animate the colliders that it should, so it's workable as very simple legs.  But, also subject to huge phantom forces.  Which means the huge phantom forces aren't part of the wheel/leg modules.  They're just a lot more common with legs for some reason.

Posting this here so anyone chasing down strange phantom forces in leg modules knows they can probably stop looking so closely at the leg module settings.  I don't have a solution, just a teeny bit of problem isolation.

And, based on the Tuesday dev notes, probably due to me leaving the wheel collider in the mu file. Also, knowing the issue is to do with wheels interacting with other colliders, makes sense considering the mem legs.

Link to comment
Share on other sites

remember any colliders near the wheel collider should be set to layer WheelCollidersIgnore to avoid compression forces going bonkers. beaware that setting object to WheelCollidersIgnore will make mesh invisible.

Link to comment
Share on other sites

53 minutes ago, Bonus Eventus said:

If you have a landing leg that is meant to carry large loads, try physicssignificance = 1, instead of 0. This stop weird forces (probably sheering at the attach nodes).

No, no, no, no and no. Do not deactivate physic on large parts.

Link to comment
Share on other sites

physicssignificance = 1 deactivate physic for the part. Your part does not bend, does not have a mass, does not do anything physics related. its mass is pushed to the partent so the CoM is wrong and the fact that it does not have physic while having a collider can invoque the Kraken fast.

Link to comment
Share on other sites

1 hour ago, sarbian said:

physicssignificance = 1 deactivate physic for the part. Your part does not bend, does not have a mass, does not do anything physics related. its mass is pushed to the partent so the CoM is wrong and the fact that it does not have physic while having a collider can invoque the Kraken fast.

I see. I was under the assumption this was a setting for stricter collisions and not turning physics off. No matter how high I set the breaking force or torque force the attach node would break the moment physics engaged. Oddly, this would change when the attach node didn't have a size setting. Instead the part would collapse under weight.

EDIT: To illustrate what I'm talking about, here's some screens of tests I did.

1) Light payload.
    Breaking and torque force are set to 8000 (absurd I know, I was just trying to get obvious results)
    attach_node = 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 100
wh78eI0.jpg

You can see the odd looseness of the joints. I tested this by giving a girder the same node properties, and it did the same thing.

2) Heavy payload (+5000 tons)
    breakingForce = 400
    breakingTorque = 400
    node_attach = 0.0, 3.0, 0.0, 1.0, 0.0, 0.0, 3
    physics significance still set to 0
KsnV3qa.jpg

DwnQ09b.jpg

3) Settings kept the same as 2 accept physical significance set to 1.
nJM7m1u.jpg

Perfectly stable. It can even fold up and unfold with no problem, which is how it worked in 1.05 with physics significance set to 0.

My guess was that I had pushed the limits of the physics engine beyond what it could deal with. Also realistically, it's hard to believe these landing legs could take that level of shearing stress in the real world, with such a shallow angle.

BTW, thanks for your help @sarbian

Edited by Bonus Eventus
additional info
Link to comment
Share on other sites

13 hours ago, nli2work said:

remember any colliders near the wheel collider should be set to layer WheelCollidersIgnore to avoid compression forces going bonkers. beaware that setting object to WheelCollidersIgnore will make mesh invisible.

I think my issue would be the colliders of the part the legs attach to, so I'm seriously thinking of setting those to wheelCollidersIgnore, even though that part has no wheel collider. 

Ok, tested. Making the partly intersecting part all wheelCollidersIgnore didn't help. But I set a new record of 5000m/s using only Springs! ... Plus craft was destroyed and you cannot save at this point, but that's all part of the learning experience. 

I might try the genericAnimation without wheel collider. 

Edited by TiktaalikDreaming
Updated with testing
Link to comment
Share on other sites

7 hours ago, TiktaalikDreaming said:

I think my issue would be the colliders of the part the legs attach to, so I'm seriously thinking of setting those to wheelCollidersIgnore, even though that part has no wheel collider. 

Ok, tested. Making the partly intersecting part all wheelCollidersIgnore didn't help. But I set a new record of 5000m/s using only Springs! ... Plus craft was destroyed and you cannot save at this point, but that's all part of the learning experience. 

I might try the genericAnimation without wheel collider. 

Have you tried different settings with TsubSys, as @NecroBones pointed out, this seems to further dampen the spring of the wheelCollider. It worked for me, and I was trying to lift a craft with 5000+ tons lol. Also what does the debug menu say? Mention anything about sub modules of the wrong type at such and such index?

Link to comment
Share on other sites

 

What numbers are you guys using for Spring and Damper? I'm finding that the scale has changed considerably. Legs where I used to have a Spring of 20 or 25, are suddenly very stiff and don't compress the suspension much. However, getting below maybe 8 or so, lots of phantom oscillations appear. I'm setting most of my legs to 10 or 12 for now, with Dampers around the same number.

 

My legs are all working, except with a few ongoing caveats (with the MRS legs I worked on first being perfect, and not subject to the same caveats for some reason):

  1. Most of the legs will land with the feet "floating" slightly above the surface, and I can't fix it. Shorten the wheelCollider suspension any further, and the foot touches the ground, but the collider doesn't extend through the other colliders enough and so there's no suspension, just a rigid deployment. Lengthening the wheelCollider makes it float higher, of course. No perfect middle-ground.
  2. Most of the suspensions are super tight, and even with a heavy vehicle, the weight doesn't sink into the leg much. Can't lower the Spring any further, or phantom forces/oscillations start up. Ironically however, low Spring settings here do seem to mitigate #1.
  3. Everything is very springy, jumping vehicles back into the air when they land, even with high Damper values. Maybe I'm not going high enough?

I just haven't had time to work on the legs much this week, which is fine since they do work. I was just wondering if anyone else had observations to compare against.

 

 

Link to comment
Share on other sites

damperRatio seem to work best between 10 to 30% of springRatio. You could use suspensionOffset to adjust the visible mesh so there's no poking through ground after you get spring and damper ratio that feels good.

Link to comment
Share on other sites

 

Yeah, that's what I used to do with the Damper setting, but going even higher doesn't seem to have much impact. The leg suspension just lacks good dampening for leaping back up after a landing.

 

I played with SuspensionOffset quite a bit, and all it does is change the suspension's position, colliders and all, and so it doesn't help the problem at all with the floating feet. Get the foot any closer to the ground, and the suspension stops working altogether. It's as if the wheel collider's suspension is magically getting another 0.25m added to its length after detecting contact with the ground. Very strange.

 

Link to comment
Share on other sites

yeah multiple wheelColliders on a single part is endless physics spasms. Probably best to use a single suspension down the center. the leg tips normal colliders should keep it from tipping over

Edited by nli2work
Link to comment
Share on other sites

1 hour ago, sarbian said:

Any of you worked on part that have more than 1 leg ? The MJ pod has 4 and if I add more than 1 ModuleWheelBase the game complains...

 

I did, sort-of. I cheated though. I have a multi-leg part, but it doesn't have suspension built into it, by design. So no wheel colliders. ;)

 

Link to comment
Share on other sites

2 hours ago, NecroBones said:

 

Yeah, that's what I used to do with the Damper setting, but going even higher doesn't seem to have much impact. The leg suspension just lacks good dampening for leaping back up after a landing.

 

I played with SuspensionOffset quite a bit, and all it does is change the suspension's position, colliders and all, and so it doesn't help the problem at all with the floating feet. Get the foot any closer to the ground, and the suspension stops working altogether. It's as if the wheel collider's suspension is magically getting another 0.25m added to its length after detecting contact with the ground. Very strange.

 

that's really odd... I'll have to play with Legs more... after I get a handle on rover wheels. Suspension settings that seems like they should work is completely untenable in game, and a seeming trivial change would completely change their behaviour. it's really strange.

Link to comment
Share on other sites

2 minutes ago, nli2work said:

that's really odd... I'll have to play with Legs more... after I get a handle on rover wheels. Suspension settings that seems like they should work is completely untenable in game, and a seeming trivial change would completely change their behaviour. it's really strange.

 

Yeah, it's frustrating because of the amount of "hidden voodoo" that seems to be going on behind the scenes. I feel like there are some variables involved that we don't have access to.

Link to comment
Share on other sites

On 31.3.2016 at 3:03 AM, NecroBones said:

I posted in our other thread over there if it would be OK with him if I shared it here. It's just called DebugStuff.dll

hi, i downloadet your plugin but how i 'activated' the debug during game ? 

Link to comment
Share on other sites

2 hours ago, NecroBones said:

 

Yeah, it's frustrating because of the amount of "hidden voodoo" that seems to be going on behind the scenes. I feel like there are some variables involved that we don't have access to.

I concur.  And it would be awesome to have an idea of what units some of the variables are in.  Is that spring rate kN per m?  Or tonnes per m?  or...  It'd be great to have an idea.  That way, you have an idea of the size of craft (roughly most of the time), and the travel in the suspension, and some very simple maths gets you a workable spring constant.

I really only have two leg parts to work on, one kinda works with wild guess work numbers, so I haven't touched it since.  The other was so fraught with overlappy colliders I've removed the suspension and wheel collider (and 3 of 4 of the new v1.1 modules).  So I don't have a lot of clue about good suspension values.

My thought on hearing that the issue with phantom forces being wheel colliders not ignoring other colliders, even those marked to ignore was basically that that means only half of the forces are being modelled, which is going to lead to issues.  If a wheel (or any part really) collides with a different part of the same craft, sure, there's force on the wheel pushing it, but there's an exactly equal and opposite force acting on some other part.  Net effect *should* be zero.  There's gotta be some very assumption based simplified physics going on.  And that means, knowing said assumptions is fairly key to knowing how they'll behave.

Link to comment
Share on other sites

Just now, TiktaalikDreaming said:

I concur.  And it would be awesome to have an idea of what units some of the variables are in.  Is that spring rate kN per m?  Or tonnes per m?  or...  It'd be great to have an idea.  That way, you have an idea of the size of craft (roughly most of the time), and the travel in the suspension, and some very simple maths gets you a workable spring constant.

I really only have two leg parts to work on, one kinda works with wild guess work numbers, so I haven't touched it since.  The other was so fraught with overlappy colliders I've removed the suspension and wheel collider (and 3 of 4 of the new v1.1 modules).  So I don't have a lot of clue about good suspension values.

My thought on hearing that the issue with phantom forces being wheel colliders not ignoring other colliders, even those marked to ignore was basically that that means only half of the forces are being modelled, which is going to lead to issues.  If a wheel (or any part really) collides with a different part of the same craft, sure, there's force on the wheel pushing it, but there's an exactly equal and opposite force acting on some other part.  Net effect *should* be zero.  There's gotta be some very assumption based simplified physics going on.  And that means, knowing said assumptions is fairly key to knowing how they'll behave.

Units are in metric, N/m I believe. Which, seems to me, makes the stock values very very low. In game behavior seems to point to kN/m. phantom forces are harder to figure out... most of it don't have much to do with neighboring colliders, unlike what I previously thought, and more to do with suspension Rate/Distance, and friction curve settings. 

Edited by nli2work
Link to comment
Share on other sites

Just now, nli2work said:

Units are in metric

Yeah, all the units seem to be metric.  But what ratio is the spring constant?  The *normal* ratio used would be N/mm, or at least that's what springs are usually quotes in.  But my legs are working with a ratio of 8.  Which should mean under a 800 tonne craft they'd deform vastly more than what I see (should be 1m under 1G, I see about 10cm).  I used to have the spring value set at 100 (big legs for big craft).  But the new system, the spring rate doesn't seem to match up to an actual spring rate.

Link to comment
Share on other sites

 

One of the dev notes a while back mentioned that they do some sort of dynamic scaling of the suspension strength based on the vehicle's mass and other factors, so that the suspension works for both light and heavy vehicles. This was in reference to the wheeled landing gear, etc, but almost certainly involves the legs too since they use the same modules. I have no idea how this works "under the hood".

Link to comment
Share on other sites

I think it'll just be a lot of trial and error on the modders part. I don't expect any support from Squad on this front. I'll record some videos soon on rover wheels with different suspension and friction curve settings, hopefully useful as a starting point for people setting up their own wheels down the line. Even then I expect every part involving wheels or suspension to be a lot of trial and error.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...