Drivable Vehicle Model [solved]

Got problems with your models? Struggling with textures? Get help with your custom assets.

Drivable Vehicle Model [solved]

Postby TheDanishMaster on Mon Nov 22, 2010 1:37 pm

Hey guys. I've been looking on a lot of pages and I can't seem to find a tutorial on how to make a model drivable using 3Ds Max. Well I know about bones and stuff but I can't seem to get it to work. HAALP!

thx
Last edited by TheDanishMaster on Fri Dec 10, 2010 4:17 pm, edited 1 time in total.
Specs:
MSI P67A-GD55, Intel Core i7 Sandy Bridge 2600k @ 3,4GHz, Corsair 8GB DDR3 1333MHz, 1TB HDD, NVidia GTX580 1,5GB GDDR5, Blu-Ray drive
Image
User avatar
TheDanishMaster
Been Here A While
Been Here A While
 
Joined: Sun Jul 26, 2009 7:02 pm

Re: Drivable Vehicle Model

Postby TheDanishMaster on Mon Nov 22, 2010 6:40 pm

Finally something seems to work.. BUT I still have a little problem with the physbox

have a look
Image

Upper: The model viewer from Source SDK
Lower: In 3ds max 2011

So what should I do?
Specs:
MSI P67A-GD55, Intel Core i7 Sandy Bridge 2600k @ 3,4GHz, Corsair 8GB DDR3 1333MHz, 1TB HDD, NVidia GTX580 1,5GB GDDR5, Blu-Ray drive
Image
User avatar
TheDanishMaster
Been Here A While
Been Here A While
 
Joined: Sun Jul 26, 2009 7:02 pm

Re: Drivable Vehicle Model

Postby Gary on Mon Nov 22, 2010 6:54 pm

Build a collision model
Each separate object is converted into a convex hull. So you should have all faces that belong to a single convex object be a single smoothing group & texture. Also, it uses simple vertex connectivity to determine what an object is, so don't connect things you don't want turned into a single convex hull. Studiomdl does not optimize any of the meshes, it just makes convex hulls.
As a rule of thumb, you shouldn't model anything smaller than 1" cubed as a detail. You should be somewhat coarse in that regard, all details like bolts, buttons, etc should not be modeled as separate convex pieces.
In general, it's totally fine for convex pieces to overlap. So if this lets you make the model out of fewer (but larger) convex pieces, then that is good for performance. Please do so. You want to have as few convex pieces as possible. Number of vertices is less important, but it should be on the order of a lower LOD of the render model. You're not going to feel/notice inaccuracies of 1" in any cases - there are plenty of other factors that players will notice first.


I think that is what you want, sorry if I misunderstood the problem.
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: Drivable Vehicle Model

Postby TheDanishMaster on Mon Nov 22, 2010 7:19 pm

Gary wrote:
Build a collision model
Each separate object is converted into a convex hull. So you should have all faces that belong to a single convex object be a single smoothing group & texture. Also, it uses simple vertex connectivity to determine what an object is, so don't connect things you don't want turned into a single convex hull. Studiomdl does not optimize any of the meshes, it just makes convex hulls.
As a rule of thumb, you shouldn't model anything smaller than 1" cubed as a detail. You should be somewhat coarse in that regard, all details like bolts, buttons, etc should not be modeled as separate convex pieces.
In general, it's totally fine for convex pieces to overlap. So if this lets you make the model out of fewer (but larger) convex pieces, then that is good for performance. Please do so. You want to have as few convex pieces as possible. Number of vertices is less important, but it should be on the order of a lower LOD of the render model. You're not going to feel/notice inaccuracies of 1" in any cases - there are plenty of other factors that players will notice first.


I think that is what you want, sorry if I misunderstood the problem.


