Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Outerra Tech Demo download. Help with graphics driver issues

Pages: 1 [2]

Author Topic: PlanetSide 2 Vanguard  (Read 17085 times)

PytonPago

  • Hero Member
  • *****
  • Posts: 2254
  • It´s way too complex, dont let me try to explain !
Re: PlanetSide 2 Vanguard
« Reply #15 on: June 28, 2015, 02:26:49 pm »

... on what version of Max was it created ? ... i have 2010 and it wont open ... i could import the separate .obj parts, but for some reason, after exporting it to into one .obj file (cause i want to work on it in Blender, so i must export it out), all UVs are a mess (pieces of them are all around and owerlaping --- evidently, the max file has them located right, but the .obj´s in some other arrangement system). 

 ... could you try to export the model to .obj for me from your max program (or someone) ? Some changes need to be done, its just as a static model, so the cannon and turret is one mesh, leading wheels and the body too, etc. so id have to do some splitting to make it animated. Just need them damned UVs as they should ...
« Last Edit: June 28, 2015, 02:29:29 pm by PytonPago »
Logged
We are still undeveloped as long as we don´t realize, that all our science is still descriptive, and than beyond that description lies a whole new world we just haven´t even started to fully understand.

TruenoCraft

  • Jr. Member
  • *
  • Posts: 22
    • YouTube Channel
Re: PlanetSide 2 Vanguard
« Reply #16 on: June 28, 2015, 03:13:47 pm »

... on what version of Max was it created ? ... i have 2010 and it wont open ... i could import the separate .obj parts, but for some reason, after exporting it to into one .obj file (cause i want to work on it in Blender, so i must export it out), all UVs are a mess (pieces of them are all around and owerlaping --- evidently, the max file has them located right, but the .obj´s in some other arrangement system). 

 ... could you try to export the model to .obj for me from your max program (or someone) ? Some changes need to be done, its just as a static model, so the cannon and turret is one mesh, leading wheels and the body too, etc. so id have to do some splitting to make it animated. Just need them damned UVs as they should ...
Take this file. It's better Download (And Thank you :D)
Logged

PytonPago

  • Hero Member
  • *****
  • Posts: 2254
  • It´s way too complex, dont let me try to explain !
Re: PlanetSide 2 Vanguard
« Reply #17 on: June 28, 2015, 04:19:43 pm »

... on what version of Max was it created ? ... i have 2010 and it wont open ... i could import the separate .obj parts, but for some reason, after exporting it to into one .obj file (cause i want to work on it in Blender, so i must export it out), all UVs are a mess (pieces of them are all around and owerlaping --- evidently, the max file has them located right, but the .obj´s in some other arrangement system). 

 ... could you try to export the model to .obj for me from your max program (or someone) ? Some changes need to be done, its just as a static model, so the cannon and turret is one mesh, leading wheels and the body too, etc. so id have to do some splitting to make it animated. Just need them damned UVs as they should ...
Take this file. It's better Download (And Thank you :D)

 :o   ... you used this one for import ?
Logged
We are still undeveloped as long as we don´t realize, that all our science is still descriptive, and than beyond that description lies a whole new world we just haven´t even started to fully understand.

TruenoCraft

  • Jr. Member
  • *
  • Posts: 22
    • YouTube Channel
Re: PlanetSide 2 Vanguard
« Reply #18 on: June 28, 2015, 04:51:03 pm »

:o   ... you used this one for import ?
Yes I did, why?
Logged

PytonPago

  • Hero Member
  • *****
  • Posts: 2254
  • It´s way too complex, dont let me try to explain !
Re: PlanetSide 2 Vanguard
« Reply #19 on: June 29, 2015, 01:12:08 am »

:o   ... you used this one for import ?
Yes I did, why?





 ... either Blender plays with me, cause he secretly hates NCs, or ... well i dont know.
No crtitics doe, if it works, i just ...



Well, the TOW-part is visible - just double-stuff is shifted outside the picture into the right side ... but the other ones ... i wouldn't guess if i were on all the Afghans crack in the world, witch should be where ...

 doe pieces are properly split in the model it seems - i just splitted the wheels off from the main body so i would just copy-paste the whole tiger2 script in, having those wheels named the same as in the script (2a, 2b, 3a ... 10a, 10b), so they could turn around the same way too (off course putting theyr origins to the center of theyr geometry too). ... else, just a little tweak to the script to be able to handle both the turret and the TOW separately, like in my promo-4-turret script :

