java-3d

How to set ViewingPlatform and update TransformGroup?

I have a scene inside of a TransformGroup that allows the mouse to zoom/rotate/pan. I need to set the camera position back far enough that I can see the entire scene, which I do with the following code: // Position the position from which the user is viewing the scene ViewingPlatform viewPlatform = universe.getViewingPlatform...

Render to BufferedImage in Java3D

Is there a simple way of rendering to a BufferedImage in Java3D? I know you can extend Canvas3D, but it seems cumbersome if I just want to render directly. ...

How to rotate an object in Java 3D?

I have a Cone I drew in Java 3D with the following code: Cone cone = new Cone(2f, 3f); Transform3D t3d = new Transform3D(); TransformGroup coneTransform = new TransformGroup(t3d); coneTransform.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE); t3d.setTranslation(new Vector3f(0f,0f,0f); coneTransform.setTransform(t3d); coneTransform...

Why does my off screen rendering Canvas3D not work?

I've been trying to make off screen rendering to work, using Java3D 1.5.2. In my source code I've been trying to attach an extended Canvas3D that will do off-screen rendering to SimpleUniverse, but doing so will break the render: 62. // FOR SOME REASON THIS BREAKS RENDERING 63. universe.getViewer().getView().addCanvas3D(canvas); The...

Attach an object to the view platform in Java3D

Hello, In my Java3D application, I have a movable viewing platform (thanks to "OrbitBehavior" and "KeyNavigatorBehavior" behaviors for example) so I can change my point of view to the scene. Now, I would like to add an object which is "static" over my view, i.e. always viewed the same way when I move my view (for example, like the gun o...

Java3d resetting to a new scene

Hi all, I'm working on a game in Java3D. I read all my level info from a file and it works fine. But now I want to re-initialize the scene from reading data from a different file. How do I reset the scene? Should I just destroy the whole canvas3D and universe objects? ...

Help debugging GL_VERSION error in a Java3d application

I'm working on a 3d globe application written in java using java3d for the rendering. I've got a windows installer that basically copies files from a development snapshot to the program files directory. It runs fine from the devel snapshot, but when running after an install it does this: Java 3D ERROR : OpenGL 1.2 or better is require...

Rotate around a specific point in Java3D

I'm importing 2 models in Java3D, scaling them down and then rotating one of them using a RotationInterpolator However, this rotates the object around the origin. I want to rotate the object around ITS centre, not the scene's. Put simply, I want it to spin in place. How do I rotate around a specific point? TransformGroup rotateThe...

Java3d + osx + netbeans

Hi, I have a java3d project that was developed on solaris that I am trying to move onto my macbook for a variety of reasons (1 being that our solaris machines are painfully slow). Basically what I want is to use osx + netbeans for this project but it seems to reference java3d methods that are not included in the outdated version of jav...

In java JMonkeyEngine, public GameSettings getNewSettings()? How do I fill it out?

I'm trying to change a BaseGame to a FixedFrameRateGame, and It's saying I need a public GameSettings getNewSettings() method. Now I tried filling out like this: public GameSettings getNewSettings(){ return null; } it gives me a nullpointerexception when I try to run it. ...

Java3D disable clicking within PickMouseBehavior

Hey SO When running my @Override public void updateScene(int x, int y) The code the runs takes a little to long, and a user can click on a java3D object before the code has finished running and my RotationInterpolator can't keep up I cant change the Alpha on the RotationInterpolator as this is what the button updates so im looki...

How to write text on a texture using java3D API ?

Hello, I'm wondering how I can write some text on a given texture (during execution) ? I'm using the java3d API. Thanks ! ...

Java 3d: Unable to get Shape3D to be affected by lights

I am attempting to get a custom Shape3D to be affected by a DirectedLight in java 3D, but nothing I do seems to work. The Shape has a geometry that is an IndexedQuadArray, with the NORMAL flag set and applied, ensuring the normal vectors are applied to the correct vertices - using indexed vectors I have given the Appearance a Material ...

Displaying 3D graphs using JUNG

I am new to JUNG, I can display graphs in 2D but can anyone show me how to show 3d graphs. ...

Data display with 3d graphs in Java?

Can you please recommend a library that can draw a simple (see the image) 3D graph in Java? The library should comply with the following requests: it has to be freely available for non-commercial use it should be simple to use (given a set of data, it should draw a 3D graph) when drawn, users should be able to do basic control over...

Java 3D Memory Leak

I have a large scene graph in Java 3D consisting out of a Group which contains around 3500 Switches, each containing a Shape3D and a Group, the latter contains two more Shape3Ds. The reason for this setup is that each of the 3500 Switches must be able to be either completely hidden or have either of its two children visible. The proble...

Why enabling transparency can lead to clipping problems ?

Hi, I'm working on a 3D graphical application in Java using the Java 3D API. I noticed that every time I was dealing with transparency, all I got in return were some clipping problems. Some parts of the scene weren't displayed properly. It might seem obvious that this would happen in a certain way but I'm looking for a logical explanati...

Java3D: Problem with order of objects that have a transparent PNG texture

Hello! Today I tried to program a little fish tank with Java 3D. The fish tank rotates and fishes are placed in it. The fishes in the box are Java 3D Boxes with a PNG picture that has an alpha channel. Without activated transparency the order of the objects is correct. But when I enable it, some fishes in the back come to the front what...

Creating a Glowing Sphere in Java3D

Hey, I'm looking for a way to reproduce this foggy-sphere-glowing effect using Java3D. http://bzflag.org/screenshots/bzfi0021.jpg http://bzflag.org/screenshots/bzfi0019.jpg http://bzflag.org/screenshots/bzfi0022.jpg I'm creating a transform group with a point light source and an emissive-material-sphere, but I can't reproduce the fogg...

Java3D: Painting 2D HUD over a Canvas3D

Hello, I'm using Java3D to render a three-dimensional scene. I would like to overlay a two-dimensional "heads-up-display" on top of the 3d image. How can I efficiently paint the 2d content on top of the 3d canvas? Thanks! ...