Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (582)
games submitted by our members
Games in WIP (503)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  Xith HelpS!!!!  (Read 4142 times)
0 Members and 1 Guest are viewing this topic.
Offline jOshfLY

Senior Newbie




Java games rock!


« Posted 2004-03-08 17: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...

Offline kevglass

JGO Kernel


Medals: 85
Projects: 25


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #1 - Posted 2004-03-08 17:58:56 »

Make sure the "model" directory with the "character.3ds" appears in your classpath.

Kev

Offline jOshfLY

Senior Newbie




Java games rock!


« Reply #2 - Posted 2004-03-08 18: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!
Legends of Yore - The Casual Retro Roguelike
Offline kevglass

JGO Kernel


Medals: 85
Projects: 25


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #3 - Posted 2004-03-08 18:25:13 »

How are you running the TDSTest ? i.e. what command line are you using?

Kev

Offline jOshfLY

Senior Newbie




Java games rock!


« Reply #4 - Posted 2004-03-08 18:40:01 »

oh...im using NetBeans-IDE...is it ok for it?
Offline kevglass

JGO Kernel


Medals: 85
Projects: 25


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #5 - Posted 2004-03-08 18: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

Offline AndersDahlberg

Junior Member





« Reply #6 - Posted 2004-03-08 18: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! Cheesy
Offline jOshfLY

Senior Newbie




Java games rock!


« Reply #7 - Posted 2004-03-08 18: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
Offline jOshfLY

Senior Newbie




Java games rock!


« Reply #8 - Posted 2004-03-08 19:03:43 »

Sorry...i still can not do it...please help me out...thanks a lot
Offline kevglass

JGO Kernel


Medals: 85
Projects: 25


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #9 - Posted 2004-03-08 19:05:22 »

Is character.3ds actually in the model directory?

Kev

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline jOshfLY

Senior Newbie




Java games rock!


« Reply #10 - Posted 2004-03-08 19: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);
Offline kevglass

JGO Kernel


Medals: 85
Projects: 25


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #11 - Posted 2004-03-08 19: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

Offline jOshfLY

Senior Newbie




Java games rock!


« Reply #12 - Posted 2004-03-08 19: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
Offline kevglass

JGO Kernel


Medals: 85
Projects: 25


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #13 - Posted 2004-03-08 19:28:01 »

Thats right, you should be able to run it then..

Offline jOshfLY

Senior Newbie




Java games rock!


« Reply #14 - Posted 2004-03-08 19:31:47 »

do you know this .jar?? where i can get it??

import display.DisplayOptions;
Offline kevglass

JGO Kernel


Medals: 85
Projects: 25


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #15 - Posted 2004-03-08 19: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

Offline jOshfLY

Senior Newbie




Java games rock!


« Reply #16 - Posted 2004-03-08 19:37:40 »

oh...yaa..is JavaCoolDude's demo..wahh you are smart  Smiley

i get error on that particular part....so, im looking for the .jar

you know how to get it??
Offline Java Cool Dude

Senior Member




Java forever


« Reply #17 - Posted 2004-03-08 19:37:41 »

Quote
do you know this .jar?? where i can get it??

import display.DisplayOptions;


Linky linky link link Grin
Offline jOshfLY

Senior Newbie




Java games rock!


« Reply #18 - Posted 2004-03-08 19: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 Cry
Offline Java Cool Dude

Senior Member




Java forever


« Reply #19 - Posted 2004-03-08 19: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 Grin
Offline jOshfLY

Senior Newbie




Java games rock!


« Reply #20 - Posted 2004-03-08 19:59:32 »

er...in my case...which part of my program need to modifiy???
Offline jOshfLY

Senior Newbie




Java games rock!


« Reply #21 - Posted 2004-03-08 20:09:28 »

JavaCoolDude's Demo the WaterSimulation can not execute...

java.lang.Error: Cannot load image Data/Water.png

please help
Offline aNt

Senior Member




AFK


« Reply #22 - Posted 2004-03-09 08:49:46 »

fun fun fun Grin
Offline Java Cool Dude

Senior Member




Java forever


« Reply #23 - Posted 2004-03-09 09:22:38 »

/me stabs self in the face with a soldering iron Roll Eyes
Offline jOshfLY

Senior Newbie




Java games rock!


« Reply #24 - Posted 2004-03-09 10: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???
Offline AndersDahlberg

Junior Member





« Reply #25 - Posted 2004-03-09 11:09:14 »

http://java.sun.com/tutorial - please!  Shocked

Good luck though on your future java explorations!  Cool
Offline Bombadil

Senior Member





« Reply #26 - Posted 2004-03-09 12:25:50 »

Quote
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).
Offline jOshfLY

Senior Newbie




Java games rock!


« Reply #27 - Posted 2004-03-10 05: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??

Offline SpuTTer

Senior Member


Medals: 1


Lazy Middle Class Intellectual


« Reply #28 - Posted 2004-03-10 05: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"  ?


Sacramento Volleyball
"Whitty phrase goes here."
Offline jOshfLY

Senior Newbie




Java games rock!


« Reply #29 - Posted 2004-03-10 06: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
Pages: [1] 2
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (72 views)
2014-04-15 18:08:23

BurntPizza (68 views)
2014-04-15 03:46:01

UprightPath (79 views)
2014-04-14 17:39:50

UprightPath (65 views)
2014-04-14 17:35:47

Porlus (80 views)
2014-04-14 15:48:38

tom_mai78101 (104 views)
2014-04-10 04:04:31

BurntPizza (164 views)
2014-04-08 23:06:04

tom_mai78101 (260 views)
2014-04-05 13:34:39

trollwarrior1 (210 views)
2014-04-04 12:06:45

CJLetsGame (220 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!