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

Author Topic: waterline.  (Read 4733 times)

konaone

  • Full Member
  • ***
  • Posts: 132
  • newbie
waterline.
« on: January 05, 2015, 05:10:50 pm »

waterline.
I imported the model ship Rotterdam.
respond to commands floats, but the waterline is too.
how can I adjust it, whereas I used the script coastguard us?
Logged

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6716
  • No sense of urgency.
    • outerra.com
Re: waterline.
« Reply #1 on: January 06, 2015, 03:00:15 am »

You will get the correct waterline when you set a correct ship mass, and when the volume approximation is set right as well. The waterline is where the hydrostatic force balances the gravity.
Logged

konaone

  • Full Member
  • ***
  • Posts: 132
  • newbie
Re: waterline.
« Reply #2 on: January 06, 2015, 10:35:45 am »

Sorry Cameni unfortunately are poorly trained, ..... which folder I can change these parameters? :-[
Logged

PytonPago

  • Hero Member
  • *****
  • Posts: 2282
  • It´s way too complex, dont let me try to explain !
Re: waterline.
« Reply #3 on: January 06, 2015, 10:45:05 am »

Sorry Cameni unfortunately are poorly trained, ..... which folder I can change these parameters? :-[

Those should be in the .js file of the model you imported. It should be together with the vehicle mass and gravity-center parameters in the "function init. chasis" :

Code: [Select]
    return {com:{y:0.3, z:0.1}, mass:14710, steering:2.0, steering_ecf:60, centering: 2.6, centering_ecf:20, hydro_l:7.2, hydro_w:2.35, hydro_h1:0.0, hydro_h2:1.6, hydro_uplift:400, hydro_volcoef:0.8, Cx:{x:1.2, y:0.3, z:1.2, w:0.8}};

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.

Uriah

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 569
  • We do these things not because they are easy. -JFK
Re: waterline.
« Reply #4 on: January 06, 2015, 11:47:31 pm »

I am assuming this is exclusive to Bullet, and JSBSim does not interact with water using the same script. Is there an example of an aircraft that takes off and lands on water?

Regards,
Uriah
Logged

M7

  • Hero Member
  • *****
  • Posts: 736
  • newbie
Re: waterline.
« Reply #5 on: January 07, 2015, 12:53:53 am »

I am assuming this is exclusive to Bullet, and JSBSim does not interact with water using the same script. Is there an example of an aircraft that takes off and lands on water?

Regards,
Uriah

As far as i know, it's not possible yet.
Logged

konaone

  • Full Member
  • ***
  • Posts: 132
  • newbie
Re: waterline.
« Reply #6 on: January 14, 2015, 06:11:18 pm »


Ok, PytonPago, I modified the .js file as tur indications, the ship is properly positioned on the water, but by pressing the arrow keys will not move it veers.
the model has propellers, rudders and radar that can move with the pivot positioned in 3ds max.
appointed:
radar_id
radar2_id
rudderL_id
rudderLoo1_id
EnvironmentAmbientLight [vehicle script = "EnvironmentAmbientLight.js" EnvironmentAmbientLight]
smit_rotterdam_id [vehicle script = "smit_rotterdam_id.js" smit_rotterdam_id]
   glassr_id [glassr_id]
   glassr_id [glassr_id]
   radar_id [radar_id]
   rudder_L [rudder_L]
     rudder_L_PIVOT
   left_propeller_id [left_propeller_id]
     part_63_LOD_101
       part_63_LOD_101_PIVOT
   right_propeller_id [right_propeller_id]
     part_63_LOD_100
       part_63_LOD_100_PIVOT
   rudder_L001 [rudder_L001]
     rudder_L001_PIVOT
   radar2_id [radar2_id]
     part_113_LOD_100
   timone_id
.I Would like to modify the scripts to make them work, there are also different audio files, engine, horn, ignition that could be used ............. suggestions?
Logged

PytonPago

  • Hero Member
  • *****
  • Posts: 2282
  • It´s way too complex, dont let me try to explain !
Re: waterline.
« Reply #7 on: January 14, 2015, 08:42:57 pm »

Well, movement in water is defined by an extra force :

Code: [Select]
function update_frame(dt, engine, brake, steering){
  this.extra_force({z:-0.05,y:-10},{x:9000*steering,y:15000*engine});
}

... the position, force used to turn the vessel around and the force for forward movement (mind the position of the force being applied should be somewhere, where the turning force can rotate the vessel (not close to the vehicles center of mass) )

Not sure how to define an engine and its RPM for an boat, doe, you can look at the WindTurbine-model script (the model is on the forum somewhere at static objects - the animated one) and try that for the stuff ya need turning, some more can be trough some math-thought ... otherwise, you can use some lightweight car-script for the engine and bind the forces to them (also, for the turning, see the "steering" script parts for vehicles) -

if ya can make a little sense of scripts, you can go trough the script of the BTR-80 and use the switch to turn on and off some rotations bounding that to some of the vehicle-usage keys (look for the part where AOpen AFire and such are) ... if ya like details about some, just paste them in my PM and i try to explain some of the stuff in proper detail for ya.

P.S.: If ya like some more optionous tool to go trought scripts, i use this one -
http://www.yaldex.com/Free_JavaScript_Editor.htm
... it can help ya find certain parts of the script fastly and highlight some stuff so ya can see some evident miss-spellings.
« Last Edit: January 14, 2015, 08:47:17 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.