Personal tools

OBJ Texture Variants RFC

From X-Plane Wiki

Jump to: navigation, search
This page contains a Request For Comment (RFC). RFCs are posted to facilitate discussion of possible features; an RFC does not mean that the feature will be implemented, or that the feature will be implemented exactly as specified in the RFC! Do not assume an RFC will be implemented; do not create and post content that uses extensions proposed in the RFC. Wait for the final specification before creating airplanes and models!
	Revision History
		12/4/09 - Initial Draft

Traditionally, in order to change the UV map of an object, it was necessary to introduce a new batch. Thus there was no performance advantage to changing the texture of an object vs. changing the entire object.

With modern hardware, it is now possible to linearly remap the UV map of an object on the GPU on the fly, and it is possible in some cases to change this mapping per object without introducing new batches.

This extension proposes a way for objects to contain multiple images in a single texture, for the purpose of increasing variety of a repeated object without impacting performance.

A "swizzled" object is one where the UV map is selected among quadrants on the fly. The object contains a global attribute describing the grid that we swizzle from - an implicit grid of 1x1 cells applies to legacy objects.

Restrictions:

  • A swizzled object cannot have a UV map that "wraps" - wrapping is not supported!
  • Swizzling is a global attribute - the entire object must be swizzled.
  • The selected cell for swizzling is picked by the sim at random.
  • Swizzling is not allowed for the cockpit object.
Navigation