On Thu, May 16, 2013 at 8:58 AM, Vivian Meazza wrote:
> 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.

There's a bug in the <predicate> for technique 4.  It should only be enabled if
you have ARB_multisample, but is incorrectly being enabled if you have
shader language 2.  I've got a fix for this that I've still to push.
However, I think this issue
predates my recent tree changes, though they may have exacerbated
them.  Were you
seeing black borders around the trees before I started messing around
with them recently?

My system supports ARB_multisample, and IMO it provides quite a good effect at
normal tree viewing distances.  I'm slightly surprised that Thorsten's
new system doesn't
support this, as evidenced from his screenshots.

Interestingly, when I disable technique 4, I start seeing the black
outlines. Evidently there
some very GPU-specific things going on here.  On the plus side, I can
at least reproduce
the issue!

I _do_ have a good fix for the black outlines in general, and I've
modified the current
textures to use it.  I just need to push it - hopefully tonight.

> 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 -

Unfortunately modifying the mipmap didn't help.  Partially disabling mipmaps
by setting "nearest" meant that trees in the medium-far distance look
very pixelated and
artificial, and I've been unable to get the mipmap alpha channel to work.

> 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.

Let me check in the stuff I've done so far once I run a couple more
tests this evening.
That should fix the issues you are seeing.

However, that still leaves us with very long, thin, textures as I
can't see a way to go
back to the square textures without causing the black hats.

If we want to stay within a total texture size of 4096, the long, thin
texture limits us to
a maximum individual tree texture of 128x256, as there are now 32
textures in a typical
sheet (8 trees, each in summer, summer+snow, winter, winter+snow variants).

I think that a 128x256 texture for an individual tree isn't quite
enough.  While we don't need
to go bird-spotting, it's not unreasonable to expect the tree to look
good if it fills the screen.

So, I think we have the following options:

1) Forget the whole thing.  Revert back to the previous model of
having one texture
for summer and one for winter, no support for snow-covered trees.  I'd
still commit
changes to fix the black outlines and technique=4, so the effort won't
have been completely
wasted. With a 4096 texture sheet limit we'd be able to have 512x1024
individual trees.

2) Support dynamic changing of snow-cover on trees, but not season
changes.  This means
that to see a winter deciduous tree one would need to change the
season and reload the scenery,
loading in the winter material definitions which would include both
the tree texture and general
ground textures.  Thorsten R. - what are your plans for ALS support
for winter?  I
think you currently use the summer materials, correct?  This would
allow 256x512 individual trees.

3) Support dynamic changes of season, but have no support for
snow-cover on trees in the texture
itself.  This is my probably my preferred option. While having
snow-covered trees is nice, the
actual circumstances when it occurs are fairly minimal as the snow is
blown off the trees by the wind.
This would allow 256x512 individual trees.

4) Accept the limitation of 128x256 individual tree textures.

Let me know what you think.

-Stuart

------------------------------------------------------------------------------
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