Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendering process stops for high number of geometries #508

Open
miro-cd opened this issue Nov 30, 2021 · 1 comment
Open

Rendering process stops for high number of geometries #508

miro-cd opened this issue Nov 30, 2021 · 1 comment

Comments

@miro-cd
Copy link

miro-cd commented Nov 30, 2021

Hi all,
I am trying to render an image with around 65000 cylinders and 20000 spheres and I noticed that the .exe stops right before the renderer is called to render a single frame . However, if I reduce the total number of primitives to around 15000 the .exe runs until the end and I get the .ppm file with all the 15000 gometries.

In the documentation https://www.ospray.org/documentation.html#geometries it is stated that the maximum number of primitives is 2^32, and because of that I was not expecting the aforementioned problem. Is there another threshold parameter that has to be modified to work with a higher number of rendered geometries?

@johguenther
Copy link
Contributor

Indeed, this should work. I tried successfully with ospExamples.exe choosing the random_spheres scene with 100k spheres (by using below patch)

diff --git a/apps/common/ospray_testing/builders/RandomSpheres.cpp b/apps/common/ospray_testing/builders/RandomSpheres.cpp
index 7de355161..4414bcac4 100644
--- a/apps/common/ospray_testing/builders/RandomSpheres.cpp
+++ b/apps/common/ospray_testing/builders/RandomSpheres.cpp
@@ -33,7 +33,7 @@ void Spheres::commit()
 {
   Builder::commit();

-  numSpheres = getParam<int>("numSpheres", 100);
+  numSpheres = getParam<int>("numSpheres", 100000);
 }

 cpp::Group Spheres::buildGroup() const
@@ -46,7 +46,7 @@ cpp::Group Spheres::buildGroup() const
   std::mt19937 gen(randomSeed);

   utility::uniform_real_distribution<float> centerDistribution(-1.f, 1.f);
-  utility::uniform_real_distribution<float> radiusDistribution(0.05f, 0.15f);
+  utility::uniform_real_distribution<float> radiusDistribution(0.0005f, 0.015f);
   utility::uniform_real_distribution<float> colorDistribution(0.5f, 1.f);

   // populate the spheres

Some questions:

  • The cylinders and spheres are each a single geometry (with thousands of primitives)?
  • With "stop" you mean crashing? Or execution halts?
  • If crashing, do you have a debugger stack trace where it is happening?
  • Is is possible to get a reproducer, or see the relevant snippets of code setting of the Geoemtries / World?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants