Fraser,

This will definitely get you better performance. As for the looks, it
depends on what you are going for. You can try it and play with the
ColoringAttributes to adjust the blending algorithm. I'm not completely
clear on what you are trying to accomplish so I can't be completely sure
vertex coloring will work.

It is easy enough to add and test if you are already creating the geometry.

-mike


-----Original Message-----
From: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED]
On Behalf Of Fraser MacLeod
Sent: Wednesday, September 29, 2004 8:23 AM
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] Applying texture to terrain

Mike;

Thanks for the suggestion. While performance is not an issue right now
it will become a major factor for the final software!!

Another thought would be the possibility of modifying the color of each
grid cell to take account of the visibility information, rather than
applying a surface texture. Would this work, and if so would it offer
better performance?

Fraser

On Wed, 2004-09-29 at 13:08, Mike Pilone wrote:
> One option is to use a texture that is larger than you need and just crop
it
> using texture coordinates. Remember that your texture does not need to
> exactly fit your shape, but you can let the texture coordinates go from 0
to
> .75 for example.
>
> However in this case you would need a 1024x1024 texture, which is rather
> large and will probably not perform well on most video cards. A general
rule
> of thumb is to keep the texture size to 256x256, but if performance isn't
a
> big concern right now, give it a try.
>
> -mike
>
>
> -----Original Message-----
> From: Discussion list for Java 3D API
[mailto:[EMAIL PROTECTED]
> On Behalf Of Fraser MacLeod
> Sent: Wednesday, September 29, 2004 6:31 AM
> To: [EMAIL PROTECTED]
> Subject: [JAVA3D] Applying texture to terrain
>
> Hi;
>
> I am using a DEM file to generate a virtual terrain (650x1000 grid cells
in
> the terrain). Using this I am computing those areas of the terrain visible
> from a point and storing this as an array (1=visible, 0=non visible for
each
> grid cell).
>
> I would like to overlay the visiblility information as a texture onto the
> terrain - the effect that I want is one where red tinged cells are
visible,
> and dark tinged cells are non-visible.
>
> I am struggling to find a way of doing this given that the
> terrain/visibility arrays are not powers of 2. Is there something like an
> ELevationGridGenerator for textures?
>
> Any suggestions more than welcome.
>
> TIA
>
>
===========================================================================
> 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".

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