I don't think you misunderstood but I that sounds like what I've done so far. And it seems like either the SMD export plugin messes up the physbox or the studiomdl does. Last time I had this problem was when i used XSI 6.1 and I found out that it was because of its age. 3ds max 2011 isn't that old and that plugin works fine with any other model :/
Specs:
MSI P67A-GD55, Intel Core i7 Sandy Bridge 2600k @ 3,4GHz, Corsair 8GB DDR3 1333MHz, 1TB HDD, NVidia GTX580 1,5GB GDDR5, Blu-Ray drive
Image
User avatar
TheDanishMaster
Been Here A While
Been Here A While
 
Joined: Sun Jul 26, 2009 7:02 pm

Re: Drivable Vehicle Model

Postby TheDanishMaster on Mon Nov 22, 2010 10:15 pm

Right so I've fixed the collision model now (added a bone to it) but now... This must be the last problem.., In Model Viewer.. If I go from ani idle to ani turning the model rotates 90 degress which might be why the car seems to drive sideways :/ and it flips over and breakdances HALP NAOW
Specs:
MSI P67A-GD55, Intel Core i7 Sandy Bridge 2600k @ 3,4GHz, Corsair 8GB DDR3 1333MHz, 1TB HDD, NVidia GTX580 1,5GB GDDR5, Blu-Ray drive
Image
User avatar
TheDanishMaster
Been Here A While
Been Here A While
 
Joined: Sun Jul 26, 2009 7:02 pm

Re: Drivable Vehicle Model

Postby Jangalomph on Mon Nov 22, 2010 10:25 pm

Yeah, it'd be nice to get this fixed for our mod :D :smt023.. any takers?
http://www.nomoreroominhell.com
I don’t know whether I was right or wrong, I guess I’ll never know… But I made it. And I guess I should be thankful for that. - Strelok
Has anyone really been far even as decided to use even go want to do look more like?
User avatar
Jangalomph
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Wed Jun 25, 2008 3:19 pm
Location: Sumter, SC

Re: Drivable Vehicle Model

Postby Groxkiller585 on Tue Nov 23, 2010 3:15 am

I want a video of that, both to help visualize the problem and for the lols.
User avatar
Groxkiller585
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Fri Jul 09, 2010 3:43 pm

Re: Drivable Vehicle Model

Postby TheDanishMaster on Wed Nov 24, 2010 8:14 pm

I made it go forward and fixed the other shit by messing with the script file.. All there is left is this: The view seems to rotate 45 degress after a certain amount of speed check it out

Specs:
MSI P67A-GD55, Intel Core i7 Sandy Bridge 2600k @ 3,4GHz, Corsair 8GB DDR3 1333MHz, 1TB HDD, NVidia GTX580 1,5GB GDDR5, Blu-Ray drive
Image
User avatar
TheDanishMaster
Been Here A While
Been Here A While
 
Joined: Sun Jul 26, 2009 7:02 pm

Re: Drivable Vehicle Model

Postby Groxkiller585 on Thu Nov 25, 2010 3:51 am

Now that is odd.

Also, you scripted a new entity? How do you do that? :/

Either way, at least the car model looks cool. And it runs.
User avatar
Groxkiller585
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Fri Jul 09, 2010 3:43 pm

Re: Drivable Vehicle Model

Postby TheDanishMaster on Thu Nov 25, 2010 3:40 pm

Well its not a new entity but every vehicle has a script. This script defines its handling.. Ex speed or turn amount
Specs:
MSI P67A-GD55, Intel Core i7 Sandy Bridge 2600k @ 3,4GHz, Corsair 8GB DDR3 1333MHz, 1TB HDD, NVidia GTX580 1,5GB GDDR5, Blu-Ray drive
Image
User avatar
TheDanishMaster
Been Here A While
Been Here A While
 
Joined: Sun Jul 26, 2009 7:02 pm

Re: Drivable Vehicle Model

Postby TheDanishMaster on Mon Dec 06, 2010 4:33 pm

Righty so it works now... JUUUUst one little little baby thing
Specs:
MSI P67A-GD55, Intel Core i7 Sandy Bridge 2600k @ 3,4GHz, Corsair 8GB DDR3 1333MHz, 1TB HDD, NVidia GTX580 1,5GB GDDR5, Blu-Ray drive
Image
User avatar
TheDanishMaster
Been Here A While
Been Here A While
 
Joined: Sun Jul 26, 2009 7:02 pm

Re: Drivable Vehicle Model

Postby crazycarl on Mon Dec 06, 2010 8:16 pm

Hard to tell what the problem is without knowing what you've tried already, but you need to make an animation that's nine frames long, where all the wheels turn 360 degrees forward. My guess is this is set up wrong.

Here's the example code from http://developer.valvesoftware.com/wiki ... _(modeling) that describes the wheels turning.
Code: Select all
$poseparameter "vehicle_wheel_fl_spin" -180 180 wrap
$poseparameter "vehicle_wheel_fr_spin" -180 180 wrap
$poseparameter "vehicle_wheel_rl_spin" -180 180 wrap
$poseparameter "vehicle_wheel_rr_spin" -180 180 wrap

..................

$animation wheel_fl_spin0 "digger_wheelspin" frame 0 0 subtract neutral 0 weightlist wheel_fl
$animation wheel_fl_spin120 "digger_wheelspin" frame 3 3 subtract neutral 0 weightlist wheel_fl
$animation wheel_fl_spin240 "digger_wheelspin" frame 6 6 subtract neutral 0 weightlist wheel_fl
$sequence wheel_fl_spin { wheel_fl_spin0 wheel_fl_spin120 wheel_fl_spin240 wheel_fl_spin0 blendwidth 4 blend "vehicle_wheel_fl_spin" -180 180 } weightlist wheel_fl delta autoplay


Open your car in model viewer and in the sequence tab you should find sliders for steering, suspension, etc. The wheel spin parameter should go from -180 to 180 for the wheels to work right.
crazycarl
Been Here A While
Been Here A While
 
Joined: Tue Jan 12, 2010 9:12 pm

Re: Drivable Vehicle Model

Postby TheDanishMaster on Tue Dec 07, 2010 6:51 am

One thing I don't get is this:

Code: Select all
-spin - 9 frames - frame0: wheels at 0 degrees; frame9: wheels spun forwards 360 degrees


and then in the example code you showed this:
Code: Select all
$animation wheel_fl_spin0 "digger_wheelspin" frame 0 0 subtract neutral 0 weightlist wheel_fl
$animation wheel_fl_spin120 "digger_wheelspin" frame 3 3 subtract neutral 0 weightlist wheel_fl
$animation wheel_fl_spin240 "digger_wheelspin" frame 6 6 subtract neutral 0 weightlist wheel_fl


Again i did an animation with 9 frames. At frame 9 its neutral or 360 degress. At frame 0 nothing has been moved.
So I'm asking why something like wheel_fl_spin360 isn't there? Can Source find out itself or what?
Specs:
MSI P67A-GD55, Intel Core i7 Sandy Bridge 2600k @ 3,4GHz, Corsair 8GB DDR3 1333MHz, 1TB HDD, NVidia GTX580 1,5GB GDDR5, Blu-Ray drive
Image
User avatar
TheDanishMaster
Been Here A While
Been Here A While
 
Joined: Sun Jul 26, 2009 7:02 pm

Re: Drivable Vehicle Model

Postby crazycarl on Tue Dec 07, 2010 9:01 am

It doesn't need a wheel_fl_spin360 because that's the same as wheel_fl_spin0; it just uses the zero position twice twice. The only frames that are really important are 0, 3, and 6, which need to show the wheels at 0, 120, and 240 degrees respectively. That's enough information for the engine to make a complete circle.
crazycarl
Been Here A While
Been Here A While
 
Joined: Tue Jan 12, 2010 9:12 pm

Re: Drivable Vehicle Model

Postby TheDanishMaster on Tue Dec 07, 2010 5:40 pm

so first heres the defined attachments from qc
Code: Select all
$attachment wheel_fl "Golf.Wheel_FL" 0.00 0.00 0.00
$attachment wheel_fr "Golf.Wheel_FR" 0.00 0.00 0.00
$attachment wheel_rl "Golf.Wheel_RL" 0.00 0.00 0.00
$attachment wheel_rr "Golf.Wheel_RR" 0.00 0.00 0.00