Code: [Select]
//vehicle script file
//see http://xtrac.outerra.com/index.fcgi/wiki/vehicle for example and documentation
var bscount;

var aAAuxb2Time;
var aAAuxb2Bool;

var turret
var mantlet

const MaxTurretXSpeed01 = 10; //deg/s
const MaxTurretYSpeed01 = 10; //deg/s
const MaxTurretXAccel01 = 100;//deg/s^2
const MaxTurretYAccel01 = 100;//deg/s^2
const MinTurretAngle01 = -7.2;  //in deg  gun depression
const MaxTurretAngle01 = 60; //in deg  gun elevation

const MaxTurretXSpeed02 = 10; //deg/s
const MaxTurretYSpeed02 = 10; //deg/s
const MaxTurretXAccel02 = 100;//deg/s^2
const MaxTurretYAccel02 = 100;//deg/s^2
const MinTurretAngle02 = -7.2;  //in deg  gun depression
const MaxTurretAngle02 = 60; //in deg  gun elevation

const TurningBoost = 0.4;   //boost coefficient to help with turning at speed
const TurnForceCoef = 0.8;  //portion of engine force for neutral turns
const RollingFriction = 1000;//force that needs to be overcome to get wheels turning

const EF = 25000.0;         //engine force
const BF = 20000.0;         //braking force
const EFr = 0.02;           //engine force reduction coef with speed
const maxkmh = 40;          //top speed



function radians(v){
  return v*Math.PI/180.0;
}


//invoked only the first time the model is loaded, or upon reload
function init_chassis(){
  var wheelparam = {
    radius: 0.50,
    width: 0.20,
    suspension_max: 0.25,
    suspension_min: -0.25,
    //ride height   
    suspension_stiffness: 3.9,

    damping_compression: 0.5,
    damping_relaxation: 0.4,
    slip: 0.5,
    slip_lateral_coef: 0.7,
    roll_influence: 0.1
  //rotation: -1
  };
  this.add_wheel('2a', wheelparam);
  this.add_wheel('2b', wheelparam);
  this.add_wheel('3a', wheelparam);
  this.add_wheel('3b', wheelparam);
  this.add_wheel('4a', wheelparam);
  this.add_wheel('4b', wheelparam);
  this.add_wheel('5a', wheelparam);
  this.add_wheel('5b', wheelparam);
  this.add_wheel('6a', wheelparam);
  this.add_wheel('6b', wheelparam);
  this.add_wheel('7a', wheelparam);
  this.add_wheel('7b', wheelparam);
  this.add_wheel('8a', wheelparam);
  this.add_wheel('8b', wheelparam);
  this.add_wheel('9a', wheelparam);
  this.add_wheel('9b', wheelparam);
  this.add_wheel('10a', wheelparam);
  this.add_wheel('10b', wheelparam);
 
  var geom = this.get_geomob(0);
this.Tur01 = this.geom.get_joint("turret");
 this.Gun01 = this.geom.get_joint("cannon");
this.Tur02 = this.geom.get_joint("rifle_base");
 this.Gun02 = this.geom.get_joint("rifle");
 
 aAAuxb2Time = 0.001;
  aAAuxb2Bool = false;

 bscount = 1;

  this.load_sound("tiger2_eng_starter.ogg");
  this.load_sound("tiger2_forward.ogg");
  this.load_sound("turret.ogg");
  this.add_sound_emitter("turret");
  this.add_sound_emitter("mantlet");

 
  return {mass:20000, com:{z:0.1,y:0.0}, steering:2.0, steering_ecf:60, centering: 100, centering_ecf:20,
   
  };
}

//invoked for each new instance of the vehicle
function init_vehicle(){
  //this.set_fps_camera_pos({x:-0.5,y:2.15,z:1.14});//commander view
  this.set_fps_camera_pos({x:-0.5,y:-0.3,z:2.5});//driver view
  this.snd = this.sound();
  this.snd.set_ref_distance(0, 15.0);
 
    this.geom = this.get_geomob(0);
   
 this.turx01 = new axis_integrator(radians(MaxTurretXSpeed01), radians(MaxTurretXAccel01));
  this.tury01 = new axis_integrator(radians(MaxTurretYSpeed01), radians(MaxTurretYAccel01), radians(MinTurretAngle01), radians(MaxTurretAngle01));

 this.turx02 = new axis_integrator(radians(MaxTurretXSpeed02), radians(MaxTurretXAccel02));
  this.tury02 = new axis_integrator(radians(MaxTurretYSpeed02), radians(MaxTurretYAccel02), radians(MinTurretAngle02), radians(MaxTurretAngle02));

}


