Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 4 ... 8   Go Down

Author Topic: Hip & Hind Progress - 3d artist help needed  (Read 17877 times)

0 Members and 1 Guest are viewing this topic.

BT~wasted

  • Modder
  • member
  • Offline Offline
  • Posts: 1468
Hip & Hind Progress - 3d artist help needed
« on: October 15, 2018, 09:35:28 AM »

3d artist WANTED  :)

Quote
As I slowly progress with code, might be there are any 3d specialties who are interested in Hip and Hind mods that can give some 3d modelling help?

Things needed:
1. Make few changes in Mi-8 meshes and transform it from T model to MT (add two more pylons, mirror the tail rotor position and add dust protection covers to the engine intakes).

2. Remove the rotating turret on Mi-24V and add the static double GSh-30 cannon on the right side (Mi-24V to Mi-24P).

Hello everyone!

Here is an awful short video demonstrating some of the new features of IL-2 helicopters future:

- rewritten from scratch player helicopter flightmodel by Koty and tweaked by me. Now flying a Mi-8 or Mi-24 becomes quite a challenge and requires some skill and attention from player side. I think that it was never closer to the real helicopter as it is now. All the calculations of both main and tail rotor are made by Koty, who did and amazing job. I've added few more tweaks like ground effect, climb rate tweaks and possibility of autorotation and flying on one engine.

- AI flightmodel in the same slot. With the new reflection methods by Storebror it is now possible to include both AI and player flight parameters in one slot. AI can perform usual tasks like any other in-game aircraft.

- Helicopter-style takeoff for AI. Lots of bugs here. I need help of the real JAVA coders here

- Usable paratroopers that will get into combat if there are any enemy unit is near. After debarking form and Helicopter and positioning itself acts like usual artillery unit in game.

BUGS:
-AI landing bug with loop and crash
-AI take off shake
-lots and lots of others

Plans for future:
-AI helicopter-style landing
-AI helicopter-style troops deployment
-Possibility to pick troops back into helicopter and redeploy them

The help I need:
My JAVA knowledge are really poor so I am in desperate need of the help from real coder. Lower I will post some parts of the code for you guys to have a look. Any advice is appreciated  :)


Logged

Fresco23

  • Part-Time Skinner
  • Modder
  • member
  • Offline Offline
  • Posts: 2346
  • F.A.C. #23
Re: Hip & Hind Progress
« Reply #1 on: October 15, 2018, 04:44:02 PM »

Beautiful! Looking forward to the future!
Logged
cogito, ergo sum armatus

glibble

  • member
  • Offline Offline
  • Posts: 280
  • RTFM Gold Star Award
Re: Hip & Hind Progress
« Reply #2 on: October 15, 2018, 08:04:10 PM »

Wow! That troop deployment part is jaw dropping! :P
Logged

vudu_1

  • Modder
  • member
  • Offline Offline
  • Posts: 64
Re: Hip & Hind Progress
« Reply #3 on: October 15, 2018, 09:37:19 PM »

excelent job mate!!!!!!!!!!!!!!!!!!!!!!!!!!
Logged

DarkBlueBoy

  • Supporter
  • member
  • Offline Offline
  • Posts: 674
  • Learning slowly...
Re: Hip & Hind Progress
« Reply #4 on: October 16, 2018, 12:42:46 AM »

Fantastic!!!
Logged

Vampire_pilot

  • member
  • Offline Offline
  • Posts: 8630
Re: Hip & Hind Progress
« Reply #5 on: October 16, 2018, 08:38:56 AM »

Are you aware that this is already done by Vega and available in BAT since 3.4?

He has reworked almost all the helicopters in BAT so AI can fly them in the same slot, also particularly the Hind.
Maybe you should connect with him to combine forces and avoid inventing the wheel twice..

Logged

PO_MAK_249RIP

  • CMON U SPURS!
  • member
  • Offline Offline
  • Posts: 2111
Re: Hip & Hind Progress
« Reply #6 on: October 17, 2018, 03:04:54 AM »

Hi Vampire, I assume you mean this https://www.sas1946.com/main/index.php/topic,32888.0.html and this https://www.sas1946.com/main/index.php/topic,32888.0.html which were posted by Wasted himself? Im guessing these are more improvements?
Logged
Corsair Carbide case, Intel core i5 4690 3.5ghz with Arctic Cooler, Asus Rock H97 performance, MSI Ventus XS OC 1660GTX 6GB DDR6, 32GB Patriot Viper 1600Mhz, 256GB/500GB Crucial SSDs, Windows 10 64bit.