k?
then heres the pose
$poseparameter "vehicle_wheel_fl_spin" -180.00 180.00
$poseparameter "vehicle_wheel_fr_spin" -180.00 180.00
$poseparameter "vehicle_wheel_rl_spin" -180.00 180.00
$poseparameter "vehicle_wheel_rr_spin" -180.00 180.00


and the weightlist thingy things with funny stuff
$weightlist wheel_fr_spin { "Golf.Wheel_FR" 1.0 }
$animation wheel_fr_spin0 "spinning" frame 0 0 subtract neutral 0 weightlist wheel_fr_spin
$animation wheel_fr_spin120 "spinning" frame 3 3 subtract neutral 0 weightlist wheel_fr_spin
$animation wheel_fr_spin240 "spinning" frame 6 6 subtract neutral 0 weightlist wheel_fr_spin
$sequence wheel_fr_spin { wheel_fr_spin0 wheel_fr_spin120 wheel_fr_spin240 wheel_fr_spin0 blendwidth 4 blend "vehicle_wheel_fr_spin" -180 180 } weightlist wheel_fr_spin delta autoplay

$weightlist wheel_fl_spin { "Golf.Wheel_FL" 1.0 }
$animation wheel_fl_spin0 "spinning" frame 0 0 subtract neutral 0 weightlist wheel_fl_spin
$animation wheel_fl_spin120 "spinning" frame 3 3 subtract neutral 0 weightlist wheel_fl_spin
$animation wheel_fl_spin240 "spinning" frame 6 6 subtract neutral 0 weightlist wheel_fl_spin
$sequence wheel_fl_spin { wheel_fl_spin0 wheel_fl_spin120 wheel_fl_spin240 wheel_fl_spin0 blendwidth 4 blend "vehicle_wheel_fl_spin" -180 180 } weightlist wheel_fl_spin delta autoplay

$weightlist wheel_rr_spin { "Golf.Wheel_RR" 1.0 }
$animation wheel_rr_spin0 "spinning" frame 0 0 subtract neutral 0 weightlist wheel_rr_spin
$animation wheel_rr_spin120 "spinning" frame 3 3 subtract neutral 0 weightlist wheel_rr_spin
$animation wheel_rr_spin240 "spinning" frame 6 6 subtract neutral 0 weightlist wheel_rr_spin
$sequence wheel_rr_spin { wheel_rr_spin0 wheel_rr_spin120 wheel_rr_spin240 wheel_rr_spin0 blendwidth 4 blend "vehicle_wheel_rr_spin" -180 180 } weightlist wheel_rr_spin delta autoplay

$weightlist wheel_rl_spin { "Golf.Wheel_RL" 1.0 }
$animation wheel_rl_spin0 "spinning" frame 0 0 subtract neutral 0 weightlist wheel_rl_spin
$animation wheel_rl_spin120 "spinning" frame 3 3 subtract neutral 0 weightlist wheel_rl_spin
$animation wheel_rl_spin240 "spinning" frame 6 6 subtract neutral 0 weightlist wheel_rl_spin
$sequence wheel_rl_spin { wheel_rl_spin0 wheel_rl_spin120 wheel_rl_spin240 wheel_rl_spin0 blendwidth 4 blend "vehicle_wheel_rl_spin" -180 180 } weightlist wheel_rl_spin delta autoplay


Any funny bissness going on?
Specs:
MSI P67A-GD55, Intel Core i7 Sandy Bridge 2600k @ 3,4GHz, Corsair 8GB DDR3 1333MHz, 1TB HDD, NVidia GTX580 1,5GB GDDR5, Blu-Ray drive
Image
User avatar
TheDanishMaster
Been Here A While
Been Here A While
 
Joined: Sun Jul 26, 2009 7:02 pm
Next

Return to Custom Asset Help

Who is online

Users browsing this forum: No registered users

cron