Jump to content
Oovee® Games

Archived

This topic is now archived and is closed to further replies.

Localhost (Oovee)

Wheelmass=light makes the truck heavier than with superheavy wheels.

Recommended Posts

Yet another member who would like to report a bug but cannot create a topic for it.
I'd appreciate if a moderator could move this post to a separate thread, but until then here's my report:

Wheelmass=light makes the truck heavier than with superheavy wheels.

Version affected: 25.12.15 (and probably several earlier versions too)
Mods: none, except mass modifications mentionned below.
Map: tests done on proving grounds, but can probably be replicated anywhere.
bug description: there seems to be a strong downward force applied to trucks that is inversely proportional to wheel mass, causing a truck with lighter wheels to be be "crushed" onto the cround.

For example, I took a vanilla kraz 255 and set its wheel's mass to superheavy:
xNmqDE.th.jpg
Note that suspensions are at about 75% extension and wheels aren't very deformed.
Now if I just change wheel mass to Light and reload the truck, here's what happens:
xJaf0A.th.jpg
The truck crumples: suspensions are at 30% extension, and wheels are as deformed as if I had changed their softness to "soft" preset. It looks like the chassis suddently became a lot heavier, yet I only made the wheels LIGHTER (and did not change softness).

Another interesting experiment consists in spawning a kraz with superheavy wheels on the swamp area:
EXmRNR.th.jpg
You can see that the truck stays above ground (even after 3 reloads), but if I change wheelmass to light and reload, the truck sinks:
sqlnoZ.th.jpg
Note that the truck spawns above ground and then sinks, it is not directly spawning underground.
I did not touch the accel, the truck just sank under its own weight(?), and to make a truck with superheavy wheels sink like this one, I had to add about 200 tons to its chassis.

So there is something weird going on with wheel mass, at the very least I'd expect trucks to be more prone to sinking with (super)heavy wheels than with lighter ones.

PS: sorry if it has already been reported somewhere, but I did not find any bug report related to wheel mass.

Share this post


Link to post
Share on other sites

My opinion :

Mass of the truck is with wheels. When You use SuperHeavy, then mass of the wheels is subtracted from truck's mas and truck is higher on the suspension. But when You will use Light wheels, lower mass is subtracted from truck's mass, his chassis is heavier and suspension is lower.

Share this post


Link to post
Share on other sites

My opinion :

Mass of the truck is with wheels. When You use SuperHeavy, then mass of the wheels is subtracted from truck's mas and truck is higher on the suspension. But when You will use Light wheels, lower mass is subtracted from truck's mass, his chassis is heavier and suspension is lower.

 

I think you are about right there, there is something quite strange going on (always has btw) and it's definitely to do with where the wheel mass is added in relation to the mass of the rest of the vehicle.

Share this post


Link to post
Share on other sites

I been interested to find out real weight of vehicles in game too i had this idea while back to build physics based scale like the really old teeter totter types that has counterweight on other side that is adjusted until its balanced and then where to counterweight is you can read the weight measurement. It should be possible to calibrate making rocks with correct weigt like 500kg 1000 1500 and so on then marking down the numbers on scale but i never found time to play around with this idea.

 

Picture here

http://www.rcbs.com/getattachment/Products/Powder-Measures-and-Scales/Scales/Mechanical/M500-Mechanical-Scale/RC_98915_M500_Scale_L.JPG.aspx?maxsidesize=700

Share this post


Link to post
Share on other sites

My opinion :

Mass of the truck is with wheels. When You use SuperHeavy, then mass of the wheels is subtracted from truck's mas and truck is higher on the suspension. But when You will use Light wheels, lower mass is subtracted from truck's mass, his chassis is heavier and suspension is lower.

I thought about this too, but:

1-According to this theory, and considering a light wheel weights 50kg and a superheavy one 600kg, adding 3300kg to a kraz 255 with superheavy wheels should give about the same suspension state than a truck with light wheels. Turns out you have to add 20-30 times that.

2-If the truck had globally the same mass, it would sink the same way in the swamps with light and superheavy wheels. It does not.

 