Vampire_pilot

  • member
  • Offline Offline
  • Posts: 8630
Re: Hip & Hind Progress
« Reply #7 on: October 17, 2018, 04:22:56 AM »

No. Vega rewrote code and FM for the helis for BAT 3.4. It does all the things this project here intends to do. It is already operational. Im am already flying Hinds along AI.
Logged

BT~wasted

  • Modder
  • member
  • Offline Offline
  • Posts: 1468
Re: Hip & Hind Progress
« Reply #8 on: October 17, 2018, 05:58:46 AM »

No. Vega rewrote code and FM for the helis for BAT 3.4. It does all the things this project here intends to do. It is already operational. Im am already flying Hinds along AI.

When I saw this note in BAT release post I was very glad thinking that someone overcame the issues that I had. But after a few tests I've realized that the current behavior that we have in BAT was made like few years back by me, but the results are not good. Just look at their takeoff and landing pattern. They are not usable in usual gaming environment. And I am aiming to make them working out of the box for any campaign maker and myself of course so you can produce missions without any unusual limitations.

Current code is much better, and as I wrote I am going to make the takeoff and landing pattern helicopter like.

It would be much more appreciated if some JAVA specialists could look at the code that I've posted.
Logged

Vampire_pilot

  • member
  • Offline Offline
  • Posts: 8630
Re: Hip & Hind Progress
« Reply #9 on: October 17, 2018, 06:08:18 AM »

Alright, thaks for that explanation!
It wasn't clear if you were aware of Vega's works.
There's always possibilities to improve things. Wish you luck an looking forward to the results.
Logged

BT~wasted

  • Modder
  • member
  • Offline Offline
  • Posts: 1468
Re: Hip & Hind Progress
« Reply #10 on: October 17, 2018, 07:26:46 AM »

The main problem that I cannot solve is the pitch glitch during takeoff that one can see in the video that I've posted.

I am trying to use this piece of code in update() section for smooth pitch change during takeoff lift. If I am deleting this code helicopter just falls backwards because of AI behavior (well, I assume so).

Code: [Select]
                       if (FM.Gears.nOfGearsOnGr > 2) {
gndYaw = FM.Or.getYaw();
gndRoll = FM.Or.getRoll();
gndPitch = FM.Or.getPitch();
}
FM.Or.setYPR(gndYaw, cvt(alt, 0.0F, 20.0F, gndPitch, gndPitch - 10.0F), gndRoll);

I think that the problem is that some superclass sets different orientation parameters during every tick and then my code reverts it back or vice versa.

The things that I've tried:

Code: [Select]
setStabAll(false);
Code: [Select]
bHasElevatorControl = false;
Code: [Select]
ElevatorCOntrol = 0.0F;
also tried to change maneuver:

Code: [Select]
((com.maddox.il2.ai.air.Maneuver) FM).set_maneuver(86);
Code: [Select]
((com.maddox.il2.ai.air.Maneuver) FM).unblock();
Currently I am completely stuck with this problem.

Does any one has any thoughts on this?

Logged

4S_Vega

  • Modder
  • member
  • Offline Offline
  • Posts: 3748
Re: Hip & Hind Progress
« Reply #11 on: October 17, 2018, 09:41:14 AM »

Hi Taras!

Glad to see you here!  :)

Yes, I make an overall rework aimed at making compatible the use of helicopters in the same slot for both the player and the AI.

Actually is avaliable only in BAT, not in single mods, but I will make a "Chopper Mod" to extend it to all.

Personally I find the result obtained satisfactory, even if not totally perfect for what concern Human side.

But ATM it is the maximum you can get if you want to use the same slot Player / AI, with all the facilities and positive consequences on the level of playability.

Anyway, here you can find an explanation of what I do in FM and Java side.


FLIGHT MODEL VALUES:

From AH-64.fmd (Not yet released)

Quote
[Mass]
  Empty 5165.0
  TakeOff 10450.0
  Oil 10.0
  Fuel 1110.00
Here put RL values, fuel is in kilograms

Quote
Wingspan 14.6
Here put rotor dimeter

Quote
[Squares]
  Wing 168
Here put rotor surface

Quote
CDiveBrake 1
AirbrakeCxS 0.15
Let airbrake works and give a value of 0.15

Quote
Vmin 3
  Vmax 300.0
  VmaxAllowed 365.0
 

VMax in level flight and critical speed


Quote
[Polares]
  lineCyCoeff 0.09
  AOAMinCx_Shift 1.0
  Cy0_0 0.15
  AOACritH_0 20.0
  AOACritL_0 -16.0
  CyCritH_0 1.5
  CyCritL_0 -0.7
  CxMin_0 0.028
  parabCxCoeff_0 7.2E-4