//invoked when engine starts or stops
function engine(start){
  if(start){
    this.snd.play(0, 0, false, false);
    this.snd.play(0, 1, true, true);
  }
  else
    this.snd.stop(0);
  this.started = start;
}

//handle extra actions
function action(k,v,dt)
{
      switch(k){
     
         case AAuxb2: { // For changing counter state

          if (v == 1 && aAAuxb2Bool == true) {
            bscount = ( bscount + 1 );
     // this.snd.play(1, 4, false, true);
}

if (v == 1 && aAAuxb2Bool == false) {
         aAAuxb2Time = aAAuxb2Time + (2 * 1);
           bscount = ( bscount + 1 );
      //   this.snd.play(1, 4, false, false);
}

if (v == 1) {
    if (aAAuxb2Bool == false) {aAAuxb2Bool = true;}
    else{aAAuxb2Bool = false;}
}

    if (bscount > ľ) {bscount = 1;}

     if (bscount == 1) {
       this.log_inf("Main Gun");
     }
     if (bscount == 2) {
       this.log_inf("TOW");
     }

    }break;
     
        //Turret movements
     
  case ATurretX:
 
      if(bscount == 1){
  this.turx01.set(v);
      }
      if(bscount == 2){
  this.turx02.set(v);
      }
 
   break;
   
  case ATurretY:
 
      if(bscount == 1){
  this.tury01.set(v);
      }
      if(bscount == 2){
  this.tury02.set(v);
      }
     
   break;
 
    }
}

const forceloss = 1.0 / (EFr*maxkmh + 1);

//invoked each frame to handle the inputs and animate the model
function update_frame(dt, engine, brake, steering)
{
 
 
  //turret handling
  var tmov=false;
 
  if(this.turx01.changed(dt) && bscount == 1){
    this.geom.rotate_joint_orig(this.Tur01, this.turx01.value, {x:0,y:0,z:-1});
    tmov = true;
  }
  if(this.tury01.changed(dt) && bscount == 1){
    this.geom.rotate_joint_orig(this.Gun01, this.tury01.value, {x:1,y:0,z:0});
    tmov = true;
  }

    if(this.turx02.changed(dt) && bscount == 2){
    this.geom.rotate_joint_orig(this.Tur02, this.turx02.value, {x:0,y:0,z:-1});
    tmov = true;
  }
  if(this.tury02.changed(dt) && bscount == 2){
    this.geom.rotate_joint_orig(this.Gun02, this.tury02.value, {x:1,y:0,z:0});
    tmov = true;
  }
 
  if(tmov) {
    if(!this.turretsnd)
      this.snd.play_loop(1, 2);
  }
  else this.snd.stop(1);
  this.turretsnd = tmov;
 
 
  var kmh = this.max_tire_speed()*3.6;
 
  //reduce engine force with speed (hack)
  var esign = engine<0 ? -1 : 1;
  engine = EF*Math.abs(engine);
  var force = (esign>0) == (kmh>=0)
        ? 1.0/(EFr*Math.abs(kmh) + 1)
        : 1.0;
  force -= forceloss;
  force = esign*Math.max(0.0, Math.min(force, 1.0));
  engine *= force;
   
  this.snd.set_pitch(0, 1+0.01*kmh);
   
  //if(steering!=0) engine *= 1.5;
  //var el = steering>0 ? 0 : engine;
  //var er = steering<0 ? 0 : engine;
  var df = EF*TurnForceCoef*force;
  var el=engine,er=engine;
  var spd = 1 + TurningBoost*this.speed();
  if(this.started){
    if(steering>0){
      el-=spd*df; er+=df;
    }
    else if(steering<0){
      er-=spd*df; el+=df;
    }
  }

  this.wheel_force(-2, el);
  this.wheel_force(-3, er);
   
  brake *= BF;
  brake += RollingFriction;

  this.wheel_brake(-1, brake);

  //this.log_inf("L:"+el+" R:"+er+"   B:"+brake+"  SPD:"+kmh);
 
  //this.geom.rotate_joint_orig(turret, this.turx, {x:0,y:0,z:-1});
  //this.geom.rotate_joint_orig(mantlet, this.tury, {x:1,y:0,z:0});

  this.animate_wheels();
}

