Board index FlightGear Development Aircraft

GNU/GPL MiG-21 development

Questions and discussion about creating aircraft. Flight dynamics, 3d models, cockpits, systems, animation, textures.

Re: GNU/GPL MiG-21 development

Postby PINTO » Sun Nov 06, 2016 7:19 pm

To make it OPRF competitive. The real one has a maximum detection of 30km, 20 degrees left or right, 30 up, and 1.5 down. This one is 60km, 30 degrees left/right/up/down. I'm going to include an option to let you use realistic radar limits or the competitive limits.

Later models of the MiG with the better radars, such as the LanceR, can detect out to 80km, so it's not unprecedented.

edit: also want to do some sort of AI-based GCI thing to make up for the weak radar, and that would be how a MiG was guided to the target in real life also. The end goal for me is to eventually do a LanceRIII model.
Actively developing the MiG-21bis (link to repo) (link to thread)

http://opredflag.com is an active flightgear dogfighting community (using a system that isn’t bombable)
User avatar
PINTO
 
Posts: 923
Joined: Wed Oct 21, 2015 6:28 pm
Callsign: pinto
Version: 2016.3.0
OS: Win10

Re: GNU/GPL MiG-21 development

Postby PINTO » Wed Nov 16, 2016 4:38 pm

Still working on this - the cockpit needed some Blender love, which it is currently going through.
Actively developing the MiG-21bis (link to repo) (link to thread)

http://opredflag.com is an active flightgear dogfighting community (using a system that isn’t bombable)
User avatar
PINTO
 
Posts: 923
Joined: Wed Oct 21, 2015 6:28 pm
Callsign: pinto
Version: 2016.3.0
OS: Win10

Re: GNU/GPL MiG-21 development

Postby PINTO » Wed Nov 30, 2016 5:24 pm

Still a heavy WIP. I'm putting coding on hold and prioritizing getting the new cockpit done.

Download link: https://github.com/l0k1/MiG-21bis

Semi-official development thread (for me): http://opredflag.shivtr.com/forum_threads/2569974

Change notes since the last update:

*YASim is unsupported. I have no interest in supporting it. Currently the fuel guage won't work with the YASim version, the missile guidance and payload handling might not work, and future electrical/hydraulic/pneumatic systems will be implemented using JSBSim causing further breakage. YASim just can't model the MiG-21 FDM accurately enough without getting into nasal territory, which I will not be doing for concerns of accuracy and the computational expense. I'm leaving the YASim option in there for now, however. But if you want to run YASim, you're probably better off getting 1.4.4beta4 from the FGUK site.

*Fuel tanks are now 100% accurate in amount and position, and one more tank has been added (thanks to Enrogue for finding the info).

*490L drop tank now available on the ventral pylon

*Weapon systems are at 80%-ish accuracy. Still need radar guided ground missile code, anti-rad missile code, and multiple armament per pylon support.

*Updates to alpha lift and a more accurately modeled pitch FCS. It gets a lot less alpha now, but matches up with most of the numbers I'm seeing.

*Roll rate has been increased to ~550 degrees per second. You can redout - and quickly - by rolling too fast. To help with control, there's a fictional roll FCS running as well that makes small adjustments less sensitive, but still gives full authority at anything over 50% stick left/right.

*Engine spool up time increased from 0.8 seconds to 9 seconds.

*Fictional smoke pod with 9 different colors + rainbow options on the ventral pylon. Shift+S to activate.

*Fuel guage now accurate. It does not set itself, you need to set it manually prior to take off.

*Guns have ammo and can jam.

*Damage code and missile messaging cannot be turned off at this time, but this option will be enabled in the future.

*All non-guided ordinance has been disabled for the time being (sorry). I need to get it working with the new payload system.

*[edit, forgot to add]: throttle code has been reworked. Afterburner kicks in at 75% throttle instead of 99% throttle.

Currently working on a high-detailed cockpit. The plan is to have 100% of the switches, buttons, and knobs working.
Actively developing the MiG-21bis (link to repo) (link to thread)

http://opredflag.com is an active flightgear dogfighting community (using a system that isn’t bombable)
User avatar
PINTO
 
Posts: 923
Joined: Wed Oct 21, 2015 6:28 pm
Callsign: pinto
Version: 2016.3.0
OS: Win10

Re: GNU/GPL MiG-21 development

Postby Skydive » Sat Mar 04, 2017 3:41 pm

Hi all, I am also working on an upgraded version of MiG-21UPG (21-93 or Bison) based on this one.

