I remember seeing some utility code from Sun for clipping triangles.  I just
can't seme to find it.  Does anyone know where that is?

Dave Yazel
----- Original Message -----
From: "Mauricio Vives" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 15, 2002 4:51 PM
Subject: Re: [JAVA3D] Model clipping


Dave,

It would indeed be tricky to use clipping planes to create holes, and it may
not actually be possible.  As you already noticed, you end up clipping
everything if you use standard clipping planes to try to create a hole.
Java 3D uses clipping plane support from the underlying graphics API, and
that support is limited to half-spaces as Mark described.

But I have heard of stranger things.  For example, from the SIGGRAPH 99
OpenGL course notes (a gold mine of tips and tricks), we have an explanation
of how to use a stencil buffer for constructive solid geometry (booleans):

http://www.opengl.org/developers/code/sig99/advanced99/notes/node22.html

Not that this helps with Java 3D, but it is interesting to see what is
possible with clever tricks!

In any case, I think that for your situation (putting holes in terrain
geometry for basements), you will either need to generate the hole in
advance, or allow your engine to modify the terrain geometry dynamically
(i.e. drop a house here, and the engine cuts out the hole for you).  There
may be a more clever solution out there, but I imagine that almost all games
out there which render terrain with holes use one option or the other.

- Mauricio

-----Original Message-----
From: David Yazel [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 15, 2002 2:49 PM
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] Model clipping


I never got a response on this, so I thought I would resend it.  Also, can
anyone explain the Vector4d that defines the clipping planes, or does anyone
have examples of how this works?

Thanks,

David Yazel

----- Original Message -----
From: "David Yazel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, June 16, 2002 12:44 AM
Subject: [JAVA3D] Model clipping


Is it possible to define a model clip such that it makes a hole in geometry?
In other words can the clipping planes be defined such that the planes face
outward?  In particular I want to put holes in the terrain to give access to
basements, etc.

And when it does clip, does it slice triangles or just render or not render
the entire triangle?

Thanks in advance!

Dave Yazel

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