Special Aircraft Service

Please login or register.

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

Author Topic: Weekly progress report  (Read 127907 times)

0 Members and 1 Guest are viewing this topic.

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: Weekly progress report
« Reply #24 on: April 20, 2015, 02:39:45 AM »

Well this week I have spent most of my time looking at radars for a change.

That's going well as you can see in another thread.

I went back to the in cockpit display and had another look at that as well.

I realised that I had cocked up with placing the 3d mesh for the cockpit. The position is relative to the airframe, so I had to transform the position of the 3d mesh into the aircrafts frame of reference before I displayed it.

That was a simple fix and now the cockpit is locked in place regardless of aircraft attitude.

The camera position is relative to the cockpit. So now the cockpit is in the correct place all I have to do is transform the eye point into the cockpits frame of reference and we are all good.

Except it doesn't work. The camera starts off in the right place then drifts through the cockpit floor as the aircraft pitches up. WTF!

This is what has been happening a lot on this project. The big complicated things go smoothly, the little simple things go wrong and take ages to fix.

I'll bang my head on the wall a few times and figure out what's wrong.

Usually works, but it's not very good for the wall.
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: Weekly progress report
« Reply #25 on: April 21, 2015, 02:46:04 AM »

Fixed it. Proper face palm.

The joys of multi-threaded coding.

What I was doing was

  • Calculate cockpit position relative to airframe
  • Calculate camera position relative to cockpit
  • Draw cockpit
  • Draw airframe
  • Update camera

So I was drawing everything from the position the camera was 16.7 mS in the past.

Doh!

Multi-threading is excellent and allows you to use all the cores on the cpu, but it can bite you in the ass.
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: Weekly progress report
« Reply #26 on: May 01, 2015, 02:32:25 AM »

This week I have mostly been focused on airports.

This is going well and has formed a cunning plan.

I am now starting on actual game code.

The plan is to create a single patch of terrain based on satellite data for a region that contains an airport. Generate the airport from an apt.dat file. Stick the Phantom at the start position.

Then let you fly it.

The plan is to have this done by the end of June and release it for you to play with.

The main thing that can go wrong is not actual coding, it's input devices. It's very difficult to fly on keyboard, damn near impossible, so I'm going to have to support joysticks etc.

However I don't have any joysticks.

Might be a problem.

 
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: Weekly progress report
« Reply #27 on: May 15, 2015, 04:47:36 AM »

Most of this week has been taken up sorting out the airports.

It's damn frustrating.

I am so close, but I still have errors. So I looked hard at the data and noticed strange artifacts in the apt.dat file. Coincident points and bezier curves with mad coordinates.

So I downloaded flightgears world editor, it supports the same files, and looked at it in that. The data is fine.

So I have to have misunderstood the documentation. To solve this I have downloaded the source code to flightgear and I am going through the airport stuff with a fine code comb.
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: Weekly progress report
« Reply #28 on: May 23, 2015, 01:59:05 AM »

This week has been a clean up week.

I've re-factored the code into core libraries and separate applications. The main libraries are

  • Flight dynamics
  • Rendering
  • Asset collection

I've created a common asset collection which contains everything needed to do basic rendering.

I've also swapped from bitmap fonts to signed distance field fonts to improve text rendering.

And I've added a new skydome, this can be turned on or off with a render setting. It calculates the sun position from the modified Julian date, and view point altitude and renders atmospheric scattering using pre-generated mie and rayleigh scattering textures.











I'm in the middle of adding the moon, planets, and stars. I have all the data I need so shouldn't be a major issue.

Logged

asheshouse

  • SAS Team
  • member
  • Offline Offline
  • Posts: 3255
Re: Weekly progress report
« Reply #29 on: May 25, 2015, 08:52:35 AM »

So this will be a planetarium as well as a flight simulator. :)
Logged

DarkBlueBoy

  • Supporter
  • member
  • Offline Offline
  • Posts: 674
  • Learning slowly...
Re: Weekly progress report
« Reply #30 on: May 26, 2015, 12:26:35 AM »

Looking good Stainless. :)
Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: Weekly progress report
« Reply #31 on: June 07, 2015, 02:05:20 AM »

This week I haven't got a lot done. Train troubles and problems at work limited my free time a lot.

