Difference between revisions of "Compiled objects"

From JPCT
Jump to: navigation, search
(Created page with '=== Compiled Objects === compiled objects are a new feature in jPCT 1.18 and higher. By default, jPCT uses a render-pipeline that i call hybrid-pipeline, because it processes so...')
 
Line 14: Line 14:
 
* Config.lightMul is implicitly set to 1 for a compiled object
 
* Config.lightMul is implicitly set to 1 for a compiled object
 
* environment mapping is done in world space only
 
* environment mapping is done in world space only
 +
 +
Basically, all objects can be compiled, even animated ones. There are two modes. One for static objects, one for dynamic ones (animated, manipulated by an IVertexController....). The static mode is much faster than the dynamic one...which may still be faster than the default pipeline but that depends.

Revision as of 19:44, 7 April 2009

Compiled Objects

compiled objects are a new feature in jPCT 1.18 and higher. By default, jPCT uses a render-pipeline that i call hybrid-pipeline, because it processes software- and hardware rendered scenes in a very similar way. When compiling an object, another, more hardware oriented pipeline is used. Compiling usually increases performance but it has some drawbacks too. Here's a brief overview:

Advantages

  • It's much faster than the default pipeline for higher polygon counts (up to 80times faster in my tests)
  • Shaders are possible for compiled objects by using the IRenderHook

Disadvantages/Limitations

  • A compiled object can only use as many texture stages as the hardware offers. On current hardware, this means 4, on something like a GeForce2, it means 2. Anything higher will be discarded.
  • Only the 8 nearest light sources will affect the lighting, not all lights
  • Config.lightMul is implicitly set to 1 for a compiled object
  • environment mapping is done in world space only

Basically, all objects can be compiled, even animated ones. There are two modes. One for static objects, one for dynamic ones (animated, manipulated by an IVertexController....). The static mode is much faster than the dynamic one...which may still be faster than the default pipeline but that depends.