I prefer triangles for geometry, especially since the delaunay
triangulations I perform on the terrain for simplification yield
triangles. Also, I believe most 3D hardware natively uses
triangles and so has to go the additional step of decomposing
a quad. I am currently using average neighboring surface normals
for each vertex normal, coupled with Gouraud shading to get
satisfactory results. Another approach is to compute a "shadow
map" for your terrain based on the sun's position in the sky and
the heightmap. You can then texture yor terrain with the shadow
map or use it as part of a multitexturing step (supported in J3d 1.2)
with some other texture like grass or whatever.
-Pedro Estrada
----- Original Message -----
From: "Jon Barrilleaux" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 15, 2000 3:57 PM
Subject: [JAVA3D] Terrain shading (was: Lights on texture)
> In past lives I've approached terrain shading as an imaging problem.
> Now I need to get smarter about doing it with polygons. Any
> suggestions from the terrain shading community on what is the
> preferred geometry (quad vs. triangle) and method of normal generation
> (average neighboring surface normals, cross product of neighboring
> vertices, etc.) for high visual quality of untextured (and textured)
> terrains using what java 3D provides?
>
> I've been doing some experimenting with untextured terrains and my
> findings are that flat shading with per-vertex normals is bad -- too
> many mis-shaded polygons, whether with quads or tris (why isn't there
> an equivalent of normal-per-polygon in Java 3D -- or did I miss
> something?), and that gouraud shading produces annoying "starburst"
> patterns (perhaps this is just an artifact of gouraud shading in
> general).
>
> --jon
>
> > Date: Wed, 12 Jul 2000 09:24:12 -0400
> > From: Pedro Estrada <[EMAIL PROTECTED]>
> > Subject: Re: Lights on texture
> >
> > An approach I use (for shaded terrain rendering) is the following:
> >
> > 1. Set the color of the underlying mesh to Color3f(1.0f, 1.0f, 1.0f)
> > 2. Define a material object :
> > material.setAmbientColor(color);
> > material.setDiffuseColor(color);
> > 3. Set the Gourad shading model in ColoringAttributes
> > 4. Set textureAttrib.setTextureMode(TextureAttributes.MODULATE) for the
> > texture
> >
> > This has the effect of modulating the texture with the light shaded
polygon
> > mesh.
> > Works well for terrain as it bypasses having to "burn in" a particular
sun
> > position (albeit
> > at a possible performance penalty).
> >
> > -Pedro Estrada
> > www.alphatech.com
>
> --
> __________________ JMB and Associates, Inc. ___________________
> Jon Barrilleaux 3800 Lake Shore Ave. Consulting for 3D
> [EMAIL PROTECTED] Oakland, CA 94610 Web Applications
> 510.444.4370 voc & Tech Industry
> 510.444.0231 fax www.jmbaai.com Management
>
>
===========================================================================
> 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".