Stunt Playground v1.0 released!!

Share with us how are you using the powerrrr of the force

Moderator: Alain

Postby kjelle69 » Sat Mar 12, 2005 3:06 pm

I have been experimenting a bit with spring and damper coefficients in carlab, Seems to be able to go at lest up to 3.0 on both.

Julio: what is the real max and min values of those ?
User avatar
kjelle69
 
Posts: 60
Joined: Fri Aug 27, 2004 9:08 am
Location: Koskullskulle, Sweden

Postby _Tux_ » Sat Mar 12, 2005 3:11 pm

ive currently got mine at

tireSuspensionShock := 1.0;
tireSuspensionSpring := 4.0; (gone as high as 6 in 1.30)
tireSuspensionLength := 0.2;

but the car still leans really badly in corners (its a sporty car so its not really ment to lean)
_Tux_
 
Posts: 81
Joined: Wed Sep 08, 2004 10:38 am
Location: UK

Postby Julio Jerez » Sat Mar 12, 2005 3:13 pm

There is not max, it was calibrated for critically damped at 1.0 for spring and 1.0 for the damper.
This calculation is done by solving a big matrix with all of the springs dampers set a the position, the mass and inertia and position of the bodies and the springs are very important factor in that matrix, so the parameterization around 1.0 for the spring and the damper only applied to the configuration I used in the tutorial.

So I think we all are learning what the best settings are with experimentation, I am learning a lot from this too.
Julio Jerez
Moderator
Moderator
 
Posts: 12425
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Postby _Tux_ » Sat Mar 12, 2005 3:21 pm

julio > whats the best way to calculate the mass matrix for a convex hull? (i think im doing it for a box at the moment)

Ixx := sMass * (BoxSize.x * BoxSize.y + BoxSize.z * BoxSize.z) / 12;
Iyy := sMass * (BoxSize.x * BoxSize.x + BoxSize.z * BoxSize.z) / 12;
Izz := sMass * (BoxSize.x * BoxSize.x + BoxSize.y * BoxSize.y) / 12;

box size is the bounding box of the mesh
_Tux_
 
Posts: 81
Joined: Wed Sep 08, 2004 10:38 am
Location: UK

Postby Julio Jerez » Sat Mar 12, 2005 3:43 pm

There are two theorems than can be used for that, one is called the divergence theorem or the gauss theorem. This allows converting any volume integral into an area integral

It is very cool because it simplyfied the solution of very complex integral like the inertia, cross inertia, volumes, very complex problem in electricity, and thermodynamics, and many other field, By just calculating the area of know primitives multiplying then by some constant and adding them together.
This is what Newton used to solve the buoyancy problem.

The other theorem is the Curl Theorem, which allow converting any area integral into a line integral,
For example if you have a triangle the Curl theorem say that the area of that triangle is proportional to the length of the three edges.

I do not used this part in Newton because it is more involve but lot of optimization can be done if a more sophisticated model is to implemented.
Applying this is extremely heavy math involve, I do not recommend to used if you are no doing some phd work of some other research .

In general the espresion

Ixx := sMass * (BoxSize.y * BoxSize.y + BoxSize.z * BoxSize.z) / 12;
Iyy := sMass * (BoxSize.x * BoxSize.x + BoxSize.z * BoxSize.z) / 12;
Izz := sMass * (BoxSize.x * BoxSize.x + BoxSize.y * BoxSize.y) / 12;


Will generate and inertial some larger than what you would get using the converge theorem, but not by much, so what I do is tha I apply a scale factor to make it a little smaller, something like:

Ixx := scale * sMass * (BoxSize.y * BoxSize.y + BoxSize.z * BoxSize.z) / 12;
Iyy := scale * sMass * (BoxSize.x * BoxSize.x + BoxSize.z * BoxSize.z) / 12;
Izz := scale * sMass * (BoxSize.x * BoxSize.x + BoxSize.y * BoxSize.y) / 12;

Scale is a value smaller than 1.0
Last edited by Julio Jerez on Sat Mar 12, 2005 3:48 pm, edited 1 time in total.
Julio Jerez
Moderator
Moderator
 
