I'm afraid that all I can think of is that using URL, the address is
case sensitive. Check that out. And is there really that space in your
filename 'ceiling .jpg'?
If you turn on the logging, I think the loader tells you exactly what
the path and filename are for the texture image that it's expecting.

-Paul



Ben Logan wrote:

Hi
Thanks for the help, much appreciated! There is still a problem though,
with textures.
Here is the code;

URL url1 = cl.getResource(fileName);

int index = url1.toString().lastIndexOf("/");
String temp = url1.toString().substring(0, index+1);

Inspector3DS loaded3DS = new Inspector3DS(url1);

System.out.println("THE URL BASE? " + temp);
loaded3DS.setURLBase(temp);

What I have done is consistent with your quick answer where my texture
files would be in the whatever folder. But I am getting the following
message on the console;

THE URL BASE?
jar:file:/C:/Documents%20and%20Settings/nbl8/Desktop/app/MapBuilder.jar!
/mapFiles/MapTiles/Office/objects/
Error loading Image
jar:file:/C:/Documents%20and%20Settings/nbl8/Desktop/app/MapBuilder.jar!
/mapFiles/MapTiles/Office/objects/ceiling .jpg

There is no problem with the files or their locaction, I know this all
works without archiving etc

Any ideas, do I need to call .setTexturePath? If so what would the path
be in this instance?

Regards


-----Original Message-----
From: Paul Brown [mailto:[EMAIL PROTECTED]
Sent: 23 January 2004 09:44
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] Starfire Loader

Quick answer:

URL url = new
java.net.URL("jar:file:/C:/dir/archive.jar!/whatever/model.3ds");
String base = "jar:file:/C:/dir/archive.jar!/whatever/";
Loader3DS loader = new Loader3DS();
loader.setURLBase(base);
Scene scene = loader.load(url);

-Paul

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