nech_neb
Junior Devvie  
Java for LIFE !!!
|
 |
«
Posted
2004-07-23 23:31:57 » |
|
Hi, I'm trying to use the 3DS loader package provided by: http://games.swizel-studios.com/Anyone have experience using this package? It seems that when I load a 3DS file using scene = new Scene3ds(new FileInputStream("data\\skeleton.3ds")); The system.out keeps getting sent numbers which I guesstimate to be framerates. Is there a way to turn that off? Right now I added a call: System.setOut(new PrintStream(new ByteArrayOutputStream())); Really stupid hack...
|
|
|
|
oNyx
|
 |
«
Reply #1 - Posted
2004-07-24 00:03:52 » |
|
OT but...
>"data\\skeleton.3ds"
NEVER use backslashes in a path. It works on windows but everyelse it doesn't.
|
|
|
|
nech_neb
Junior Devvie  
Java for LIFE !!!
|
 |
«
Reply #2 - Posted
2004-07-24 03:04:24 » |
|
Does anyone know if another way to load 3DS files with LWJGL  It seems this one only loads from 3D studio V3... As well as I can't figure out how to get textures to work. I looked at JME for a little bit. can't seem to find enough documentation on it to start. Just wondering what people use for loading models for LWJGL ?? EDIT: While searching for something which loads models into openGL, I came across this : http://www.jpct.net/I guess this is what I'm looking for ... I can't seem to find a tutorial or example code though... If some one can kick me towards the right direction, that's be great. Along with jME and Xith, which one is better ?? It seems Xith has more support for JOGL right now... Maybe I should ditch LWJGL and go with JOGL *Hides before the stones come flying at him*
|
|
|
|
Games published by our own members! Check 'em out!
|
|
Middy
Junior Devvie  
Java games rock!
|
 |
«
Reply #3 - Posted
2004-07-24 08:06:49 » |
|
Well try the JDC utils http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=LWJGL;action=display;num=1078868758He has a 3ds loader thats is a gametutorials.com tutorial. He has hacked it into HIS framework. I am sure it would be easy to hack it into yours. You just have to change a single function. Also be aware that it only support one material pr object, and no vertex colors. It will also try to load in a texture if it are specified in the material settings (Thats a part of the 3ds format) good luck
|
When do I get my makeMyGameAsILike() extension?
|
|
|
darkprophet
Senior Devvie   
Go Go Gadget Arms
|
 |
«
Reply #4 - Posted
2004-07-24 08:43:08 » |
|
you know im biased with the jME side. But I just wanted to make something clear about the 3ds loading thing. We *dont* load 3ds files into the scene graph. We load .jme ( which is faster at loading in the scenegraph btw ) into the scenegraph. You can convert 3ds to .jme using the converter available with the jme distribution. As for the documentation thing, still with the 3ds theme here, look at jmetest.renderer.loaders.MaxtoJmeTest. It converts a 3ds file to a jme file and loads it into the scenegraph. You can alter that test to create a FileOutputStream and save the .jme file for later use (thats what I am doing in my game). Hope that helps. PS. at gametutorials.com you have to buy their CD to find out how to load an animated 3ds file into the scenegraph, so if your not willing to part with you hard earned money, go with jME  DP
|
|
|
|
Middy
Junior Devvie  
Java games rock!
|
 |
«
Reply #5 - Posted
2004-07-24 10:30:29 » |
|
If he uses JDC utils he gets a loader he can use whereever he wants. The point is that JCD used a tutorial from gametutorials.com and hacked it into his framework without any effort. So the question is do nech_neb just want one file that can load or an entire framework 
|
When do I get my makeMyGameAsILike() extension?
|
|
|
nech_neb
Junior Devvie  
Java for LIFE !!!
|
 |