I also thought at some point that suspension stiffness was proportional to wheel mass since it awfully looks like a ratio, but that wouldn't explain the difference in tire deformation and swamp sinking.

 

And thank you to the moderator who did move my report to its own thread.

Share this post


Link to post
Share on other sites

I always thought the heavier the wheel the stiffer it made the suspension strength and damping. worked something like wheelmass*suspensionstregth= final suspension strength.

 

the weight also affects friction which affects how fast it sinks in the swamp, the lighter it is the more the wheels spin and the faster it sinks. not sure why it also affects it when its standing still but it does

 

and a lighter wheel will tend to have a lower load rating and thus deform more under the same amount of weight

Share this post


Link to post
Share on other sites

Localhost :

2) Hmmm, You are right.

Physic model of ST is some strange, because is fully optimized for slow crawl across mud and obstacles.

Share this post


Link to post
Share on other sites

a lighter wheel will tend to have a lower load rating and thus deform more under the same amount of weight

I'm not very knowledgeable on that, but I thought one of the selling points of super singles was to have the same load rating than double wheels for half(?) the weight. I know you said "tend" but it's because of cases like this that imo tire softness should only depend on the dedicated setting.

BTW: I discovered the bug when trying to give a realistic mass to some super singles.

 

the weight also affects friction which affects how fast it sinks in the swamp, the lighter it is the more the wheels spin and the faster it sinks.

Yes, but it is the global weight of the vehicle that matters, not just the weight of the wheel. A 100kg wheel under 5t of chassis weight should perform like a 600Kg wheel under 4.5t, which isn't the case atm.

 

I always thought the heavier the wheel the stiffer it made the suspension strength and damping. worked something like wheelmass*suspensionstregth= final suspension strength.

It's a possibility, in which case

-As you said, suspension stiffness would be proportional to wheel mass. That would be a strange design choice, but it's possible.

-Wheel stiffness would be dependent on wheel mass AND softness, which would be a poor design choice as explained above.

-Spinning set aside, mud would become softer when under lighter wheels, which would be a bug. I could understand that the mud becomes softer under a heavy vehicle, to emulate the fact that heavy things sink faster, but mud softness shouldn't only/mostly depend on wheel mass.

 

The combination those 3 effects would give the impression of an unknown force pressing down vehicles with lighter wheels.

 

EDIT: I took an uaz, added a winchpoint on the roof and tried to winch myself up, results:

1-with chassis weight=1400kg and light wheels I can barely winch up, but it is enough to take all wheels off the ground. I assume the winch's max pull is about 1600kg.

2-with chassis weight=10kg and superheavy wheels I cannot winch up.

3-with chassis weight=800kg and heavy wheels I get the same behavior than in test 1.

 

Conclusion: there is no extra force pushing trucks downward when they have lighter wheels, it's just that suspension, tires, and most importantly: MUD suddently become softer, giving the impression that the truck became a lot heavier.

Share this post


Link to post
Share on other sites

Yes, but it is the global weight of the vehicle that matters, not just the weight of the wheel. A 100kg wheel under 5t of chassis weight should perform like a 600Kg wheel under 4.5t, which isn't the case atm.

 

i'm not sure about in the mud but in general, the wheel mass seems to affect grip a lot more than the total mass. the wheel mass seems to add grip while the body mass seems to take it away. (try a steep hill climb in a light vehicle with heavy wheels, then bump up the weight of the body or reduce the wheel mass (by a lot) and it will not do as well) on flat ground in the mud body mass seems to add grip until you get to a certain point then it seems to subtract it where as adding wheel mass seems to always help

It's a possibility, in which case

-As you said, suspension stiffness would be proportional to wheel mass. That would be a strange design choice, but it's possible.

-Wheel stiffness would be dependent on wheel mass AND softness, which would be a poor design choice as explained above.

 

The combination those 3 effects would give the impression of an unknown force pressing down vehicles with lighter wheels.

