Java3D and no display - Server side usage

Hi,
I am working on a prototype for an online RPG and since I need to keep track of 3d elements on the server side as well as know terrain, obstacles, objects… etc.

I would like to use java3D structure for this, especially since you can set user data on nodes.

I have been successful in using a java3d structure in my first attempts without display, but I would like to get a basic function which is to know all the nodes within some specified bounds.

So for instance, given:

  • 1 point of origin
  • a distance

I would like to get all the nodes within these bounds.

Do you think this is possible outside of a display and what is your advice on the method to use?

Thanks,

  • Dan

I think you are going to have to at least partially write it yourself. I believe recalculation of bounds is part of the processing of live trees.

This sounds like a pretty expensive operation to be doign on the server though. Have you considered scaling issues? How many of thes ecomaprisons do yo uexpect tpo have to make per second? (# tests/sec/user * projected max number of users)

Hi -
I am not really sure yet, but the whole idea behind this is the following:

  • I need at least initially to get a list of “live” objects in the vicinity of the user and I obviously cannot request the whole list of objects in the world/area
  • later on, the client will send requests for updates at a regular interval (as some of what’s happening can be deduced by the client) to resynch with the server and to get new objects, etc… so this could be used too

I was looking for a way to do this thinking that maybe java3D keeps it’s own list of objects in the vicinity in order to speed up the sorting/rendering.

Effectively implementing this will probably be costly if I have to traverse the whole damn tree. ;D

  • Dan

Java3D has a very fast, very efficient hirearchical bounds calculation system.

The rub is that I believe these calculatiosn are only carried out on “live” trees. Live in this case beign a Java3D term meaning they are attached to a
scenegraph that is being rendered.

I’ll double check that, though.

Definitive answer:

Bounds calculation on non-live trees works in 1.4

Before then it may not.

Thanks Jeff - I am currently using the released version since I work mainlyon the Mac and the dev version is not available on that platform.

I’ll see what I can do with the 1.4 on a PC.