Vehicle help

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Vehicle help

Postby TheoLogic » Mon Dec 29, 2008 2:11 pm

Hellows

Can someone tell me how to add grip to the tires of a vehicle.
I'm using newton 2.0 in the LeadWerks engine. The problem is when putting a big amount of torque on a wheel it spins out of control. So at this moment, I put a downwards force on the body, making it drivable. But at lower framerates, the vehicle starts buming around...
Any help would be appreciated!

Cheers
TheoLogic - Portfolio.
Wiki - Personal wiki pages.
TheoLogic
 
Posts: 35
Joined: Thu Oct 02, 2008 5:27 am

Re: Vehicle help

Postby TheoLogic » Wed Dec 31, 2008 3:51 am

Nobody has an idea?
TheoLogic - Portfolio.
Wiki - Personal wiki pages.
TheoLogic
 
Posts: 35
Joined: Thu Oct 02, 2008 5:27 am

Re: Vehicle help

Postby Dave Gravel » Wed Dec 31, 2008 12:38 pm

The best idea that I can have is to wait the next beta.
Because all method that I use with my demos is only some experimental tests.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Vehicle help

Postby Julio Jerez » Thu Jan 01, 2009 10:21 am

TheoLogic wrote:The problem is when putting a big amount of torque on a wheel it spins out of control. So at this moment, I put a downwards force on the body, making it drivable. But at lower framerates, the vehicle starts buming around...

That's a problem you will always have when evaluating a differential equation at a fix sampling rate.
The error is a function of the rate and the non linearity of the function.
In the car when you apply a big torque you increase the amount of non linearity, so evaluating the function a low sampling rate (low frame rate) will make the error too large to reflect and realistic behavior.
using tricks like extra down forces, or higher friction will only increse the non linearity making the behavior worse.

The car joint in 2.0 is the same joint that was in 1.53 with the exception of the sampling rate.
In 1.53 I added a special sub sampling just for the car, but I took that out in 2.0 because I thought that engine was fast enough that people could do it themselves.
Maybe I need to put that functionality back.

Could you try this experiment and let me know if it makes be batter, then I will know what to do?
Make the physics time step say three time faster (180 or 200 fps)
You could try a simple level so that the experimental demo is playable; if it is better than I will add the option of sub sampling rate to joints.
That is if a car joint and all of it child joint get more a higher FPS, that way the physic tiem is oly increased when it count.

Please can you run that test for me?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Vehicle help

Postby Julio Jerez » Fri Jan 02, 2009 2:43 pm

If you are reading this, please tell me if you run the test?
I believe it is better if you discuses car issues here rather asking Leadweek, he is no going to be able to help you with the specific physics problem as much as I can, he already integrated the engine in a way the it is easy to do updates from the end user side, so that allowe me to help you out sine I can see the joint DLL which is open source.

Simple car physics is a physic modeling problem, it is not a physics simulation problem.
As such is full of voodoo magic because there are no theoretical laws of physics that can represent a tire model.

I know you have made many post, but most of them has been very vague, and most you have made out of anger. Not one had tried to fool you I know I certainly have not.
I want to help but for me to do that I need some cooperation.
I simple test demo showing way you want go a long way in helping out,
It get you what you want, it help me and it help leadwerk.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Vehicle help

Postby Leadwerks » Sat Jan 03, 2009 2:42 am

He won't be able to do most of that from the engine commands. I too have noticed the wheels are really hard to control, and I didn't have any trouble in the version 1.53 vehicle. Most people are just going to add a constant torque based on keyboard input.

In 1.53 I added a special sub sampling just for the car

Can you provide some code showing how I should modulate the torque? Or maybe the old functionality should be restored? I was satisfied with the vehicle behavior in 1.53.

I can't promise another example soon, since I am moving next week.
User avatar
Leadwerks
 
Posts: 569
Joined: Fri Oct 27, 2006 2:54 pm

Re: Vehicle help

Postby Julio Jerez » Sat Jan 03, 2009 10:18 am

like I said in 1.53 the simulation rate was sub sample at a higher time step, the by itself make the calculation more accurate when high values were applied, you are using a low simulation time and interpolation.
I know that in addition to that the vehicle parameters where very out of range from demo last demo you send me. That leads to a system with a very high condition number that do no converge to a solution even if you increase the simulation rate say to 180 fps.
So as a test if the car behaves better by increasing the frequency, then you know where that problem can be calibration or that the error is increasing too much with high values.
It is very difficult for me to give an answer to a question like “I need help, the tire lose grip” and the ether is no follow up.

