Forums

Full Version: Car graphics config
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
OK, subsections are in trunk. We could have more than 4 wheels right now, theoretically. Smile

Will be converting car/cardynamics to support them fully in the next days.
cool!

i played around with the le and tried putting this in the .car file

[seat]
texture = seat.png
mesh = seat.joe
position = 0.292, -0.210, -0.125


but it didn't have an effect. is that expected at the moment?
Quote:but it didn't have an effect.
Loading code is incomplete, work in progress.

I would like to get rid of the textures directories(have textures, meshes, config files in one directory) if there are no objections. And get rid of the subdirectories in carparts.
So..., I just put together some stuff that gives the option of specifying a quadrilateral frame for suspension (for, eg, double wishbone setups). This would make it possible, though not necessary, to have something like this in a (last I checked, wheel) section:

Code:
suspension = quad
position = -0.69, 1.28, -0.45
hinge-upper = -0.35, 1.28, -0.07
hinge-lower = -0.28, 1.26, -0.44
mount-upper = -0.64, 1.30, -0.37
mount-lower = -0.65, 1.26, -0.56

Does this seem reasonable?
Quote:Loading code is incomplete, work in progress.

gotcha

Quote:I would like to get rid of the textures directories(have textures, meshes, config files in one directory) if there are no objections. And get rid of the subdirectories in carparts.

yeah, it seems kinda strange to have meshes is the car's root and then textures in a sub-directory. i think either doing that or to have a /media sub-directory under each car. and the only reason to do that would be if the amount of files in the car's root directory starts getting unwieldy. which could happen start to happen. depending on what extent we use sub-sectioning in cars.



Quote:suspension = quad
position = -0.69, 1.28, -0.45
hinge-upper = -0.35, 1.28, -0.07
hinge-lower = -0.28, 1.26, -0.44
mount-upper = -0.64, 1.30, -0.37
mount-lower = -0.65, 1.26, -0.56


it would be really cool to have a simple single wishbone mesh with vertex groups encompassing each of the 3 "points" on the wishbone, so it could be stretched to the spec in the .car file. the mesh could be in the carparts folder. and we could use it to get a visual model for the suspension (top and bottom arm) on any car that needed it and didn't provide a custom mesh. needs vertex groups which could also help shrink the driver mesh selectively to make him fit in smaller cars.
zimluura Wrote:it would be really cool to have a simple single wishbone mesh with vertex groups encompassing each of the 3 "points" on the wishbone, so it could be stretched to the spec in the .car file. the mesh could be in the carparts folder. and we could use it to get a visual model for the suspension (top and bottom arm) on any car that needed it and didn't provide a custom mesh. needs vertex groups which could also help shrink the driver mesh selectively to make him fit in smaller cars.

Defining all those points would actually make it easier to locate your suspension hinges because you're giving it the axes of rotation for the wishbones.

If there are to be models for suspension frames (makes at least as much sense as having visible brake discs), might it make more sense then to actually specify suspension types such as "double wishbone", "macpherson", "leading arm" etc. It also opens the question of implementing linked suspension.
Further, I'd like to rearrange the suspension loading so that it's almost all done in the suspension class itself.

In other news, it would be nice to be able to specify the location of brake discs/drums.
Quote:Defining all those points would actually make it easier to locate your suspension hinges because you're giving it the axes of rotation for the wishbones.

i think this is the best reason to do it. so we can bolt the suspension together, and make sure it looks correct. and the hinge parameters could be (hopefully) more realistic to the car if the computer figures them out. it would be very cool to see the car in front of you bottom out after catching air, and see the suspension compress, but most of the time i probably won't be paying attention.

maybe something like
[suspension/front/macpherson]
...parameters that make sense for a macpherson strut

[suspension/rear/leafspring]
...parameters that make sense for a leaf spring
Support for variable number of drawable components is in trunk. Every car component has optionally:
Code:
[foobar]
texture = foo.png, bar.png
mesh = foo.joe
scale = 1,1,1
position = 0,0,0
rotation = 0,0,0
color = 1,1,1,1
draw = {emissive, transparent}

The position, rotation are relative to parent. Scale is somewhat expensive, is creating a scaled copy of the mesh.
awesome!!

just got a chance to play with the LE and add it's accessories in (including the steering wheel) i'll commit what i've got now.

the mirrors and hard top will need a flag to color themselves like the body. and various things will need geometry flip/transpose functions. but this is really really cool!! now each car's modeling pipeline can be a little different to suit the vehicles needs exactly.

i want to transpose the seat's mesh so it's origin is at the center of mass, so later the passenger seat can be removed to save weight and it will shift the balance of the car slightly.

[edit]
oh, i center allot of the object meshes acually. the steering wheel so it will be easier to rotate, and the fog-lights too.
trying to get the seat exported, and i get an error.
here's the output:

Traceback (most recent call last):
File "/home/zimluura/.blender/scripts/export-joe.py", line 30, in save_joe
filename = mesh.properties['joename']
KeyError: 'key not in subgroup dict'

tried on the seat, and triangulated cubes. i am typing a filename. tried with almost all the export.py files in there, but most recently with just export-joe.py, import-joe.py, and vdrift.py

any ideas?
Comment out
Code:
filename = mesh.properties['joename']
for now.

Edit: I reverted the changes. The latest rev should work again.
cool, thanks. i got the LE seat and steering wheel redone. the rotation parameter doesn't seem to work yet. but aside from that i think the steering wheel should be all set for making it turn as you turn the car.
made the LE allot less prone to flipping over. it's ballast weights were way too high.

also added a side_mirror_rr.joe which has the normals flipped on the mirror surface. that,bright red specular, and the real time reflections vdrift has make it look pretty good.

you have to be in wide angle view to see it though.
i think the carparts folder is sort of messy now. the number of wheel styles could theoretically grow to hundreds. drivers, and brakes, to a lesser extent. if we have engine models and text configuration files then that will also be quite allot.

sorry, i had meant to say it made sense to have everything in a car's root folder, but could make things unwieldy on the car-parts. i have 3 or 4 rim styles i wanted to add. and was going to do more brake calipers (for career mode upgrades) once the code was present to draw them, and the model spec was complete.

don't know how much benefit you get from it this was though.
Quote:i think the carparts folder is sort of messy now

The problem is simple. If the mesh/texture is not in the car directory where should we look for it? Right now it is the carparts directory.

I could implement a recursive search. This would allow to create any directory structure one wants. But you would have to guarantee that there are no assets having the same filename.

Another way would be to replicate the carparts directory structure in the car folders.
Code:
mesh = wheel/wheel_oem.joe
instead of
Code:
mesh = wheel_oem.joe
Pages: 1 2 3 4 5