HUD visible to all Viewers

I’m currently using the HUD package from http://www.newdawnsoftware.com/resources/newdawnhud.zip . It works really great, except for one thing: viewers in the same scene can see each other’s HUDs! They look like 2D graphics that follow the ViewPlatform transform of each Viewer. Is there a way to hide the HUD from the sight of other Viewers in the same scene?

Hi
When you say other players, how do multiple people play, do you do a split screen thing, or are they networked?.

Cheers

Endolf

Hi,

My application doesn’t support multiple players, only one. That one player has both a first-person-view with a HUD, and a third-person-view (without a HUD). Both of these views (with their own Canvas3Ds) are visible at the same time. So I guess you’d say it’s sort of a “split-screen” setup.

The problem is that from the third-person-view camera, the HUD that’s attached to the first-person-view camera is visible. By “visible” I don’t mean that it’s showing in full screen as in the first-person-view, it sort of looks like a 2D projection attached to the first-person-view camera.

The first-person-view camera is attached to a 3D model. So when the model rotates this camera can see exactly what the model is facing. If the model is facing the third-person-view camera, the HUD isn’t visible. But as soon as I start rotating the model past about 90 degrees the HUD becomes visible (on the third-person-camera).

Hi
How do you go about creating your PhysicalHUD object?

Cheers

Endolf

This is the code I use to create the HUD:


// Creating PlatformGeometry
PlatformGeometry hudPlatformGeometry = new PlatformGeometry();
hudPlatformGeometry.setCapability(PlatformGeometry.ALLOW_CHILDREN_WRITE);
hudPlatformGeometry.setCapability(PlatformGeometry.ALLOW_CHILDREN_READ);
hudPlatformGeometry.setCapability(PlatformGeometry.ALLOW_CHILDREN_EXTEND);

// Creating GraphicsConfiguration
GraphicsConfigTemplate3D gTempl3D = new GraphicsConfigTemplate3D();
gTempl3D.setDoubleBuffer(GraphicsConfigTemplate3D.PREFERRED);
gTempl3D.setSceneAntialiasing(GraphicsConfigTemplate3D.PREFERRED);
gTempl3D.setStereo(GraphicsConfigTemplate3D.PREFERRED);
GraphicsConfiguration graphicsConfig = GraphicsEnvironment.getLocalGraphicsEnvironment().
                      getDefaultScreenDevice().getBestConfiguration(gTempl3D);

// Assign GraphicsConfiguration to the Canvas3D
Canvas3D aCanvas = new Canvas3D(graphicsConfig);

// Create the PhysicalHUD
PhysicalHUD hud = new PhysicalHUD(MAX_NUM_OF_HUD_LAYERS, aCanvas3D, hudPlatformGeometry, 4f);

// Create a Viewer using aCanvas and hudPlatformGeometry
Viewer ptiViewer = new Viewer(aCanvas);
ViewingPlatform ptiPlatform = new ViewingPlatform();
ptiViewer.setViewingPlatform(ptiPlatform);

ptiPlatform.setPlatformGeometry(hudPlatformGeometry);

After this I just add the ViewingPlatform to my scene graph. Please let me know if you require further clarification. Thank-you.