These works very well

From GeneralElectric.emd (AH64FM)

Quote
Type Radial
Select piston type


Quote
[T-700-GE701C(L)]
  HorsePowers 1890.0
  BoostFactor 1.0
  TowFactor 1.0
  Direction Left
  EngineI 10.0
  EngineAcceleration 3.0

[T-700-GE701C(R)]
  HorsePowers 1890.0
  BoostFactor 1.0
  TowFactor 1.0
  Direction Right
  EngineI 10.0
  EngineAcceleration 3.0

For twin engine Helys, make 2 versions of same engine, 1 rotating left and 1 right)

Quote
PropDiameter 4.0

This diameter allows high maximum speeds, but reduces acceleration readiness (to be resolved with the VerticalThrust code in java), smaller diameters are good for slower helicopters.
Smaller diameter in a Hely with powerful engine cause overspeed of engine with overheat and KO.





CODE#1: Vertical Thrust
This is the main code of new chopper mod

Here code from AH-64 (plane not released yet)

Quote
public void computeVerticalThrust()
    {
        boolean isControlledByAI = true;
        if (this.FM.isPlayers() && (this.FM instanceof RealFlightModel))
        {
            isControlledByAI = !((RealFlightModel) this.FM).RealMode;
        }
        float x = this.FM.EI.engines[0].getThrustOutput();
        float ias = Pitot.Indicator((float) (((Tuple3d) ((FlightModelMain)FM).Loc).z), FM.getSpeed()) * 3.6F;
        float y = cvt(ias, 0.0F, 170F, 1F, 0.1F);
        float z = cvt(this.FM.getAltitude(), 0.0F, 6000F, 1F, 0.5F);
        float Thrust1 = 0.0F;
        if(this.FM.EI.engines[0].getStage() > 5 && this.FM.EI.engines[1].getStage() > 5 && this.FM.EI.getPowerOutput() > 0.2F && isControlledByAI && ias < 15F) // AI
        {
        Thrust1= 2.2F*x;
        }else if(this.FM.EI.engines[0].getStage() > 5 && this.FM.EI.engines[1].getStage() > 5 && this.FM.EI.getPowerOutput() > 0.2F && isControlledByAI && ias > 15F) //for AI
        {
        Thrust1= 1.25F*x;
        }else if(this.FM.EI.engines[0].getStage() > 5 && this.FM.EI.engines[1].getStage() > 5 && !isControlledByAI) //for Human
        {
        Thrust1= 1.7F*x;
        }
        this.FM.producedAF.z += Thrust1 * (10F * FM.M.referenceWeight + 10F * FM.M.fuel) * (1F * y) * (1F * z); // (10F * FM.M.referenceWeight + 10F * FM.M.fuel +)
    }

In the new Hely scheme the position of the propeller in the .fmd file is like in normal aircraft (and as in the old Hely AI).

Then, it is necessary to give them a vertical thrust to take off like a true helicopter.

Quote
float x = this.FM.EI.engines[0].getThrustOutput();
This code means that the vertical thrust is proportional to the amount of throttle you intend to give.

Quote
float y = cvt(ias, 0.0F, 170F, 1F, 0.1F);
This means that at ias=0 (indicated air speed =0) the vertical Thrust ratio will be 1, at 170 will be 0.1).

Quote
float z = cvt(this.FM.getAltitude(), 0.0F, 6000F, 1F, 0.5F);
This means that at sea level you have 100% of vertical thrust, at 6000m only 50%, with a similar code an Hely without extarnal stores can takeoff till 4000/4500m.


Quote
if(this.FM.EI.engines[0].getStage() > 5 && this.FM.EI.engines[1].getStage() > 5 && this.FM.EI.getPowerOutput() > 0.2F && isControlledByAI && ias < 15F) // AI
        {
        Thrust1= 2.2F*x;
        }else if(this.FM.EI.engines[0].getStage() > 5 && this.FM.EI.engines[1].getStage() > 5 && this.FM.EI.getPowerOutput() > 0.2F && isControlledByAI && ias > 15F) //for AI
        {
        Thrust1= 1.25F*x;
This is the AI code part, it means that below 15km/h the vertical thrust value is 2.2 times the throttle input, so at 100% thrust the chopper have a value of 2.20, and when passed 15km/h this ratio decrease to 1.25, to prevent the helicopter from overturning due to excessive pushing upwards. This code works only with throttle over 20% to prevent problems when Landing.

Quote
}else if(this.FM.EI.engines[0].getStage() > 5 && this.FM.EI.engines[1].getStage() > 5 && !isControlledByAI) //for Human
        {
        Thrust1= 1.7F*x;
        }
