To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 7204
7203  |  7205
Subject: 
Re: JAVA - Viewer for dat-Files
Newsgroups: 
lugnet.cad, lugnet.cad.dat.parts
Date: 
Sat, 26 Jan 2002 12:43:21 GMT
Viewed: 
4101 times
  
"Kyle McDonald" <kmcdonald@bigfoot.com> schrieb im Newsbeitrag news:3C519D02.2040901@bigfoot.com...
Hi,
for how I'm doing the internal creating:

I did a depth search with hashing the files, create two shapes for
all lines, quads, triangles, each partitioned in solid and transparent.
So I got finally one Branchgroup with six shapes and two appearances.

> > most games.  They generate detail with textures instead.  We tend to
> > save lots of memory in C/C++ viewers by only creating each part once
> > in memory and then keeping pointers to it, instead of making a copy
> > for each occurance of the same brick.  I think that's harder to do
> > in Java, but perhaps you could manage it with a collection of parts
> > or a hash table.
> I found it easy to do just what you describe. The J3D Scenegraph allows
> it's 'Shape3D' nodes to share 'Geometry'. By using a HashTable of the
> file already read in, it's relatively easy to attach the same geometry
> over and over in the scene. This saves *alot* of memory (and makes
> processing the files alot faster also.)

I tried this out, and you can do it too: I added some code, that shares the
geometries, and the appearances as far as possible.
Just change in the Show-class every 'SubFile' to 'Element'. The coloring
doesn't work fine at the moment, but this doesn't matter to the problem
above.

The fact is: Loading is a little bit faster, but memory is used much more
and the drawing/rotating speed gets low.

The memory you save with the sharing of geometries get exhausted by the
memory that the shapes, the transformgroups and the appearances need.

> > Have you looked into any of the opengl bindings for java?  GL4Java looks
> > pretty cool and claims to have Mac support, which would make James very
> > happy.
> I haven't looked at GL4Java myself, but I've read many discussion on
> the java3d-interest mailing list about it's pro's and con's. So far I've
> been very impressed with J3D and I haven't really had to look into
> anything else.

Maybe over the weekend I get a look on it.

Sascha



Message has 2 Replies:
  Re: JAVA - Viewer for dat-Files
 
"Bernd Broich" <bernd.broich@online.de> schrieb im Newsbeitrag news:GqJq1r.7G4@lugnet.com... (...) I also tried out the stripifier, that cames with j3d: A Model without stripifying needs about 34MB, with stripifying 134MB. It's very interesting. So (...) (25 years ago, 27-Jan-02, to lugnet.cad, lugnet.cad.dat.parts)
  Re: JAVA - Viewer for dat-Files
 
Bernd Broich wrote: > "Kyle McDonald" <kmcdonald@bigfoot.com> schrieb im Newsbeitrag news:3C519D02.204090...oot.com... > Hi, > for how I'm doing the internal creating: > > I did a depth search with hashing the files, create two shapes for > all (...) (25 years ago, 28-Jan-02, to lugnet.cad, lugnet.cad.dat.parts)

Message is in Reply To:
  Re: JAVA - Viewer for dat-Files
 
Hi, I'm also currently working on a very similiar program. (...) Yes because of the way .DAT files are made, the most straight forward way of representing them in J3D is 1 triangle or quad -> 1 Object. J3D however does tremendously better on both (...) (25 years ago, 25-Jan-02, to lugnet.cad, lugnet.cad.dat.parts)

20 Messages in This Thread:





Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR