Particle Size Increasing with Time with OSPRay On

Hey everyone, came across a new OSPRay bug I’m hoping to get some help on. Most of my simulations have a lot of smooth particle hydrodynamic (SPH) particles. Basically, lots of small particles that I either represent as points or surfaces.

Although with OSPRay Pathtracing enabled, I’ve noticed that the points will increase in size as the simulation time goes on. For example, a point with “point size” = 1, will be relatively larger later in time than at the beginning of the simulation.

These behavior does not happen with OSPRay turned off. This is extremely frustrating as it means I have to script in a way to adjust the size of the particles each timestep to keep them a constant size.

Example of this behavior:

Am I missing a checkbox or filter that will solve this? Or is this a bug within OSPRay itself? Thanks for the help.

My guess is that the data bounding box is changing over time. Can you check if that is the case?

Changing data bounds would expose the wrinkle that VTK currently uses a heuristic of scaling the implicit spheres and cylinders that the ray tracers draw for point and line primitives by the scene bounding box.

I will push an option to turn off the heuristic as well soon. In the meantime a workaround could be to place a fixed size wireframe bounding box around the scene but oriented out of view.

@Dave_DeMarle Thanks for the help with this. The bounds are in fact changing over time so I believe you are correct. Can you expand a bit on how to setup the bounding box? I’ve tried a couple things this morning and haven’t been able to get anything to work.

Marston my idea was to use wavelet to make a 1x1x1 volume, scaled to be very large, and rendered as bounding box. On further review the idea won’t work. The scaling that happens is based on the object’s bounding box, not the scene’s, so throwing in some other object won’t affect it.

FYI - @aron.helser - I am working on a real fix here.
It probably won’t cherry-pick back onto master trivially since my branch is on top of the ospray2 bump. It will also need XML additions in ParaView to expose the control as well. See how luminosity is done for an idea.

Gotcha, that is what I was running into this morning. Appreciate the help and best of luck with the fix. Looks like i’ll have to scale point size for each timestep based on relative bounding box size as a work around for now

@mconti the fix is going through review here:

The GUI will look a lot like this:
Screenshot from 2020-08-27 21-02-09
The All Exact and Each Exact modes are new. They take the sizes directly from the PointSize/LineWidth or the supplied Scale Array respectively.

If you’ve got the time to check it out I would appreciate it.

Awesome!!! Thanks for the hard work on this @Dave_DeMarle. I’ve actually been working on a simulation this week where we have had to work around this. I’ve figured out how to script around it, but it’s a giant pain and this will be much easier.

Will this be in the nightly builds soon? Or do I need to grab the branch during building to check it out?

Thanks again,

Better to build and test. It will take a few days for the changes to make it into master and I am not certain that the nightly binaries have OSPRay enabled.

Hey Dave, sorry I took so long with this. Was on vacation for a while and then busy with some stuff. Just tested this out in the latest nightly build and it seems to work great. The “All Exact” mode seems to be exactly what I was looking for. Thanks for taking the time to implement this.