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.

Pages: 1 2 3 [4] 5 6

Author Topic: Bismark  (Read 86325 times)

PytonPago

  • Hero Member
  • *****
  • Posts: 2284
  • It´s way too complex, dont let me try to explain !
Re: Bismark
« Reply #45 on: March 28, 2014, 02:52:48 am »

Oh, i thought you meant that google drive-link (the tiger2 panzer)

Quote

If you could have a look . I dont quite understand how these kind of value works
this.geom.rotate_joint_orig(turret, this.turx.value, {x:1,y:0,z:0});
I just hope the turret pivot dont have to be moved the same way as the origin.


https://drive.google.com/file/d/0B96RrTcNJsI2M21seXNvenlGTE0/edit?usp=sharing



in the Bismark JS - at the end you had :

Code: [Select]
  }
  if(tmov) {
    if(!this.turretsnd)
      this.snd.play_loop(1, 3);
  }
  else  this.snd.stop(1); 
  this.turretsnd = tmov;
 
}

If has its arguments in "{"  "}", else should have too, like this :

Code: [Select]
  }
  if(tmov) {
    if(!this.turretsnd)
      this.snd.play_loop(1, 3);
  }
  else {
  this.snd.stop(1); 
  this.turretsnd = tmov;
  }

}

 ... i see you used the little tank-script, like me. Doe you dont need to define a separate mesh to be rotated at certain angle of the turret (he needed it to topple down the antenna sticking from the tanks side standing in the guns way). You better delete that part, i think it may interfere as stuff for that lines arent defined and antenna mesh missing in the model.


  //turret handling
  var tmov=false;
  if(this.turx.changed(dt)){
    this.geom.rotate_joint_orig(turret, this.turx.value, {x:0,y:1,z:0});
    if(this.turx.value>1) {
      var a = 2*(this.turx.value-1);
      if(a>1.57) a=1.57;
      this.geom.rotate_joint_orig(aerial, a, {x:0,y:0,z:0});

    }
    tmov = true;

... dont see anything else bad there. Im sure one of those things might got the turret "jammed". A little strange thing is, if you dont define some rotation-used mesh, or forget to rename the mesh in the rotation-script. Sometimes OT picks an casual one from the model (had my engine once spinning around instead of the gun :D )
« Last Edit: March 28, 2014, 03:10:13 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.

M7

  • Hero Member
  • *****
  • Posts: 736
  • newbie
Re: Bismark
« Reply #46 on: March 28, 2014, 01:07:05 pm »

Yeah it sure need some cleanup as i tend to leave everything in as long as it work.

I think i found the source of the pivot problem. Seems the sketchup FBX exporter will default all pivot to origin :'(. I can see it when i import into max. Still searching for solution.
Logged

M7

  • Hero Member
  • *****
  • Posts: 736
  • newbie
Re: Bismark
« Reply #47 on: March 30, 2014, 03:38:50 am »

Finally found a way to set those pivots. I actually had to take a turret and gun in sketchup and move it next to the origin where i wanted to pivot to be set, then i would make a separate fbx export for each  bone.  Then i would assemble back everything in max. A bit of a pain but i got the 4 guns to rotate together  ;D.

Now i need to get the engine sound to work, animate the propellers and limit the turrets rotation.

https://drive.google.com/file/d/0B96RrTcNJsI2ZDFzNzFWWU5YZXM/edit?usp=sharing


« Last Edit: April 01, 2014, 12:27:55 am by M7 »
Logged

PytonPago

  • Hero Member
  • *****
  • Posts: 2284
  • It´s way too complex, dont let me try to explain !
Re: Bismark
« Reply #48 on: March 30, 2014, 04:18:24 pm »

Nice work man, will try to assemble a script for the turrets to be used separately and post ya ...
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.

M7

  • Hero Member
  • *****
  • Posts: 736
  • newbie
Re: Bismark
« Reply #49 on: March 30, 2014, 10:01:52 pm »

I think i would have them to rotate in pair. I guess that's how they were used in RL. I'd like to limit their rotation angle. I think they should turn 140 degree on each side. I tried an educated guess in the script...
const MinTurretYAngle =140; 
const MaxTurretYAngle = -140;   (tried  with X too)
i though i made sense but no,  it didnt do anything  :(

There's also a fonction  i'd like to get for ships in general,  a throttle in percentage for the engine power  like planes instead of a gas pedal like vehicle. I think for ships it would make more sense. now can this  be script in JS or it has to be code in the engine?  And then i would try to animate propellers like plane propellers.
« Last Edit: March 31, 2014, 11:44:39 am by M7 »
Logged

PytonPago

  • Hero Member
  • *****
  • Posts: 2284
  • It´s way too complex, dont let me try to explain !
Re: Bismark
« Reply #50 on: March 31, 2014, 05:07:11 pm »

const MinTurretYAngle =140; 
const MaxTurretYAngle = -140;   (tried  with X too)
i though i made sense but no,  it didnt do anything  :(

thats odd ... does the X angles beig ignored too ? - try checking the :

Code: [Select]
  this.turx = new axis_integrator(radians(MaxTurretXSpeed), radians(MaxTurretXAccel), radians(MinTurretAng), radians(MaxTurretAng));
  this.tury = new axis_integrator(radians(MaxTurretYSpeed), radians(MaxTurretYAccel), radians(MinTurretAngle), radians(MaxTurretAngle));
  this.turretsnd = 0;

part in the ``function init_vehicle()`` part, if they dont have some mis-spelling ...


For that throttle ... there was an oldtimer mercedes video of a aircraft script-test on in whyte that kind of throttle. Dont think the script was shown anywhere, but the creator should have it stored somewhere ...
« Last Edit: March 31, 2014, 05:08:58 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.

Revolver

  • Hero Member
  • *****
  • Posts: 672
  • Adlerhorst-Hangar Design Group ©
Re: Bismark
« Reply #51 on: March 31, 2014, 05:54:29 pm »

OK.... my ship can shoot ...and yours?! :P  ;D ;)

Logged
"Es gibt nur eine Sünde, die gegen die ganze Menschheit mit allen ihren Geschlechtern begangen
werden kann, und dies ist die Verfälschung der Geschichte."(F.Hebbel)


M7

  • Hero Member
  • *****
  • Posts: 736
  • newbie
Re: Bismark
« Reply #52 on: March 31, 2014, 10:50:00 pm »

const MinTurretYAngle =140; 
const MaxTurretYAngle = -140;   (tried  with X too)
i though i made sense but no,  it didnt do anything  :(

thats odd ... does the X angles beig ignored too ? - try checking the :

Code: [Select]
  this.turx = new axis_integrator(radians(MaxTurretXSpeed), radians(MaxTurretXAccel), radians(MinTurretAng), radians(MaxTurretAng));
  this.tury = new axis_integrator(radians(MaxTurretYSpeed), radians(MaxTurretYAccel), radians(MinTurretAngle), radians(MaxTurretAngle));
  this.turretsnd = 0;

part in the ``function init_vehicle()`` part, if they dont have some mis-spelling ...

For that throttle ... there was an oldtimer mercedes video of a aircraft script-test on in whyte that kind of throttle. Dont think the script was shown anywhere, but the creator should have it stored somewhere ...
I made it up from   const MinTurretAngle it's not a real command i saw anywhere  , i just tried to add a X or Y to see if it would limit the turret rotation

I also to incorporate  MinTurretYAngle (or with X) into these lines but no cigar
  this.tury = new axis_integrator(radians(MaxTurretYSpeed), radians(MaxTurretYAccel), radians(MinTurretAngle), radians(MaxTurretAngle));

Quote
For that throttle ... there was an oldtimer mercedes video of a aircraft script-test on in whyte that kind of throttle. Dont think the script was shown anywhere, but the creator should have it stored somewhere ...
Is that this video?


OK.... my ship can shoot ...and yours?! :P  ;D ;)
Not yet but i hope someday replay this... 

Logged

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6721
  • No sense of urgency.
    • outerra.com
Re: Bismark
« Reply #53 on: April 01, 2014, 02:03:34 am »

I made it up from   const MinTurretAngle it's not a real command i saw anywhere  , i just tried to add a X or Y to see if it would limit the turret rotation

I also to incorporate  MinTurretYAngle (or with X) into these lines but no cigar
  this.tury = new axis_integrator(radians(MaxTurretYSpeed), radians(MaxTurretYAccel), radians(MinTurretAngle), radians(MaxTurretAngle));

I did the following:
Code: [Select]
  this.turx = new axis_integrator(radians(MaxTurretXSpeed), radians(MaxTurretXAccel), radians(-140), radians(140));
  this.tury = new axis_integrator(radians(MaxTurretYSpeed), radians(MaxTurretYAccel), radians(MinTurretAngle), radians(MaxTurretAngle));
... and it worked as expected. You could define those 140 as a const somewhere and refer to that, of course.
Logged

PytonPago

  • Hero Member
  • *****
  • Posts: 2284
  • It´s way too complex, dont let me try to explain !
Re: Bismark
« Reply #54 on: April 01, 2014, 02:39:39 am »

Yes, that is the car ...

 ... well, its true, that gas-pedals are intensity based. Seems, for simulations (whyte driving wheel and pedals on PC) it will be needed - thats a point there. (whyle using 100% on keyboard intput of course or finding a balanced way of altering that intensity trough maybe the number-pad - like power of engines in IL2 etc.)
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.

M7

  • Hero Member
  • *****
  • Posts: 736
  • newbie
Re: Bismark
« Reply #55 on: April 01, 2014, 09:46:25 am »

Thanks Cameni! It's perfect.

@Pyton     I dont know what to add to this. A plane like throttle that could be scripted would be the perfect solution, but even a toggle engine full, engine off could do for now . I need to reserve those keypad numbers for all the different turrets  ;D
« Last Edit: April 01, 2014, 09:56:07 am by M7 »
Logged

M7

  • Hero Member
  • *****
  • Posts: 736
  • newbie
Re: Bismark
« Reply #56 on: April 04, 2014, 12:59:59 am »

I added the 150mm gun turret animation. For now, all guns rotate with the same key.
https://drive.google.com/file/d/0B96RrTcNJsI2UFAwV0V3OU9meTA/edit?usp=sharing
Logged

PytonPago

  • Hero Member
  • *****
  • Posts: 2284
  • It´s way too complex, dont let me try to explain !
Re: Bismark
« Reply #57 on: April 08, 2014, 02:37:05 pm »

Here is, what i speculated out for the turrets - http://forum.outerra.com/index.php?topic=2596.0

I hope it can be used well in the Bismark - will be finally a real beast. Actually, if you add another node, that would use the turnxXXX or turnyXXX (XXX being some number) as an definition of the throttle, you could use the switch as an position changer between the bridge and separate turrets - just have to add the driving force as an variable, that would be set on its value and give an max-min angle for the turning on 0-100 as percents. (just adding another turret into the script that is, but it would not have an rotation command in the every FPS section of the script, but the definition of the throttle)
 
« Last Edit: April 08, 2014, 02:51:46 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.

M7

  • Hero Member
  • *****
  • Posts: 736
  • newbie
Re: Bismark
« Reply #58 on: April 11, 2014, 11:46:16 pm »

I got pytonpago script working 8). I even got rid of the sound loop error and now the turret sound play when turret turn!!!

So i got the turrets grouped in 4 groups.
the 2 front 380mm guns
the 2 back 380mm guns
the 3 left side 150mm guns
the 3 right side 150mm guns

Use the ''aux button 2'' to switch group

I didnt updated the main file so just copy the bismark.js attachment in the bismark folder.

edit: i thought i had the sound for engine and turrets working but no, as soon as turrets turns, the engine sound stop  :(
« Last Edit: April 12, 2014, 10:09:43 am by M7 »
Logged

Revolver

  • Hero Member
  • *****
  • Posts: 672
  • Adlerhorst-Hangar Design Group ©
Re: Bismark
« Reply #59 on: April 14, 2014, 06:16:07 am »

Very well! I am glad very much that they make what new and interesting for the OT-Community together. If they wanted, I could help for them with the Texturing. In addition I need only the UVW-Mapps...of course if they wanted it themselves... ;)
Logged
"Es gibt nur eine Sünde, die gegen die ganze Menschheit mit allen ihren Geschlechtern begangen
werden kann, und dies ist die Verfälschung der Geschichte."(F.Hebbel)


Pages: 1 2 3 [4] 5 6