jOshfLY
Senior Newbie 
Java games rock!
|
 |
«
Posted
2004-03-08 16:57:12 » |
|
****************************************************** TDSLoader Debug Output file: model/character.3ds ****************************************************** java.io.IOException: Not found: model/character.3ds at org.newdawn.xith3d.threeds.TDSLoader.load(TDSLoader.java:87) at TDSTest.<init>(TDSTest.java:80) at TDSTest.main(TDSTest.java:137) Init GL is net.java.games.jogl.impl.windows.WindowsGLImpl OpenGL Renderer = GeForce2 MX/AGP/SSE/3DNOW! OpenGL Version = 1.4.0 OpenGL Vendor = NVIDIA Corporation OpenGL Extensions = GL_ARB_imaging GL_ARB_multitexture GL_ARB_point_parameters GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_transpose_matrix GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_window_pos GL_S3_s3tc GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_clip_volume_hint GL_EXT_compiled_vertex_array GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_packed_pixels GL_EXT_paletted_texture GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shared_texture_palette GL_EXT_stencil_wrap GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_add GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod GL_EXT_texture_lod_bias GL_EXT_texture_object GL_EXT_vertex_array GL_IBM_rasterpos_clip GL_IBM_texture_mirrored_repeat GL_KTX_buffer_region GL_NV_blend_square GL_NV_fence GL_NV_fog_distance GL_NV_light_max_exponent GL_NV_packed_depth_stencil GL_NV_pixel_data_range GL_NV_point_sprite GL_NV_register_combiners GL_NV_texgen_reflection GL_NV_texture_env_combine4 GL_NV_texture_rectangle GL_NV_vertex_array_range GL_NV_vertex_array_range2 GL_NV_vertex_program GL_NV_vertex_program1_1 GL_NVX_ycrcb GL_SGIS_generate_mipmap GL_SGIS_multitexture GL_SGIS_texture_lod GL_WIN_swap_hint WGL_EXT_swap_control java.lang.NullPointerException at TDSTest.run(TDSTest.java:130) at java.lang.Thread.run(Thread.java:534)
This is the error when i execute the 3DS Koader program from xith.com...what should i do to overcome this problem...
|
|
|
|
kevglass
|
 |
«
Reply #1 - Posted
2004-03-08 16:58:56 » |
|
Make sure the "model" directory with the "character.3ds" appears in your classpath.
Kev
|
|
|
|
jOshfLY
Senior Newbie 
Java games rock!
|
 |
«
Reply #2 - Posted
2004-03-08 17:22:02 » |
|
****************************************************** TDSLoader Debug Output file: model/character.3ds ****************************************************** java.io.IOException: Not found: model/character.3ds at org.newdawn.xith3d.threeds.TDSLoader.load(TDSLoader.java:87) at TDSTest.<init>(TDSTest.java:80) at TDSTest.main(TDSTest.java:137)
sorry...i dun clear about the classpath...can you make it more detail.... thanks lot
|
|
|
|
Games published by our own members! Check 'em out!
|
|
kevglass
|
 |
«
Reply #3 - Posted
2004-03-08 17:25:13 » |
|
How are you running the TDSTest ? i.e. what command line are you using?
Kev
|
|
|
|
jOshfLY
Senior Newbie 
Java games rock!
|
 |
«
Reply #4 - Posted
2004-03-08 17:40:01 » |
|
oh...im using NetBeans-IDE...is it ok for it?
|
|
|
|
kevglass
|
 |
«
Reply #5 - Posted
2004-03-08 17:46:21 » |
|
Yeah, thats fine, to get it to run you must have added xith-3ds.jar to the classpath. Where you did that you need to add the directory that contains the "model" directory.
So if you put all the files in:
c:\code\
So that this would exist:
c:\code\model\character.3ds
You need to make sure "c:\code" is in your classpath.
Kev
|
|
|
|
AndersDahlberg
|
 |
«
Reply #6 - Posted
2004-03-08 17:50:14 » |
|
Or, I'm not trying to be an *** here..., try to study http://java.sun.com/tutorial and learn some basics, how the classpath works, how to compile and run java programs first - It's a lot easier to understand what we're trying to say here then! 
|
|
|
|
jOshfLY
Senior Newbie 
Java games rock!
|
 |
«
Reply #7 - Posted
2004-03-08 17:54:10 » |
|
The .3ds i put in here...
c:\xith-3ds\model\character.3ds
is it right?? but still can not locate the character.3ds....headache
|
|
|
|
jOshfLY
Senior Newbie 
Java games rock!
|
 |
