Home Technical Talk

Car customization

DirkJan
polycounter lvl 4
Offline / Send Message
DirkJan polycounter lvl 4
Hi fellow Polycounters.

I have to think of a system on how to make a basic car fully customizable. I am talking about changing the hood, bumpers, sideskirts.
Adding decals and stickers on the car and how to select different colors.
A bit like in Need for Speed.

I wonder if there are articles about this kind of thing, how it can be done, cheaply and relatively fast.

Thank you for your time,

Dirk Jan:poly142:

Replies

  • Angry Beaver
    Offline / Send Message
    Angry Beaver polycounter lvl 7
    cheaply like runtime cheap or cheaply manpower? fast on the cpu or a quick turnaround time?

    There's no bible to this stuff because you need to define the edges for youself, the basic premise is

    For paint: you'll want your shaders to have a base colour, then you apply dirt maps to that to make it look like a standard diffuse and then treat it like a regular shader. Now depending upon the complexity of your decal system you may need to be super careful with your U/Vs. If you wish to provide an arbitrary painting system then I'd basically write that off to a render target when your done painting. Otherwise some well designed pre-sets could be good. I'd recommend trying to line up your U/Vs across cars so you can re-use the decal paintings.

    For body parts: you'll want a 'core' part of the car that's not going to change much. probably the under carriage/frame. This will contain your skeleton. You'll want to then create several bones at key locations around your car to represent where you'll mount body parts. Now you could use sockets instead of bones but I found there was generally more potential issues when using sockets compared to bones. Then to finish making the 'car' you assign defaults to all the positions and voila

    For Damage effects: I'd include morph targets with all of the parts so they can look damaged. I'd also build it into the shader that there are scratches that can be applied to it. The car overall should detect the impacts then translate that into a section of the car to turn on the damage effect your lerping in. Don't forget a really good damage effect will include normal and specular modifications not just diffuse.

    You'll still need to define some things in stone or you're gonna have a HELL of a time lining things up. I recommend defining certain profiles to the cars so things like window shapes and doorframe forms get locked in on a per car basis. It means you might need to remodel the 'parts' for each car but the other options are a little fuzzt IMO. The only way to re-use parts is by being able to tweak the shape a little to fit all your cars, the 2 mechanisms for tweaking shape are animations and morph targets. I like morph targets for damage so that only leaves animation for tweaking your shapes which could be wonky. You may reverse it so you use animations for the damage so you can morph target the parts but that doesn't feel right to me.

    I've done this entire setup before and worked with coders/artist to implement it. Silly little indie project but I took it seriously. If you wanna chat more in depth hit me up as I'm sure I didn't directly answer your questions.
Sign In or Register to comment.