Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (777)
Games in Android Showcase (231)
games submitted by our members
Games in WIP (856)
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  
  Model Loader with Jogl1.1  (Read 4739 times)
0 Members and 1 Guest are viewing this topic.
Offline baldacim

Senior Newbie

« Posted 2011-04-16 23:09:18 »

Hello everyone, I need to do  a  job  for  computer graphics and it need a lot of load  models  from blender  or  3ds  ...
Was provided for work of a reader .obj but has numerous errors and did not read right texture.
 Could someone give me or indicate a reader .obj?? Reader of any other format also helped me a lot ...

Thanks for the help
Offline baldacim

Senior Newbie

« Reply #1 - Posted 2011-04-17 16:03:36 »

Nobody can give me a hand? Unfortunately I have to use pure Jogli 1.1 in the project ...
Any loader who accepts texture would help me ...

I heard that JOGL provides a model loader for wavefront .. but I could not use it: (
Offline C0dR

Senior Newbie

« Reply #2 - Posted 2011-04-17 17:50:57 »

have a look on this 3ds-model loader:,54298290/model.rar/

its not from me, but works good and saved me much time in building an own one Cheesy
"JD3dsModel" is the 3DS model loader class.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline baldacim

Senior Newbie

« Reply #3 - Posted 2011-04-17 20:53:52 »

Thank you for the help,  it will be very useful.
Not wanting to trouble you, could you give me an example of how to use the loader to load a model? You just create a new instance of JD3dsModel passing the name of  .3ds file and GL to draw? Is there any method call that I need to draw?

Sorry to annoy you, I'm new in 3d world = /.

Thank you for your help!

ps: I'm replacing  all  GL2  for GL,  can cause a problem?
Offline gouessej
« Reply #4 - Posted 2011-04-18 11:42:02 »

Hi baldacim

Sorry for the late reply. You said JOGL provides a 3DS loader, did you speak about JOGL-utils? If so, what was wrong with this? Which formats do you need to support? Only 3DS and OBJ? JMonkeyEngine 2.0 has some supports of JOGL 1.1.1a and supports these formats. Ardor3D supports OBJ, MD2 and Collada. 3DzzD could do this too.

I remind you that JOGL 1.1.1 is no more maintained, using it in a professional project is a very bad idea except for prototyping.

Use new JD3dsModel(GLContext.getCurrentGL(),"my_model.3ds") to load a model, call the render method in the display method of your GLEventListener to draw it. The rendering uses the immediate mode which is very slow especially on big meshes. Maybe it is enough for your needs.

Julien Gouesse | Personal blog | Website | Jogamp
Offline baldacim

Senior Newbie

« Reply #5 - Posted 2011-04-18 15:17:07 »

gouessej very thanks for reply Smiley

It's a small project for my university, for that reason can not use any engine ready (JMonkey for example). I can only use java and Jogl  1.1.

I got the joglutils 1.1 for testing, but when I try to use the loader in a .3 ds get a black screen and no display of the model: (.

When I was trying to use JD3dsModel, I put to load the model in the display method, since it must pass the argument by GL. But there was no error and also not turn up any object in my scene.

The work consists of making an interactive scene by which I can move into a house.

I've tested several loaders but I could not do any work so far Sad. I must be really weak in programming  Cry.

Thank you for the reply!
Offline cylab

JGO Kernel

Medals: 188

« Reply #6 - Posted 2011-04-18 16:07:09 »

Loading a model should be done in init(), not display() and there has to be some method responsible for drawing a model in each loader you could call in update(). Just use the codecompletion of your IDE or try to find a javadoc for the used class.

Mathias - I Know What [you] Did Last Summer!
Offline baldacim

Senior Newbie

« Reply #7 - Posted 2011-04-18 20:11:55 »

I tried as you said, but did not work, some things appeared purple, but is far from being a model ...

I'm posting the project I'm using the loader and the camera that I use. If someone can take a look would be very grateful! In the class what happens to load and render.

Excuse me for my problems, but I do not know what to do.

Thank you for your attention.
Pages: [1]
  ignore  |  Print  

hadezbladez (335 views)
2018-11-16 13:46:03

hadezbladez (177 views)
2018-11-16 13:41:33

hadezbladez (336 views)
2018-11-16 13:35:35

hadezbladez (82 views)
2018-11-16 13:32:03

EgonOlsen (2175 views)
2018-06-10 19:43:48

EgonOlsen (2203 views)
2018-06-10 19:43:44

EgonOlsen (1376 views)
2018-06-10 19:43:20

DesertCoockie (2008 views)
2018-05-13 18:23:11

nelsongames (1646 views)
2018-04-24 18:15:36

nelsongames (2297 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46 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‑
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!