«
Reply #6 - Posted
2004-07-24 18:03:31 » |
|
Due to DP's strong support for jME , here and in other posts... I've decided to research deeper into jME. Problem is: I'm an idiot, and can't get the CVS working HOST : cvs.dev.java.net Repository Path :  User: guest Password : *blank?* Help? 
|
|
|
|
Middy
Junior Devvie  
Java games rock!
|
 |
«
Reply #7 - Posted
2004-07-24 19:29:23 » |
|
Thats a hard question...Realy cant help you... but Anonymous access to a CVS server usualy have username anonymous.
But it could also be your protocol. is that set to pserver?
|
When do I get my makeMyGameAsILike() extension?
|
|
|
|
nech_neb
Junior Devvie  
Java for LIFE !!!
|
 |
«
Reply #9 - Posted
2004-07-24 23:03:43 » |
|
Hey Andy?
Does it only support 3DS files using version 3? Cause I can load the skeleton provided by the tutorial just fine.
But I can't seem to load my own 3DS files created by 3DS MAX 6.
|
|
|
|
Games published by our own members! Check 'em out!
|
|
darkprophet
Senior Devvie   
Go Go Gadget Arms
|
 |
«
Reply #10 - Posted
2004-07-25 07:07:54 » |
|
in jME you can  (ive done it loads of times) anyway, back to your guest thing. I dont recall the username or password (but I think its blank), you could try anonymous. but the repository path is: /cvs scroll down until you find jme (not jME) and checkout a copy. Or an even better way is to register with java.net and request an "Observer" status, that way, you can post bugs if you see any. DP
|
|
|
|
ap_kelly
Junior Devvie  
Java rocks!
|
 |
«
Reply #11 - Posted
2004-07-25 11:44:13 » |
|
I know it handles most (if not all the) v3 .3ds nodes, I know it handles some from v4 as well. I'm not sure if it's a complete list.
If you have some files that don't work post them on the internet and I'll have a go and see if I can add in the required changes.
Regards,
Andy.
|
|
|
|
tom
|
 |
«
Reply #12 - Posted
2004-07-25 20:29:24 » |
|
It's been a while since I looked at this code, but as far as I know it should handle textures OK. Yes it does. But the texture reported by mri-v3ds is the name of the material in MAX. So you need to rename the material to the texture path. Don't think it spammed System.out. There is a Scene3ds constructor that takes a TextDecode3ds wich can be used to get a debug output. Also note that mri-v3ds only parses the 3ds file and stores the data in memory. It is not a 3ds viewer!
|
|
|
|
ap_kelly
Junior Devvie  
Java rocks!
|
 |
«
Reply #13 - Posted
2004-07-25 21:12:45 » |
|
Correct, the library only parses the files into an internal data structure it's up to you to write the rendering part.
I've already written a simple one, see the link further up the page in my previous comments.
It's kind of hard for me to debug some of these problems, since I don't have 3D Studio Max, it helpful comments like these that allow me make improvements to the code for all to see.
Regards,
andy.
|
|
|
|
Mac_Systems
Junior Devvie  
I love my Java
|
 |
«
Reply #14 - Posted
2004-07-28 00:02:44 » |
|
Hi,
i also tested the .3ds Loader from Mri. It seems to load Mesh and Texture cords quite well. When i try to load a Scene with Light made in 3D Max 5 a "Negative Chunk Size" Exception is thrown. Anyone loaded Scenes containing Light using the Loader ?
Stay Tuned, Jens
|
|
|
|
ap_kelly
Junior Devvie  
Java rocks!
|
 |
«
Reply #15 - Posted
2004-07-28 02:20:57 » |
|
The example code, listed in one of my previous posts in this thread reads in a uses lights.
Andy.
|
|
|
|
Mac_Systems
Junior Devvie  
I love my Java
|
 |
«
Reply #16 - Posted
2004-08-03 08:41:55 » |
|
hmm, can you give me a link ? I only need the .3ds file so i can load in into Max and see for myself  - jens
|
|
|
|
|
Mac_Systems
Junior Devvie  
I love my Java
|
 |
