Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (535)
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 Loader  (Read 1186 times)
0 Members and 1 Guest are viewing this topic.
Offline Guoshima

Junior Member




Java games rock! Do they .. ?


« Posted 2003-09-26 12:03:15 »

Well if I take a look at all the loaders available at j3d.org to load 3ds files I wonder which one is best. Any suggestions? Is there one that covers everything like anumations and stuff also ?
Offline Herkules

Senior Member




Friendly fire isn't friendly!


« Reply #1 - Posted 2003-09-26 12:46:53 »

I found Starfires/John Wrights loader to be very good.
I don't think it does handle animations, but I'm not sure about that.

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Offline zingbat

Senior Member




Java games rock!


« Reply #2 - Posted 2003-09-26 13:40:43 »

You could do your own loader. If you need to use a loader then you probably know enough of java3d to do your own loader. Cinema4D v6 CE (community edition) is a free version of Cinema4D. It exports to xml so you can read all info and convert it into a scenegraph.
Besides Cinema4D will read 3ds do some cleaning up on old file formats that startfire cannot read.

Notice that Starfire is limited and you wont be able to read custom tags (parameters) or ik information. You wont be able to read shading and texturing info unless the most basic and useless data.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Herkules

Senior Member




Friendly fire isn't friendly!


« Reply #3 - Posted 2003-09-26 15:56:04 »

Sounds as you have that loader for the Cinema4D XML format?

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Offline zingbat

Senior Member




Java games rock!


« Reply #4 - Posted 2003-09-26 21:23:30 »

I dont need a loader. A loader would impose a particular scene graph structure on every app i would made. Just read the xml doc with the sax driver and when you encounter the relevant sections insert java3d code to build the scene graph directly.

Here have a peek to part of the xml file from Cinema4D for a simple cube. Most of the uv mapping info contain default information and the editor, viewport and prefs info was ommited.

Im still reading the free documentation about Cinema4D so i cant interpret everything. But the docs are there, are free, and are pro documentantion so its just a matter of reading them.

I think its unavoidable that everyone who is interesting in programming for games and 3d apps needs to learn how to use a modeler app in some detail.

<?xml version="1.0"?>
<c4d_file id='C4D6'>
 <v6_basedocument level='0'>
   <v6_baselist2d level='0'>
     <long v='2' />
     <long v='0' />
   </v6_baselist2d>
     <v6_root_object level='0'>
       <v6_rootlist2d level='0'>
         <obj_polygon level='0'>
           <v6_baselist2d level='0'>
             <long v='26' />
             <long v='0' />
           </v6_baselist2d>
           <v6_root_tag level='0'>
             <v6_rootlist2d level='0'>
               <tag_phong level='0'>
                 <v6_baselist2d level='0'>
                   <long v='0' />
                   <long v='0' />
                 </v6_baselist2d>
                 <v6_basetag level='0'>
                   <container id='-1'>
                     <data id='1000'><real v='1.3962633609771729' /></data>
                   </container>
                 </v6_basetag>
           </tag_phong>
           <tag_uvw level='0'>
                 <v6_baselist2d level='0'>
                   <long v='0' />
                   <long v='0' />
                 </v6_baselist2d>
                 <v6_basetag level='0'>
                   <container id='-1'>
                   </container>
                 </v6_basetag>
                 <tag_uvw level='1'>
                   <uwordarray size='72'>
                     <uword v='0' /><uword v='5000' /><uword v='0' /><uword v='0' />
                     <uword v='0' /><uword v='0' /><uword v='5000' /><uword v='0' />
                     <uword v='0' /><uword v='5000' /><uword v='5000' /><uword v='0' />
                     <uword v='0' /><uword v='5000' /><uword v='0' /><uword v='0' />
                     <uword v='0' /><uword v='0' /><uword v='5000' /><uword v='0' />
                     <uword v='0' /><uword v='5000' /><uword v='5000' /><uword v='0' />
                     <uword v='0' /><uword v='5000' /><uword v='0' /><uword v='0' />
                     <uword v='0' /><uword v='0' /><uword v='5000' /><uword v='0' />
                     <uword v='0' /><uword v='5000' /><uword v='5000' /><uword v='0' />
                     <uword v='0' /><uword v='5000' /><uword v='0' /><uword v='0' />
                     <uword v='0' /><uword v='0' /><uword v='5000' /><uword v='0' />
                     <uword v='0' /><uword v='5000' /><uword v='5000' /><uword v='0' />
                     <uword v='0' /><uword v='5000' /><uword v='0' /><uword v='0' />
                     <uword v='0' /><uword v='0' /><uword v='5000' /><uword v='0' />
                     <uword v='0' /><uword v='5000' /><uword v='5000' /><uword v='0' />
                     <uword v='0' /><uword v='5000' /><uword v='0' /><uword v='0' />
                     <uword v='0' /><uword v='0' /><uword v='5000' /><uword v='0' />
                     <uword v='0' /><uword v='5000' /><uword v='5000' /><uword v='0' />
                   </uwordarray>
                   <vectorarray size='24'>
                      <vector x='0' y='1' z='0' /><vector x='0' y='0' z='0' />
                      <vector x='1' y='0' z='0' /><vector x='1' y='1' z='0' />
                      <vector x='0' y='1' z='0' /><vector x='0' y='0' z='0' />
                      <vector x='1' y='0' z='0' /><vector x='1' y='1' z='0' />
                      <vector x='0' y='1' z='0' /><vector x='0' y='0' z='0' />
                      <vector x='1' y='0' z='0' /><vector x='1' y='1' z='0' />
                      <vector x='0' y='1' z='0' /><vector x='0' y='0' z='0' />
                      <vector x='1' y='0' z='0' /><vector x='1' y='1' z='0' />
                      <vector x='0' y='1' z='0' /><vector x='0' y='0' z='0' />
                      <vector x='1' y='0' z='0' /><vector x='1' y='1' z='0' />
                      <vector x='0' y='1' z='0' /><vector x='0' y='0' z='0' />
                      <vector x='1' y='0' z='0' /><vector x='1' y='1' z='0' />
                    </vectorarray>
                  </tag_uvw>
                </tag_uvw>
                <tag_polygon level='0'>
                  <v6_baselist2d level='0'>
                    <long v='0' />
                    <long v='0' />
                  </v6_baselist2d>
                  <v6_basetag level='0'>
                    <container id='-1'>
                    </container>
                  </v6_basetag>
                  <tag_polygon level='0'>
                    <polygonarray size='6'>
                      <polygon a='0' b='1' c='3' d='2' />
                      <polygon a='2' b='3' c='5' d='4' />
                      <polygon a='4' b='5' c='7' d='6' />
                      <polygon a='6' b='7' c='1' d='0' />
                      <polygon a='1' b='7' c='5' d='3' />
                      <polygon a='6' b='0' c='2' d='4' />
                    </polygonarray>
                  </tag_polygon>
                </tag_polygon>
                <tag_point level='0'>
                  <v6_baselist2d level='0'>
                    <long v='0' />
                    <long v='0' />
                  </v6_baselist2d>
                  <v6_basetag level='0'>
                    <container id='-1'>
                    </container>
                  </v6_basetag>
                  <tag_point level='0'>
                    <vectorarray size='8'>
                      <vector x='-100' y='-100' z='-100' /><vector x='-100' y='100' z='-100' />
                      <vector x='100' y='-100' z='-100' /><vector x='100' y='100' z='-100' />
                      <vector x='100' y='-100' z='100' /><vector x='100' y='100' z='100' />
                      <vector x='-100' y='-100' z='100' /><vector x='-100' y='100' z='100' />
                    </vectorarray>
                  </tag_point>
                </tag_point>
              </v6_rootlist2d>
            </v6_root_tag>
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #5 - Posted 2003-09-26 21:46:12 »

