-----Original Message-----
> From: Discussion list for Java 3D API
[mailto:[EMAIL PROTECTED]]On Behalf Of Cristian Tota

> I want to represent a wireframe with filled polys and lines at the same
time
> (filled polygons with drawn margins). Do I have to add 2 Shape3Ds to a
> BranchGroup, one with filled polygons and one with lines, having the same
? coordinates? Or is there an easier way?

I don't know if my approach is actually easier, but I have the same
requirement with rendering a model composed of Quads, and use textures to
show quad edges.

I found that using a texture composed of a black square on a transparent
background, with coordinates {(0,0), (0,1), (1,1), (1, 0)}, and applied as a
decal, is *much* faster to render (probably because most video cards are
optimized for textures) than having two Shape3d objects. The performance
benefit is doubly so for DirectX, which appearantly (so I've read) doesn't
have true support for wireframe polygons (only triangles), requiring Java3D
to fake it for you.

The downside of this approach is that the lines aren't "crisp" when you are
zoomed out or if your quad has an aspect ratio far from 1. I guess you could
always create multiple textures based on quad shape. You have to use
"NICEST" texture scaling to eliminate some weird rendering artifacts (at
least on my TNT 2 card), and MipMapping helps with quality/speed. Again,
performance is awesome!

Hope this helps. Let us know how it goes.

Simeon Fitch

/**
 * @author Simeon H.K. Fitch
 * @organization Mustard Seed Software
 * @web http://www.mustardseedsoftware.com
 * @email [EMAIL PROTECTED]
 * @voice 210.867.1616
 * @fax 309.424.4982
 */

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