Problem with volume

Hi everyone, I’ve met a strange problem with the volume when I started a new project with the newest version of vtk(27.4.4, tried 27.4.2 too), the situation is, when I ran my app in an old computer which had a graphic card of GTX1650, I found the frame drops to be very low and the volume got blured.

I notice this because on my other app which has a version of 25.11.0, the same component behaves as expected, to prove this, I downgrade the vtk.js in current app to 25.11.0, the frame recovers and the blur will not happen.

Is there any idea of this? The new version has more fixes and features so I prefer to use new, but if with this situation I’ll have to use the older one.

Thanks in advance.

Are you rendering the same volume? If so, look at the calculated sample distance. To really compare the two versions, set the same sample distance and maximumsamplesperray on both versions. I don’t think any of the new changes would introduce significant performance issues.

Hi Sankhesh,

I’m sure it is the same volume, as I mentioned, I did the test through downgrading the version in the same app from 27+ to 25.11.0, it’s not significant in the broswers on our new computers but the older ones with lower hardware configuration will behave obviously.

The project structure is very simple:

  • A vtkGenericRenderWindow at full screen size (resized to fix the window)
  • A vtkVolume to with a vtkVolumeMapper as mapper, with a vtkImageData read from itk-wasm for a series of dicom (about 255MB) as input data, maximumSamplesPerRay is set to 2500 and sampleDistance 0.25
  • A vtkColorTransferFunction and a vtkPiecewiseFunction to map the data to display bone

This would only happen after the ColorTransferFunction and PiecewiseFunction is applied, the newer version of vtk will cause a high gpu usage, on our GTX1650, v25.11.0 takes about 40% while rotating the volume or call a render(), and v27+ will take about 90% or more.

If you can not reproduce this I can provide a sandibox, but will need a computer with lower configuration to see the problem.

Regards

Hi @Xoz,

Do you have shading enabled? Is there a difference in performance without shading?
If you have the ability to test against different vtk-js versions, could you identify which version introduces the performance drop?

Thanks!

Hi @sankhesh,

The shading is not enabled(if you are referrig to the property-shade) for my test before.

On the pc for test, the frame keeps about 25 (shown in the vtkFPSMonitor) when shading is disabled and jumps from 15-45 when shading is enabled.

In my tests this starts from the version 26.1.2, before this (26.1.1 or older) the frame keeps at 50+ while shading is disabled.

Regards.