Hi Eric/Mike,

I think for 1.1 we should experiment with what mulitpliers work on
different hardware, and then come up with some auto detection code
that detects the hardware and produces an appropriate fudge setting
for it.  If could be a simple as its ATI then use 512 as a multiplier,
it could be that this should go into osg::PolygonOffset itself.



Robert.

On 7/10/06, E. Wing <[EMAIL PROTECTED]> wrote:
> From: Mike Weiblen <[EMAIL PROTECTED]>

> ok, I saw the cool new outlined text in the updated osglogo, and
> unfortunately
> it looks pretty bad on ATI graphics, see attached.
>
> (I realize this is an ATI problem, but we have to deal with it.  Is it worth
> the
> possible bad impression for OSG's premier branding demo to use a rendering
> technique that looks so bad on such a widely deployed configuration of
> graphics hw?)
>
> The artifact is alpha texels or blending don't function properly at certain
> distances and view angles, the result being obvious flashing of white inside
> the
> blue letters.  tested on:


With respect to the osglogo/text problems you're seeing, I've been
having similar problems on my ATI card in a Mac (Radeon 9700 I think).
I think the problem is due to z-fighting (though I could be wrong).

The outline/backdrop algorithm is really lame. It just redraws the
same object, slightly shifted in different directions to give the
effect of an outline. It uses glPolygonOffset to try to eliminate
z-fighting problems. This seemed to be the easiest way to achieve the
backdrop/outline effect and also had the benefit of not requiring
advanced hardware or anything beyond OpenGL 1.1 so it would be
accessible to everybody.

But on my ATI card, I'm finding that the glPolygonOffset amounts we
set are not enough. Right now if you look at the code, you see we have
a 2x multiplier to fudge things. For my ATI card, I had to change 2x
to 512x before things were working correctly for most cases. But even
at 512x, if I zoomed in far enough and rotated at certain angles, I
could recreate the problem in some cases.

Robert tells me that I shouldn't have to scale up the fudge factor so
high and suggests an implementation mismatch w.r.t. spec. And he warns
me pushing up the factor too high may cause other strange artifacts
when there are objects behind the text.

I don't have these problems on Mac Nvidia. I think Apple writes their
own drivers so usually don't expect to see the same problems on
different platforms, so now I'm pretty worried to hear this affects
Windows/ATI too as this hints at something beyond just a driver
problem.


So I'm not sure what to try to fix this ATI problem. I'm open to
anybody submitting a better algorithm than my lame "redraw shifted"
technique (though I would hope the solution could still meet the low
hardware and OpenGL 1.1 compatibility requirements.) But I think that
will be hard to pull off, especially in this release cycle.

If changing the PolygonOffset works for your ATI card, maybe we need
to crank up the value, or make a backdoor API call that lets us change
the value for our specific needs. It's an ugly hack, but it might be
needed.

Or maybe something can be done to disable the depth buffer or
something along those lines. But I presume this may cause rendering
order problems.

Or maybe we could modify the current algorithm to use the stencil
buffer? I've avoided the stencil buffer in the past because I dealt
with lots of crappy hardware that had no hardware acceleration for the
stencil buffer so framerates would drop to the floor. But maybe that
has changed with modern hardware? (How well do those Intel GMAs that
seem so popular in laptops now-a-days fare with the stencil buffer?)
Maybe we could make it yet another ugly API call that lets us switch
between PolygonOffset or StencilBuffer techniques (if this is still an
issue). I am really weak on my stencil buffer skills, so if this is a
feasible solution, would somebody be able to help contribute this? I'm
afraid I wouldn't be able to get this done before osg 1.1 goes final.

Thanks,
Eric
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to