Thank you all for the help.

Yeah, the binary files are gziped, I 've upziped one,
but it is invalid as Alan said, many DEF
style_[number]Appearance, I am wondering if there is
any tool that can help validate such VRML files, just
feel it is too troublesome to modify them manually.


Thanks a lot!
M.


--- Alan Hudson <[EMAIL PROTECTED]> wrote:
> kindy huang wrote:
>
> > I write a program using Xj3D's X3DLoader to browse
> > VRML2.0 files.
> >
> > The attached are two files I downloaded from web,
> > their 3D scenes can be seen using Cosmo Player or
> > Cortona VRML client, but they cannot be loaded by
> my
> > program(and Crossroad3D). One of them seems in
> binary
> > format, the other one looks like a VRML2.0 file in
> > text format, but still cannot be loaded.
> >
> xj3d does not support gzipped files.  ungziped
> before you load them in
> Xj3d.  Usually you need to move the file from
> foo.wrl foo.wrl.gz and
> then gunzip foo.wrl
>
> > what 's wrong with these VRML files or with my
> > program?
> >
> The second file is invalid VRML.
>
> You have some top-level Appearance nodes.
> Appearance nodes must be in a
> Shape node's appearance field.
>
> So this:
>
> DEF style_1 Appearance {
>         material Material {
>                 ambientIntensity 1
>                 diffuseColor 0.371078 0.347641
> 0.292953
>                 emissiveColor 0 0 0
>                 shininess 1
>                 specularColor 0 0 0
>                 transparency 0
>         }
> }
>
>
> must be:
>
> Shape {
>     appearance DEF style_1 Appearance {
>         material Material {
>                 ambientIntensity 1
>                 diffuseColor 0.371078 0.347641
> 0.292953
>                 emissiveColor 0 0 0
>                 shininess 1
>                 specularColor 0 0 0
>                 transparency 0
>         }
> }
> }
>
>
>
> > Any hints? Thanks a lot!
> >
> > BTW, I am also surprised why .wrl can be in binary
> > format.? I thought all of them should be pure
> text.
> >
> gzip files should not be in .wrl files.  The X3D
> spec has fixed this
> problem, but the practice still continues in VRML.
> In X3D you append a
> z to indicate that file is gzipped, so .x3d  would
> become .x3dz if it
> was gzipped.
> --
> Alan Hudson
> President: Yumetech, Inc.
> http://www.yumetech.com/
> Web3D Open Source Chair
> http://www.web3d.org/TaskGroups/source/
>
>
===========================================================================
> 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".


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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