Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / [Dark Physics] Creating a material to make a car slow down

Author
Message
Elite Gaming
20
Years of Service
User Offline
Joined: 10th May 2003
Location: Isle Of Wight, UK
Posted: 12th Aug 2006 17:12
I'm currently trying to make a material that will slow down a car when it moves over it. The obect is the outside of a track (the gravel for example). When the car comes off the track, i want it to be slower to move off it, back on the track, but i can't seem to create it. I'm using Dark Physics vehicle commands for the object. The code i have is:



Changing the values in that don't seem to affect the car at all. Am i doing something wrong?
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 12th Aug 2006 17:19 Edited at: 12th Aug 2006 17:20
give this a try its the sticky one with bit yours add.



ps if you get the right feel add to the material thread.

Dark Physics makes any hot drink go cold.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 12th Aug 2006 17:26
Plus try looking at this command.

phy set material dir of anisotropy ID, x#, y#, z#

will put the slip in it.

Dark Physics makes any hot drink go cold.
Elite Gaming
20
Years of Service
User Offline
Joined: 10th May 2003
Location: Isle Of Wight, UK
Posted: 12th Aug 2006 17:48
The problem i have is that setting any material values doesn't seem to affect the car (almost as if the material isn't their). I'm not sure whether i'm setting the material to the ojbect properly, or if their is something i need to do with the vehicle commands so when the car does come off the track, its slows down, and takes longer to move.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 12th Aug 2006 17:52
have a look at this one make the wheels do something.

phy set vehicle static friction v ID, value#

Dark Physics makes any hot drink go cold.
Elite Gaming
20
Years of Service
User Offline
Joined: 10th May 2003
Location: Isle Of Wight, UK
Posted: 12th Aug 2006 19:23
setting vehicle static friction doesn't seem to have any effect. The wheels of the car don't seem to be reacting to materials. Could this be a problem with Dark Physics?
mm0zct
20
Years of Service
User Offline
Joined: 18th Nov 2003
Location: scotland-uk
Posted: 12th Aug 2006 20:14
are you certain the off road and on road models don't overlap because then it might still be interacting with the on-road.
i replied to your speed calculation thread but just for your conviniece i'll post my reply to that here



AMD athlon 64 3000+, 1GB ddr400, 400GB total hdd, ati radeon x700pro 256mb (pci-e) 17" tft(@1280x1024).
Elite Gaming
20
Years of Service
User Offline
Joined: 10th May 2003
Location: Isle Of Wight, UK
Posted: 13th Aug 2006 02:11
@ mm0zct

Thanks for your help on the speed calculation, just trying to work a way of converting that speed into kmh or mph.

Anybody have any ideas for what could be the problem with creating materials to have effect on vehicle physics? The material created isn't having any effect on the car no matter what i do.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 13th Aug 2006 02:13
whats the total mass of your car ,if you know it.

Dark Physics makes any hot drink go cold.
Elite Gaming
20
Years of Service
User Offline
Joined: 10th May 2003
Location: Isle Of Wight, UK
Posted: 13th Aug 2006 02:16
Its at the default of 80
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 13th Aug 2006 02:23
Well it not your material as I have made a material tester which is in the material section, with a mass of 80 and free fall sphere it stops within 2,3 units.

give it ago.

Dark Physics makes any hot drink go cold.
Elite Gaming
20
Years of Service
User Offline
Joined: 10th May 2003
Location: Isle Of Wight, UK
Posted: 13th Aug 2006 02:45
I've just entered the debugger to check if the wheels of the vehicle are touching the track, as i thought that might of been it, but it's saying that they are.

I'm starting to think this is a problem with using the vehicle commands, as all the examples for material tend to use static objects etc, not using the build vehicle commands.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 13th Aug 2006 02:54
Quote: "I'm starting to think this is a problem with using the vehicle commands,"


Just what I was going to say, seem we have no way of just giving the wheels a material.

Dark Physics makes any hot drink go cold.
Elite Gaming
20
Years of Service
User Offline
Joined: 10th May 2003
Location: Isle Of Wight, UK
Posted: 13th Aug 2006 03:51
I've just tested the material in one of the demos that come with Dark Physics (Test Drive), and it's not working there!

Hopefully the new update fixes this problem.
mm0zct
20
Years of Service
User Offline
Joined: 18th Nov 2003
Location: scotland-uk
Posted: 13th Aug 2006 04:33
the dark physics default uit is one dbp unit to one metre, so if you've used that for the car and track etc then just multiply by 0.06 to get km/h

AMD athlon 64 3000+, 1GB ddr400, 400GB total hdd, ati radeon x700pro 256mb (pci-e) 17" tft(@1280x1024).
Elite Gaming
20
Years of Service
User Offline
Joined: 10th May 2003
Location: Isle Of Wight, UK
Posted: 14th Aug 2006 13:05
Anybody have any suggestions?
Mike Johnson
TGC Developer
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 14th Aug 2006 22:32
Try experimenting with these commands in the update for further control of how the vehicle moves:

