In my opinion you should add a PolygonAttributes object with Face Culling is set
to CULL_NONE.

regards
Paul

PS.: you don't need set the TransparencyAttributes, since opaque is the default.

Vikas Bhardwaj schrieb:

> Hi Everybody!
>   I'm trying to create an open box.
> For this I use several box objects to create plates, these are created using
> the following code:
> Primitive blk = (Primitive)new com.sun.j3d.utils.geometry.Box (
>  (float)dim[find(DimensionNames.UNQUALIFIED_WIDTH)]/2000,
> (float)dim[find(DimensionNames.UNQUALIFIED_DEPTH)]/2000,
> (float)dim[find(DimensionNames.UNQUALIFIED_HEIGHT)]/2000,
> com.sun.j3d.utils.geometry.Box.GENERATE_TEXTURE_COORDS
> |com.sun.j3d.utils.geometry.Box.GENERATE_NORMALS|Geometry.ALLOW_INTERSECT|
> com.sun.j3d.utils.geometry.Box.ENABLE_APPEARANCE_MODIFY,//added for picking
>             app);
> These five Box objects (plates) are joined to create a cuboid with five
> faces.
> I again place two small plates on the four faces of the box created above.
>
> When I rotate this system, at some position one of the plates becomes
> transparent and I can see through it.At other position one of the faces of box
> becomes invisible but small plates are visible.
> I'm using the following appearance node :
>
> Appearance app = new Appearance ();
> app.setCapability (Appearance.ALLOW_COLORING_ATTRIBUTES_READ);
> app.setCapability (Appearance.ALLOW_COLORING_ATTRIBUTES_WRITE);
> Material mat = new Material (objColor, black, objColor,white, 50.0f);
> mat.setLightingEnable (true);
> app.setMaterial (mat);
> ColoringAttributes ca = new ColoringAttributes ();
> ca.setCapability (ColoringAttributes.ALLOW_SHADE_MODEL_WRITE);
> ca.setShadeModel (ColoringAttributes.FASTEST);
> ca.setColor (new Color3f (0.0f, 1.0f, 0.0f));
> app.setColoringAttributes (ca);
>
> I'm using lights as recomended by the tutorial.
>
> I've tried setting the TransparencyAttributes to make it opaque as follows
> app.setTransparencyAttributes (new
> TransparencyAttributes(TransparencyAttributes.BLENDED,0.0f));
>
> I created my own Box object and generated the normals for the edges, increased
> the No. of vertices but this all did'nt work.
>
> Is it because of lighting, rendering order or Z Buffer?
> How I can correct this?
> Thanks
>
> Vikas
>
> ____________________________________________________________________
> Get free email and a permanent address at http://www.netaddress.com/?N=1
>
> ===========================================================================
> 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