I’m trying to use OSPRay to render points as spheres (not 3D glyphs), scale them with a given scalar field, and then apply an additional, single value scale factor to that. It’s this last bit I cannot seem to do.
The “point size” under Styling seems to have no effect. Toggling “Render points as spheres” seem to have no effect. And OSPRay Scale Function I don’t understand, but it too seems to have no effect.
I can try to provide a simple example if necessary.
Are you using the OSPRay Scale Function (advanced properties)?
I did open that and played with it, yes. But I did not see how it would let me apply an additional, fixed scaling factor to all my spheres. What’s the trick?
You can use the calculator filter for that.
If you want to scale up with a factor of 5, use the formula
ScalarsArrayName * 5
Sorry to be dense, but exactly where do I enter that formula in the GUI (for 5.6.0)? Also, do you know if there are docs for the 5.6.0 GUI? I’m finding the wiki a bit confusing. Thanks!
- Select the filter called
Calculator (Filters menu / Data Analytics / Calculator)
- Enter the formula in properties panel (of course, replace the name of the array by yours):
Concerning the docs, you can find it for ParaView 5.5.2 here: https://www.paraview.org/paraview-guide/
As far as I know, the guide for 5.6.0 in not out yet. @cory.quammen
The updates for the ParaView Guide are just about finished for 5.6. Most of the guide for 5.5.2 is still valid for 5.6, so it is still a good reference.
I also highly recommend the ParaView Tutorial for getting a good hands-on understanding of ParaView.
Thanks. I confess I haven’t attempted your suggestion yet. But I did do some screen captures to try to describe what I’m seeing:
Briefly: Using 3D glyphs (spheres; no OSPRay), scaled by an array, work as one would expect. Toggle on OSPRay rendering, everything disappears. Switching to Points (from 3D glyphs), they appear, but very tiny and all the same size. Applying an OSPRay scale array (same as before) has no effect.
I would find it odd that I’d need to mess with a formula to get proper scaling.
Thanks for the details.
There is a bug in the OSPRay Scale Function widget, the scalars range is not automatically set.
If you set manually your range (20-50), it works as intended.
I must still be missing something because when I set my range 20-50, I see no change (screenshot on google doc). Do I still need to mess with the formula in the prop panel or something else?
the pv560*.pvsm state file uses the *.mat file. Set an env var PHYSICELL_DATA to point to a directory with the .mat file.
Caveat: this uses a custom reader for our data which requires scipy being installed in your Python env as explained here:
One could probably create a much simpler data file & pipeline for this particular test
Can you save your data to a
vtu file (depending if you have a polydata or a unstructured grid) using the
Save Data... menu in ParaView and share it with me?
It would be a lot easier for me to open it.
I blindly created a .vtp and put on the repo.
It seems that there is no way to apply a custom factor on top of the scale function with OSPRay at the moment…
You can use a transform filter to scale down your dataset but it is a poor workaround.
Find attach a state file with this workaround: state.pvsm (250.1 KB)
But to be clear, for OSPRay rendered data, it doesn’t properly use the “OSPRay Use Scale Array”. Correct? Applying any additional scale factor/function on top of that is another issue. I think I’ll wait for a fix to the former before I share further with our users. But thanks for being so responsive!
It is using the OSPRay Use Scale Array but it is mapping your current range [20;50] to a custom function inside [0;1] range, meaning that the maximum size of the sphere you can achieve is 1.