1) You could use multi-texturing, but I've never seen this work
particularly well. (look at the javadoc for TextureUnitState)

2) You could draw 2 polygons very slightly apart with a single texture on
each using standard transparency.

3) If the amount of alpha isn't going to vary at runtime you could
preprocess the textures into a new texture and just apply that. The
preprocessing can be done using Java 2D (look at BufferedImage/ImageFilter
javadoc).

I've tried each one for a terrain engine I was writing
(http://pondering.newdawnsoftware.com) but ended up using number 3 since
it smallest FPS hit.

HTH

Kev

> Hi,
>
> I'd like to render two textures on a surface using an alpha mask to
> specify what portions of the lower texture should show through and blend
> with the top texture. The alpha mask and, if possible, its texture
> coordinates should be modifiable at runtime.
>
> Any thoughts on how I may be able to achieve this?
>
> Thanks!
>
> Martin
>
> ===========================================================================
> 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".


--
Jose UML - http://www.newdawnsoftware.com/jose
Pondering RPG - http://pondering.newdawnsoftware.com

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