«
Reply #18 - Posted
2004-08-03 22:03:40 » |
|
Thx, and the first Test worked, now i have to implement it  Stay Tuned, Jens
|
|
|
|
cohnen
Junior Newbie
Java games rock!
|
 |
«
Reply #19 - Posted
2004-10-05 09:59:06 » |
|
Another way to tackle the problem is to write a 3DS MAX import/export script into your own format. This way you could export only the information you really need in your 3D engine. If you plan to optimize for size (e.g. webstart or a demo) I would consider this.
Pros for using the script is easy to maintain/make changes very flexible Cons you have to be familiar with MAX Script language you need 3DS Max software
if u are interested in this I would have a look at the MD5 (Doom3) import export scripts from "der ton" ...
/Christian
|
|
|
|
ug02070
Senior Newbie 
Java games rock!
|
 |
«
Reply #20 - Posted
2004-10-14 13:40:12 » |
|
hi i'm having trouble getting the following code to compile:- http://games.swizel-studios.com/tutorials/beta/src/beta_0.3.zip i'm trying to get to grips with the 3ds loader so that i can have a play at loading in the models and getting them to move around. i am using the latest lwjgl by the way 0.92 i think it is cheers
|
|
|
|
ap_kelly
Junior Devvie  
Java rocks!
|
 |
«
Reply #21 - Posted
2004-10-14 20:38:29 » |
|
The code on my site was created with LWJGL v0.7, so I can imagine you'd be having a lot of trouble trying to get it to compile. with v0.9.2.
I'm now using v0.9.2 myself so I'll try and make a new build this weekend of those tutorials I wrote...not that they're very good anyway.
I'm also fighting Jdeveloper, since it doesn't support Java 1.5 yet, therefore static imports don't work too well.
Check back on Monday for some changes.
Andy.
|
|
|
|
ug02070
Senior Newbie 
Java games rock!
|
 |
«
Reply #22 - Posted
2004-10-15 07:56:45 » |
|
nice one andy! 
|
|
|
|
ap_kelly
Junior Devvie  
Java rocks!
|
 |
«
Reply #23 - Posted
2004-10-17 11:49:20 » |
|
I've updated the beta_0.3.zip to include source code that compiles and runs using lwjgl v0.9.2 and Java v1.4.2 (i.e. no static imports). You can get this file from the website using the following link. http://games.swizel-studios.com/tutorials/beta/src/beta_0.3.zipThe website as a whole will be going through some changes this week, to get all the code and jnlp files up to date. Enjoy, Andy.
|
|
|
|
ug02070
Senior Newbie 
Java games rock!
|
 |
«
Reply #24 - Posted
2004-10-18 09:24:12 » |
|
Andy, nice job with updating the code for loading in 3ds files. could you do me a favour though and tell me what code i need simply to load a 3ds file into a window so that i can get it moving left to right and so on, the bare minimum. also as i am designing a space invaders game can you tell me how i could place these into rows i.e aliens so that i could get them moving in rows, so that i can get several 3ds files moving left and right, you know the game.  any reply would be greatly appreciated cheers Danny 
|
|
|
|
ug02070
Senior Newbie 
Java games rock!
|
 |
«
Reply #25 - Posted
2004-10-20 15:42:06 » |
|
has anybody had trouble getting colour to show on the 3ds files when they have been laoded, i can get a file in but it has no texture cheers Danny
|
|
|
|
ap_kelly
Junior Devvie  
Java rocks!
|
 |
«
Reply #26 - Posted
2004-10-20 20:59:41 » |
|
Danny,
The code in tutorial beta_0.3 IS the bare minimum, all it does is load the model and display it on the screen.
If you want more than 1 model displayed, you have 2 options.
1) Just reuse the already loaded model and draw it twice, but in different places (glTranslatef() should do the trick) 2) Load in a different model, I assume there will be different looking aliens. Once again draw each model and change their position using glTranslatef()
Andy.
|
|
|
|
|