B4J Question display 10+ million points xyz location

alienhunter

Active Member
Licensed User
Longtime User
Hi ,
it is possible to display so many points in B4J ?
I tried with canvas displaying them only as small circles in (xy location) but the app was not responsive .
the format of each xyz line is something like this x100 y100 z100.
is there another way ?
thanks AH
 

jmon

Well-Known Member
Licensed User
Longtime User
This project seems interesting I will try something on my side.

It will be difficult to display 10M points in 3d space, especially as spheres. Because if your sphere has 8 faces that would be 80M faces to display. You can try as cubes instead. It may be possible to display as a single triangle face, but you will have to orient it towards the camera. Even the best 3d programs sometimes struggle at loading more than 2 million faces (3dsmax, Maya..). So I think Javafx isn't made for that.

This page has a project similar to yours and aparently has difficulties displaying more than 40000 points
http://stackoverflow.com/questions/23749614/how-to-improve-javafx-3d-performance

I think you should load only the point you see. For example at zoom 1, you should display 1 out of 1000 points. You could do that with a step 1000 in your for loop that loads the points. Then you monitor the zoom level, and load more points when getting closer. It must be possible to retrieve the field of view of the camera, and also load only points that are in the FOV.
 
Upvote 0

alienhunter

Active Member
Licensed User
Longtime User
This project seems interesting I will try something on my side.

It will be difficult to display 10M points in 3d space, especially as spheres. Because if your sphere has 8 faces that would be 80M faces to display. You can try as cubes instead. It may be possible to display as a single triangle face, but you will have to orient it towards the camera. Even the best 3d programs sometimes struggle at loading more than 2 million faces (3dsmax, Maya..). So I think Javafx isn't made for that.

This page has a project similar to yours and aparently has difficulties displaying more than 40000 points
http://stackoverflow.com/questions/23749614/how-to-improve-javafx-3d-performance

I think you should load only the point you see. For example at zoom 1, you should display 1 out of 1000 points. You could do that with a step 1000 in your for loop that loads the points. Then you monitor the zoom level, and load more points when getting closer. It must be possible to retrieve the field of view of the camera, and also load only points that are in the FOV.


thanks

I was reading a bit about 3d api
https://docs.oracle.com/cd/E17802_0...J3D_1_3_API/j3dapi/javax/vecmath/Point3d.html
or as a point cloud as an the link , but i guess i hit a limit with javafx too, since reading only xy the memory hits 1+gb
the guy in the link is rendering the points as spheres to be able to pick them but the last hope is just
to display them as point

my idea was/is to read all points in and color them red if they are out of position and green if they are ok so i can see it like a color map
we got a machine that is accurate in 0.0002 inch and the produced cnc code and part has to be accurate in 0.0003 inch so any deviation the result is a big waste of time ...
since the cad/cam software cannot do that to compare , it is able to read all points in but there is no compare function.
so you have to imagine on a square inch there are 3+ million points on a 3d shape
 
Last edited:
Upvote 0
Top