the suspension I have tested extensively trying to figure out good crawler settings, if you change only the wheel weight you'll notice the suspension flex and softness change drastically along with ride height. the softness/flex of the wheels I believe is affected by the total weight  but other than that yeah seems right as to how it acts in game. and asfar as the effect in mud I have no idea that crap is voodoo to me, I know heavier trucks sink to the bottom but tend to keep going (within a range that's relative to their tiremass and friction) and lighter ones get stuck (in game) and I think wheel width also plays a bit of a  roll

 

I don't think the winch force is constant either. I've never fiddled with it to figure out what its set off of though.but think of the maz2/het winch vs the uaz winch one is way more powerful.

 

edit: I think the pros of super singles are less rolling resistance (aerodynamics) which equal better fuel economy and better handling. not sure if the tires themselves are lighter but the rims might be, the tire would probably need to have more plys than duals to support the same weight so itd probably be heavier

Share this post


Link to post
Share on other sites

Spent a lot of time digging through the exe (hence the late reply), and found out part of how suspension stiffness and tire deformation works. Basically the stiffness from the xml is multiplied by 1/( 1/[mass_of_tire] + 1/[mass_of_other_body] + epsilon )

epsilon is a small something (1.2e-7) just to guarantee we never end up with 1/0, you can ignore it.

For those allergic to maths, the equation means that stiffness is roughly proportionnal to the mass of the lightest body involved.

 

In the case of suspension it is interesting to note that it is only the masses of the wheel and its parent frame that are used, NOT the whole chassis. That means in theory wheels parented to a 1kg suspension joint should have their suspension stiffness nearly independent from wheel mass.

You can confirm that parent frame mass affects suspension stiffness by taking an uaz with superheavies, setting suspension strength around 0.005 and chassis mass to 10. Bumping the mass to 100 raises the chassis.

 

For tire deformation, it's the mass of the wheel vs the mass of whatever you're rolling over (the world has an infinite mass) that is used. And thus when you have light soft wheels, the virtual spring between the wheels and the ground may not be strong enought to push the truck upward, so your wheels clip through the ground.

This can be experienced on a kraz 255 with light soft wheels.

I haven't found how sinking into the mud works yet, but here's my guess: mud is a soft body of infinite mass, thus its stiffness is directly proportional to the mass of the thing that is over it (ie: wheels, branches, rocks...).

The thing I wonder is why Pavel didn't simply put constants like when we define the vehicle's chassis.
 

 

