Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (577)
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  
  3D Model  (Read 2808 times)
0 Members and 1 Guest are viewing this topic.
Offline arkdm

Junior Duke




Go Pooh on yourself


« Posted 2005-06-06 18:59:57 »

Hi -

I'm a newbie when it comes to JOGL, and I was wondering if anyone knows any easy ways to import a 3D model into a JOGL app? Any ideas?

Thanks!
Casey
Offline pepijnve

Junior Duke




Java games rock!


« Reply #1 - Posted 2005-06-07 12:31:19 »

OpenGL (and thus jogl too) is only a rendering API. How you load data and render it is application specific. There are however some model loaders available in the jogl-demos which you might be able to use. I haven't used these yet so I can't comment on how complete they are and what kind of functionality they provide.
Offline kevglass

JGO Kernel


Medals: 186
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #2 - Posted 2005-06-07 12:46:36 »

If MD2 (Quake 2 models) would do, this thread might help:

http://192.18.37.44/forums/index.php?topic=7918.0

Even if not, the code contained might give you some points.

Kev

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

Junior Duke




Go Pooh on yourself


« Reply #3 - Posted 2005-06-07 15:30:49 »

Ok - I'm using blender right now for modeling, it looks like all of the blender md2 exporters have dissapeared off of the internet, but I can export to .obj. I tried using the ObjReader.java file from the jogl-demos section, which required the FloatList.java file, which errored on compile. Can someone show/tell me how to load a .obj file?

Thanks for all of your help!
Offline arkdm

Junior Duke




Go Pooh on yourself


« Reply #4 - Posted 2005-06-07 17:29:39 »

...or would you suggest switching to Xith3d?
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #5 - Posted 2005-06-07 17:46:42 »

If you want to load 3D models of any complexity (for example, articulated or skinned models) I would recommend you use a higher-level API like Xith3D. The model readers in the jogl-demos workspace are not designed to be general-purpose loaders. What was the compilation error you got with demos.util.FloatList? It should work fine; it's distributed in all of the release builds of JOGL.
Offline arkdm

Junior Duke




Go Pooh on yourself


« Reply #6 - Posted 2005-06-07 18:24:43 »

It doesn't like the "assert" commands. And, is Xith3D faster or slower than JOGL?

Thanks again!
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #7 - Posted 2005-06-07 21:05:34 »

You're probably trying to compile with a JDK earlier than 1.4. JOGL only works with JDK 1.4 and later.

Xith3D is built on top of either JOGL or LWJGL and it isn't reasonable to make performance comparisons between the two APIs. Xith3D does seem to be a pretty good / fast implementation of Java3D-like APIs and given the kinds of operations you're trying to do I'd recommend you look at it.
Offline arkdm

Junior Duke




Go Pooh on yourself


« Reply #8 - Posted 2005-06-07 21:16:14 »

I'm working off of jdk 1.4.2..., and JRE 1.4.2.08. I've ran some JOGL things before.

Alright, I took your advice and installed Xith3D, but I'm having some trouble running the test program, here's my error:


C:\xith\xith3d\libs>java -cp xith3d.jar;C:\j2sdk1.4.2_07\jre\lib\ext\vecmath.jar
;.;C:\j2sdk1.4.2_07\jre\lib\ext\jogl.jar;C:\j2sdk1.4.2_07\jre\lib\ext\log4j.jar;
C:\j2sdk1.4.2_07\jre\lib\ext\junit.jar;C:\j2sdk1.4.2_07\jre\lib\ext\vorbis.jar c
om.xith3d.test.CubeTest
starting frame speed test
Exception in thread "main" java.lang.AbstractMethodError: com.xith3d.render.jogl
.OldStyleGLCapabilitiesChooser.chooseCapabilities(Lnet/java/games/jogl/GLCapabil
ities;[Lnet/java/games/jogl/GLCapabilities;)I
        at net.java.games.jogl.impl.windows.WindowsGLContext.choosePixelFormatAn
dCreateContext(WindowsGLContext.java:271)
        at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.create(Wind
owsOnscreenGLContext.java:204)
        at net.java.games.jogl.impl.windows.WindowsGLContext.makeCurrent(Windows
GLContext.java:117)
        at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.makeCurrent
(WindowsOnscreenGLContext.java:110)
        at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:162)
        at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:182)
        at net.java.games.jogl.GLCanvas.display(GLCanvas.java:82)
        at com.xith3d.render.jogl.CanvasPeerImpl.render(CanvasPeerImpl.java:1136
)
        at com.xith3d.scenegraph.View.renderOnce(View.java:604)
        at com.xith3d.scenegraph.View.renderOnce(View.java:537)
        at com.xith3d.test.CubeTest.<init>(CubeTest.java:181)
        at com.xith3d.test.CubeTest.main(CubeTest.java:201)

I get an empty white screen when I try to run it, and when I go back to the command prompt I get this. Any ideas?

Thank you so much guys! All of you at this forum are helpful!
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #9 - Posted 2005-06-07 23:40:00 »

I would post this question on the Xith3D forum. It looks like your version of Xith3D is really old and you're running with a newer version of JOGL, but I know  that Xith3D has been recently updated to work with the latest JOGL.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline BK

Junior Newbie





« Reply #10 - Posted 2005-06-14 18:41:15 »

Hi.
As i am looking for a jogl model Loader too (especially for 3ds files), i was searching this Forum. I found a couple of topics which seem to match, but  all the links refer to the old Forum. For example:

"A 3ds loader:
http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=share;action=display;num=1061796369"

Although I searched some code or external links for a 3ds loader I didn't find anything here.
How can I find the topic in the new forum or can someone give me a link to a 3ds loader written for jogl?

Would be nice. Thanks in advance.
Offline wanao

Junior Newbie





« Reply #11 - Posted 2006-01-01 03:46:59 »

Hi, Smiley
i have been searched that for a long time, and finally i find this package "mri-v3ds" Grin
but it only decode the 3ds files, so i write a small render class.
it's simple, you can look though my code to know how to render a 3ds file.

please change file name  "mri-v3ds.txt" to "mri-v3ds.jar", because it don't allow me
to upload a .jar file. and "Model3DS.txt" it's class i write.

P.S.  it can not read textures by itself
Offline thiagosc

Senior Newbie





« Reply #12 - Posted 2006-01-05 20:00:04 »

Hi,

Right now I'm struggling with the loader question. Isn't anything for just fetching data from a 3ds (or any other format) file for me render as I wish?

The reason for me to hesitant about using Xith is that I'm planning to use OSGi for having a plugin system similar to what we see on Eclipse, with support of versioning and so on, and I'd divide the game into separate independent modules (bundles is the correct word).

A monolithic solution such as Xith defeats the whole purpose of modularizing it. In the end i'd be yet another layer, a frontend to Xith, that would only add overhead and make things more complicated than they need to be.
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.

Longarmx (49 views)
2014-10-17 03:59:02

Norakomi (38 views)
2014-10-16 15:22:06

Norakomi (31 views)
2014-10-16 15:20:20

lcass (34 views)
2014-10-15 16:18:58

TehJavaDev (65 views)
2014-10-14 00:39:48

TehJavaDev (65 views)
2014-10-14 00:35:47

TehJavaDev (54 views)
2014-10-14 00:32:37

BurntPizza (72 views)
2014-10-11 23:24:42

BurntPizza (43 views)
2014-10-11 23:10:45

BurntPizza (84 views)
2014-10-11 22:30:10
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!