Empty BranchGroup/Shapes

Sorry to spam the group, its been a busy day…

I was having a performance problem earlier whenever I loaded an OBJ model into my scene. It turns out it was caused by either an empty BranchGroup or empty Shape3D (i.e. geometry with no vertices) being added to the scene. Having fixed this problem I’m back to the performance I’m used to from Xith. (new version of the loader posted in a mo).

I just thought other people might find this problem also.

Kev

[quote]Having fixed this problem I’m back to the performance I’m used to from Xith.
[/quote]
How is this performance? I don’t know Xith (or Java3d), but OpenGL on a basic level. If I read your previous postings right, you know both APIs? If so, say you would do some medium complex 3d action with Xith3d: would it be compareable to a “pure Jogl” implementation?

[quote]I just thought other people might find this problem also.
[/quote]
Yes thanks, I’ll remember your posting. :slight_smile:

Writing a pure OpenGL engine is always going to yield better performance (assuming you’re an expert on what you’re doing). However, writing an engine for a non trivial game is difficult to get right (or good).

If you’re just playing around (hobby project) its really a decision you don’t have to worry about. Just use what seems most interesting.

From a commerical point of view, it would be far more cost effective to use an engine like Xith3D rather than go for pure opengl. You’ll just end up duplicating effort and not finding your bugs as quick (since not as many people will be using the code). Performance wise Xith (and other engines) are fine unless you’re trying to push the boundaries of technology.

You larger concern should probably be download footprint (que Cas), since most of the engines, including Xith, get quite large.

I’ve attempted a bunch of stuff with OpenGL and Java3D. Generally the performance of pure OpenGL looks really good up front but comes down quickly as the scene gets more complex. The tail off with the engines is slow but performance starts at a lower level.

Long post over,

Kev

Thanks for the nice explanation. It’s not been too long. :slight_smile:

The same afternoon I’ve asked a similar question in the existing thread named " Java3D, JOGL or Xith3D?" (
http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=xith3d;action=display;num=1067530262;start=0#8) Hopefully I’m not doubling the topic now and yes I’m somewhat offtopic now, sorry Kev.

Hello

the obj loaders give me problems on linux

If i change the line:
BufferedReader reader = new BufferedReader(new InputStreamReader(OBJLoader.class.getClassLoader().getResourceAsStream(objFile)));

to:
BufferedReader reader = new BufferedReader(new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream(objFile)));

it works as expected (when also done for materialLoader)
used as is it never finds the resource (altough clustered all around the classpath) but gives back null

i am using j2sdk1.4.2_b28 on suse9.0
and the loader from 3days ago.

has anyone tested this on linux sucessfully ??

regards
Martin

I was testing emtpy groups some time ago and had no performance diffs.

Can you please make a short test so I can look deeper in the problem?

Thanks for testing,
Yuri

I can try, if you’d already tested empty group then its more likely it was empty geometry in shapes. e.g. not having any vertices in the geometry inside the shape3d.

Kev

Sorry, I missed this earlier…

I can’t imagine why ClassName.class doesn’t work on linux, but I’ll update it since your way should work on all platforms.

Cheers for the info,

Kev