I know heavier trucks sink to the bottom but tend to keep going (within a range that's relative to their tiremass and friction) and lighter ones get stuck (in game) and I think wheel width also plays a bit of a  roll

And another weird thing is that the wider your tires, the more you spin in the mud. A kraz 255 with 6m wide "tires" in the swamp spins its rollers a lot more that when they are 50cm wide.
 

 

I don't think the winch force is constant either. I've never fiddled with it to figure out what its set off of though.but think of the maz2/het winch vs the uaz winch one is way more powerful.

You're right there: a 5t uaz with superheavies and a driver cannot winch itslef up to the hook of my crane truck, but the truck can winch the (empty) uaz all the way up.... This or Sasha needs to go on a diet, but anyway it doesn't change the results of the winching experiment in my previous post.
 

 

rolling resistance (aerodynamics)

 

As an enginner I can tell you that rolling resistance has nothing to do with aerodynamics.
-Rolling resistance comes from the effort you have to do to deform the tires (esp. their rubber) when rolling. That's why irl stiff tires have less rolling resistance than deflated ones: they morph less.
-Resistance to movement in the air is called drag. Even if the air does oppose resistance to a truck that rolls on a road, it is not called "rolling resistance". After all a tire rolling on a conveyor belt faces rolling resistance but no drag (purists will argue that there is still an insignificant skin drag, yes, yes, that is correct).

 

 

not sure if the tires themselves are lighter but the rims might be, the tire would probably need to have more plys than duals to support the same weight so itd probably be heavier

 

If you do a google query for "super singles weight" you'll get several results saying that super singles are lighter than doublewheels.
 

Share this post


Link to post
Share on other sites

Eh, diagnosed pretty accurately what was going on.
As opposed to what I thought, the source of all evil isn't in russia, but in Havok's user guide, in the chapter on motors:

// Create a callback function
void HK_CALL SampleCallbackFunc(const hkpCallbackConstraintMotor& motor, const hkpConstraintMotorInput*
input, hkpConstraintMotorOutput* output)
{
    // We’re not interested in achieving a specific velocity
    output->m_targetVelocity = 0.0f;

    // We compute relative targetPosition for the motor i.e. our spring’s rest point.
    // This is computed directly from the given input.
    output->m_targetPosition = input->m_deltaTarget + input->m_positionError;

    // These are desired spring constant and dumping.
    // Those values need to be converted into simple tau and damping parameters used by the solver.
    hkReal springConstant = 100.0f;
    hkReal springDamping = 5.0f;
    hkReal invMass = 1.0f / input->m_virtualMass;
    hkReal dt = input->m_stepInfo->m_substepDeltaTime;

    // Forces applied by the solver are proportional to tau and virtual mass of involved bodies.
    // Spring force is independent of the bodies’ masses therefore we divide tau by their virtual mass.

    // To convert tau to solver space we multiply it by dt^2
    hkReal tau = springConstant * dt * dt * invMass ;
    output->m_tau = hkMath::clamp( tau, 0.0f, 1.0f );

    // Solver damping is computed analogically to tau.
    // To convert damping to solver space we multiply it by dt
    hkReal damp = springDamping * dt * invMass;
    output->m_damping = hkMath::clamp( damp, 0.0f, 1.0f );

    // Explicitly specify minimum and maximum forces that the motor can apply.
    output->m_maxForce = motor.m_maxForce;
    output->m_minForce = motor.m_minForce;
}

so the relationship I found earlier wasn't Pavel trying to reinvent the laws of physics, but part of Havok's internals.
Pavel just forgot to counter this by multiplying suspension strength and damping by [ 1/wheelmass + 1/parent_frame_mass ] (and probably dt too)

 

For tire deformation, dividing pWheelParams->fSoftForceScale by wheelmass makes light wheels deform less that heavy ones, so that too much countering.
Empirically, multiplying fSoftForceScale by 20/sqrt(wheelmass) seems to make deformation independant from wheelmass, but I don't see where this sqrt comes from.

 

Finally concerning swamp sinking, you have a function that decides whether or not to deform the mud, which contains something like:

hkReal WeightRatio=min(TotalWeighOnWheel/4000.0 , 1.0);
hkReal DeformationAmount=WeightRatio*abs(Something.GetMudDeformationFactor())*1.2;
if( DeformationAmount > 0.0001)
{
    EnterCriticalSection(...);
    ApplyStaticMudDeformation( void* , void* , DeformationAmount);
    LeaveCriticalSection(...);
}
return;

BTW: the weight of the wheel isn't counted in TotalWeighOnWheel, I think it's a bug.
TotalWeighOnWheel is just the total weight of the chassis with all addons divided by the number of wheels, no fancy mass repartition there. Fair enough.
It doesn't take any truck you stack ontop of yours (or your trailer) into account either.

Anyways that GetMudDeformationFactor() basically looks like:

hkReal ::GetMudDeformationFactor()
{
    if (this->SomePtr==NULL)
    {
        return GetContactForce(pWheelBodyInfo, pGroundBodyInfo ?, void*, void*, void*);
    }
    else
    {
        return *(this->SomePtr);
    }
}

In that GetContactForce you're doing what I assume to be vector_product(torque,BarycenterToContactPoint) + force (ie: moving a screw) for the wheel and the ground. The problem is that the "force" vector is multiplied by invMass earlier, causing GetContactForce and GetMudDeformationFactor to return much higher values for light wheels.
Ultimately this is why you sink in the swamps with light wheel but not with superheavies.

Disclaimer: function and variable names are something I came up with given their behavior, they can be something very different in your source.

 

Share this post


Link to post
Share on other sites

Very interesting reading material.

Share this post


Link to post
Share on other sites

BTW: the weight of the wheel isn't counted in TotalWeighOnWheel, I think it's a bug.

 

TotalWeighOnWheel is just the total weight of the chassis with all addons divided by the number of wheels, no fancy mass repartition there. Fair enough.

 

Which quite nicely explains why when a wheel is 'light' the vehicle sinks more easily into the mud than if the wheel is 'superheavy'.

 

On a 10000kg truck with 4 wheels, since it appears that the wheel mass gets subtracted from the wheel's ParentFrame mass and as noted it does not get added back on when computing the wheel loading:

  • With 'light' wheels (50kg each) it's TotalWeightOnWheel is 2450kg per wheel
  • With 'medium' wheels (100kg each) it's TotalWeightOnWheel is 2400kg per wheel
  • With 'heavy' wheels (200kg each) it's TotalWeightOnWheel is 2300kg per wheel
  • With 'superheavy' wheels (600kg each) it's TotalWeightOnWheel is 1900kg per wheel

While it doesn't seem like much, if the ground can only take 2200kg per wheel-contact-area only the truck with superheavy wheels will be able to traverse the area without breaking through the surface, so on a practical level it really does make a big difference.

Share this post


Link to post
Share on other sites

@PressureLine: It's not exactly how it works. When you are not rolling, GetMudDeformationFactor()'s output is roughly inversely proportional to wheelmass, so there the test to determine mud sinking basically looks like:

Force * 1.2 * TotalWeightOnWheel / (4000 * Wheelmass) > 0.0001

Wheelmass and TotalWeightOnWheel are combined multiplicatively, not additively, so you are about 12 times more prone to sinking with light wheels than with superheavies.

 

To give you some numbers, I took an uaz, set its root body's mass to 10t (mudgards left to 10kg), and looked at TotalWeightOnWheel and GetMudDeformationFactor()'s output in the swamp:

With superheavy wheels:

TotalWeightOnWheel: 2510 (constant)

GetMudDeformationFactor()'s output:

0.0434155277907848358
0.0487766526639461517
0.0587772987782955169
0.0533284507691860198
0.0428974665701389312
0.0513254478573799133
0.0587635785341262817
0.0484919920563697814

(average: 0.05)

 

With light wheels:

TotalWeightOnWheel: 2510 (constant)

GetMudDeformationFactor()'s output:

0.8850137591361999511
0.0696121156215667724 (wtf?)
0.8254403471946716308
0.8997780680656433105
0.8889556527137756347
0.0690835788846015930 (wtf?)
0.8232494592666625976
0.9001841545104980469

(average: 0.67)

 

Normally I'd expect the light wheel average to be 12x the superheavy's but it's 13x there, probably because the car unevely sank when I changed the wheels.

 

EDIT: wait a minute, when you move a force/torque screw (the math object) it's the forces that you multiply by distance, not the torques, so either I swapped torques and forces in my previous post, or I'm looking at a velocity screw.

Hmm...values on the rotating part are close to the angvel displayed by the "info" tool, but that would mean a static truck in the mud has a non 0 linear Y velocity... (What the hell am I looking at?)

Share this post


Link to post
Share on other sites

 this info needs to be saved somewhere like in the wiki a sticky idk, this explains so much better, over what can be observed by tweaking xmls and watching trucks.

 

good job

Share this post


Link to post
Share on other sites

No doubt the only rational explanation I have found is that the name of the wheels weight ie light-Superheavy is directly related to the total weight that will be applied to them... And this seems to tell the story in its entirety. But in a nutshell that seems to be the case. So this is good info! Very nice find.

Share this post


Link to post
Share on other sites

 this info needs to be saved somewhere like in the wiki a sticky idk, this explains so much better, over what can be observed by tweaking xmls and watching trucks.

 

good job

 

or send it to pavel

Share this post


Link to post
Share on other sites

this may sound really dumb but is the 'wheelmass' just a way to simulate surface pressure ie its the vehicle mass that exerts pressure on the ground and the wheel mass value determines how much of the vehicle mass is factored out of the equation by the wheels. i might be reading it wrong but maybe its not a bug

 

lol im pretty sure im out of my depth here im no maths whizz nor do i have any experience tinkering with the vehicle files but could it have been done the way it has to facilitate the implimentation of a wide range of vehicles from bikes to tanks?

 

just pretend im not here if im talking nonsense

Share this post


Link to post
Share on other sites

Nah, can't be, because:

1-It would not explain why the mass of the wheels affects the rigidity of the suspension (check OP for pictures).

2-In real life ground pressure = total vehicle weight * 9.81 / contact surface. And since it's the total vehicle weight that matters, there is no reason to subtract wheel mass from vehicle mass.

 

If you're thinking that we tell the game how much the whole truck weights, and then what part of this weight belongs to the wheels, let me remind you that you exert the same pressure and thus sink the same way with a 9t chassis + 1t of wheels, and with 9t on wheels + 1t of chassis (as long as the wheels have the same shape). This is not what happens ingame.

Share this post


Link to post
Share on other sites
Localhost, on 26 Apr 2016 - 7:30 PM, said:

Nah, can't be, because:

1-It would not explain why the mass of the wheels affects the rigidity of the suspension (check OP for pictures).

2-In real life ground pressure = total vehicle weight * 9.81 / contact surface. And since it's the total vehicle weight that matters, there is no reason to subtract wheel mass from vehicle mass.

 

If you're thinking that we tell the game how much the whole truck weights, and then what part of this weight belongs to the wheels, let me remind you that you exert the same pressure and thus sink the same way with a 9t chassis + 1t of wheels, and with 9t on wheels + 1t of chassis (as long as the wheels have the same shape). This is not what happens ingame.

i was thinking that the wheels are essentially weightless but are assigned a value that represents the amount of total vehicle weight they make dissapear thus simulating lower ground pressure.  but my real concern is do i want to intall this mod which depends on my agreeing with this wheelmass bug. could you give me an example regarding how this bug effects my gameplay?

Share this post


Link to post
Share on other sites

i was thinking that the wheels are essentially weightless but are assigned a value that represents the amount of total vehicle weight they make dissapear thus simulating lower ground pressure.

1-And thus "superheavy" would correspond to lower pressure?

2-Internally the physics engine (Havok) creates an object that has the mass you specify in the wheel's xml, so they are not weightless.

3-And that still doesn't explain the variation in suspension stiffness.

 

 could you give me an example regarding how this bug effects my gameplay?

Read OP.

Share this post


Link to post
Share on other sites
Localhost, on 26 Apr 2016 - 9:19 PM, said:

1-And thus "superheavy" would correspond to lower pressure?

2-Internally the physics engine (Havok) creates an object that has the mass you specify in the wheel's xml, so they are not weightless.

3-And that still doesn't explain the variation in suspension stiffness.

 

Read OP.

1 yes superheavy would correspond to low ground pressure.

2 i assumed the terms wheelmass and superheavy were just designations chosen by the author and super heavy isnt a specific mass (im assuming the total vehicle weight is a specific mass ie a numerical value)

3 like superheavy wheels would make weight dissapear super light would make weight appear. thats where my idea about future proofing the code came from, the wheel weight extremes being reserved for the vehicle extremes ie bikes-tanks.

 

but anyway im not cliaming to be right or anything just an idea

 

i did read the op but i dont mess with the vehicle values. would this bug fix effect my vanilla gameplay at all?

Share this post


Link to post
Share on other sites

1: ...And that would be bug since when someone increases the weight of his wheel he expects to increase total vehicle weight and thus its ground pressure.

 

2: Superheavy and other preset values map to specific constants, an shown in an extract of the game's code that has been posted by Oovee on this forum

    LPCSTR pszMassType = GetXMLString(nodeType, "Mass", "", true);
	if (strcmp(pszMassType, "Light") == 0) {
	 bodyInfo.m_mass = 50.f;
	} else if (strcmp(pszMassType, "Medium") == 0) {
	 bodyInfo.m_mass = 100.f;
	} else if (strcmp(pszMassType, "Heavy") == 0) {
	 bodyInfo.m_mass = 200.f;
	} else {
		if (strcmp(pszMassType, "Superheavy") != 0)
		{
			WriteLog("Game| Unrecognized wheel mass type %s", pszMassType);
		}
		bodyInfo.m_mass = 600.f;
	}

If you're no programmer, here's the translation:

-if you say Mass="Light" your wheel weights 50kg.

-if you say Mass="Medium" your wheel weights 100kg.

-if you say Mass="Heavy" your wheel weights 200kg.

-if you say Mass="Superheavy" (or do not fall in any other category) your wheel weights 600kg.

 

It's not in the extract, but afterwards Havok creates a body with the specified mass. Same goes for the chassis which has the exactly the mass you submit, not what_you_enter - wheel_mass. So if your theory were what is used, then the mass of the body used in the physics simulation wouldn't match the mass used for ground pressure/suspension stress/tire deformation calculations. That would also be a bug.

i did read the op but i dont mess with the vehicle values. would this bug fix effect my vanilla gameplay at all?

Well with my bugfix, light wheels (ex: uaz) sink less into the ground, heavier (ex: K/D/E types) sink more, not the other way around.

 

 

Oh and if there is a 20t modded truck over light soft wheels, at least its wheels won't clip through concrete ground.

Share this post


Link to post
Share on other sites
Localhost, on 26 Apr 2016 - 11:31 PM, said:

1: ...And that would be bug since when someone increases the weight of his wheel he expects to increase total vehicle weight and thus its ground pressure.

 

2: Superheavy and other preset values map to specific constants, an shown in an extract of the game's code that has been posted by Oovee on this forum

    LPCSTR pszMassType = GetXMLString(nodeType, "Mass", "", true);
	if (strcmp(pszMassType, "Light") == 0) {
	 bodyInfo.m_mass = 50.f;
	} else if (strcmp(pszMassType, "Medium") == 0) {
	 bodyInfo.m_mass = 100.f;
	} else if (strcmp(pszMassType, "Heavy") == 0) {
	 bodyInfo.m_mass = 200.f;
	} else {
		if (strcmp(pszMassType, "Superheavy") != 0)
		{
			WriteLog("Game| Unrecognized wheel mass type %s", pszMassType);
		}
		bodyInfo.m_mass = 600.f;
	}

If you're no programmer, here's the translation:

-if you say Mass="Light" your wheel weights 50kg.

-if you say Mass="Medium" your wheel weights 100kg.

-if you say Mass="Heavy" your wheel weights 200kg.

-if you say Mass="Superheavy" (or do not fall in any other category) your wheel weights 600kg.

 

It's not in the extract, but afterwards Havok creates a body with the specified mass. Same goes for the chassis which has the exactly the mass you submit, not what_you_enter - wheel_mass. So if your theory were what is used, then the mass of the body used in the physics simulation wouldn't match the mass used for ground pressure/suspension stress/tire deformation calculations. That would also be a bug.

Well with my bugfix, light wheels (ex: uaz) sink less into the ground, heavier (ex: K/D/E types) sink more, not the other way around.

 

 

Oh and if there is a 20t modded truck over light soft wheels, at least its wheels won't clip through concrete ground.

maybe ill give it a try. although im convinced theres something else to it.

 

i kinda think the rate at which the vehicles sink on plains for example looks about right but the tire deformation is all wrong the tires on the uaz deform way too much i would even say the stock tires on the kraz do too among others. the tires on the maz 535 and 7310 arguably deform correctly but could possibly stand to deform more before the effects become too pronounced. also the kraz and most if not all of the 6x6's suffer clipping of the rear tires on most add-ons (carrage cistern ect) which i imagine would be fixed to an extent by your bugfix. so if the a b and c type sink less and the d e and k sink more as a result of your fix i suppose there could be something too it im just not sure the d e and k should be sinking more. they seem to sink plenty as it is. would it even be conceivable to effect changes that isolated the the suspension stress/tire deformation from the ground pressure or are they a package deal

Share this post


Link to post
Share on other sites

×
×
  • Create New...