Stuart

> Sent: 14 May 2013 09:34
> To: FlightGear developers discussions
> Subject: Re: [Flightgear-devel] Tree issues
> 
> Hi Vivian,
> 
> On Sat, May 11, 2013 at 9:57 AM, Vivian Meazza wrote:
> >  That works - the hat artefact is gone. If I look very carefully I can
> > see a vertical artefact emanating from the centre top of some trees.
> >
> > I hadn't realised that the high res texture was going to be quite so
big.
> > Texture sizes > 4096 px are not so well supported.
> >
> > I wonder if you wouldn't be better disabling mipmapping for trees - it
> > seems to be the source of all the problems? In particular, the
> > different grazing angle on the crossing panels means that different
> mipmaps will be used.
> 
> I can't disable mipmapping AFAIK, but I spent some time looking at the
> effects source code and found an undocumented (well, not in
> README.effects) option to control how the mipmaps are generated for each
> of the RGB and alpha
> channels.*
> 
> So, it would appear that I can generate a mipmap where the alpha value is
> taken as the minimum of the surrounding pixels while the RGB values are
> created normally.
> 
> I need to experiment some more with it later in the week, but I may have
> found a way to use a more square texture without artifacts.  It should
also
> resolve the artifact you mention above.
> 
> In passing I noticed that both your and some of Thorsten's screenshots
show
> a nasty black outline around some of the trees.  I don't see that myself
> except, but I've also got a fix for that issue.  As mentioned on the
forum, the
> problem is that the completely transparent pixels have an RGB value of
0,0,0,
> so mipmaps and interpolations cause this to bleed into the surrounding
> edges.

I'm rather surprised that you can't see the black outline around the trees.
It's around all of them, but is more or less visible according to the range
and angle of incidence. It is also the cause of the "spike" arising from the
centre of the trees.

The proximate cause of the black outline is
<alpha-to-coverage>true</alpha-to-coverage>. Commenting out techniques 4 and
9 in the tree effect removes all black artefacts. While alpha-to-coverage is
intended for dense foliage or grass, I'm not sure that it is appropriate for
our trees as presently drawn and textured. I think you are right to try to
go back to the square texture. I hope that you can find a fix for this - I
know how difficult it is to fix a bug that you can't yourself see. In the
meantime should we consider reverting to the previous scheme in fgdata while
you come up with a fix? Here. I've adjusted the bleed margins and commented
out the relevant techniques, which produces nice trees.

HTH

Vivian



------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to