Is there a way to turn off 3D?

Hi,



I have used Jmonkey Engine to draw a large diagram. It is very large, so I needed hardware acceleration to do it. However, even JMonkey is too slow, so is there any way to turn off 3D and perspective functions? (So that everything is projected on the xy-plane).

how are you drawing your diagram? cause either you do something very unefficient (i bet so) or it is just to large. at least you wont get any speed from using another perspecive mode (even tho it is possible) since the hardware is doing 3d calcualtions anyway.

first of all, JME is not slow. if you tell JME is slow, then OpenGL is slow for you.



yes it is possible to project into xy plane, even with frustrum. (but still 3D acceleration exist) - see on this forum, there were a topics about xy(or rather xz) projection



i think, to turn off 3D acceleration, you need to set off all JME Application and change to Java swing/awt view.



maybe someone will know more about it.

Sounds like you are rendering many objects that could benefit from being batched.

Can you describe a little more how you are organizing and rendering your diagram, and what object count you have?

1 Like
@Sploreg said:
Sounds like you are rendering many objects that could benefit from being batched.
Can you describe a little more how you are organizing and rendering your diagram, and what object count you have?


I am drawing a large diagram, almost like UML. It has 10000+ nodes and I want to be able to draw text on the nodes, and zoom in and out.

Edit: I also want to be able to change the color of the nodes when I click them and have an action.

2D or 3D doesn’t matter in this case. You need to find a way to batch your geometry or it will always be slow… get it down to less than 2000 objects or so for sure. It’s the GPU dispatch that’s killing you.



…Note: swing is also GPU accelerated… but 2D. It would also do this very slow unless you buffered it in images.

I recommend you have a look at voxel worlds. It’s a different problem but the same solution.





Essentially graphics cards are awesome at slinging millions of vertices around - however not so good at thousands of objects. You need to combine all of your objects into a few much bigger objects.



BatchNode and GeometryBatchFactory are designed to help in this sort of case but if you are creating a custom mesh anyway then you might as well just do it in that.



It does make the click detection a little more complex but you can either track back from the geometry or you can just apply your meta knowledge you used to create the diagram and look at the x/y/z co-ordinates of the click and then track back into your original data structure for it.

Well i suggest to start using more intelligent rendering techniques.

Also a screenshot would rellay help. I guess its a bar diagram with 10k bars ? or why use nodes?