My texture is in the same file as the model and all files as well as directories are accesible.  As for my VRML file, it calls the texture as follows:
                                ...
                            Shape {
                           appearance DEF _APP0 Appearance {
                              texture DEF _TXT0 ImageTexture {
                                 url "C:/java/load/plane_wheel.rgba"
                              }
                           }
                                ...
 
where java/load/ has the model,texture,and java class.
 
here's the beginning part of the error:
C:\java\load>java SimpleLoad
java SimpleLoad
WARNING: Canvas3D constructed with a null GraphicsConfiguration.
Error: in loading image
Exception: java.lang.NullPointerException
Last token was "}" at line 64
java.lang.NullPointerException
 at com.sun.j3d.utils.image.TextureLoader.getTexture(Compiled Code)
 at com.sun.j3d.loaders.vrml97.impl.ImageTexture.doChangeUrl(Compiled Code)
 at com.sun.j3d.loaders.vrml97.impl.ImageTexture.initImpl(ImageTexture.java:78)
 at com.sun.j3d.loaders.vrml97.impl.Parser.Node(Parser.java:527)
 at com.sun.j3d.loaders.vrml97.impl.Parser.NodeStatement(Parser.java:229)
.
.
.
It can't be this complicated...
 
----- Original Message -----
Sent: Friday, September 01, 2000 11:52 AM
Subject: Re: [JAVA3D] J3D java.library.path for windows

Shaun,

Have you verified that the URL provided in the VRML file for the texture is available?  The options that I've seen work just fine are:

1)  texture file is in the same directory as the model
2)  texture file is a valid and accessible URL
3)  texture file reference is to a valid and accessible directory in the filesystem

Of course, the texture file must be in one of the formats supported -- we are using JPG.

--Mark

At 11:02 AM 9/1/2000 -0500, you wrote:
Mark,
        I got the newer one, thanks.  The problem is when I try to load a simple object with a texture on it I get a bunch of runtime errors.  Starting with a NullPointerException at the utility Texture Loader followed by com.sun....impl.Parser errors.  Do I need to load in the texture before I load the object?  I tried to find some sample code of loading a textured VRML file but couldn't find anything.  Any input would be greatly appreciated. 
                                                                                            Shaun


Mark Ferneau                    240-462-6262 (cell)
Director of Adv. Technology             801-437-4608 (efax)
Xtivia Technologies, Inc.               732-469-5954 x629 (NJ office)
[EMAIL PROTECTED]                      301-279-5703 (home office)
http://www.xtivia.com/          [EMAIL PROTECTED] (wireless email)







Reply via email to