Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (526)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (593)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  3DS files and LWJGL  (Read 6200 times)
0 Members and 1 Guest are viewing this topic.
Offline 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...
Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« 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.

弾幕 ☆ @mahonnaiseblog
Offline 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 Huh

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!
Legends of Yore - The Casual Retro Roguelike
Offline 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=1078868758

He 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?
Offline 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  Wink

DP

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline 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  Smiley

When do I get my makeMyGameAsILike() extension?
Offline 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 : Huh
User: guest
Password : *blank?*

Help?

Embarrassed
Offline 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?
Offline ap_kelly

Junior Devvie




Java rocks!


« Reply #8 - Posted 2004-07-24 22:43:48 »

It's been a while since I looked at this code, but as far as I know it should handle textures OK. Check out the example source for loading and rendering a model on this page here.

http://games.swizel-studios.com/tutorials.html

The face.3ds should have a texture face.png, which gets loaded and rendered with the model.

http://games.swizel-studios.com/tutorials/beta/src/beta_0.3.zip

Hope this helps,

Andy.

Offline 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!
Legends of Yore - The Casual Retro Roguelike
Offline darkprophet

Senior Devvie




Go Go Gadget Arms


« Reply #10 - Posted 2004-07-25 07:07:54 »

in jME you can  Grin (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


Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline 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.

Offline tom
« Reply #12 - Posted 2004-07-25 20:29:24 »

Quote
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!

Offline 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.

Offline 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


The Network is the Music
http://www.mac-systems.de
Offline 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.

Offline 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   Grin

- jens

The Network is the Music
http://www.mac-systems.de
Offline ap_kelly

Junior Devvie




Java rocks!


« Reply #17 - Posted 2004-08-03 20:50:04 »

Here are the links you'll need.

http://games.swizel-studios.com/libraries.html

http://games.swizel-studios.com/tutorials/beta/src/beta_0.3.zip

The skeleton.3ds file in the zip should use lights I think. It's been a while since I checked.

Andy.

Offline 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 Smiley

Stay Tuned,
Jens

The Network is the Music
http://www.mac-systems.de
Offline 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
Offline 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
Offline 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.

Offline ug02070

Senior Newbie




Java games rock!


« Reply #22 - Posted 2004-10-15 07:56:45 »

nice one andy! Smiley
Offline 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.zip

The 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.

Offline 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. Smiley
any reply would be greatly appreciated
cheers
Danny Smiley

Offline 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
Offline 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.

Pages: [1]
  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.

toopeicgaming1999 (72 views)
2014-11-26 15:22:04

toopeicgaming1999 (62 views)
2014-11-26 15:20:36

toopeicgaming1999 (15 views)
2014-11-26 15:20:08

SHC (29 views)
2014-11-25 12:00:59

SHC (27 views)
2014-11-25 11:53:45

Norakomi (32 views)
2014-11-25 11:26:43

Gibbo3771 (27 views)
2014-11-24 19:59:16

trollwarrior1 (40 views)
2014-11-22 12:13:56

xFryIx (78 views)
2014-11-13 12:34:49

digdugdiggy (56 views)
2014-11-12 21:11:50
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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