Quote
I dont need a loader. A loader would impose a particular scene graph structure on every app i would made. Just read the xml doc with the sax driver and when you encounter the relevant sections insert java3d code to build the scene graph directly.


Erm, i don't get what your saying, a loader will just return you a node when you ask it to load a model, what you do with it after that is up to you. Doing the java3d code yourself you are writing a loader, but then forcing it into the scene graph, a loader is probably more flexible than what you suggest (I've got some user providable node handlers for special circumstances in my ac3d loader).

Just my 2p worth.

Endolf

Offline zingbat

Senior Member




Java games rock!


« Reply #6 - Posted 2003-09-27 01:01:29 »

I was trying to do loader for 3dstudiomax ascii scene some months before after puting it away. Its a very flexible 3d data format in hu ascii and got some problems with the basic loader interface.

For one and if i remenber well it has a method that returns a node, a group node that contains all your scene. This was a problem because sometimes i wanted the loader to give me a different scene graph with the same data like when building an animation the loader would detect a certain association of bones, tags and ik values and associate them with custom made java3d node called humanoid for instance, but in a flexible way and not having allways the same java3d object associated with the same hierarchy.

OK so i could configure a loader with options but this got too close to creating a second language. I could also load the basic nodes into an array and then rebuild the hierarchy on the spots it varies most but that also negates the purpose of using an editor to do it.

Besides a loader main function is parsing a file format so when you have a xml api that has all the parsing code it makes a loader quite useless to me.

I dont agree with you 100% that my code is the loader.
It is a loader in one way that it translates form Cinema4D xml into java3d custom nodes but its part of an application and not a general purpose api. Besides the loader is also an interface well defined in the java3d utilities packages (more suited for vrml if you ask me) so you have to be stuck to that specific interface. Of course that you can add customizing options but if your loader is too specific for your own application is this worth the trouble ?
Offline Guoshima

Junior Member




Java games rock! Do they .. ?


« Reply #7 - Posted 2003-09-27 13:07:08 »

well seams like an interesting point to me .. XML parsing is defently very handy and will take a look at the Cinema4D program later. For the moment I am just testing a few different loaders to see which one works fine and not for later .. tried the Neverwinter Night file loader yesterday and this one seams to work pretty good for easy animation of animals and so ..

Thanx for the tips.
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.

Riven (6 views)
2014-07-29 12:53:52

Dwinin (7 views)
2014-07-29 10:59:34

E.R. Fleming (21 views)
2014-07-29 03:07:13

E.R. Fleming (8 views)
2014-07-29 03:06:25

pw (39 views)
2014-07-24 01:59:36

Riven (39 views)
2014-07-23 21:16:32

Riven (26 views)
2014-07-23 21:07:15

Riven (28 views)
2014-07-23 20:56:16

ctomni231 (59 views)
2014-07-18 06:55:21

Zero Volt (51 views)
2014-07-17 23:47:54
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!