Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Download Outerra Tech Demo. Unofficial Outerra Discord server, MicroProse Discord server for OWS.

Author Topic: Ford F-150 2004  (Read 19223 times)

ToZik

  • Member
  • **
  • Posts: 81
  • Modeler for Outerra
Ford F-150 2004
« 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)





Logged

ZeosPantera

  • ||>>-Z-<<||
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2520
  • #1 Outerra Fan Boy
    • My Youtube
Re: Ford F-150 2004
« Reply #1 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!

Logged
"Fear accompanies the possibility of death, Calm shepherds its certainty" - General Ka Dargo

Foxiol

  • Full Member
  • ***
  • Posts: 101
  • Gamer
Re: Ford F-150 2004
« Reply #2 on: April 07, 2013, 11:32:50 pm »

Thank you! Very nice model. ;)
Logged

Unsurt

  • Jr. Member
  • *
  • Posts: 37
  • 1/T
Re: Ford F-150 2004
« Reply #3 on: April 08, 2013, 07:45:22 am »

Thank you for sharing, good work  :D
Logged

ToZik

  • Member
  • **
  • Posts: 81
  • Modeler for Outerra
Re: Ford F-150 2004
« Reply #4 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. :-)
Logged

madnjpn

  • Newbie
  • Posts: 7
    • DriftArt. AC
Re: Ford F-150 2004
« Reply #5 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.




//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);


Logged
i7 3770
GTX1060 6GB
32 GB RAM

M7

  • Hero Member
  • *****
  • Posts: 736
  • newbie
Re: Ford F-150 2004
« Reply #6 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

Logged

Cristian

  • Newbie
  • Posts: 4
  • newbie
Re: Ford F-150 2004
« Reply #7 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




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




Here is a video:

« Last Edit: May 02, 2013, 05:35:11 am by Cristian »
Logged

M7

  • Hero Member
  • *****
  • Posts: 736
  • newbie
Re: Ford F-150 2004
« Reply #8 on: May 02, 2013, 08:43:22 am »

much better, thanks!
Logged

bugsblake

  • Sr. Member
  • ****
  • Posts: 255
  • jedi master
Re: Ford F-150 2004
« Reply #9 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
Logged
Intel 6 core i7 Xeon - 4930k @3.40 GHz
GTX 770 4GB X2 in SLI
Asus P9X79 Extreme MOBO
Patriot 16GB DDR3 1600MHz
SSD 250GB + SATA 500GB + SATA 1TB

Atrax

  • Full Member
  • ***
  • Posts: 119
  • newbie
    • AtraxGaming Game Shop
Re: Ford F-150 2004
« Reply #10 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 :)

ToZik

  • Member
  • **
  • Posts: 81
  • Modeler for Outerra
Re: Ford F-150 2004
« Reply #11 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
Logged