«
Reply #8 - Posted
2004-03-08 18:03:43 » |
|
Sorry...i still can not do it...please help me out...thanks a lot
|
|
|
|
kevglass
|
 |
«
Reply #9 - Posted
2004-03-08 18:05:22 » |
|
Is character.3ds actually in the model directory?
Kev
|
|
|
|
Games published by our own members! Check 'em out!
|
|
jOshfLY
Senior Newbie 
Java games rock!
|
 |
«
Reply #10 - Posted
2004-03-08 18:08:05 » |
|
yupe, the character.3ds is in the model folder...
or do i need to modify the code?? the code originally is like this
model = new TDSLoader().load("Model/character.3ds",true);
|
|
|
|
kevglass
|
 |
«
Reply #11 - Posted
2004-03-08 18:11:18 » |
|
na, should be fine. If you put all the files in the c:\xith-3ds\ directory then you need to modify the classpath to include it.
In Netbeans, you need to "mount" the c:\xith-3ds\ directory. Right click on the filesystems icon and mount the directory.
Kev
|
|
|
|
jOshfLY
Senior Newbie 
Java games rock!
|
 |
«
Reply #12 - Posted
2004-03-08 18:17:09 » |
|
no, can not...when i mounted the files i got the list on hte Explorer [Filesystem] like this :-
-c:\xith-3ds -model (folder) -org (folder) -TDSTezst -jogl.jar -lwjgl.jar -test.bat -vecmath.jar -xith-3ds.jar -with_utilities
|
|
|
|
kevglass
|
 |
«
Reply #13 - Posted
2004-03-08 18:28:01 » |
|
Thats right, you should be able to run it then..
|
|
|
|
jOshfLY
Senior Newbie 
Java games rock!
|
 |
«
Reply #14 - Posted
2004-03-08 18:31:47 » |
|
do you know this .jar?? where i can get it??
import display.DisplayOptions;
|
|
|
|
kevglass
|
 |
«
Reply #15 - Posted
2004-03-08 18:33:43 » |
|
Um, have you just context switched or something? DisplayOptions is nothing to do with the 3DS loader, I believe its part of JavaCoolDude's demo stuff?
Kev
|
|
|
|
jOshfLY
Senior Newbie 
Java games rock!
|
 |
«
Reply #16 - Posted
2004-03-08 18:37:40 » |
|
oh...yaa..is JavaCoolDude's demo..wahh you are smart  i get error on that particular part....so, im looking for the .jar you know how to get it??
|
|
|
|
|
jOshfLY
Senior Newbie 
Java games rock!
|
 |
«
Reply #18 - Posted
2004-03-08 18:41:38 » |
|
Oh..very thank you kevglass and Java Cool Dude...cool! horayyyy~~~especially kevglass...im very appreciate you spent your time here with me... Java Cool Dude can you plz...have a look for my problem...please 
|
|
|
|
Java Cool Dude
|
 |
«
Reply #19 - Posted
2004-03-08 18:45:34 » |
|
Yes I ran into the same problem than you and I came up with solution; suicide.... j/k here's what I did 1 2 3 4 5 6 7 8 9 10 11
| BranchGroup holdModels = new BranchGroup(); ClassLoader fileLoader = RippleFactory.class.getClassLoader(); InputStream fileStream = fileLoader.getResourceAsStream("Data/pond.3ds");
try{ if(fileStream == null) fileStream = new java.io.FileInputStream("Data/pond.3ds");
holdModels = new TDSLoader().load("",fileStream, false); } catch(Exception e){} |
Of coarse you need to make the due modifications as in not every class out there is named RipleFactory 
|
|
|
|
jOshfLY
Senior Newbie 
Java games rock!
|
 |
«
Reply #20 - Posted
2004-03-08 18:59:32 » |
|
er...in my case...which part of my program need to modifiy???
|
|
|
|
jOshfLY
Senior Newbie 
Java games rock!
|
 |
«
Reply #21 - Posted
2004-03-08 19:09:28 » |
|
JavaCoolDude's Demo the WaterSimulation can not execute...
java.lang.Error: Cannot load image Data/Water.png
please help
|
|
|
|
aNt
|
 |
«
Reply #22 - Posted
2004-03-09 07:49:46 » |
|
fun fun fun 
|
|
|
|
Java Cool Dude
|
 |
«
Reply #23 - Posted
2004-03-09 08:22:38 » |
|
/me stabs self in the face with a soldering iron 
|
|
|
|
jOshfLY
Senior Newbie 
Java games rock!
|
 |