phy set vehicle longitudinal tire force function ID, wheel, extremum slip#, extremum value#, asymptote slip#, asymptote value#, stiffness factor#

phy set vehicle lateral tire force function ID, wheel, extremum slip#, extremum value#, asymptote slip#, asymptote value#, stiffness factor#

Here's the default values:

extremum slip# = 1.0
extremum value# = 0.02
asymptote slip# = 2.0
asymptote value# = 0.01
stiffness factor# = 1000000.0 ( very stiff to begin with )

I'd suggest changing the stiffness factor to start with. Higher values make for a better grip so play around with this and see where you get.

As for other rigid bodies that the car can collide with:

* create a material or a set of materials for these bodies

* adjust the dynamic friction, high values used here will apply a larger stopping force on the vehicle while it's moving and low values will make it easer to glide along the surface
Elite Gaming
20
Years of Service
User Offline
Joined: 10th May 2003
Location: Isle Of Wight, UK
Posted: 15th Aug 2006 23:02
@ Mike,

Just two quick questions - do the tire force commands need to be set during the build commands for a vehicle, or can these be placed anywhere in code (within reason!),

and when will we have update help files, would be nice to see what each of the new functions is capable of (i see their is now 9 parameters for the add wheel function, according to the info within DarkBasic Pro, but in the help doc, it doesn't say what we can now change).
Elite Gaming
20
Years of Service
User Offline
Joined: 10th May 2003
Location: Isle Of Wight, UK
Posted: 16th Aug 2006 01:40
In this example script made by HowDo, should the ball be stopping before it its the wall by adjusting the material propertys. No matter what i do, the ball doesn't slow down?

HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 16th Aug 2006 06:07
try a lower mass like 80 you will then see a diffrence.

Dark Physics makes any hot drink go cold.
Mike Johnson
TGC Developer
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 16th Aug 2006 10:17
The tire force functions act only when the vehicle has been built.

As soon as the new documentation has been prepared another update will be released.
Elite Gaming
20
Years of Service
User Offline
Joined: 10th May 2003
Location: Isle Of Wight, UK
Posted: 19th Aug 2006 15:38
@HowDo

Yeah, it had an effect when i changed the mass of the object, and slowed down really quick. However, when you try to do the same thing with a vehicle built with DarkPhysics, there is no effect. I've assigned materials to other objects in the game (tyre walls, concrete walls etc) and they have an effect on the vehicle. But the tyres seem to have no effect when running along a material.

Has anybody else tried or got any demos of this?

I'm sure that the more friction you apply to the wheels, the quicker a) it should stop when no force applied, and b) The slower it would be to move when a force is applied

So by applying a material to the track, and increasing its friction properties, the effects should show on my vehicle?

Vehicle code:


Material Code:
bosskeith
18
Years of Service
User Offline
Joined: 5th Dec 2005
Location:
Posted: 22nd Aug 2006 06:33
actualy the more friction applied to the wheels the more acceleration a vehicle has if they have the gas down.

car at stand still sitting in oil slick(low friction surface) you slam on gas your vehicle goes no where but tires spin like crazy.
but a dry tar road has high friction and if you do not apply too much torque it will take off.

but as far as stopping you are right it should have an effect of slowing it down quicker if brakes are applied.

if no brakes are applied then the only thing that would slow it down in a perfect world would be engine mechanics and wind drag because if brakes are not applied the wheels would just roll on surface...only braking and/or sliding would change this. I could be wrong but that would be my take on it.

(obviously we are trying to recreate an imperfect world where the warping of the tires from gas compression would also add drag however i do not believe there is support for warping of a tire's surface area )

a non warped cylinder in contact with the road in a perfect world would have an infinitely thin line as it's surface area of contact which would be the connection of the tangent points of the circles comprised of those cylinders. Therefore because of this inconsequential surface area there is inconsequential friction when rolling.

maybe we could have a radians of contact command for our vehicles wheels? I wonder if something like that would help.

I may have misplaced my logic but that is how i see it.

Ink all over the screen...and dang it! Signature still does not show.
Elite Gaming
20
Years of Service
User Offline
Joined: 10th May 2003
Location: Isle Of Wight, UK
Posted: 28th Aug 2006 19:09
Thanks for the help bossKeith. Perhaps TGC or someone from the forums could create a more detailed demo using Dark Physics to show how to control different effects to vehicles. I'm still having trouble with using the friction commands on the vehicle, and also making the vehicle slow down over different terrains.

Login to post a reply

Server time is: 2024-03-29 09:39:09
Your offset time is: 2024-03-29 09:39:09