Outerra forum

User mods, screenshots & videos => Vehicles => Topic started by: ToZik on April 07, 2013, 12:51:05 pm

Title: Ford F-150 2004
Post by: ToZik on April 07, 2013, 12:51:05 pm
My new high-poly car model Ford F-150 2004.

List of bugs:
1. Two artifacts in the hood
2. One can see the wheels of the cab

Warning! If you decide to try out all the capabilities of the car, and he turned and started to turn around and fly bugged, just press Alt+R, which would restart the car.

Installation:
Folder from the archive to put in ..\Outerra Anteworld\packages\outerra

Author: ToZik

Download(MEGA) (https://mega.co.nz/#!vUQkFBoJ!ELDKJjiJQjy2J4K9q4DvAzvgbvthBw3X1_IEINSSRUQ)

(http://s017.radikal.ru/i429/1304/48/9579e172038et.jpg) (http://radikal.ru/F/s017.radikal.ru/i429/1304/48/9579e172038e.jpg.html)

(http://s017.radikal.ru/i406/1304/9b/598fd6b31a12t.jpg) (http://radikal.ru/F/s017.radikal.ru/i406/1304/9b/598fd6b31a12.jpg.html)

(http://s019.radikal.ru/i604/1304/64/973623b76426t.jpg) (http://radikal.ru/F/s019.radikal.ru/i604/1304/64/973623b76426.jpg.html)
Title: Re: Ford F-150 2004
Post by: ZeosPantera on April 07, 2013, 11:03:37 pm
I have touched the physics with my beat down stick.. The only thing I have consistently had to change is the "Slip" value for the tires on pretty much all the mod cars. Through much testing 0.57 seems to be THE starting point. It is the most realistic on grass and asphalt at speed and allows the tires to spin when you climb near vertical walls. Anything higher seems unrealistic.

I tweaked a load of stuff. 

Here is the code..
Code: [Select]
//invoked only the first time the model is loaded, or upon reload
function init_chassis()
{
  var wheelparam = {
    radius: 0.38,
    width: 0.265,
    suspension_max: 0.25,
    suspension_min: -0.10,
    suspension_stiffness: 20.0,
    damping_compression: 0.20,
    damping_relaxation: 0.08,
    slip: 0.60,
    roll_influnce: 0.1,
    rotation: -1,   
}
 
  this.add_wheel('wfl', wheelparam);
  this.add_wheel('wfr', wheelparam);
  this.add_wheel('wbl', wheelparam);
  this.add_wheel('wbr', wheelparam); 
 
  //sounds
  this.load_sound("mon_start.ogg");
  this.load_sound("mon_idle.ogg");
  this.add_sound_emitter("carpaint");
 
  return {mass:2315, steering:6.0, steering_ecf:40, centering:2.8, centering_ecf: 120,
  com:{z:-0.6, y:0.5}};
}

//invoked for each new instance of the vehicle
function init_vehicle()
{
  this.set_fps_camera_pos({x:-0.4,y:-0.08,z:0.6});
  this.snd = this.sound();
  this.snd.set_ref_distance(0, 9.0);

  this.started = 0;
}

function engine(start)
{
  if(start) {
    this.started=1;
    this.snd.play(0, 0, false, false);
  }
}


const EF = 8000.0;
const BF = 2500.0;
const maxkmh = 120;
const forceloss = EF / (0.4*maxkmh + 2);


//invoked each frame to handle inputs and animate the model
function update_frame(dt, engine, brake, steering)
{
  var kmh = this.speed()*3.6;
 
  //reduce engine force with speed (hack)
  var redux = engine>=0 ? 0.2 : 0.6;
  var esign = engine<0 ? -1 : 1;
  engine = EF*Math.abs(engine);
  var force = (esign>0) == (kmh>=0)
        ? engine/(redux*Math.abs(kmh) + 1)
        : engine;
  force -= forceloss;
  force = Math.max(0.0, Math.min(force, engine));
  engine = esign*force;


  steering *= 0.6;
  this.steer(0, steering);
  this.steer(1, steering);

 
 
  if(this.started>1)
    this.wheel_force(0, engine);
    this.wheel_force(1, engine);
    this.wheel_force(2, engine);
    this.wheel_force(3, engine);
 
  brake *= BF;
  this.wheel_brake(-1, brake);

  if(this.started==1 && !this.snd.is_playing(0)) {
    this.started=2;
    this.snd.play(0, 1, true, false);
  }
  else if(this.started==2) {
    var pitch = Math.abs(kmh)/20.0;
    var g = kmh>0 ? Math.floor(pitch) : 0;
    var f = pitch - g;
    f += 0.5*g;
    this.snd.set_pitch(0, 0.5*f + 1.0);
  }
  this.animate_wheels(); 
}

And a video of the cross country results!

Outerra - Ford F150 (Modded Physics) (http://www.youtube.com/watch?v=JnTLX8Vn504#)
Title: Re: Ford F-150 2004
Post by: Foxiol on April 07, 2013, 11:32:50 pm
Thank you! Very nice model. ;)
Title: Re: Ford F-150 2004
Post by: Unsurt on April 08, 2013, 07:45:22 am
Thank you for sharing, good work  :D
Title: Re: Ford F-150 2004
Post by: ToZik on April 08, 2013, 10:05:17 am
 Thanks all. ZeosPantera, thanks for physics, as always helping. Next time I will do as you say. :-)
Title: Re: Ford F-150 2004
Post by: madnjpn on April 20, 2013, 04:32:12 pm
This is my config, I made it a little SPORTY, now it is a bit more powerfull and has better suspension.

(http://s018.radikal.ru/i501/1304/16/9697aaa155a9.jpg) (http://www.radikal.ru)


//invoked only the first time the model is loaded, or upon reload
function init_chassis()
{
  var wheelparam = {
    radius: 0.38,
    width: 0.265,
    suspension_max: 0.50,
    suspension_min: -0.10,
    suspension_stiffness: 28.0,
    damping_compression: 0.10,
    damping_relaxation: 0.60,
    slip: 0.60,
    roll_influnce: 0.1,
    rotation: -1,   
}
 
  this.add_wheel('wfl', wheelparam);
  this.add_wheel('wfr', wheelparam);
  this.add_wheel('wbl', wheelparam);
  this.add_wheel('wbr', wheelparam); 
 
  //sounds
  this.load_sound("mon_start.ogg");
  this.load_sound("mon_idle.ogg");
  this.add_sound_emitter("carpaint");
 
  return {mass:2500, steering:5.0, steering_ecf:40, centering:2.8, centering_ecf: 120,
  com:{z:-0.6, y:0.5}};
}

//invoked for each new instance of the vehicle
function init_vehicle()
{
  this.set_fps_camera_pos({x:-0.4,y:-0.08,z:0.6});   
  this.snd = this.sound();
  this.snd.set_ref_distance(0, 9.0);

  this.started = 0;
}

function engine(start)
{
  if(start) {
    this.started=1;
    this.snd.play(0, 0, false, false);
  }
}


const EF = 30000.0;
const BF = 5540.0;
const maxkmh = 260;
const forceloss = EF / (0.4*maxkmh + 2);


Title: Re: Ford F-150 2004
Post by: M7 on April 26, 2013, 02:30:42 am
I just learned how to play with  .matlib files to change the look of the default color. I first checked mLichy's Belair.matlib to find how to get glossy paint and chrome, then tried to apply it on the Ford. Hope you dont mind that i'm showing it here

Here's the Ford_F150.matlib if you want to try.
https://docs.google.com/file/d/0B96RrTcNJsI2bF9ZamdhWGJKRUU/edit?usp=sharing (https://docs.google.com/file/d/0B96RrTcNJsI2bF9ZamdhWGJKRUU/edit?usp=sharing)

(http://imageshack.us/a/img11/8373/f150i.jpg)
Title: Re: Ford F-150 2004
Post by: Cristian on May 02, 2013, 05:33:10 am
I just learned how to play with  .matlib files to change the look of the default color. I first checked mLichy's Belair.matlib to find how to get glossy paint and chrome, then tried to apply it on the Ford. Hope you dont mind that i'm showing it here

Here's the Ford_F150.matlib if you want to try.
https://docs.google.com/file/d/0B96RrTcNJsI2bF9ZamdhWGJKRUU/edit?usp=sharing (https://docs.google.com/file/d/0B96RrTcNJsI2bF9ZamdhWGJKRUU/edit?usp=sharing)

(http://imageshack.us/a/img11/8373/f150i.jpg)


I modified a little bit your .matlib file so now the glass is visible: http://www.outerra.com/forum/index.php?action=dlattach;topic=1642.0;attach=945 (http://www.outerra.com/forum/index.php?action=dlattach;topic=1642.0;attach=945)

(http://img703.imageshack.us/img703/9136/fordy.jpg) (http://imageshack.us/photo/my-images/703/fordy.jpg/)


Here is a video:

 (http://www.youtube.com/watch?v=wyIooYokFYQ#)
Title: Re: Ford F-150 2004
Post by: M7 on May 02, 2013, 08:43:22 am
much better, thanks!
Title: Re: Ford F-150 2004
Post by: bugsblake on May 30, 2013, 02:08:29 pm
thanks a lot for this! its the one i drive most in outerra! love it :D any plans to work on the interior? thanks
Title: Re: Ford F-150 2004
Post by: Atrax on November 21, 2013, 03:23:07 am
thanks a lot for this! its the one i drive most in outerra! love it :D any plans to work on the interior? thanks

I also hope to see proper interior. Great car to drive!
Thanks for sharing :)
Title: Re: Ford F-150 2004
Post by: ToZik on November 23, 2013, 10:06:07 am
While adding the interior I will not, most likely in the following models. The problem is that the interior is, in itself, a fairly complex 3D object. But do not worry, I'm going to start importing the model with the interior. Thanks