There's a new cockpit, bubble canopy, animated switches, armed with R-27, R-77, R-60, R-73, FAB-250, FAB-500, UB-32 rocket pods, flares. Radar, MFDs, Electrical, hydraulics and autopilot are still to be connected. Don't judge too hard, I am still learning and wanted to have a MiG-21 with HUD :)

Image

Image



Project page: https://sky4viper.github.io/MiG-21UPG/
It can be downloaded from my box as well: https://app.box.com/s/iqswp1yk30r11g3p8vowgdpnf0g81oag
Skydive
 
Posts: 7
Joined: Thu Mar 02, 2017 1:45 am

Re: GNU/GPL MiG-21 development

Postby Johan G » Sun Mar 05, 2017 12:26 am

Hi and Welcome to the forum! :D

Very nice first post and very nice video. :D
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Johan G
Moderator
 
Posts: 5294
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: GNU/GPL MiG-21 development

Postby abassign » Mon Mar 06, 2017 11:23 am

Certainly better than nothing, but we are miles away from reality as 3D model :(

Image

For example, this 1/48 scale model has certainly done much better!
http://www.themodellingnews.com/2014/05/a-great-looking-mig-21-needs-good.html

This plane is so important in aviation history deserves greater attention to detail. It does not take much to add polygons to make the most similar curved surfaces to reality. The smooting feature of Blender, can optimize the model, without increasing the number of polygons (for the purists frame rate)!
The SU15 Victor seems like a good example of how you would make a good 3D.
Many users complain, that Flightgear planes are "bad" ... and as a corollary of that assertion therefore say that Flightgear is ugly, is not it!

I Recommend:
less aircraft, but made better!
abassign
 
Posts: 735
Joined: Mon Feb 27, 2012 5:09 pm
Location: Italy (living 5 Km from airport LIME)
Callsign: I-BASSY
Version: 2018.3
OS: Linux Mint 19. x

Re: GNU/GPL MiG-21 development

Postby Johan G » Mon Mar 06, 2017 2:29 pm

That photo reminds me the caption of a cartoon on top of this ejection seat article: :wink: :lol:
On one hand it was a $40 million plane, on the other hand the spider was inside the cockpit.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Johan G
Moderator
 
Posts: 5294
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: GNU/GPL MiG-21 development

Postby pjedvaj » Mon Mar 06, 2017 8:30 pm

abassign wrote in Mon Mar 06, 2017 11:23 am:Certainly better than nothing, but we are miles away from reality as 3D model :(


You're one sick puppy. :D

Great work Skydive, you brought some life to a 7 year old model. If you need an updated MiG-21UPG model send me a P.M.

https://www.turbosquid.com/3d-models/mikoyan-gurevich-mig-21-93-fighter-aircraft-3d-model/1055021
Retired Extremely Dangerous
User avatar
pjedvaj
 
Posts: 651
Joined: Thu Mar 18, 2010 8:32 pm
Location: Croatia

Re: GNU/GPL MiG-21 development

Postby PINTO » Tue Mar 07, 2017 2:56 am

@abassign, I've spent many hours working on the cockpit for the bis, with many more hours to come. Have some patience. It will get there.

Front panel rebuilt from scratch (WIP, still needs labels, better textures, some better meshes, normal and lightmaps):

Image

Gunsight detail:

Image

I'm currently trying to get all the instruments updated in the xml files so I can have something showable/flyable while I continue to make improvements.

Real life has gotten in the way for the last couple weeks, but work should be continued soon.
Actively developing the MiG-21bis (link to repo) (link to thread)

http://opredflag.com is an active flightgear dogfighting community (using a system that isn’t bombable)
User avatar
PINTO
 
Posts: 923
Joined: Wed Oct 21, 2015 6:28 pm
Callsign: pinto
Version: 2016.3.0
OS: Win10

Re: GNU/GPL MiG-21 development

Postby it0uchpods » Tue Mar 07, 2017 3:06 am

Awesome work PINTO!
it0uchpods/WTF411

FGFS Aircraft Developer
Lead Programmer at it0uchpods Design Group
Download High Quality Aircraft from it0uchpods Hangar
User avatar
it0uchpods
 
Posts: 3567
Joined: Tue Oct 06, 2015 12:51 pm
Version: 2018.2.1
OS: Windows 10 x64

Re: GNU/GPL MiG-21 development

Postby pjedvaj » Sat Mar 11, 2017 1:00 pm

Just to show you what progress Skydive already made on his MiG-21UPG variant.

Image
Retired Extremely Dangerous
User avatar
pjedvaj
 
Posts: 651
Joined: Thu Mar 18, 2010 8:32 pm
Location: Croatia

Re: GNU/GPL MiG-21 development

Postby Skydive » Sat Mar 18, 2017 7:23 pm

Hi, could somebody please point me out to an animation guide or help out with main landing gear animation (unfortunately flightgear wiki is very cryptic about it)?
I am stuck, somehow the children elements are turning not in the directions I need them to turn. I can animate it in blender, but in game they twist somewhat differently. I have also tried using a blender io script but it returns some random numbers that don't work. There must be some steps or naming conversion I am missing with it.
Skydive
 
Posts: 7
Joined: Thu Mar 02, 2017 1:45 am

Re: GNU/GPL MiG-21 development

Postby pjedvaj » Sun Mar 19, 2017 12:47 pm

First you need to check did you bind animation to proper gear [0], [1] or [2]

then on which <axis> does the animation occur

then you need to find out will you need interpolations with positive or negative angles <dep> (trial and error)

if you need to animate several objects you need to name them all

<ind> is the timing of the animation (0.0 is starting, 1.0 is ending)

example

Code: Select all
   <animation>
      <type>rotate</type>
      <object-name>right_strut</object-name>
      <object-name>rightd_strut</object-name>
      <object-name>right_scissor</object-name>
      <object-name>right_wheel</object-name>
      <object-name>right_inner_strut</object-name>
      <property>gear/gear[2]/position-norm</property>
      <interpolation>
         <entry>
            <ind>0.0</ind>
            <dep>92</dep>
         </entry>
         <entry>
            <ind>0.5</ind>
            <dep>92</dep>
         </entry>
         <entry>
            <ind>1.0</ind>
            <dep>0</dep>
         </entry>
      </interpolation>
      <axis>
         <x1-m> 0.66</x1-m>
         <y1-m> 1.59</y1-m>
         <z1-m> 0.11</z1-m>
         <x2-m> 0.50</x2-m>
         <y2-m> 1.75</y2-m>
         <z2-m> 0.11</z2-m>
      </axis>
   </animation>


Same procedure is with translations, just change the <type>

Hope it helps
Retired Extremely Dangerous
User avatar
pjedvaj
 
Posts: 651
Joined: Thu Mar 18, 2010 8:32 pm
Location: Croatia

Re: GNU/GPL MiG-21 development

Postby Skydive » Sun Mar 19, 2017 3:26 pm

Hi Peter, thank you for your reply.

I already know that part and have no problem animating parts on a single axis such as front gear that just folds inside on y axis. This is easy. But more complex animation for some reason doesn't work the way I expect it to work. The main gear folds in diagonally, so my understanding is that it supposed to rotate on several axis. I have animation where main wheels fold in together with the struts, while I need them to remain remain parallel (the same way they are when the aircraft is on the ground) so they would enter right into the gear box and not pass through fuselage as it it is happening at the moment. There's also some unwanted translation from somewhere too. I noticed that for some reason once rotation animation starts, they the lower struts and wheels are getting further away from the rotation axis and a gap between the struts appears. My understanding is that if the rotation is defined in the same animation all parts should rotate around defined axis, but somehow they are doing something else and end result is different from what I anticipate.

Also writing down axis coordinates manually for each part is a huge pain in the back side, trial and error guesswork is very counterproductive I am afraid. Is there an easy way around it something like animating all the parts in blender and exporting the animation code somehow? Also does Flightgear recognize parts that are marked as parent and child parts in blender or does animation of the child parts needs to be defined anyway?
Skydive
 
Posts: 7
Joined: Thu Mar 02, 2017 1:45 am

Re: GNU/GPL MiG-21 development

Postby pjedvaj » Sun Mar 19, 2017 3:42 pm

I never used parent and children objects in animations, in my projects they were all at the same level.
When you bind some kind of change (rotation, scale, hide, sow or translation) with some internal FG property to animation only thing that is important is the timing (0-1) and included list of objects. You can create several animations using the same FG property in a sequence using proper timing. Important things are axis and value (angle, length or scale). I know it's complicated but it works.

Other way is to use output from nasal:

http://wiki.flightgear.org/Howto:Animate_gear_scissors
Retired Extremely Dangerous
User avatar
pjedvaj
 
Posts: 651
Joined: Thu Mar 18, 2010 8:32 pm
Location: Croatia

PreviousNext

Return to Aircraft

Who is online

Users browsing this forum: Google [Bot] and 12 guests