... ill try to export it from Blender and import into OT to see, if the textures are messed up.
« Last Edit: June 29, 2015, 01:26:06 am by PytonPago »
Logged
We are still undeveloped as long as we don´t realize, that all our science is still descriptive, and than beyond that description lies a whole new world we just haven´t even started to fully understand.

PytonPago

  • Hero Member
  • *****
  • Posts: 2254
  • It´s way too complex, dont let me try to explain !
Re: PlanetSide 2 Vanguard
« Reply #20 on: June 29, 2015, 01:34:46 am »

This is how the model looks after the splitting and hierarchy changes :



... just posting, so if ya liked to do it yourself in the future for some more of the games tanks, you knew how to play around with the model (FOR THE SCRIPT) ...

Dont mind the turret prefs (max, min tilt etc.), nor the wheel-parameters, need to have it imported and working to look how those specs must look for that thing. Besides, i needed to lift the turret by some centimeters. If it rotated around as it were originally, the turret would tear up the higher engine compartment on the main body. (and its the same way in the game, omg)

 ... also, put some disclaimer in - its the games property, so if ya write "just for personal, non profit use", it should be fine.
« Last Edit: June 29, 2015, 01:44:46 am by PytonPago »
Logged
We are still undeveloped as long as we don´t realize, that all our science is still descriptive, and than beyond that description lies a whole new world we just haven´t even started to fully understand.

PytonPago

  • Hero Member
  • *****
  • Posts: 2254
  • It´s way too complex, dont let me try to explain !
Re: PlanetSide 2 Vanguard
« Reply #21 on: June 30, 2015, 05:40:33 am »

I dont get it ... it just worked, with such messed up UVs .... i just dont know what to think now .... HERE YA GO FELLAS, GRAB IT :

https://drive.google.com/file/d/0B3ZscF0ox2AGV1JFSm9rejNQem8/view?usp=sharing


 ... you have to add sounds yourselve (just use those same names as in script) ... and tamper with the gun elevation props. Also, if you press AUX1, you can switch to the TOW ... but it uses the same X and Y rotation values right now.
« Last Edit: June 30, 2015, 05:43:52 am by PytonPago »
Logged
We are still undeveloped as long as we don´t realize, that all our science is still descriptive, and than beyond that description lies a whole new world we just haven´t even started to fully understand.

BijiHunter

  • Jr. Member
  • *
  • Posts: 15
Re: PlanetSide 2 Vanguard
« Reply #22 on: June 30, 2015, 12:06:46 pm »

You're a wizard PytonPago!
Logged
“Man cannot discover new oceans unless he has the courage to lose sight of the shore.”

― André Gide

PytonPago

  • Hero Member
  • *****
  • Posts: 2254
  • It´s way too complex, dont let me try to explain !
Re: PlanetSide 2 Vanguard
« Reply #23 on: June 30, 2015, 12:14:15 pm »

You're a wizard PytonPago!


 ... nah, im just a religious man .... in the religion of



 =D

Besides, wizardry is what that guy done with the UVs ... i cant even imagine to get to that level in 3D Hogwards.

... well, just look up what i did in the model, paste the same script and so you can import all those tanks from that series.
Logged
We are still undeveloped as long as we don´t realize, that all our science is still descriptive, and than beyond that description lies a whole new world we just haven´t even started to fully understand.

TruenoCraft

  • Jr. Member
  • *
  • Posts: 22
    • YouTube Channel
Re: PlanetSide 2 Vanguard
« Reply #24 on: July 04, 2015, 12:15:23 pm »

You're a wizard PytonPago!


 ... nah, im just a religious man .... in the religion of



 =D

Besides, wizardry is what that guy done with the UVs ... i cant even imagine to get to that level in 3D Hogwards.

... well, just look up what i did in the model, paste the same script and so you can import all those tanks from that series.
You did an excellent job man thank you very much :D
Logged
Pages: 1 [2]