> Setting the solid flag to FALSE will make us turn on two sided lighting.
>    This is only available on IndexedFaceSets in VRML.  X3D allows this
> for all geometry.

It think that VRML only supports the solid attribute in IndexedFaceSets
is my problem.  However, I think I am using a X3D v3.0 document (one of
the examples on the x3d site), so theoretically I should have this
support under all geometry.  However, when I tried it, I received a
parse error saying it was an invalid attribute.  Thus, I believe my
loader is still only VRML compatible.  This could be caused by a couple
things.

1.  I am using an old version of the x3d jars (I just downloaded the
latest stable release last week though).
2.  I am misusing the loader somehow.  I noticed a vrml97Only flag on
the BaseLoader that is inherited by the X3DLoader.  However, I can't get
to this flag in my app because it is a protected attribute.  I would
have thought that the X3DLoader would set this to false and render all
X3D content???
3.  I'm just an idiot and don't get it.

All are equally plausible...

Here is an excerpt from the FAQ that I found though...

3.2 How do I use a VRML Loader in Java 3D?
This is a little tricky currently. We have a loader from VRML content
that will support both VRML97 and the last draft VRML3.0 specification.
The loader does not handle XML (X3D) content directly and requires you
to jump through a number of hoops. If you only want VRML97 support, then
use the class org.web3d.vrml.j3d.VRMLLoader and use it like a standard
Java3D loader.

What are the hoops to jump through that this excerpt mentions?

>
> BTW, you might want to look at using the XML encoding of X3D.  Then you
> can easily convert the XML document to X3D through XSLT.  There is a
> program in the examples/browser directory called XSLTViewer.  It takes
> an XML document, and XSLT->X3D document and then renders the result.
> We've had a fair bit of success getting content into X3D via this route.

I agree...this is exactly what I am in the process of trying to
prove...and what I want to do eventually.  Right now, I'm just
prototyping for a proof of concept.

>
> Here is the particular code:
>
>      /**
>       * Specify whether an object is solid.
>       * The default is true.  This will determine if we do backface culling
>       * and flip backface normals.
>       * Can only be set during setup
>       *
>       * @param newSolid Whether the object is solid
>       */
>      public void setSolid(boolean newSolid) {
>          if (newSolid == false) {
>              implPA.setCullFace(PolygonAttributes.CULL_NONE);
>              implPA.setBackFaceNormalFlip(true);
>          }
>          else {
>              implPA.setCullFace(PolygonAttributes.CULL_BACK);
>              implPA.setBackFaceNormalFlip(false);
>          }
>
>          j3dImplNode.setPolygonAttributes(implPA);
>      }

Sorry to be a dimwit...but did this come from the X3DLoader
implementation?  I haven't been able to track down the current source on
the site yet.  thanks for the help...

kddubb

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