javafx 3d performance large data set

六月ゝ 毕业季﹏ 提交于 2019-12-11 02:53:29

问题


I have a data set which compromises of the order of a million cuboids. I render it as a single node, using TriangleMesh. This seems OK, rotation is fast. But I also want to do slicing of it, so I implemented code to recalculate the faces and apply these. It works, but is a bit slow - not in calculating the faces indices, but it seems in the rendering.

Each cuboid consists of 12 triangles

I then tried it with having a separate node for each cuboid, and setting the nodes visible/invisible. Performance of this was horrible.

Any ideas? To get an idea of what I am talking about, take a look at

http://www.peclouds.com/node/1


回答1:


Do you know the FXyz library? It has several new 3D complex shapes, along with complex texturing options, to enable contour plots, for instance.

Have a look also at the Sampler, to explore all of the options.

Some of the lastest (uncommitted) developments in the library are ScatterMesh and TetrahedraMesh.

We can read data from files, with every line containing {x,y,z,f} data, and create a tetrahedron for that point (x,y,z), using only 4 triangles (4 points and 4 faces). And we set the density color according to f.

We can add every tetrahedron as a node, and have a full group of nodes, which is only valid for small number of nodes, or we could create one single mesh, as you said, by adding every new tetrahedron to this mesh. That is really fast, and I've managed to read several millions of data points.

This mesh has 1 million of tetrahedra, or 4 million of triangles:

For now we don't have a slicing algorithm. You are welcome to contribute with it.



来源:https://stackoverflow.com/questions/31619781/javafx-3d-performance-large-data-set

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!