«
Reply #24 - Posted
2004-03-09 09:09:58 » |
|
hahahaa.....i don't know what happen actually... i usually download the source code and put it on my desktop...and run the program...
or should i put the program to c: or else???
|
|
|
|
|
Bombadil
|
 |
«
Reply #26 - Posted
2004-03-09 11:25:50 » |
|
JavaCoolDude's Demo the WaterSimulation can not execute...
java.lang.Error: Cannot load image Data/Water.png
please help With Kevin's 3ds loader I experienced the same problem - because I don't put the app's resource paths into the classpath. Let's asume your Java application stays in a folder with a subfolder "models/", where the models as well as their textures are. In addition to the model's InputStream we've to give the "models"/ path to the loader, too, in order it can find the textures. From the three (+) possibles ways to create a TDSLoader I can only use this one: 1 2 3 4 5 6 7 8
| final String pathname = "models/"; final String modelfile = "Yourmodel.3ds";
InputStream bis = FileInputStream(pathname + modelfile);
TDSLoader dslader = new TDSLoader(); dslader.setGenerateMipMaps(true); TDSModel model = dslader.load(pathname, bis, true); |
This way it works fine, no matter how you start the Java application: via dosbox (java -cp ..), or via double click on your App.jar, or at a friend's PC (again with emtpy CLASSPATH).
|
|
|
|
jOshfLY
Senior Newbie 
Java games rock!
|
 |
