Forums

Full Version: Car Creating Questions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All,

I'm modelling a Viper GTS-R for V-Drift but have a few questions/issues to get it all working.

1) Vehicle size. Other than the car in the modelling pack, are there any other sizing quidelines?

2) Model position. I've modelled the car around the origin. I think the JOE script uses the object centre as its reference point, but when the car is in the game it appears to be about foot in the air. Where should the model/object centre be positioned?

3) The collision box. Does this have to be a cube? Also, should it cover the bottom of the body or the bottom of the wheels?

4) Wheels. They appear to be postioned in the car.ini file. Looking at other car files they all appear to have a negative z coordinate. I tried altering this to match the car (see number 2 above), but ended up with a car stuck on the startline in a constant skid or collision. How does the position of the wheels, body and collision box interact?

5) Presumably, the suspension position in the car file should correspond with the wheels (roughly). What happens if they don't?

Many thanks,

David
davidMC1982 Wrote:I'm modelling a Viper GTS-R
Cool!

Quote:1) Vehicle size. Other than the car in the modelling pack, are there any other sizing quidelines?

Units are in meters.

Quote:2) Model position. I've modelled the car around the origin. I think the JOE script uses the object centre as its reference point, but when the car is in the game it appears to be about foot in the air. Where should the model/object centre be positioned?

It shouldn't matter where you model the car, as long as the positions in the .car file match up.

However, the wheel models must be positioned on the origin.

Quote:3) The collision box. Does this have to be a cube? Also, should it cover the bottom of the body or the bottom of the wheels?

The collision box has to be a cube. I suppose you could make it something else, but VDrift will simplify it to a cube anyway. It should cover only down to the bottom of the body. In fact, you could probably put it a little up from the bottom of the body.

Quote:4) Wheels. They appear to be postioned in the car.ini file. Looking at other car files they all appear to have a negative z coordinate. I tried altering this to match the car (see number 2 above), but ended up with a car stuck on the startline in a constant skid or collision. How does the position of the wheels, body and collision box interact?

The collision box and the body should be in the same coordinate system in blender. Unfortunately the coordinate system in the .car file is different than the coordinate system in blender. If you look at another car for an example you can get a feeling for which axes in blender match up with which axes in the car file. For some parameters the .car file isn't even internally consistent. Doh. Here's an explanation:

http://vdrift.net/Forum/viewtopic.php?t=...c&start=15

In the future the plan is to move to an optional, unified coordinate system where everything in the .car file matches up with Blender.

Quote:5) Presumably, the suspension position in the car file should correspond with the wheels (roughly). What happens if they don't?

The suspension position is used as the point at which forces from the wheels are applied to the car's chassis. So, if the suspension position is set oddly it could result in all kinds of handling problems.

One other thing to note... the modeling package on sourceforge is a tad out of date. Make sure you get the latest from SVN:
http://svn.vdrift.net/viewvc.py/trunk/to...vdrift-art

Also, if you haven't seen it already, here's the wiki:
http://wiki.vdrift.net/Creating_cars

I'll update the wiki to contain answers to the questions you just asked. Feel free to ask more questions or ask for clarification.
Thanks for the response.

Just one thing that needs clarification is the car position. The only positional related data I've seen in the car files relates to wheels or positions of masses, not the position of the car. How does the code place the car at the start? Does it take the object centre of the car, position the wheels relative to that, then position the lowest z coordinate of the wheels at the z coordinate of the circuit? Can the wheels collide with the car body if they are positioned incorrectly?

Also, I'm having trouble compiling the SVN version on Linux (all the correct libraries are installed and detected). I'll post a full description when I get home.

Thanks,

Dave
davidMC1982 Wrote:How does the code place the car at the start? Does it take the object centre of the car, position the wheels relative to that, then position the lowest z coordinate of the wheels at the z coordinate of the circuit?

Yep.

Quote:Can the wheels collide with the car body if they are positioned incorrectly?

Nope, no wheel/body collision checks are done. Of course if the wheels are positioned too high the car can "high center" which ends up looking like the car is jittering very fast.
joevenzon Wrote:Nope, no wheel/body collision checks are done. Of course if the wheels are positioned too high the car can "high center" which ends up looking like the car is jittering very fast.

OK I think that's what happened before.

I have the basic model all finished now, although some parts could do with reworking. Just have the horror of UV mapping and textures to sort now (the Viper has lots of overlapping bodywork). Is it possible for the body to be made of several parts, UV Map each part to the same texture, then select all the meshes require to make the JOE file? It would save me joining the mesh, meaning remodelling bits at a later date is much easier. I also have the interior to do but that can wait for now.

I've got to do the car file but this should be pretty simple, since I have all the parameters direct from the car. Tyre constants could still pose a problem but, knowing the other parameters are correct, this will form a good test for the tyre model.

Have their been any major physics engine changes since the Linux binary release on the website (Feb '07)? It feels like the TCS and clutch code has been altered. I modified the FF car file with F3 type parameters (again, direct from the car) and it actually felt pretty good in the Feb '07 version. I had to exaggerate the downforce a little but nothing else. In the SVN version, the car has a bucket load of understeer. I think it's related to keyboard input though as tapping the steer button seems to keeps the car more balanced. I'll have to order a new wheel to check.

Is data acquisition being implemented? The AIM Sports (Google it) file format is pretty open and their Race Studio analysis software is free. I could look at coding it but I've only ever programmed C/C++ on an embedded platform and have only programmed applications on Windows so would need to get up to speed. Some form of data acquisition in VDrift would allow direct comparison with real world data and is a great way to confirm downforce, grip and drag settings.

Regards,

Dave
davidMC1982 Wrote:Is it possible for the body to be made of several parts, UV Map each part to the same texture, then select all the meshes require to make the JOE file? It would save me joining the mesh, meaning remodelling bits at a later date is much easier. I also have the interior to do but that can wait for now.

Not currently, but you can always model and UV-map everything as separate objects, and then make copies and do a join just before JOE exporting.

Quote:Have their been any major physics engine changes since the Linux binary release on the website (Feb '07)? It feels like the TCS and clutch code has been altered. I modified the FF car file with F3 type parameters (again, direct from the car) and it actually felt pretty good in the Feb '07 version. I had to exaggerate the downforce a little but nothing else. In the SVN version, the car has a bucket load of understeer. I think it's related to keyboard input though as tapping the steer button seems to keeps the car more balanced. I'll have to order a new wheel to check.

There have been a lot of changes... new collision code, physics bugfixes, a new simulation integration step, and I think all of the keyboard processing stuff got changed (although it can be tuned via the control options).

Quote:Is data acquisition being implemented?

I'm refactoring (more like rewriting, really) the code at the moment and have implemented telemetry in the refactor branch, but it's crude and just outputs data in a gnuplot format.

Quote:The AIM Sports (Google it) file format is pretty open and their Race Studio analysis software is free.

I will definitely look into that! Gnuplot isn't really suited for telemetry....
davidMC1982 Wrote:The AIM Sports (Google it) file format is pretty open and their Race Studio analysis software is free.

Maybe I'm a bad googler; I couldn't find any info on the format. Do you have any links or info? Or maybe knowledge of alternative formats?
I'll download some data from my system this weekend and get the relevant info for you.

Dave