As well as Madness playing Fratton Park, which did a lot of damage to my liver.

However I have made progress on the airports. I have partially decoded the crap that the original coder created and have fixed most of the curves. I still have a few to figure out though.

I have also spent a lot of time thinking about terrain. I worried that I may have to switch to c++ to get a terrain system in without killing myself.

If I switch to c++, I can use one of several CLOD systems which are out there. None of them can be used out of the box, but all have source code available. So modifying them for flight sims is possible.

Starting from scratch in C# is what I was planning to do, but it's a hell of a lot of work.

Not sure yet.

Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: Weekly progress report
« Reply #32 on: June 14, 2015, 12:30:45 AM »

Another week gone, and I'm still fighting with runways. It's become an obsession.

The problem is that after the file format was specified, the editor was changed to make it easier to edit the runways. The new format wasn't propagated into the file format, instead the curves were encrypted into the data stream.

For example this section.

Code: [Select]
120 Center Line on to Runway
111  53.24967380 -004.52905004 1 101
112  53.24938951 -004.52935506  53.24931939 -004.52963229
111  53.24938951 -004.52935506
112  53.24938951 -004.52935506  53.24942883 -004.52907179 1 101
115  53.24925237 -004.52879055

The first line specifies this is a linear feature called "Center Line on to Runway"

It starts at Latitude  53.24967380 Longitude -004.52905004 and is a solid white line.

Then it curves to  53.24938951 -004.52935506  with a bezier control point at 53.24931939 -004.52963229. No problem there.

Then it goes weird. The next two points are at the same location as the start point. Total bollocks. This is what the coder inserted to encode his changes.

Looking at it in the world editor it's this line





What I end up with in my code is.





ahhhhh

WTF has he done. I'm just guessing at the moment




Logged

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: Weekly progress report
« Reply #33 on: June 22, 2015, 07:56:06 AM »

This week I have taken a rest from my airport obsession. I will come back to it, but for my sanity I had to take a rest from it.

Instead I worked on the AI, mainly so I can flight tests accurately.

The original autopilot code I put in was very basic and imprecise. So I have redesigned it to use a phase locked loop.

Say you want a rate of climb of 300 FPS, the AI will make a guess at the right elevator setting for the current aircraft state, then it stops time and does a few simulation loops to refine the guess.

Once it has a good estimation of the control position required, it sets the control and starts time again.

The end result is that you should get a very good flight path, but without cheating. Most simulations cheat. They don't "fly" the plane, they just make it do what they want.

 
Logged

max_thehitman

  • SAS~Area51
  • Modder
  • member
  • Offline Offline
  • Posts: 8976
  • Beer...Girls...IL2+Mods!
Re: Weekly progress report
« Reply #34 on: June 22, 2015, 08:47:58 AM »

You are doing some amazing work good friend. You are really good at this thing.   8) A very talented artist!
I congratulate you!

I would like to thank you once again for creating that little gadget you did a few years back which
reads the Mesh file (.Him file) of a game 3d-model and creates an instant UVW mapping for us skin-painters.

It saves ALOT of guess work on painting a 3d-Model when there is no UVW mapping file available to us for
painting those skins.
I have been amazed seeing that many of our IL2-1946 models have so little areas to paint on the skins, but the
original artists have spent way too much time painting areas on the skins, which will NEVER show up on the
model when it appears in the game. It was because they had no UVW mapping skin to actually notice where
the skin is mapped at in the model.

I will post for you a screenshot of a Soldier model we have in the game and its original skin. You can notice that the
original artist painted so much on the skin, but it will never be seen in the game...



So I thank you very much for your very handy STAINLESS gadget. You should post it up again for other artists to use, if
they don't know about it yet.


Cheers
MAX
Logged
Everything I like is either illegal, immoral or fattening ! Welcome to SAS1946

Stainless

  • moderator
  • member
  • Offline Offline
  • Posts: 1534
Re: Weekly progress report
« Reply #35 on: June 23, 2015, 02:35:04 AM »

I have been thinking of changing that code.

I often use a tool called UVMapper, which is very useful as you can load in an object and drag the UV coords around.

Do you want me to add that capability to the tool?

Logged
Pages: 1 2 [3] 4 5 6 ... 51   Go Up
 

Page created in 0.029 seconds with 20 queries.