Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (499)
Games in Android Showcase (118)
games submitted by our members
Games in WIP (567)
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  
  Objectloader  (Read 23555 times)
0 Members and 1 Guest are viewing this topic.
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #30 - Posted 2006-11-19 18:25:28 »

Please recheckout SVN. I've updated the JavaDoc and made the loaders use the resource's path as the basePath / baseURL. So you don't need to set the baseURL or basePath anymore, if you're loading from a URL of filename, just as it was before Smiley.

Marvin
Offline hawkwind

Junior Member




Java games rock!


« Reply #31 - Posted 2006-11-20 01:14:00 »

working...coooooll...thanx!!!
Offline apohlmann

Senior Newbie





« Reply #32 - Posted 2006-11-29 15:01:00 »

Hi,

I had a lot of work but Iam finaly back ^^

At first I tried to compare the Objectloader from Java3D with the one from Xith.
In J3D it is simple said load(xy) ... returns scene -> attach it to the TranformGroup and it works
Xith now offers loadScene and loadModel. To compare it I use loadScene... and than I got an Exception:
java.lang.ArrayIndexOutOfBoundsException: 2
   at org.xith3d.loaders.models.impl.obj.FaceList$Face.configure(FaceList.java:267)
   at org.xith3d.loaders.models.impl.obj.FaceList.build(FaceList.java:206)
   at org.xith3d.loaders.models.impl.obj.OBJGroup.build(OBJGroup.java:62)
   at org.xith3d.loaders.models.impl.obj.OBJLoader.load(OBJLoader.java:165)
   at org.xith3d.loaders.models.impl.obj.OBJLoader.loadScene(OBJLoader.java:270)
   at org.xith3d.loaders.models.impl.obj.OBJLoader.loadScene(OBJLoader.java:307)

I don't know how to handle this because I used only ''scene = (Scene) ofl.loadScene("test.obj");'' ...there is nothing else...
I know that it works a few weeks ago...  Undecided 
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #33 - Posted 2006-11-29 15:33:11 »

I don't know how to handle this because I used only ''scene = (Scene) ofl.loadScene("test.obj");'' ...there is nothing else...
I know that it works a few weeks ago...  Undecided 
I'm tempted to say that it's impossible : nothing has changed in the OBJ loader since then..

But just give me your model I'll see what I can do.

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline apohlmann

Senior Newbie





« Reply #34 - Posted 2006-11-29 16:35:47 »

Thanks.... u helped me a lot Wink

I cheked the exported files and it seems that I hit somthing weired ... I compared the export with an older file  Smiley
So the second export of the cube runs fine so far...


sorry begging for help unneeded  Cool

Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #35 - Posted 2006-11-29 16:47:08 »

Thanks.... u helped me a lot Wink

I cheked the exported files and it seems that I hit somthing weired ... I compared the export with an older file  Smiley
So the second export of the cube runs fine so far...


sorry begging for help unneeded  Cool
Phew glad it finally worked. This type of debugging is particularly nasty.

There's no problem asking for help, I prefer people who ask (unnecessary) questions than those who don't say anything and go out saying Xith3D is crap because they don't found anything Smiley There's plenty for you, just ask Smiley

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #36 - Posted 2006-11-29 19:15:49 »

I had a lot of work but Iam finaly back ^^

Welcome back Smiley.

At first I tried to compare the Objectloader from Java3D with the one from Xith.
In J3D it is simple said load(xy) ... returns scene -> attach it to the TranformGroup and it works
Xith now offers loadScene and loadModel. To compare it I use loadScene...

The loadScene() methods of the OBJLoader return an OBJScene, which extends BranchGroup. If you're planning to load a model, which is to be inserted somewhere into the scenegraph, but not as root, then use loadModel(). The most important difference is, that it returns an OBJModel, which extends TransformGroup and is meant to be inserted as a non-root element into the scenegraph.

...and than I got an Exception:
java.lang.ArrayIndexOutOfBoundsException: 2
   at org.xith3d.loaders.models.impl.obj.FaceList$Face.configure(FaceList.java:267)
   at org.xith3d.loaders.models.impl.obj.FaceList.build(FaceList.java:206)
   at org.xith3d.loaders.models.impl.obj.OBJGroup.build(OBJGroup.java:62)
   at org.xith3d.loaders.models.impl.obj.OBJLoader.load(OBJLoader.java:165)
   at org.xith3d.loaders.models.impl.obj.OBJLoader.loadScene(OBJLoader.java:270)
   at org.xith3d.loaders.models.impl.obj.OBJLoader.loadScene(OBJLoader.java:307)

Could you maybe give me the version of the export, that produced this exception? Maybe I can modify the loader to throw a more readable exception.

Marvin
Offline apohlmann

Senior Newbie





