Re: Vehicle configuration

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Re: Vehicle configuration

Postby e3dalive » Wed Oct 28, 2015 10:41 am

all my videos uses old version of newton vehicle. I've tried the new one, but car keeps flying :D, when it's stable it works, but for some reason is heavier then linearcast version and it jumps when it goes from mesh to mesh. In turning the car i didn't notice any differences from previous linearcast version. Maybe because in my tests car didn't go faster then 30kmph. The new version is on hold for me, untill it will stop jumping and become more stable, but it's so much better then linearcast one. My last video of new newton car is here http://www.youtube.com/watch?v=KHEJlokf0X0
my params:
mass: 1484.000000
2?whs[i].m_radius0=0.309575
2?whs[i].m_radius1=0.309575
2?whs[i].m_mass0=10.000000
2?whs[i].m_mass1=10.000000
2?whs[i].m_width0=0.177436
2?whs[i].m_width1=0.177436
2?whp[i].m_length0=0.280000
2?whp[i].m_length1=0.280000
2?whss[i].m_strength0=4000.000000
2?whss[i].m_strength1=4000.000000
2?whss[i].m_dampingRatio0=80.000000
2?whss[i].m_dampingRatio1=80.000000
2?whss[i].m_lateralStiffness0=10000.000000
2?whss[i].m_lateralStiffness1=10000.000000
2?whss[i].m_longitudialStiffness0=10000.000000
2?whss[i].m_longitudialStiffness1=10000.000000
0?AxleSync=0
0?WheelHeightSync=0
5?suspension.m_wheelParams[i].m_hardpointChassisSpace0=1.340000 -0.000000 -0.730000 0.000000
5?suspension.m_wheelParams[i].m_hardpointChassisSpace1=1.340000 0.000000 0.730000 0.000000
5?suspension.m_wheelParams[i].m_hardpointChassisSpace2=-1.300000 0.000000 -0.730000 0.000000
5?suspension.m_wheelParams[i].m_hardpointChassisSpace3=-1.300000 0.000000 0.730000 0.000000
2?transmission.m_wheelsTorqueRatio[i]0=0.500000
2?transmission.m_wheelsTorqueRatio[i]1=0.500000
2?transmission.m_wheelsTorqueRatio[i]2=0.000000
2?transmission.m_wheelsTorqueRatio[i]3=0.000000
2?CarEngineBoost=3.000000
2?transmission.m_primaryTransmissionRatio=4.210000
2?transmission.m_reverseGearRatio=3.550000
2?transmission.m_gearsRatio[i]0=3.730000
2?transmission.m_gearsRatio[i]1=2.050000
2?transmission.m_gearsRatio[i]2=1.390000
2?transmission.m_gearsRatio[i]3=1.030000
2?transmission.m_gearsRatio[i]4=0.790000
2?engine.m_minRPM=300.000000
2?engine.m_maxRPM=5500.000000
2?transmission.m_downshiftRPM=1200.000000
2?transmission.m_upshiftRPM=2500.000000
4?COM=0.020000 -0.300000 -0.000001
2?HBrake=4000.000000
2?SBrake=4000.000000
e3dalive
 
Posts: 87
Joined: Thu Feb 05, 2015 5:20 am

Re: Vehicle configuration

Postby Julio Jerez » Wed Oct 28, 2015 1:00 pm

yes that is a bug with the tire collision that I have got the time to fix.
I see if I can spend some time the weekend finding it.

I tried to fixed with out haven to add any special code, but the may required too much work that will affect all the collision code, so I will see how to special case the collision.
It is no really a bug, is I an intended side effect of edge collision.
Julio Jerez
Moderator
Moderator
 
Posts: 11039
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Vehicle configuration

Postby collerblade » Thu Oct 29, 2015 3:27 am

e3dalive: can u try how fast u can be with the newest vehicle?
Which version your older code is? can u pass me the vehicle related parts? Is it raycast-vehicle? or is it the newer multibody version?

Julio: why we are tring multibody vehicle again? As u can see, e3dalive is using 30cm sized wheels too. So their cars speed will be limited to ~100km/h (~60mph). Maybe the wheels pulling back the car, maybe the friction can be better, but the rotation limit in newton is just killing us again. We played this game years ago, do u want to do it again?
Last time i checked (2014), u were using convex cast cars. I thought thats was a good way... that code was flexible (i mean i could implement a 3 wheel vehicle too, but i cant now...).

(I tried bullet for a short period of time. They dont have the body rotation limit. But noone implemented a good vehicle base on multiple bodies and joints. There is only a horrible acting raycast car there...)

collerblade
collerblade
 
Posts: 88
Joined: Mon Apr 05, 2010 12:09 pm

Re: Vehicle configuration

Postby Sweenie » Thu Oct 29, 2015 5:26 am

Are you using the latest build? In that case the car has a hardcoded limit of 2 gears just to limit the car going too fast for the friction tuning test.
Comment the following line in CustomVehicleControllerManager.cpp (line 610) if it's there...
Code: Select all
m_data.m_gearsCount = 2 + D_VEHICLE_FIRST_GEAR;

and change back to
Code: Select all
m_data.m_gearsCount = info.m_gearsCount + D_VEHICLE_FIRST_GEAR;


Last time i tested the viper with default demo values it reached about 150 km/h before falling off the plane.
Sweenie
 
Posts: 490
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

Re: Vehicle configuration

