I’ve commented in a past post on the cost of vertices in an OBJ.  Here’s a general thought on your 3-d modeling: consider using more vertices in your OBJs.

When I started using X-Plane as a user/third party developer (back in X-Plane 6) every quad was hand-coded and removing the floors from building cubes was a key optimization.

Fast forward a decade and things have changed.  X-Plane can draw a lot of vertices.  Go look at one of the big oil rigs or the aircraft carrier.  Does your frame-rate blink?  probably not.

A few reasons to at least consider using more vertices:

  • If X-Plane is limited by CPU or fill-rate while showing your content, the vertices are basically “free” – the GPU can probably draw more vertices without hurting fps.
  • Since X-Plane 10 will feature dynamic shadows, it’s going to be a lot more obvious what’s really drawn in 3-d and what’s just a nicely painted flat surface.
  • Similarly, with global lighting, lighting on your scenery may come from many directions, including from multiple landing lights on the airplane.  The multi-directional light will emphasize more correct 3-d.

Here are a few pictures of LOWI.  Now we shipped LOWI as a demo area a long time ago.  But this is LOWI with global shadows and lighting from X-Plane 10.

Looking back at LOWI, it could have even more 3-d; Sergio got a lot of leverage out of his textures.  But the 3-d that is there helps make the shadowing work correctly.

Authors are already getting dinged in payware aircraft reviews for not going full 3-d in the panel (that is, for building parts of the panel via paint instead of real surfaces); I think we’ll reach a point where scenery is evaluated the same way.

Every time I talk to a 3-d modeler, I hear the same thing: the 3-d modeling is the quickest part; UV unwrapping and texture painting takes a lot more time, and wiring up the model to systems and animation is worse than 3-d too.  So maybe it makes sense to model the 3-d in a little more detail.

If you do want to push the 3-d, please be aware of the following performance issues:

  1. Object 3-d costs VRAM at a charge of 32 bytes per vertex.  You can get a lot of mesh out of VRAM – 32k vertices per MB of VRAM – and you might use 8 MB for a 1024 x 1024 day/lit/normal texture set.  (In other words, you can have 250k vertices for the cost of your textures.)
  2. You pay for all of that VRAM even if the low LOD is drawn, but you pay nothing if the OBJ is skipped. So for seldom-used or one-time-used objects with huge vertex count (like an airplane fuselage or airport terminal) it might be better to have a “details” object that is fully separate from a main building.  The details object can have a super-low LOD and you don’t pay for VRAM from 5000 feet in the air.
  3. If an object is repeated a lot, the vertex count can be an issue.  A 10k vertex object is not a big problem until it is drawn 5000 times on screen.  So if your object is used a lot (like an autogen house or a sign attached to a road) make sure that the LOD with a lot of triangles has a low distance!  (This is how we can have such complex airport runway light fixtures and still have 8,000 per airport – the LO is really low.)

Finally one other tip for future-proofing with version 10: version 10 will have particular enhancements if the LODs of your OBJ are “additive” – that is, if the high detailed LOD is the low detailed LOD plus extra pieces.  I’ll explain that in more detail when v10 is in beta, but basically if you do a basic building and then “decorate” it you’ll be able to use a fast path in v10.

About Ben Supnik

Ben is a software engineer who works on X-Plane; he spends most of his days drinking coffee and swearing at the computer -- sometimes at the same time.

8 comments on “X-Plane 10: Use More Vertices (Maybe)

  1. Will geometry instancing (assuming that makes it into release) have an effect on the vertex count that’s practical for autogen objects?

    1. Instancing is in for v10, and yes it has an impact – but the effects aren’t quite what you’d expect.

      The impact is: you want to have fewer vertices in your objects than in v9! In v9, an OBJ is sooo expensive to draw (on the CPU) that you get only about 5k to 10k objs total in scene. Since the CPU interacts with each one, you might as well have at least 100 vertices – any less and the GPU finishes the OBJ before the next one starts.

      With instancing, you can draw many OBJs per CPU call, and thus the geometry is multiplied. So if you have a really numerous object like a road pylon, you want fewer vertices since the total vertex count can get out of control. We’ve seen well over 50k objs per frame with instancing.

  2. You know what is going to happen now right? 3D artists are now going to start modeling the interior of engines and such. 😛

    Us 3D artists love detail, and if you give us a bag of polygons, we will use em. give us two and we will use that to.

    Just saying, this post can be dangerously fun, if you know what i mean.

    /me goes back to studying the inner workings of a PW JT8D-9A engine. 😛

    1. Well, the inside of an engine is an interesting case…
      – you could put the far view of the engine inside (just a single “cap”) into an outer part of the plane, but only in the far LOD of the main plane.
      – make the jet engines have a very low LOD but make them as insane as you want. 500 meters should be MORE than enough.
      Result: not only do you get a nice LOD progression, but since the engine details aren’t drawn _at all_ past 500 meters, you pay virtually nothing for them when they’re too far away.
      The bypass fan is only 1.25 meters. How far do you have to stand from the thing for that to be < 5 pixels at 45 degrees FOV at the default 1024 x 768 res? About 312 meters.

      (In other words, cut over from the insanely detailed fan to the small one at a mere 217 meters and the fan will be 5 pixels when the cutover happens.)

      1. Lol Ben, thanks for the heads up.

        So technical. So anyway, after reading what you have posted, i believe i will be aiming for about 600k polygons on the 727 Series i am working on now. I think i can get away with that this time around, especially since it wont be out till next year sometime. The Q400 was about 350k total, and that was of ok quality.

        I didn’t use any LOD on the Q400 either. Perhaps I will on the 727. It just seems like more work at the moment. You may some good points though.

        I am really happy that XP10 will allow us to have a separate specular texture instead of having it tied in with the normal map. This will definitely save a lot on Vram. More so if we save when we just save it out as a one channel 8 bit PNG.

        1. Hi Jack,

          Fortunately it’s easy to “pre-flight” your polygon budget – start with a very crude model and just add a few super-tessellated cylinders from your 3-d modeler…x-plane doesn’t care _which_ 600k vertices you use, it’s just the count. 🙂

          Re: the far LOD if you don’t need it you don’t need it; mostly you’d see a problem if you’re out of VRAM – if your computer can run the Q400, you probably have a lo of VRAM. 🙂 (And – the Q400 uses enough texture that 11 MB of mesh isn’t going to be that noticeable.)

Comments are closed.