«
Reply #27 - Posted
2004-03-10 04:37:20 » |
|
import com.xith3d.scenegraph.VirtualUniverse; import com.xith3d.scenegraph.View; import com.xith3d.scenegraph.Locale; import com.xith3d.scenegraph.BranchGroup; import com.xith3d.scenegraph.Canvas3D; import com.xith3d.scenegraph.DirectionalLight; import com.xith3d.scenegraph.AmbientLight; import com.xith3d.scenegraph.TransformGroup; import com.xith3d.scenegraph.Transform3D;
import com.xith3d.render.RenderOptions; import com.xith3d.render.Option; import com.xith3d.render.CanvasPeer; import com.xith3d.render.RenderPeer; import com.xith3d.render.jogl.RenderPeerImpl;
import javax.vecmath.Vector3f; import javax.vecmath.Color3f; import java.util.ArrayList;
import org.newdawn.xith3d.threeds.TDSLoader; import org.newdawn.xith3d.threeds.model.TDSModel;
import java.io.*;
public class TDSTest implements Runnable { private View view; private double lightAngle; private double modelAngle; private float anim = 0.0f; private DirectionalLight light; private TransformGroup tg = new TransformGroup(); private TDSModel model; final String pathname = "model/"; final String modelfile = "character.3ds"; public TDSTest() { VirtualUniverse universe = new VirtualUniverse(); view = new View(); view.setProjectionPolicy(View.PERSPECTIVE_PROJECTION); universe.addView(view); Locale locale = new Locale(); universe.addLocale(locale); view.setBackClipDistance(500.0f); // setup view view.getTransform().lookAt( new Vector3f( 20, 10, 0), // location of eye (cubes) new Vector3f( 0, 10, 0), // center of view (cubes) new Vector3f( 0, 1, 0)); // vector pointing up RenderPeer rp = new RenderPeerImpl(); CanvasPeer cp = rp.makeCanvas(null, 800, 600, 32, false); Canvas3D canvas = new Canvas3D(); canvas.set3DPeer(cp); view.addCanvas3D(canvas); RenderOptions options = new RenderOptions(); options.setOption(Option.USE_SHADOWS,true); options.setOption(Option.USE_LIGHTING,true); cp.setRenderOptions(options); BranchGroup root = new BranchGroup(); locale.addBranchGraph(root); Color3f ambientColor = new Color3f(0.5f, 0.5f, 0.5f); AmbientLight ambientLightNode = new AmbientLight(ambientColor); root.addChild(ambientLightNode); light = new DirectionalLight(true,new Color3f(1f,1f,1f),new Vector3f(0,0,1)); root.addChild(light); TDSLoader.setDebug(true);
try { long start = System.currentTimeMillis(); InputStream bis = new FileInputStream(pathname + modelfile); TDSLoader dslader = new TDSLoader(); dslader.setGenerateMipMaps(true); model = dslader.load(pathname, bis, true); //model = new TDSLoader().load("character.3ds",true); //model = new TDSLoader().load("model/cube_set/cube_rotation.3ds"); //model = new TDSLoader().load("model/jeep/jeep1.3ds",true); //model = new TDSLoader().load("angel/angel.3ds",true); //model = new TDSLoader().load("angel/chalice.3ds",true); //model.setShowBounds(true,true); //tg.addChild(model); //model = new TDSLoader().load("model_set/redbox_max.3DS",true); //model = new TDSLoader().load("jeep2/jeep.3ds",true); //model = new TDSLoader().load("jeep2/scale.3ds",true); //model = new TDSLoader().load("others/Tube.3ds",true); //model = new TDSLoader().load("samples/Kugel.3ds",true); //model = new TDSLoader().load("samples/building09.3ds",true); //model = new TDSLoader().load("scaleanim/output.3ds",true); System.out.println("Load took: "+((System.currentTimeMillis() - start) / 1000.0)+" seconds"); tg.addChild(model); model.setShowBounds(true,true); root.addChild(tg); } catch (Exception e) { e.printStackTrace(); } new Thread(this).start(); } public void run() { int count = 0; while (true) { try { Thread.sleep(10); } catch (Exception e) {}; view.renderOnce(); lightAngle -= 0.01; Vector3f dir = new Vector3f((float) -Math.cos(lightAngle),0,(float) Math.sin(lightAngle)); //light.setDirection(dir); modelAngle += 0.01; Transform3D yrot = new Transform3D(); yrot.rotY((float) modelAngle); Transform3D xrot = new Transform3D(); //xrot.rotX((float) modelAngle); //xrot.rotX((float) -Math.PI/2); yrot.mul(xrot); tg.setTransform(yrot); anim += 0.005f; if (anim > 1) { anim = 0; } model.setTime(anim); count++; } } public static void main(String argv[]) { new TDSTest(); } }
this is the code i use to load the .3ds...it produce the same error to me
****************************************************** TDSLoader Debug Output file: model/character.3ds ****************************************************** Init GL is net.java.games.jogl.impl.windows.WindowsGLImpl OpenGL Renderer = GeForce2 MX/AGP/SSE/3DNOW! OpenGL Version = 1.4.0 OpenGL Vendor = NVIDIA Corporation OpenGL Extensions = GL_ARB_imaging GL_ARB_multitexture GL_ARB_point_parameters GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_transpose_matrix GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_window_pos GL_S3_s3tc GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_clip_volume_hint GL_EXT_compiled_vertex_array GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_packed_pixels GL_EXT_paletted_texture GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shared_texture_palette GL_EXT_stencil_wrap GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_add GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod GL_EXT_texture_lod_bias GL_EXT_texture_object GL_EXT_vertex_array GL_IBM_rasterpos_clip GL_IBM_texture_mirrored_repeat GL_KTX_buffer_region GL_NV_blend_square GL_NV_fence GL_NV_fog_distance GL_NV_light_max_exponent GL_NV_packed_depth_stencil GL_NV_pixel_data_range GL_NV_point_sprite GL_NV_register_combiners GL_NV_texgen_reflection GL_NV_texture_env_combine4 GL_NV_texture_rectangle GL_NV_vertex_array_range GL_NV_vertex_array_range2 GL_NV_vertex_program GL_NV_vertex_program1_1 GL_NVX_ycrcb GL_SGIS_generate_mipmap GL_SGIS_multitexture GL_SGIS_texture_lod GL_WIN_swap_hint WGL_EXT_swap_control java.io.IOException: Not found: model/character.3ds at org.newdawn.xith3d.threeds.TDSLoader.load(TDSLoader.java:87) at TDSTest.<init>(TDSTest.java:80) at TDSTest.main(TDSTest.java:137) java.lang.NullPointerException at TDSTest.run(TDSTest.java:130) at java.lang.Thread.run(Thread.java:534)
any problem in my program??
|
|
|
|
SpuTTer
|
 |
«
Reply #28 - Posted
2004-03-10 04:54:32 » |
|
Posting the whole program is excessive, especially not in a code block...
Based on previous posts, I'll start with the obvious, do you have a file at the path "model/character.3ds" ?
|
|
|
|
jOshfLY
Senior Newbie 
Java games rock!
|
 |
«
Reply #29 - Posted
2004-03-10 05:05:20 » |
|
yes i do have...is like this
c:\xith-3ds\model\character.3ds
i even put the character.3ds here
c:\xith-3ds\character.3ds
but still can not locate the file...and one more, even if i change the file name like this
final String pathname = "model/"; final String modelfile = "cube.3ds";
it still display the error message
*java.io.IOException: Not found: model/character.3ds
instead of
*java.io.IOException: Not found: model/cube.3ds
please tell me why it still look for character.3ds only but not for cube.3ds...i tried other files but still look for chracter.3ds
thanks josh
|
|
|
|
|