Postby collerblade » Thu Oct 29, 2015 9:28 am

its already done in the current build.
And my car cant go faster then 100km/h (with 30cm tire radius). Maybe the viper uses larger tire radius..
collerblade
 
Posts: 88
Joined: Mon Apr 05, 2010 12:09 pm

Re: Vehicle configuration

Postby e3dalive » Thu Oct 29, 2015 10:49 am

I'm using newton SVN: 2388 from 21 aug for linearcast vehicle.
i've tested the new vehicle from SVN: 2482 the latest one.
i can't test the max speed of the vehicle because it keeps jumping, but in demos sandbox i remember i could pull 120kmph.
Also i'm using 120hz timestep in my videos, you can try it maybe more iterations will reduce your problem.
i remember once i had bug where i couldn't go past 100kmph, turns out it was problem with strength of the car joint[the higher the speed the less stable it is, i increased it and it let me simulate higher speeds], you could try that(but that was for linearcast vehicle, don't know if it work on the new one).
e3dalive
 
Posts: 87
Joined: Thu Feb 05, 2015 5:20 am

Re: Vehicle configuration

Postby Julio Jerez » Thu Oct 29, 2015 9:20 pm

collerblade wrote:its already done in the current build.
And my car cant go faster then 100km/h (with 30cm tire radius). Maybe the viper uses larger tire radius..

I though I said that you can change the code and set eh limit to a larger angle.

I gave before an example as to why the limit is necessary, but I do no thong the example was clear, so I will try the explanation again.
The physical simulation required an integration fiction to advance the state of each mode in the scene. Now the simulation method is numerical, in Newton is Runge Kutta order 4 which is very one of the most stable method but at the same time one of the reason newton is not as fast as other impulse engines.
In addition Newton 3.14 also has a new solver for special configuration of joints like vehicle and rag doll, so that too allowed smaller errors, and is it what allows for the vehicle to be simulation like any other configuration o joints.

This sound very good, and in fact is, however it does no prevent the problem of numerical error that come from numerical integration. is you have and object that spin with a very high frequency, to nee to sampling rate that is at least half the period of the frequency other wise the amount of error that is introduced in each sample is so large that you can no recover the signal.
The only way to bypass that problem is by having a large simulation rate.
Rat cast vehicle do no have the problem because ray cast vehicle are no multimode simulation.

However for a vehicle that problem can be solve very simply, because we know the condition in which the tire move.
Basically the vehicle code need to some how prevent the tires from being integrated by adding some options, or do some post processing when the tire is projected to the projected location after each integration. I opened for increasing the max rotation angle per step, but I can see now that this is not enough for small tires, so I will add the error correction, this weekend.
Julio Jerez
Moderator
Moderator
 
Posts: 11039
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Vehicle configuration

Postby collerblade » Tue Nov 10, 2015 1:23 pm

its already done in the current build.
And my car cant go faster then 100km/h (with 30cm tire radius). Maybe the viper uses larger tire radius.
.
Julio it wasnt for u.
I gave before an example as to why the limit is necessary, but I do no thong the example was clear, so I will try the explanation again.

It ok i dont have problem with this.
However for a vehicle that problem can be solve very simply, because we know the condition in which the tire move.
Basically the vehicle code need to some how prevent the tires from being integrated by adding some options, or do some post processing when the tire is projected to the projected location after each integration. I opened for increasing the max rotation angle per step, but I can see now that this is not enough for small tires, so I will add the error correction, this weekend.

Any upgrade on this?

I incrassed the simulation frequency for 120hz for the moment, so the car works perfectly. Also upgraded from the current 3.14 version.
I have 2 noticable problems now.
1 This misterious edge-edge detections couses the tire jump sometime. However on 120hz its not very noticable.
2. Im using the "viper" settings for the car. And the tire keeps rolling after the car hits the wall. Even if no torque added by the user. It slowes down slowly. I can post a video if this isnt clear. Maybe its just a question of settings.

Thx
collerblade
 
Posts: 88
Joined: Mon Apr 05, 2010 12:09 pm

Re: Vehicle configuration

Postby e3dalive » Thu Nov 12, 2015 7:54 am

can you record a video of you car jumping and spinning the wheel i want to compare it to mine, it may be because of some friction settings?
Julio Jerez: any progress on vehicle?
e3dalive
 
Posts: 87
Joined: Thu Feb 05, 2015 5:20 am

Re: Vehicle configuration

Postby collerblade » Sun Nov 29, 2015 4:44 am

Any progress on the car, or the edge-edge collision jumping problem?

I exidently revealed another bug in the car. If i create a brake controller and add all 4 tires, only the front 2 wheels are braking. The rear's are rotating freely.
collerblade
 
Posts: 88
Joined: Mon Apr 05, 2010 12:09 pm

Re: Vehicle configuration

Postby collerblade » Sun Nov 29, 2015 4:52 am

e3dalicve:
I do not set any physics materials at all. I use newton defaults everywhere.
What do u use for tires?
collerblade
 
Posts: 88
Joined: Mon Apr 05, 2010 12:09 pm

Re: Vehicle configuration

Postby e3dalive » Wed Dec 02, 2015 3:53 am

i didn't notice any problems with brakes, i use custom materials with friction at 0.8 and override car wheel material to also match 0.8 friction.
e3dalive
 
Posts: 87
Joined: Thu Feb 05, 2015 5:20 am

Previous

Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 1 guest