Flight Simulator Tutorial #1 – the joystick and a ground mesh

This is the first section of a tutorial explaining how to build a 3D flight simulator in Excel. This part deals with creating a joystick and a triangular ground mesh. The joystick model was explained in a previous post from January 2011 and the ground mesh was already used in the 3D roller-coaster. Please be aware that both the PDF and Excel files for this section have been updated on 4/13/2011 at 7:15 pm. 

This article has 9 Comments

  1. Pingback: My Homepage
  2. That’s what I am doing now. You describe the same thing from a “linear” programming point of view. The ground is not being recalculated. It’s fixed already. It has few parameters in it, yes but it’s fixed until one changes the pitch. or the offset. And those will change. I really see no point here. What takes 99% of calculations is the rotations & translation of a fixed ground. Nothing you see on u-v coordinates (screen) is fixed. Constantly calculating the new positions and displaying them it’s what takes time and computing power.

  3. Peter, thanks for the comment. I know that and I’ve been thinking about it for few months now. The temptation was high but I postponed it since I don’t see much value in it, at least not in the introductory version. I need to have a finite grid (my 299$ simulator does it). Think about seeing the mirage in the dessert, you see the lake and the more you go the farther it gets keeping at a constant distance. It sucks. There is nothing wrong with “exploring the edges of the grid. As I said I am working on something like that but as I am flying farther the relief shapes will change. I need to iron out few things though and I will not include it in my introductory model. I am also working on a progressively less dense grid as one flies farther, also with the possibility of increasing the density around the vicinity of the plane. This is in line with how the eye works (perceiving less details in the distance).
    What you say in the second part is just having a large fixed grid and DISPLAYING a subset of it. Another thing I am working on but it won’t be here. Sorry. The tutorial will be pretty long already and I won’t focus on these fine details. It will also be quite slow on 2007 if usable at all.
    Please review your very last statement. I refrain from commenting on that one. I just say, I would like to have a new virgin waking me up every morning. They used that idea in the first video games. I’ve seen that on Youtube a few months ago. The machines were weak at that time and they had certain driving games where it was possible to do that. The road was just a rectangle. Actually the idea has some merit in perfectly flat conditions but to implement it right it can be hard since the number and position of vertices changes all the time. I suggest that you create an example. That’s what I started to do for the coaster initially, but then I gave up and did it like everyone else, with triangles.

  4. Postscript: So that I do not leave you with enigmatic statements, the groundmesh could be produced with something akin to a knitting pattern.
    First row
    Moving right to produce alternate ‘saw teeth’:
    Across, up, down, … across, up, down
    Moving left to infill missing saw teeth:
    Back, up, down, …., back, up
    Next row
    Until finish

    Once you have a suitable pattern for your reference groundmesh there is no need to recalculate it. Copy and ‘paste values’ will provide a fixed array as the basis for further transformations.

  5. George

    You may feel like strangling me for this but I have some fresh ideas for you to experiment with.

    I see two problems with your ground mesh. The first is that as your flight continues you will eventually fly out of the region covered by the mesh. The second is that much of the mesh will be behind the viewpoint which creates the spurious points that you have had to suppress (there is a third problem but that can wait).

    The solution might be to translate the ground mesh by an integer number of meshspacings to ensure the rendered ground lies entirely infront of the viewpoint. The sense of movement will be derived from small increments of the viewing parameters; the larger integer changes will not be apparent because the new triangles will exactly overlay other triangles from the previous rendering.

    This also means that you can draw your groundmesh with a single continuous line – no breaks needed.

    Peter

  6. Herzlichen Dank, Marek! Tschüß, Georg

  7. Thanks, Vladimir. It is going to be a very basic one not a masterpiece (perspective rotations and translations over a triangular mesh). To prove the principle…

  8. Vladimir Astrelin says:

    Hello George, I can’t wait to see your new masterpiece..Looking forward to seeing your Flight Simulator !

Leave a Reply

Your email address will not be published.