Thanks as always for your replay Justin!

The alpha blending problem for coplanar surfaces is a real weakness.
Specifically for terrain rendering it is critical if you want to achieve a
high density terrain texturing surface to be able to composite multiple high
density textures together.

Our engine can calculate textures for every splat at any desired density, as
well as splat masks for compositing.  The problem we are facing is that we
need to generate terrain for a large area, so we can't afford to store that
many high density patch-specific textures.  Well we can get close with 6.3
GB of storage :)

Even using detail textures add-signed or modulated into the base lower
density texture provides its own problems because the detail texture for
rock is different than for grass.  This means that for one patch we would
need to combine at the very least two detail textures... and if we composite
it CPU side then we can't use repeating details... meaning that to achieve
the density in the detail it would need to be close to 1k x 1k per splat.
The lowest level we go to is 64 meters x 64 meters.  Stretching even a
256x256 unique texture (which is a prodigious amount of textures on disk)
yields only 4 texels per meter... which is fine for the basic coloring, but
compltely fails for anything approaching ground detail.  Throwing a
ubiquitous repeating detail texture over that can achieve a better look, but
still fails to add any value at all.  If you want to show a path, road or
any other coplanar high density texture you *have* to composite it.  Even if
you use completely different geometry on top of the ground (not in decal)
and you want the edges to merge into the ground you have to alpha blend the
edge, and then you are back to the original problem.  You can't depend on
Java3d's alpha sorting for this problem, since long ground textures confuse
the sort buckets and you end up with unpredictable problems.

I am really stymied unless someone can come up with something.

Dave

----- Original Message -----
From: "Justin Couch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 06, 2002 11:03 AM
Subject: Re: [JAVA3D] Decal + Alpha blending problem


David Yazel wrote:

> Decal groups seme to have an artifact that I can't seem to get around.  If
I
> am alpha blending between terrain layers java3d is still rendering the the
> alpha blended layers in the transparency pass at the end of the rendering
> cycle, even if these layers are in a decal group.

This is my understanding of how java3d's transparency sorting routine
works. Anything that has alpha in the geometry is separated out to
another list and is rendered independently of the underlying geometry.

> any way to force these to be blended in multiple passes in the solid
> rendering portion?

Not that I've aware of.

> Secondly, would it be possible to pile them all into texture units within
> the same shape and then use combine (somehow) to achieve the same effect?

Typically this is the better way of doing it. All modern video cards
support at least 2 texture units so you should be able to do this
relatively easily. However, to keep performance up, you might want make
sure that the rendering doesn't drop back to multipass texture
combinations, which J3D will do if you use more TextureUnitStates than
the hardware supports. To avoid this, query the browser properties and
then if you find it has 2 or less, do your own alpha compositing of the
textures using Java2D. I'd recommend combining the two detail textures
together assuming you weren't doing them for different visual effects
like bump mapping & shadow/light mapping.

--
Justin Couch                         http://www.vlc.com.au/~justin/
Java Architect & Bit Twiddler              http://www.yumetech.com/
Author, Java 3D FAQ Maintainer                  http://www.j3d.org/
-------------------------------------------------------------------
"Humanism is dead. Animals think, feel; so do machines now.
Neither man nor woman is the measure of all things. Every organism
processes data according to its domain, its environment; you, with
all your brains, would be useless in a mouse's universe..."
                                               - Greg Bear, Slant
-------------------------------------------------------------------

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to