Point Clouds and Particles

Hi, and welcome to the Panda3D community! :slight_smile:

That’s kind of strange. What output do you get when you call ls() or analyze() on your loaded model? Just to make sure that the model file contains actual geometry.

If the problem would turn out to be that there are no triangles defined in the model file, only vertices (or not even those), then you could try to find a way to triangulate the point cloud into a mesh before exporting to e.g. glTF. Then you can call make_points_in_place() on the Geom(s) of the loaded model to turn the mesh(es) into a point cloud in Panda:

model_root = base.loader.load_model(model_filename)
model_root.ls()
model_root.analyze()
model_root.reparent_to(base.render)
point_cloud = model_root.find("**/+GeomNode")
point_cloud.set_render_mode_thickness(5)

for geom in point_cloud.node().modify_geoms():
    geom.make_points_in_place()

There are ways to manipulate vertex colors in Panda3D, using low-level geometry manipulation or shader techniques.
Feel free to describe in more detail exactly for what purpose you would like to change the colors (e.g. for visualizing the selection of a group of points, perhaps by dragging a rectangle around them).

As for using your loaded point cloud as particles, I will have to defer to others who have more experience with the Panda3D particle system.

1 Like