On Wednesday 20 March 2002 20:59, you wrote:

> If your landscape is not too large you could simply turn the invisible
> parts invisible by setVisible(false) in RenderingAttributes. The objects
> are still pickable. But therefore all tiles have to be in the
> scenegraph.

This isn't a option, as the server isn't sending the complete map to avoid
cheating.

>
> Another more elegant way should be to use one large invisible Quad
> around the visible parts of the map. If the Pickresult is that Quad you
> have to get the clicked point on that Quad by
> getClosestIntersection(Point3d pt) in Pickresult. From that point it's
> easy to compute the not yet existing tile at that position of your map.
I will try this.

>
> > To get a nicer landscape I want blend the textures so the terrain
> > overlaps. My
> > original idea was to create a BufferdImage for each grid and add this
>
> as a
>
> > texture to the geometry. But this would result into an OutOfMemory
> > Exception.
>
> Try to use multitexturing. Use and reuse small textures for the tiles
> and a second maybe larger texture for the whole map or a cluster of
> tiles.
How can I multitexture? Is it supported in java 3d 1.2.1_4 ?


>
> > Currently I am adding the complete known map to the scene-graph. Would
>
> it
>
> > work if I only add the currently visible area and remove the
>
> invisible?
>
>
> Yes. You should do that for larger terrains. If all fits into memory you
> can simply turn the invisible parts off with a switch node above every
> tile in the scene graph to increase rendering performance. This is
> similar to frustum culling (what Java3d does) but it should be more
> efficient if you do it, 'cause you can do it with more simple operations
> with your knowledge of the scene.
That sounds good. I will try it.

Thank you for your help!

--
Andreas Bauer
[EMAIL PROTECTED]

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