Renderer feature

Started by ErDetEnAnd?, May 08, 2008, 06:55:19 PM

Previous topic - Next topic

ErDetEnAnd?

Hello.

I need to solve a problem where two objects have (partial) identical plane coordinates. Imagine two boxes with same size and position but different textures. This causes flicker once transforming the objects together. Before I go to dramatic changes I'd like to know if jPCT is capable of prior the rendering of one object, by defining which object to appear.

Regards
Ducky

Melssj5

No, that is called Z fight or something like that. The 2 objects has a face on the same plane so jpct will try to render both. what you can do is moving ons of the a little back or something.
Nada por ahora

ErDetEnAnd?

Thx for your answer. It led me to "polygon offset":

QuotePolygon offset was an extension to OpenGL 1.0, and is now incorporated into OpenGL 1.1. It allows an application to define a depth offset, which can apply to filled primitives, and under OpenGL 1.1, it can be separately enabled or disabled depending on whether the primitives are rendered in fill, line, or point mode. Thus, an application can render coplanar primitives by first rendering one primitive, then by applying an offset and rendering the second primitive.

Whole article:
http://www.opengl.org/resources/faq/technical/polygonoffset.htm

Is this feature supported by jPCT in any software renderer? - I guess its available using its OpenGL renderer?

EgonOlsen

Neither of the renderers support this. While it's a feature of OpenGL 1.1 and higher, support for it on current hardware isn't satisfying. I tried using it in the shadow mapping process, but it caused the pipeline to fall back to emulation mode on some cards...it was too slow to be usable. It's better to offset the models in world space instead of faking the offset afterwards.