Performance with a lot of particles.

Return to General Discussion

Performance with a lot of particles.

Postby heitorpb » Tue Jan 17, 2012 1:53 pm

Hello,

I need to plot to screen a cloud point, it is about 30 million points, I've heard of Panda3D but I don't know if this engine is fast enough. I need to plot this cloud and rotate it using the mouse.

I tested this http://www.panda3d.org/forums/viewtopic.php?t=12118 but with 6000 points, it becomes really slow; I noticed it was not using my Graphics Card.

Do you think Panda3D can do this job?
If so, can you tell me where to find the documentation about some functions to do it?
I quickly read the documentation, but I didn't found exactly what I need.


Gratefull for your help,
Heitorpb.
heitorpb
 
Posts: 2
Joined: Tue Jan 17, 2012 1:06 pm

Postby drwr » Tue Jan 17, 2012 4:13 pm

That code you link simply creates a new copy of a model ("smiley" in this case, which itself has about 1000 vertices) in a different node for each point position. It's certainly not a good way to render a cloud of points. (It creates one vertex data and one geom for each "point".)

If you want one-pixel points, the way to do this is to put as many as you can into as few vertex datas as you can. With 30 million points, that will be more than one vertex data, probably more than a handful, depending on your graphics card.

One easy way to optimize the referenced code better is to call:
Code: Select all
render.clearModelNodes()
render.flattenStrong()

at the end. This will flatten the models into a handful of vertex datas. You've still got 1000 times the vertices that you're actually seeing, though. It would be better to use a model that is just a single point. Better still to create the points yourself using low-level calls, or write them all to an egg file and load that file, instead of doing all of this load-and-copy for each point.

The bottom line is, if your graphics card can handle it, Panda can handle sending the graphics commands to your graphics card. But you do need to use a bit of foresight when structuring your scene.

David
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby heitorpb » Thu Jan 19, 2012 12:35 pm

Thanks for you reply, David!

But do you think Panda3D can handle 30M points?

And if I have a model with a single white pixel, can Panda change its color to a RGB value?

Heitor.
heitorpb
 
Posts: 2
Joined: Tue Jan 17, 2012 1:06 pm

Postby preusser » Thu Jan 19, 2012 12:55 pm

It takes me 20 seconds to create a Geom with 3M points and the framerate is at around 10 fps when rendering it whole. Using a relatively new GPU.

I'm not sure if any engine will give you better results, unless it has some advanced shaders built-in.
preusser
 
Posts: 520
Joined: Sun Mar 27, 2011 10:07 am


Return to General Discussion

Who is online

Users browsing this forum: Bing [Bot] and 1 guest