« Reply #37 - Posted 2006-11-29 22:25:11 »

Hi Marvin,

works fine so far. Changing appearance like color or texture is the next test  Grin ... hope it will work ...

I exported ist from Blender, but I don't know what button I hit to cause this trouble... maybe this one with the edges ?!
Offline apohlmann

Senior Newbie





« Reply #38 - Posted 2006-11-30 13:22:54 »

So, loadModel and loadScene works so far...  but stil got a problem with texturing.
I used getShapeNodes() but it returns nothing...
The loaded File is an Object-File exported from wings3D. I exported the selected cube.
getNumChildren returns 1. So there is nothing more than the cube. What's the step catching the shape and change the texture oder material ?
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #39 - Posted 2006-11-30 18:27:29 »

So, loadModel and loadScene works so far...  but stil got a problem with texturing.
I used getShapeNodes() but it returns nothing...
The loaded File is an Object-File exported from wings3D. I exported the selected cube.
getNumChildren returns 1. So there is nothing more than the cube. What's the step catching the shape and change the texture oder material ?
Look at the org.xith3d.w3g.ModifyModels example, created especially for you (some convenience features added for that, ok texturing is not perfect, I know Smiley )

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #40 - Posted 2006-11-30 19:05:19 »

So, loadModel and loadScene works so far...  but stil got a problem with texturing.
I used getShapeNodes() but it returns nothing...
The loaded File is an Object-File exported from wings3D. I exported the selected cube.
getNumChildren returns 1. So there is nothing more than the cube. What's the step catching the shape and change the texture oder material ?

The getShapeNodes() List is not filled by each loader (maybe it should be). But the model should be correctly textured by the loader itself. I was trying to debug it yesterday, but I couldn't find any OBJ model with correct matlib on the internet. When I have one, I'll try to fix the texture bug, if there is any.

Marvin
Offline hawkwind

Junior Member




Java games rock!


« Reply #41 - Posted 2006-12-05 03:00:30 »

Hawk is very interested...I updated from SVN to get the Texture/HUD fixes and all of my OBJ Apperances are now null...YOICKS!!! 

What to do what to do???.   

I am using the current loader getting an OBJModel...textures are gone now. 

Marvin, get "Art of Illusion" a free java based 3D modeller and export something as OBJ...this is a quick way.  Simple to use modller with many tutourials.
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #42 - Posted 2006-12-05 03:45:13 »

Hawk is very interested...I updated from SVN to get the Texture/HUD fixes and all of my OBJ Apperances are now null...YOICKS!!! 

What to do what to do???.   

I am using the current loader getting an OBJModel...textures are gone now. 

Marvin, get "Art of Illusion" a free java based 3D modeller and export something as OBJ...this is a quick way.  Simple to use modller with many tutourials.

OK, I will. Sorry for the flaw.
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #43 - Posted 2006-12-06 02:22:10 »

I fought a little with blender and aoi and it's really complicated the create a simple textured sphere Angry. Well, I wan't even able to get it with aoi. I seem to need to import a texture before I can apply it to an object. But it doesn't accept a simple jpg.

Please, hawkwind, you would help me a lot to find this bug, if you sent me an obj file with mtl and texture, that was once working with the obj loader. I have really much to do and don't have time (and am not in a mood) to work through several tutorials to learn blender or aoi now.

Marvin
Offline apohlmann

Senior Newbie





« Reply #44 - Posted 2006-12-12 14:11:49 »

Look at the org.xith3d.w3g.ModifyModels example, created especially for you (some convenience features added for that, ok texturing is not perfect, I know Smiley )

Thanks, works! OK, I didn't test the texturing but changing the appearance   Smiley
Hmmm.... is something like that possible in J3D?? I can't find any examples...
It's all right if not ...  Grin Cool
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #45 - Posted 2006-12-12 16:24:13 »

Thanks, works! OK, I didn't test the texturing but changing the appearance   Smiley
Hmmm.... is something like that possible in J3D?? I can't find any examples...
It's all right if not ...  Grin Cool
I don't know what you can do with J3D. What I know is that you can implement whatever you want with Xith3D !

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
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.

Pippogeek (39 views)
2014-09-24 16:13:29

Pippogeek (30 views)
2014-09-24 16:12:22

Pippogeek (19 views)
2014-09-24 16:12:06

Grunnt (45 views)
2014-09-23 14:38:19

radar3301 (27 views)
2014-09-21 23:33:17

BurntPizza (63 views)
2014-09-21 02:42:18

BurntPizza (33 views)
2014-09-21 01:30:30

moogie (41 views)
2014-09-21 00:26:15

UprightPath (50 views)
2014-09-20 20:14:06

BurntPizza (54 views)
2014-09-19 03:14:18
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!