Posts: 12425
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Postby _Tux_ » Sat Mar 12, 2005 3:47 pm

thanks.

after this sudden "breakthrough" with getting a stable vehicle. im very pleased with the results now 8)
_Tux_
 
Posts: 81
Joined: Wed Sep 08, 2004 10:38 am
Location: UK

Postby Alain » Sat Mar 12, 2005 3:53 pm

Somehow I skipped the post with Walaber's videos and I just watched them.

The only word that comes out is amazing! :shock:
Alain
Site Admin
Site Admin
 
Posts: 28
Joined: Sun Sep 28, 2003 2:33 am
Location: Miami

Postby Julio Jerez » Sat Mar 12, 2005 4:05 pm

Dude I missed the videos. Unbelievable
They are both really good.
I like the second one when you make a close up on the side view, you can see how the plank slide to the back when the front tire leave the plank, this is something that not raycast car can do properly, and in fact is hard to do on any engine.

Way to go dude.
Julio Jerez
Moderator
Moderator
 
Posts: 12425
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Postby mandrav » Sun Mar 13, 2005 4:46 am

tomek wrote:ok I've got 1200kg car stable but wheels are going up and down a bit all the time - is there any way of removing this??


Hey, that's the exact problem I had when I created the other thread.

I 've managed to stabilize it by increasing the framerate for Newton to 120 iterations/sec.

HTH,
Yiannis.
mandrav
 

Postby tomek » Sun Mar 13, 2005 6:34 am

I already have 120fps an cannot increase it because simulation would be too slow. Note tht I've got gravity of 30 and balance gravity of 60 so my car is several times heavier that your. Also light wheels makes it undriveable.
tomek
 
Posts: 102
Joined: Wed Jun 23, 2004 12:34 pm

Postby walaber » Sun Mar 13, 2005 11:25 pm

Thanks for the comments on the videos... the game is suddenly taking shape :D

I agree that the raycast car is the fastest way to make a realistic car, and is probably best for games with multiple on-screen vehicles... but for this game the vehicle joint is definately the best solution, as you can see from the videos.

here's another video that shows a few more stunts, as well as my WIP particles for dust and sparks.. the problem now is that I can't think of a way to add the particles into the replay system... so they will probably dissappear when you go into replay mode. (also note the cool VCR controls in replay mode)

DUST AND SPARKS VIDEO - DivX, approx 4.5MB
Independent game developer of (mostly) physics-based games. Creator of "JellyCar" and lead designer of "Where's My Water?"
User avatar
walaber
Moderator
Moderator
 
Posts: 393
Joined: Wed Mar 17, 2004 3:40 am
Location: California, USA

Postby Julio Jerez » Mon Mar 14, 2005 12:05 am

dude I am going to get a hard attack here.
Wnat was that duke of hazard or what :D :D :D
Julio Jerez
Moderator
Moderator
 
Posts: 12425
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Postby Julio Jerez » Mon Mar 14, 2005 12:30 am

I know what you have to do, do a particle explosion when the car pass by the opening. like they do in the show las vegas. Just joking 8)

The sparks effect when the car hit the pavement, very nice touch, and very accura.
Julio Jerez
Moderator
Moderator
 
Posts: 12425
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Postby walaber » Mon Mar 14, 2005 1:33 am

all handled beautifully in the collision callback :)
Independent game developer of (mostly) physics-based games. Creator of "JellyCar" and lead designer of "Where's My Water?"
User avatar
walaber
Moderator
Moderator
 
Posts: 393
Joined: Wed Mar 17, 2004 3:40 am
Location: California, USA

Postby kjelle69 » Mon Mar 14, 2005 4:12 am

Smokin' !!!!

Are those particle effects part of the Ogre system ?
User avatar
kjelle69
 
Posts: 60
Joined: Fri Aug 27, 2004 9:08 am
Location: Koskullskulle, Sweden

PreviousNext

Return to User Gallery

Who is online

Users browsing this forum: No registered users and 1 guest