I will add the sub sampliing funtionality to the joints, but I do not think it will help him if the car is set up the same way the car was set in the last demo you send me.
Plus it will take a long time for him to see the result.
I can see a protype demo then can see the fiunal effect and the solution is final, allowing you and him can make final corrections.
All I can do is testing it in teh SDK samples but you do no treally go by those demos.

if I remember in you test the car body was mass 10 and the tires like 100, making a vehicle with tire 40 time hevier than the car, and we do not really know what car result from and system like that.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Vehicle help

Postby Leadwerks » Sun Jan 04, 2009 3:51 pm

Can you make an example of a car with good behavior? I have no idea what most of the values should be.
User avatar
Leadwerks
 
Posts: 569
Joined: Fri Oct 27, 2006 2:54 pm

Re: Vehicle help

Postby Julio Jerez » Sun Jan 04, 2009 4:40 pm

I will make one, but there are many people who have different ideas of what that could be.
The moment I add any code to a joint, the code becames the bible for hwo to use the engine, when it is meant to be a sample to show how to use the engine.

I soppose that if I make one tah is stabnle and good enoghut it will be fine.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Vehicle help

Postby Leadwerks » Sun Jan 04, 2009 9:17 pm

What I have found is most of the time people don't appreciate or have time to care about your wonderful system you build. I am setting up some general-purpose game code for my engine because my users for the most part can't do it themselves. You have to make it easy for people.
User avatar
Leadwerks
 
Posts: 569
Joined: Fri Oct 27, 2006 2:54 pm

Re: Vehicle help

Postby Dave Gravel » Sun Jan 04, 2009 9:38 pm

The only problem when it is so easy, it is very limited too.
With vehicle many thing is possible, and many thing depending on the game type and on the way how your engine is implemented too.
The simulation that you need to get depending a lot more from your self implementation, a easy vehicle method can't fit good with all user request.
From my experience the most simple is to have a complet vehicle method with all possible behaving and options and the user reduce this code in self engine.
On this way you can create some type of vehicles complex or simple or some with very special implementation like bike, tank and more....

I don't say it's a bad idea to make a simple vehicle method but the custom way is very not bad too.
The multibody vehicle and the old raycast vehicle in beta 17 is really close to a very nice solution for all.
I don't have seen change in the new beta about vehicle, but it is what i think about the vehicle simulation.

Many people cry and cry and do nothing special, I think sometimes it is better to try and try and learn.
Again from my experience by trying and learning you progressing a lot more faster that crying anytimes.

Leadwerk this message don't aim you, it's for all users.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Vehicle help

Postby Leadwerks » Mon Jan 05, 2009 2:52 pm

Yeah, I know, it's always a tradeoff. It's an interesting idea that I have thought about a lot in engine design.

My solution has been to make the core API low-level and give users access to everything, and then have a high-level set of open-source code that does what 90% of people want. It is still easy to use that way, but it doesn't limit the advanced users.

I guess Julio's approach of making the joint library is sort of the same, and it makes sense. But I think it is important to have one example of a reliable car, just so users have something to start with.

From my point of view, it is just that I have so much to do already, and I don't want to get into all the intricacies of the physics engine. I will spend some more time on joints and things this spring, but mostly I just want to get things set up quickly.
User avatar
Leadwerks
 
Posts: 569
Joined: Fri Oct 27, 2006 2:54 pm

Re: Vehicle help

Postby TheoLogic » Tue Jan 06, 2009 5:19 am

This is our problem at this moment, we don't have the core to try and try. We are limited to the implentation in the engine, which is very well done by Joshua.
That there are bugs is normal, but it's nice for everyone to get them solved out.
TheoLogic - Portfolio.
Wiki - Personal wiki pages.
TheoLogic
 
Posts: 35
Joined: Thu Oct 02, 2008 5:27 am

Re: Vehicle help

Postby Julio Jerez » Tue Jan 06, 2009 7:24 am

I know, I know.
Like I said I will make a better car by implemnet teh same technique I used in 1.53.
I will try that thsi week end.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Vehicle help

Postby TheoLogic » Tue Jan 06, 2009 10:17 am

We would really appreciate it!
Still have some work on the decals, particles, sounds and droppable parts for now, this weekend would be great!
TheoLogic - Portfolio.
Wiki - Personal wiki pages.
TheoLogic
 
Posts: 35
Joined: Thu Oct 02, 2008 5:27 am

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 16 guests

cron