>Date: Fri, 21 Jun 2002 10:32:28 +0200 >From: "Schäfer, Peter" <[EMAIL PROTECTED]> >Subject: [JAVA3D] ModelClip bug ? >To: [EMAIL PROTECTED] >MIME-version: 1.0 >Delivered-to: [EMAIL PROTECTED] > > >Hi there ! > >I think I've found a bug in the ModelClip class. >If the model clip contains at least 3 clipping planes >AND if it is applied to a textured object, >only two clipping planes are actually effective. > >If the object has no texture, all clipping planes are effective. > >is this a known bug ?
No. >if so, is there a work-around ? Is that fail on both Java3D v1.3 beta2 OpenGL and DirectX version ? I'm guessing this may be driver related. Since some graphics card support only 2 user defined hardware clipping plane. For 3 or above it works in emulation mode. The following is quote from Nvidia OpenGL Performance FAQ for GPU v2.1. --------------------------------------------------------------- III. Clipping and Culling 22. Should I perform any clipping myself? No, its fastest to allow OpenGL to handle it, since the GPU performs viewport clipping very efficiently. In order to take advantage of this clipping, applications should pass in unclipped geometry. Applications should continue to perform gross culling against the view frustum before sending complex objects, and some intelligent scene occlusion culling, such as a BSP. 23. Are user-defined clip planes hardware accelerated? Yes, a number of user-defined clip planes are hardware accelerated through use of texture mapping and special hardware features. 24. How many user-defined clip planes are hardware accelerated? For every texture unit you have left unused, you get two hardware user-defined clip planes. The caveat is that enabling polygon stipple counts as using a texture unit if you are not already using both texture units (see question on polygon stippling below). For example, you can use 2 clip planes with single-texturing, and 4 clip planes with no texturing, assuming no polygon stipple. If more clip planes are defined than can be implemented by the hardware, the driver falls back to software clipping. If lighting is disabled, the driver can use fairly fast clip routines. However, clip planes are harder when lighting is enabled, because you have to light the vertices and then apply the clip planes, interpolating the lighted vertex results to the clipped coordinates. If lighting is enabled, the driver must use fairly slow clipping code. Avoid this case, if at all possible. In fact, avoid user-defined clipping planes altogether, if possible. ------------------------------------------------------------------------------------------- Please also send us a test case to verify. Thanks. - Kelvin ----------------- Java 3D Team Sun Microsystems Inc. ==========================================================================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".