Monday, October 18, 2010

Draped Object Geometry in X-Plane 10

I have mentioned a few of the scenery engine features coming in X-Plane 10 that will be of interest to authors: global illumination, conditional parts of OBJs (to cope with variable rendering settings). There is another general feature coming that will make authoring scenery a lot easier, I hope.

X-Plane 9's rendering engine has the ability to drape geometry. Draped geometry are meshes that are 'dropped' onto the terrain and hug the underlying base mesh perfectly. The most common example of this is the runways: because the runways 'drape' the ground, the runway shows any curvature and bumps from the underlying base mesh. This is who we create sloping and non-flat runways.

Authors can drape geometry as well, using a draped polygon (.pol) primitive in an overlay. Such draped geometry is useful any time you want to add more "paint" to the ground, e.g. to put down a taxiway, parking markings, dirt, grass, a driveway for a house, you name it.

There is one case in X-Plane 9 where you cannot drape geometry: in an object. In an object, all geometry is aligned to the object, and will only interact nicely with the ground if you get lucky. For example, if you model a house with a sidewalk, the sidewalk won't "sit" on the ground if the ground turns out to be sloped. You can use ATTR_poly_os to hide the artifacts, but ATTR_poly_os really can't cope with mismatches between the OBJ and the terrain under it.

X-Plane 10 will introduce a new object attribute: ATTR_draped. Draped geometry in an object is actually draped down onto the terrain when the object is placed in the scenery. This means that the draped part of the object will hug the ground perfectly with no interference or Z thrash. You get all of the quality of a draped polygon with the convenience of an OBJ.

There are a few possible uses for ATTR_draped:
  • Any time a 3-d model needs some ground details attached to it, e.g. the driveway near a house, draped geometry provides a good fit with the ground and good alignment with the object.
  • Any time you want to include a pre-made ground decal (E.g. a painted parking spot on a taxiway), the ground detail can be modeled as an object using draped geometry.
ATTR_draped will facilitate creating and sharing custom details for airports and streamline the authoring process.

7 comments:

simmo said...

This is not spam. Not spam not spam..

Good moves Ben, I love trying to make ground marks eg dirt and skid marks, attr_poly_os can be a pain to get right, so hopefully this makes it perfect now

Simon

Unknown said...

Am I correct in assuming that any draped geometry must be 2d? If, for example, I tossed attr_draped onto a cube, would it be smooshed into the ground, or would the geometry become vertically skewed to match the lay of the land?

The latter could be quite useful for detailed fences, and so on.

Benjamin Supnik said...

Hi AJ,

Completely flattened to a square; the vertical coordinate is ignored.

Steve in Tucson said...

Ben, will .png transparency be honored for the draped object's texture so that the edges can be "feathered in" to the surrounding terrain if needed?

This is definitely not spam. I prefer green eggs and ham!

Steve

Benjamin Supnik said...

yes. transparency is honored...which is pretty useful for 'integrating' the ground footprint.

pionono said...

Hi!

One more question. What about performance? In which cases will it be advisable to use a drapped object, and in which a drapped polygon? Is it only a matter of modularity? (i.e. objects may be more suitable for replication across the scenery and polygons for single instances...)

Benjamin Supnik said...

There will be more info coming when the real authoring guides for v10 are released. But ...

- Generally the draped part of the OBJ is almost exactly the same in cost as a draped polygon.

- Generally you want to use the OBJ when you have small decals, particularly ones that need to match ONE object.

- You want to use a .pol when you have HUGE decals (like an ortho of an airport) that have to be registered with MANY objects.

- Some MSFS converts have large poly_os geometry segments, there won't be any harm converting them to draped OBJs.

A draped-only OBJ should have the same cost as a pol, and no OBJ-related cost.