This is the Human part, value is always at 1.7 because player can manage the throttle to prevent overturning.

Quote
this.FM.producedAF.z += Thrust1 * (10F * FM.M.referenceWeight + 10F * FM.M.fuel) * (1F * y) * (1F * z);

This is the final part of the code, the function indicates that the reference value at the throttle (Thrust1) is multiplied by the empty weight (10F * FM.M.referenceWeight) added to the weight of the fuel (+ 10F * FM.M.fuel) and then multiplied first by the aforementioned variable relating to speed (1F * y) and finally multiplied by the altitude variable (1F * z).


CODE#2: Orizzontal thrust

Quote
public void computeOrizzontalThrust()
    {
       boolean isControlledByAI = true;
       if (this.FM.isPlayers() && (this.FM instanceof RealFlightModel))
        {
            isControlledByAI = !((RealFlightModel) this.FM).RealMode;
        }
        float x = this.FM.EI.engines[0].getThrustOutput();
        float y = cvt(this.FM.getSpeedKMH(), 0F, 200F, 1F, 0.0F);
        float Thrust2 = 0.0F;
        if(this.FM.EI.engines[0].getStage() > 5 && !isControlledByAI) //Human only
        {
        Thrust2= 0.3F*x;
        }else if(this.FM.EI.engines[0].getStage() > 5 && this.FM.getSpeedKMH() > 2F && isControlledByAI) // only AI
        {
        Thrust2= 0.25F*x;
        }
        this.FM.producedAF.x -= Thrust2 * (10F * FM.M.mass) * (1F * y); 
    }

This code generates a negative thrust that reduces with increasing speed, it is necessary at takeoff, otherwise the helicopter would accelerate too quickly and unrealistically along the longitudinal axis.


Quote
float x = this.FM.EI.engines[0].getThrustOutput();
also this code works with the throttle


Quote
float y = cvt(this.FM.getSpeedKMH(), 0F, 200F, 1F, 0.0F);
At speed=0, the negative thrust is 100%, at 200 is 0.

Quote
if(this.FM.EI.engines[0].getStage() > 5 && !isControlledByAI) //Human only
        {
        Thrust2= 0.3F*x;
        }else if(this.FM.EI.engines[0].getStage() > 5 && this.FM.getSpeedKMH() > 2F && isControlledByAI) // only AI
        {
        Thrust2= 0.25F*x;
        }

also here, different values betweem AI and Human


Quote
this.FM.producedAF.x -= Thrust2 * (10F * FM.M.mass) * (1F * y);

The negative thrust is equal to the coefficient given by the throttle multiplied by the total mass (empty weight + fuel + loads) multiplied by the variable speed


CODE#3: OrizzontalThrust2

Quote
public void computeOrizzontalThrust2()
    {
        float x = this.FM.EI.engines[0].getThrustOutput();
        float Thrust3 = 0.0F;
        if(this.FM.EI.engines[0].getStage() > 5 && this.FM.EI.getPowerOutput() > 0.0F && this.FM.getSpeedKMH() < 0.0F)
        {
        Thrust3= 0.35F*x;
        }
        this.FM.producedAF.x += Thrust3 * (10F * FM.M.mass); 
    }

This code generates a positive thrust when the speed tends to decreases below zero. It is a security code that helps human to avoid overturn....


CODE#4: Hovering

Quote
public void computeHovering()
    {
        float x = this.FM.EI.engines[0].getThrustOutput();
        float ias = Pitot.Indicator((float) (((Tuple3d) ((FlightModelMain)FM).Loc).z), FM.getSpeed()) * 3.6F;
        float y = cvt(ias, 0F, 100F, 1F, 0.0F);
        float Thrust4 = 0.0F;
        if(this.FM.EI.engines[0].getStage() > 5 && ias < 50F && this.FM.getSpeedKMH() > 10F && this.FM.CT.StabilizerControl) //Human only
        {
        Thrust4= 0.45F*x;
        }
        this.FM.producedAF.x -= Thrust4 * (10F * FM.M.mass) * (1F * y); 
    }

Enabling level stabilizer below 50 km/h IAS, speed decrease till 10 km/h (it depends by hely, in some case could be 6, another could be 12), let the Helicopter in hovering.

Is very useful to land on a spot or for use gun turrets or aim guided missiles.
Logged
Pages: [1] 2 3 4 ... 8   Go Up
 

Page created in 0.041 seconds with 25 queries.