Physics Systems

Blitz3D Forums/Blitz3D Programming/Physics Systems

xmlspy(Posted 2007) [#1]
I have a few questions deciding which system to utilize.

Best overall ir highly recommended?
Which physics system is the fastest?
Which system is the easiest to use?


bytecode77(Posted 2007) [#2]
tokamak
- fast
- compatible
- high recommended
- EASY
- easytok addon for low price

blitzODE
- just a little slow
- 50% compatible
- a bit reccomended

jvODE
- fast
- reccomended
- (easy)

i would go for tokamak.


Vorderman(Posted 2007) [#3]
I think it depends on what you want to do with the system.


jfk EO-11110(Posted 2007) [#4]
I found DC's ODE wrapper is pretty good, although if he reccomends to use Tokamak here :o/ Is there a free wrapper with examples for tokamak?


bytecode77(Posted 2007) [#5]
the blitzODE wrapper is not by me. i just made an add-on to blitzODE!
thats the devil physic engine. download it including the physics wrapper :)


jfk EO-11110(Posted 2007) [#6]
Yes I did! thanks again, also for the "vorhang" thingie that I could not test yet for the mentioned reasons. But I will soon go on playing with it.

I wonder if there's a way to temporary deactivate the phyics of some objects, eg. based on distance, something like EntityAutoFadePhysics(), for speed reasons. Well, I'm afraid I got to study this ODE stuff a lot.


bytecode77(Posted 2007) [#7]
you can surely modify my physic engine for this reason..


OJay(Posted 2007) [#8]
hey jfk, LEO is your friend :D


VIP3R(Posted 2007) [#9]

I wonder if there's a way to temporary deactivate the phyics of some objects, eg. based on distance, something like EntityAutoFadePhysics(), for speed reasons.


There's an auto disable feature in ODE, you can set any body to auto disable and when it stops colliding/moving it disables itself. If any other object collides with it while disabled, it will auto enable itself again and so on.

JV-ODE is very fast (faster than Tokamak and Newton). I wouldn't say it was the easiest, it's more of an intermediate/advanced library, although it doesn't take long to get the hang of it. It's also extremely stable and ODE is still being maintained by its authors.

@Devils Child: I have no idea where you're getting that 'compatible' nonsense from?


bytecode77(Posted 2007) [#10]
vip3r: i have no idea what YOU are talking about.
they all are compatible, so what?
i tested all known physic engines very well, and i know which physic engines are worth for whatever


VIP3R(Posted 2007) [#11]

vip3r: i have no idea what YOU are talking about.
they all are compatible, so what?
i tested all known physic engines very well, and i know which physic engines are worth for whatever


So what the hell is this BS all about?...


tokamak
- compatible

blitzODE
- 50% compatible



[Edit - Removed]


Ricky Smith(Posted 2007) [#12]
I would recommend jv-ode highly.
It's straight forward to use, fast, extremely flexible, very stable, has excellent support and is continually being improved and updated.


caff_(Posted 2007) [#13]
I would highly recommend JV-ODE.

Support for it has been excellent, even if you are new to ODE. Since purchasing I've had many free updates, which is rare for middleware like this. It comes with tons of example code to play around with, and is well suited to most physics simulations, but particularly car physics.

ODE is lightning fast too. I have stress tested the crap out of it and it handles thousands of objects easily.


Dock(Posted 2007) [#14]
On a related note, does anyone have any experience or recommendations for implementing 2D physics with any of these?


VIP3R(Posted 2007) [#15]
2D physics is now available in ODE using the 2D plane joint which has recently been implemented. There's more info about the 2D feature in both the Blitz3D and BlitzMax JV-ODE threads (links in sig below).


Vorderman(Posted 2007) [#16]
but particularly car physics.


Disagree there - I've yet to see an ODE-based car sim that doesn't suffer from the snap-oversteer-and-spin problem die to the dodgy friction modelling.

Tokamak can do driving, sliding and jumping cars much better, though it can't do nice soft bouncy suspension as well (at least not easily).


VIP3R(Posted 2007) [#17]
Vorderman, by your logic Tokamak is also unsuitable for car physics, as well implemented suspension is a crucial component of any car physics simulation.

ODE is very capable of good car physics simulations, providing of course they are accurately setup. There are several important factors that can contribute to problems arising in every type of physics simulation. To imply that ODE is no good for car physics because you were unsuccessful at attempting to simulate powersliding in it is daft, you know full well it may be due to bad implementation. Besides there are so many different types of car physics that your argument doesn't apply to all possible scenarios.

Tricky Tracks for example had excellent car physics implemented using ODE.

The definitive answer to the original questions is 'Experiment with them all and decide for yourself', because people like different engines for different reasons. Same goes for 3D engines, games consoles, computer OS's, web browsers etc. It mostly boils down to personal opinion.


Vorderman(Posted 2007) [#18]
No, Tokamak works much better than ODE for car simulations, merely because the friction that occurs between 2 bodies (namely the tyres and the track) is much more controllable and progressive than ODE.

All ODE car sims suffer from the snap-oversteer-spin problem, even Racer had it, and that incorporates a Pacejka tyre model.

Bouncy suspension looks very nice at slow speeds but if the car is incapable of being driven fast then it's pointless. Most ODE sims keep the speed down to avoid this snap-spin problem. With Tokamak I can have the SRX cars pelting around and still they are controllable, with proper throttle-controlled oversteer and drifting. I've yet to see an ODE program that allows that.

Tricky Tracks is very nice, but you can't powerdrift the car and it's pretty slow paced.

And I'm not blindly biased towards Tokamak - I spent ages writing and testing and experimenting with the original Blitz ODE wrapper but it just can't do nicely slidng cars without some major work on the friction model.


OJay(Posted 2007) [#19]
well, i think you both are speaking from two different ODE-wrappers...you really cant compare the old blitz-ode thing with the current jv-ode wrapper!

also, the killerfeature for me to use ode was, that i can simulate a "handbrake" with ode to immidiately stop a car and let it STAND on its position (thats something essential for a game im making), with tokamak i couldnt get a car to stop sliding over my staticmesh...really annoying. also, the staticmesh support of tokamak is much much worse than ode 's one!

and dont forget, that tokamak and its blitz wrapper arent in development anymore. ODE and jv-ode very well are.


VIP3R(Posted 2007) [#20]

Tricky Tracks is very nice, but you can't powerdrift the car and it's pretty slow paced.


You know, that statement is beyond comprehension.

Why? Well firstly Tricky Tracks is supposed to be slower paced than a stock racing game, it's closer to the car equivalent of something like Kick-Start (the trials motocross event).

Secondly, the track corner sections are not much wider than the car, how are you supposed to powerdrift when there's no room to do so? You're obsessed with powerdrifting, there's plenty of car based racing that has no powerdrifting at all.


And I'm not blindly biased towards Tokamak - I spent ages writing and testing and experimenting with the original Blitz ODE wrapper but it just can't do nicely slidng cars without some major work on the friction model.


No offence, the original ODE wrapper you made was great in its day, but it's nothing like the newer wrappers. In comparison it's much slower and nowhere near as stable. It was also based on what, V0.35 of ODE? ODE is now at V0.8 and has come a very long way since you wrapped it back then.

But you continue in your deluded opinion, why should I care. It's like trying to point out to PS3 owners they've just bought a £425 doorstop.

It's nothing personal btw, I just think you're being a little (very) short-sighted.


Vorderman(Posted 2007) [#21]
Well, show me an ODE demo that allows accurate control of a fast-moving vehicle, with slides and jumps etc... and I'll admit that ODE can do cars properly.

Until then, Tokamak is preferable for creating vehicles, unless of course you want the car to be glued to the road like Scalextric, which isn't really much fun.

But I don't expect such proof, after all you have a vested-interest in promoting ODE as the best engine, seeing as you're selling the JV-ODE wrapper.


LAB[au](Posted 2007) [#22]
Well in terms of support, you can't really have better support than the one VIP3R is providing. I personally think Newton is the best engine but that's only my opinion, and for the newton wrapper which has been recently released I can't comment on support yet(for the wrapper) but the newton community is very helpfull already.

I don't know about the other engine but Newton is scheduled to run on hardware (Nvidia 8800 monsters) that alone is enough to get me diving into Newton.


VIP3R(Posted 2007) [#23]

Until then, Tokamak is preferable for creating vehicles, unless of course you want the car to be glued to the road like Scalextric, which isn't really much fun.


In YOUR opinion, not fact. Did it ever occur to you that the Tokamak friction model might be broken? No I'll bet it didn't. That would certainly explain how objects slide around when they're supposed to be at a stand still as OJay mentioned above. Your Stunt Car demo did the exact same thing, so no wonder you prefer it for powersliding, you haven't got much choice other than to slide because it won't STOP sliding.


But I don't expect such proof, after all you have a vested-interest in promoting ODE as the best engine, seeing as you're selling the JV-ODE wrapper.


I always try to give an unbiased opinion of ODE and steer well clear of threads like this unless I need to answer someone's questions or to correct someone's BS (yours in this case).

The only points I've entered this thread were to answer jfk's and Dock's questions. Plus to challenge your view about car physics in ODE. Not ONCE have I promoted ODE as the best engine.

Go ahead and look for yourself, I don't run around this forum spamming about JV-ODE because I DON'T NEED TO. I've provided a demo version for folks to try themselves, if they like JV-ODE great, if they prefer another engine then more power to them, I'm absolutely fine with it. BUT, I will not sit here watching while people try to spoon feed BS to folks who do not know better.

But you don't expect such proof eh? I went out of my way to help you in the past, I even sent you a full copy of JV-ODE for you to experiment with remember? You tried for a few hours then threw in the towel, some 'serious' testing that was.

Anyway, I don't need to respond in this thread any further, I've said all I needed to say. The folks here are smart enough to decide for themselves which engines will suit their projects best, whether it's ODE, Tokamak, Newton or PhysX, it really doesn't make the blindest bit of difference to me at all.


Wayne(Posted 2007) [#24]
Each physics engine is better adopted at some simulations than others. With that in mind I'd say:
ODE is generaly faster, and ODE has lots of tuning options. Newton is well designed, and has built in support for complex shapes, high speed objects, and things that float. I've also seen some nice Tok simulations.

IMHO ODE Rules because I can get more speed out of it.
To me the FPS budget is almighty important.

NEWTON is a very close second for me. I like NEWTON (Itmbin wrapper) because the code is nearly interchangable with JVODE.

Learn the terminology, select a engine and have fun. Everyone's going to have a favorite.

BTW I do have a nice ODE car running around a race track and going thru loops ( race track by Dan D-Grafix ). Looking at ray casting car now as I understand thats what the pros are using.

I'll build a nice demo for ODE racer and take a shot at coding the same in NEWTON.

my .02

8)


Vorderman(Posted 2007) [#25]
In YOUR opinion, not fact. Did it ever occur to you that the Tokamak friction model might be broken? No I'll bet it didn't. That would certainly explain how objects slide around when they're supposed to be at a stand still as OJay mentioned above. Your Stunt Car demo did the exact same thing, so no wonder you prefer it for powersliding, you haven't got much choice other than to slide because it won't STOP sliding.


It's not about objects sliding when they should be stationary, it's about a moving object suddenly losing all friction and spinning out of control. The Tokamak friction model works as I would expect it to - objects move from a grip to a slide progressively - the cars in SRX have a simple variable friction that decreases (under code control) as they are pushed harder into a turn or when unsing the handbrake or when braking/accelerating, so they start to slide at the desired times (dep. upon gameplay) and do so in a gentle and progressive manner. Once sliding, opposite lock steering on the front wheels is all that is required within the physics simulation to effect a full-on sideways slide and drift - the friction and physics system allows the slide to continue and remain controllable. If I want the cars to stick to the road better I simply up the base friction value. They can still slide at a certain point, but where that is I can decide. With ODE no matter what you do with the friction values the vehicles will simply spin out of control once they pass a certain point, or else they will flip over. In the past I have experimented with some pretty complex ODE setups including using multiple joints in place of the carwheel joint and also added counterweights under the vehicle to prevent it rolling, but the results are never even approaching satisfactory.

I went out of my way to help you in the past, I even sent you a full copy of JV-ODE for you to experiment with remember? You tried for a few hours then threw in the towel, some 'serious' testing that was.

Well I tried the usual tests that I had used with my old ODE wrapper (involving hundreds of hours of work) and the results were identical, leading me to believe that nothing fundamental has changed within the physics / friction system. The typical ODE snap-spin and carwheel joint detachment/displacement problems remain, and without writing a very complex custom friction system (eg. using something like Pacejka - http://www.racer.nl/reference/pacejka.htm ) the car cannot be made to be controllable at speed.

However I'd love to be proven wrong, as all I'm interested in is messing around making programs with cars in. Seeing as ODE is probably faster than Tokamak if I could have 4 ODE cars or 4 tokamak cars that behave in the same way then I'd go with ODE. Currently however ODE simply doesn't work as well for cars.

Looking at ray casting car now as I understand thats what the pros are using.

Yes I've seen some of that before and it does seem to be a neater way of doing things - any chance we can see a demo of your program?


VIP3R(Posted 2007) [#26]
Well, I genuinely wish I could help and build you some complex car demos, but I really don't have the time available. Otherwise I'd be more than happy to because I'm convinced that your work would benefit from it.


Gabriel(Posted 2007) [#27]
Vorderman's right. Tokamak is the only one of these physics engines to have had a proper friction implementation from day one. ODE is awful, and Newton used to be even worse, but is about as good as Tokamak now.

Of course it goes without saying that this won't be an issue for lots of purposes. If you need good friction though, it's a biggy.


Vorderman(Posted 2007) [#28]
I'd really like to see Wayne's ray-casting ODE program if he would be able to provide a simple demo or even a video?


VIP3R(Posted 2007) [#29]
Gabriel you're talking bollocks, ODE is an industrial quality physics library, how the hell do you think it would get by if it couldn't implement friction correctly?

Don't bother replying, I'm not interested.


Vorderman(Posted 2007) [#30]
Anyway, I don't need to respond in this thread any further

Don't bother replying, I'm not interested.


So why keep replying saying that others don't know what they're talking about or haven't used the systems enough to know what are the pros and cons of each?

Check out the ODE mailing lists - there are years and years of posts from people having the same problems when attempting to make vehicles. As Wayne suggests, many have or are moving over to raycasting, which in the case of a vehicle would then use a custom tyre to ground friction system, rather than ODE's inbuild systems (because a raycast doesn't have or require a physical body to collide with the ground).

Anyway, I'd still like to see Wayne's car system - perhaps it would provide some positive proof of ODE's capabilities rather than just telling people they're talking rubbish.


Gabriel(Posted 2007) [#31]
Gabriel you're talking bollocks, ODE is an industrial quality physics library, how the hell do you think it would get by if it couldn't implement friction correctly?

My guess would be people who are making money from it keep mispresenting it and being remarkably rude to anyone who won't ignore the facts and agree with them.


Wayne(Posted 2007) [#32]
There is alot of capability in all the physics engines mentioned. In many cases the results depend upon the work and skill of the author, and sometimes the black art of fine tuning. Physics it seems can be remarkable complicated for something that occurs naturally.

I've already learned somethings to improve my simulations from this thread, and have several new cars waiting to be shown.

I'm happy we have physics engines we can agree and disagree over, aren't you ?

I hope XMLSPY is getting what he wants. hehe


VIP3R(Posted 2007) [#33]

So why keep replying saying that others don't know what they're talking about or haven't used the systems enough to know what are the pros and cons of each?


Well, if you would permit me to post one more time. The first post I made after that statement was to try to end the thread on a good note to show there were no hard feelings and that if I had the time I would prove to you it could be done. Although on second thoughts it's obvious you wouldn't accept it even if it was proved beyond any doubt.


Well I tried the usual tests that I had used with my old ODE wrapper (involving hundreds of hours of work) and the results were identical, leading me to believe that nothing fundamental has changed within the physics / friction system.


Btw, the above highlights what I feel was the root of your problems to begin with. If you're applying the same simulation setup that contained a possible flaw, then the flaw would still remain regardless of whether the engine was at fault or not.


My guess would be people who are making money from it keep mispresenting it and being remarkably rude to anyone who won't ignore the facts and agree with them.


Oh well you presented a very extensive argument for your point of view above didn't you. You were trolling and you f'king well know it pal. Sorry, was I being rude again you precious little thing, I do apologise :)

I don't think anyone here would associate me with the 'hard sell' methodology. I provide a professional product with decent support at a VERY reasonable rate, to make out that my motivation is financial is laughable.

If someone makes what I feel to be misconceptions about ODE, I have every damn right to challenge it. A similar situation happened to you a while back and you understandably got miffed, remember?...

http://www.blitzmax.com/Community/posts.php?topic=62987

...even I backed you up, I won't make that mistake again hypocrite.


Gabriel(Posted 2007) [#34]
Oh well you presented a very extensive argument for your point of view above didn't you.

Why would I? You expressly said you weren't interested in one.

You were trolling and you f'king well know it pal. Sorry, was I being rude again you precious little thing, I do apologise :)

No, I was agreeing with someone who was taking a great deal of undue abuse ( which is against forum rules, by the way ) for stating something I know to be true. Don't worry about offending me. I wouldn't have confirmed Vorderman's findings if I hadn't been prepared to face the same kind of abuse you were already throwing at him.

And I'm not your pal.

If someone makes what I feel to be misconceptions about ODE, I have every damn right to challenge it.

You most certainly do. You also have a responsibility ( to the site owners, if no one else ) to keep a civil manner while doing so.

A similar situation happened to you a while back and you understandably got miffed, remember?...

In fact I do, but that's not a similar situation. In that thread, Medi was criticizing the quality of the wrapper, not the underlying library. You'll notice, however, that I managed to remain civil and not abuse him or use any foul language in disagreeing with him. The similar situation was from another person entirely, and I managed not to abuse him either.

...even I backed you up, I won't make that mistake again hypocrite.

Perhaps I'm still not being clear. I don't object to you defending ODE or your wrapper. I object to you breaking forum rules and abusing someone who doesn't deserve it. Disagree with him all you want, but there is simply no cause to abuse Vorderman just because he won't toe your line. He's been on this forum for years, almost certainly longer than me, and I've never seen him be rude once.


VIP3R(Posted 2007) [#35]

Why would I? You expressly said you weren't interested in one.


If you had any facts to explain your point of view you would have presented them in the first place, instead your entire argument was 'ODE is awful'. Why would I be interested in anything you had to say regarding ODE after that? It's clear your opinion is baseless.


No, I was agreeing with someone who was taking a great deal of undue abuse ( which is against forum rules, by the way )


I wasn't giving Vorderman any abuse, are you out of your mind? We were having a healthy discussion until he implied the only reason I challenged his view was because of a 'vested-interest in promoting ODE', even then I only described his argument as BS. It's hardly breaking any rules that I'm aware of, I've seen far worse in these forums before without anyone batting an eyelid.

The only point at which I've lowered my tone is when you entered with your 'constructive argument'. Again, stating that what you said was 'bollocks' is hardly breaking any rules. If it was, FlameDuck would have been history long ago. The 'f'king' comment is probably pushing it, but it's still censored. If you think I'm out of order then report me to the mods.


And I'm not your pal.


Heh, pathetic.


Perhaps I'm still not being clear. I don't object to you defending ODE or your wrapper. I object to you breaking forum rules and abusing someone who doesn't deserve it. Disagree with him all you want, but there is simply no cause to abuse Vorderman just because he won't toe your line.


Clear as mud. If you objected to my attitude towards Vorderman you would have said so in your first post, because there's certainly nothing I've said to him since then that you can remotely describe as abuse. Like I said, you're just poking your nose in to stir things up.


Stevie G(Posted 2007) [#36]
@ VIP3R,

Having never tried any 3rd party physics engines I can't comment on the capabilities of each but ....

Why not just settle this once and for all and create a vehicle demo or video which proves JV-ODE can handle the friction correctly at high speeds? The negative comments should be motivation enough for you proove the doubters wrong, rather than simply telling them they're wrong?

Everyone would be a winner and you'll have quite a few more purchases as a result.

Stevie


Vorderman(Posted 2007) [#37]
I think we all need to calm down a bit here - I don't think I've been on the receiving end of any abuse, and I certainly haven't intended any offense. We're only talking about physics engines here, it's not the end of the world.

I had the time I would prove to you it could be done. Although on second thoughts it's obvious you wouldn't accept it even if it was proved beyond any doubt.


I would be overjoyed if you could show me a good vehicle sim using ODE - that's why I started messing around with all those years ago. If I could get the same results in ODE as I can in Tokamak then I'd switch back to it in a second. It has an excellent suspension system and can produce some brilliantly fun bouncy vehicles, but currently is let down by the friction system compared to Tokamak.

the above highlights what I feel was the root of your problems to begin with. If you're applying the same simulation setup that contained a possible flaw

I don't believe they contain a flaw - using the simplest possible setup (a block with 4 carwheel joints) and as close as possible to an identical setup in Tokamak (a block with sort of suspension hangers holding the wheels) produces a lovely controllable (even at speed) car in Tokamak, that can jump and drift and bounce, but a bit of an uncontrollable mess in ODE - it spins out of control, flips over, bounces around etc...

I don't really understand how I can manage a better comparison - using both systems at a pretty basic level, Tokamak's car is fun, ODE's is not.

In the past I spent a lot of time trying to get the ODE car to handle, and never made it work, always let down by the friction system.

Why not just settle this once and for all and create a vehicle demo or video which proves JV-ODE can handle the friction correctly at high speeds?

Yes, please do. I imagine that SRX with ODE's suspension joint's bouncing ability would be awesome fun.

As I've said before I have no real loyalty to Tokamak, but it does do friction (and thus cars) better than ODE.

We were having a healthy discussion until he implied the only reason I challenged his view was because of a 'vested-interest in promoting ODE'

Well I responded to being told I was deluded and short-sighted, implying I knew little of ODE in it's current state and would not accept it even if it had transformed into the perfect car sim engine.

I don't have time to start over with ODE to try again to get results that Tokamak can achieve much more easily, but that doesn't mean I wouldn't like to see a good ODE car engine.


Damien Sturdy(Posted 2007) [#38]
Our racer used ODE, and it had the ability to slide better than mose ODE cars,

BUT that was only because I recoded alot of the physics. ODE did most of the work, but I coded in friction stuff myself. It's not perfect and you can still sense the problems with ODE.

I spent months arguing ODE was better for it, but Vorderman is right- the friction model is iffy. There's no inbetween, its slipping, or it isn't. I got around it by converting the % of slipping frames over the last 3-4 into a % and modifying velicities manually using this when required.

Using this I managed to get Vordermans original ODE wrapper to simulate sand, grass, mud and tarmac pretty nicely- which is impressive since the original ODE wrapper collisions were only affected by Global friction!

I can't help but think though Vorderman, you seem have had worse issues than I had with ODE :) What did you think of our Racer?


Also, whats with you people these days? moody buggers.


Vorderman(Posted 2007) [#39]
I can't help but think though Vorderman, you seem have had worse issues than I had with ODE


Probably - I never attempted to write a custom friction system with ODE, I switched over to Tokamak and used a sort of modify-values-on-the-fly system with the inbuilt friction system - each tyre has it's own friction settings (each car uses a completely different set) so they can individually have the friction on all 4 wheels adjusted by my game logic to get the best feel.

What did you think of our Racer?

I remember it certainly looked very nice, but I can't recall actually playing it, I just remember seeing the auto-playing demo. Do the cars do proper 4-wheel drifts with opposite lock? If so, very well done! I never managed that with ODE.

Do you have a playable demo kicking around?


Damien Sturdy(Posted 2007) [#40]

Do the cars do proper 4-wheel drifts with opposite lock? If so, very well done! I never managed that with ODE.



Not perfectly, but you could hold it for a second or two with opposite lock round the first corner after gaining speed down the final straight - this is my fave part of the track! Evak and I would quite like to recreate it in Max with a new 3D engine. I'm hoping the friction stuff works better this time. Again, we improved it, but its nowhere near perfect.

Also remember that with ODE and proper suspension that the wheels will bounce more than in Tokamak, and that in itself will cause friction problems unless you use splining techniques on the track :)

Also, I would imagine using addforce techniques and linepick, you could get a great suspension system in Toka. The same technique I used to get the ships hovering in our incarnation of FMC.

I'll go find that demo thread - I think you posted in it!

[edit]

http://www.blitzbasic.com/Community/posts.php?topic=58713#657256


Vorderman(Posted 2007) [#41]
That's pretty cool - you can do a sort of controllable oversteer slide into corners without flipping over, which is nice. I never managed to get ODE to allow you to control the slide - once it started the car always either spun on applying opposite lock caused an instant spin the other direction. It's a strange problem that, almost as if the mass of the main body is immaterial - it can be instantly spun the other way no matter how heavy it is, like it has no inertia....

I think the problems you say ODE has with wheels bouncing happens using Tokamak in SRX also - I have been experimenting with track polygon shapes on the more steeply banked corners to try and alleviate the tendancy for the front wheels to bounce upwards at the start of the banking, meaning you can easily bounce right off the track in a straight line rather than going around the corner. Using more polygons to make a smoother track doesn't seem to work for some reason, it seems that a lower poly track shape causes less bouncing, no idea why though.

I think I got it right, but I haven't done anything on SRX for a while now. One day I must get around to releasing an updated demo, as it looks and plays a little differently now.


Damien Sturdy(Posted 2007) [#42]
Also remember that ODE's grip problem was exhadurated with cars because of the "faulty" carwheel joint making the back wheels steer at high speeds even when they were locked into place. We managed to work around that too using double physics updates. one at high step (1.5) and one at low step (0.5) so that the second update would remove the problem (because the second step ran things at a lower pace.) This problem in ODE has been resolved (well, they've made it much less severe) in recent releases.

The problem with your bounciness is quite simple- If you have a spring and press on it rhythmicaly, the bounce will amplify.

As a car goes around a track, the spring is "pressed" each time it hits a different angle on a new polygon.

The reason it doesn't happen with lower poly tracks as much is because the angles don't change as often so the suspension gets to level out before it hits the next poly. If the suspension doesn't settle before it hits another poly, the bounce will probably amplify.

The way to solve the problem was using the spline technique I mentioned above. I can't remember the exact name of the technique,

You need to get the location of the wheel contact between the two polygons and interpolate. You basically get the % between left and right, and top/bottom of each poly, and retreive the collision point as it would be there, rather than using a raypick on the polygon.

You could fake this by aligning a quad to the two triangles and usnig THAT to collide with, though really you should use a more complex spline algorhythm to remove the problem completely.

I'm really not so good at explaining it, but I hope this at leask makes some sense! :)


Vorderman(Posted 2007) [#43]
Whoa, that sounds really complex.

The polygons are banked to the left and right, as well as forming a curved corner shape - I've no idea where to begin with interpolating between them.

I haven't tried modifying the suspension parameters - they were setup about 4 years ago and I've never really looked at modifying them - I suppose I should have done really - I might try that tonight and see if I can reduce or remove the tendancy for the wheels to thump into the air when going from one polygon to another.

Currently I'm a bit caught up in one of my little test programs - this time it's Need For Speed on motorbikes, with Tokamak crashes! Mucho fun to be had with ragdoll riders hitting moving traffic :) I'm going to HAVE to implement cross-traffic somehow - on a bike that would be serious brown-trousers time!


Danny(Posted 2007) [#44]
It's interesting watching you guys pasionately discuss all this complex Car and Motorbike mechanics. It's cool, I like it, don't get me wrong!
I'm just one of those guys that NEVER enjoyed racing games (not after finishing Outrun) or sports games for example.

But Vorderman, that motorbike game does sound like fun, especially your comment about 'adding cross-traffic' for "added effect";
Made me think of why not add a FPS type control to players like me - that don't care to race - and alow me to sabotage the race instead!?! ;)
Imagine i can walk around the streets, and chuck garbage-cans and other obstacles on the road when about 10 hefy racers are approaching at break-neck speeds! Imagine the carnage! eheh... should be good fun, no?

Just a thought; couldn't resist :))

Danny


Damien Sturdy(Posted 2007) [#45]
@Danny, Lol, funny but highly annoying!

Vorderman, in your old ODE wrap it was really easy- because you could send contact points to ODE rather than allowing ODE to deal with it. Downside to it was it was slow and only had one type of contact. it's not as difficult as it sounds, and I'd have no problem implementing it now, but back then I would have :)


popcade(Posted 2007) [#46]
Verlet.....

BTW, who kept the code...


Captain Wicker (crazy hillbilly)(Posted 2012) [#47]
Are there any active links to download Tokamak? I cant seem to find it anywhere.

EDIT:
Ah, Here is a more up to date download: http://blitz3dfr.com/hedgehog/data/documents/EasyTok.zip

Last edited 2012


Yue(Posted 2012) [#48]
@Capitán Soft Wicker
thanks