[vtk-developers] Volume won't show on Win7/Intel HD4600 with QVTKOpenGLWidget in 8.0.0.rc1

Elvis Stansvik elvis.stansvik at orexplore.com
Thu May 25 17:01:48 EDT 2017


2017-05-25 21:09 GMT+02:00 Aron Helser <aron.helser at kitware.com>:
> No I did not, but I just tried it again, adding the "1" argument, and I
> still get no repro. Running either with Intel or nvidia shows the volume
> just fine.

Alright, thanks for double-checking.

Elvis

>
> On Thu, May 25, 2017 at 2:35 PM, Elvis Stansvik
> <elvis.stansvik at orexplore.com> wrote:
>>
>> 2017-05-25 18:14 GMT+02:00 David Cole <DLRdave at aol.com>:
>> > Fails for me, too, on a 3.5 year old Dell XPS laptop, Windows 8.1,
>> > with an Intel HD Graphics 4000 running driver version 10.18.10.3316. I
>> > get your TestCase app window with nothing but an empty (white) client
>> > region.
>> >
>> > An app we have built against VTK 6.2-ish with the old OpenGL using
>> > VolumeSmartMapper works fine on this very same machine.
>> >
>> > Another data point...
>>
>> Finally a reproduction, I was beginning to despair :) Thanks a lot David.
>>
>> And just to make sure, Aron, did you run the test case as "TestCase
>> 1", with a parameter? That's the crucial thing, as otherwise it'll
>> just use a regular vtkRenderWindow/vtkRenderWindowInteractor (not
>> QVTKOpenGLWidget), and not exhibit the problem.
>>
>> Elvis
>>
>> >
>> >
>> > D
>> >
>> >
>> >
>> >
>> > On Thu, May 25, 2017 at 11:02 AM, Elvis Stansvik
>> > <elvis.stansvik at orexplore.com> wrote:
>> >> 2017-05-25 16:22 GMT+02:00 Aron Helser <aron.helser at kitware.com>:
>> >>> Hi Elvis,
>> >>> I've got a Win10 laptop (dell precision 5510), with an Optimus setup -
>> >>> both
>> >>> intel and nvidia graphics.
>> >>> With your test case, I'm able to see the volume running either with
>> >>> Intel or
>> >>> nVidia, so it doesn't repro for me.
>> >>> I've got Intel HD530 graphics, with driver version 21.20.16.4627
>> >>> Sorry,
>> >>> Aron
>> >>
>> >> Alright, bugger. Thanks for testing though!
>> >>
>> >> I won't be at the office until Monday again, but when I'm back I'll
>> >> try experimenting with different driver versions.
>> >>
>> >> Elvis
>> >>
>> >>>
>> >>> On Wed, May 24, 2017 at 5:02 PM, Elvis Stansvik
>> >>> <elvis.stansvik at orexplore.com> wrote:
>> >>>>
>> >>>> 2017-05-24 22:49 GMT+02:00 Elvis Stansvik
>> >>>> <elvis.stansvik at orexplore.com>:
>> >>>> > 2017-05-24 22:20 GMT+02:00 Sankhesh Jhaveri
>> >>>> > <sankhesh.jhaveri at kitware.com>:
>> >>>> >> Hi Elvis,
>> >>>> >>
>> >>>> >> Unfortunately, I wasn’t able to reproduce this issue. :(
>> >>>> >>
>> >>>> >> I don’t have a Windows machine with an Intel graphics card but
>> >>>> >> tried
>> >>>> >> ParaView on a couple of se Windows machines as well as a Mac (with
>> >>>> >> an
>> >>>> >> Intel
>> >>>> >> HD5600). Worked fine.
>> >>>> >
>> >>>> > Alright. Call for help then: Anyone else have a Windows 7 machine
>> >>>> > with
>> >>>> > Intel graphics? Would be great if someone could reproduce.
>> >>>>
>> >>>> Forgot to say: Thanks a lot for trying to reproduce Sankhesh.
>> >>>>
>> >>>> I've now put up the compiled self-contained test case here:
>> >>>>
>> >>>>     http://dose.se/~estan/voltestcase-inst.zip (18 MB)
>> >>>>
>> >>>> If anyone with Windows (preferably Windows 7 if possible) + Intel
>> >>>> graphics could try running this test case with "TestCase 1" and see
>> >>>> if
>> >>>> the volume shows up, that would be great.
>> >>>>
>> >>>> (Running the test case with argc > 2 will make it use
>> >>>> QVTKOpenGLWidget, and is where I'm having trouble).
>> >>>>
>> >>>> Elvis
>> >>>>
>> >>>> >
>> >>>> > I could put up my build of the test case as a self-contained .zip,
>> >>>> > to
>> >>>> > make it easy to test.
>> >>>> >
>> >>>> >>
>> >>>> >> At this point, I am inclined to think that the graphics drivers on
>> >>>> >> your
>> >>>> >> Windows machine may need updating.
>> >>>> >
>> >>>> > Hm, but it works fine if I don't use QVTKOpenGLWidget, and just use
>> >>>> > a
>> >>>> > plain vtkRenderWindow + vtkRenderWindowInteractor. Wouldn't that
>> >>>> > suggest that the drivers are capable enough, and that the problem
>> >>>> > is
>> >>>> > somehow in QVTKOpenGLWidget (or QOpenGLWidget)?
>> >>>> >
>> >>>> > Elvis
>> >>>> >
>> >>>> >>
>> >>>> >>
>> >>>> >> On Wed, May 24, 2017 at 12:16 PM Sankhesh Jhaveri
>> >>>> >> <sankhesh.jhaveri at kitware.com> wrote:
>> >>>> >>>
>> >>>> >>> Okay thanks.
>> >>>> >>>
>> >>>> >>> I’ll take a look.
>> >>>> >>>
>> >>>> >>>
>> >>>> >>> On Wed, May 24, 2017 at 8:18 AM Elvis Stansvik
>> >>>> >>> <elvis.stansvik at orexplore.com> wrote:
>> >>>> >>>>
>> >>>> >>>> 2017-05-23 15:41 GMT+02:00 Sankhesh Jhaveri
>> >>>> >>>> <sankhesh.jhaveri at kitware.com>:
>> >>>> >>>> > Hi Elvis,
>> >>>> >>>> >
>> >>>> >>>> > Could you try downloading the ParaView nightly binary and test
>> >>>> >>>> > volume
>> >>>> >>>> > rendering there? You can use the wavelet source for a test
>> >>>> >>>> > dataset.
>> >>>> >>>> > ParaView
>> >>>> >>>> > uses the QVTKOpenGLWidget and it would be a good test before
>> >>>> >>>> > diving
>> >>>> >>>> > into the
>> >>>> >>>> > code.
>> >>>> >>>>
>> >>>> >>>> I tried the wavelet example with Paraview 5.4.0-RC1-125-g435b603
>> >>>> >>>> 64-bit, and the problem is the same as in my minimal test case.
>> >>>> >>>> The
>> >>>> >>>> volume won't show up.
>> >>>> >>>>
>> >>>> >>>> It does show up if I switch to the software based ray cast
>> >>>> >>>> mapper
>> >>>> >>>> (but
>> >>>> >>>> not with GPU or smart, which I guess both result in the GPU one
>> >>>> >>>> being
>> >>>> >>>> used).
>> >>>> >>>>
>> >>>> >>>> Please tell me if there's anything else I can do to help
>> >>>> >>>> debugging.
>> >>>> >>>> There are no errors printed when I run my test case.
>> >>>> >>>>
>> >>>> >>>> Elvis
>> >>>> >>>>
>> >>>> >>>> >
>> >>>> >>>> > Thanks,
>> >>>> >>>> > Sankhesh
>> >>>> >>>> >
>> >>>> >>>> >
>> >>>> >>>> > On Tue, May 23, 2017 at 6:50 AM Elvis Stansvik
>> >>>> >>>> > <elvis.stansvik at orexplore.com> wrote:
>> >>>> >>>> >>
>> >>>> >>>> >> Hi all,
>> >>>> >>>> >>
>> >>>> >>>> >> In porting to QVTKOpenGLWidget, I can't get volumes rendered
>> >>>> >>>> >> using
>> >>>> >>>> >> vtkGPUVolumeRayCastMapper to show up on Windows 7, Intel
>> >>>> >>>> >> graphics
>> >>>> >>>> >> (HD
>> >>>> >>>> >> 4600). They show up fine on Linux. They also show up fine on
>> >>>> >>>> >> Windows 7
>> >>>> >>>> >> if using a plain VTK render window. I've tried turning off
>> >>>> >>>> >> multisampling with setSamples(0) on the default
>> >>>> >>>> >> QSurfaceFormat.
>> >>>> >>>> >>
>> >>>> >>>> >> The below test case illustrates the issue. See the attached
>> >>>> >>>> >> screenshots from running "TestCase" (left) and "TestCase 1"
>> >>>> >>>> >> (right).
>> >>>> >>>> >> The former uses a plain render window while the latter uses
>> >>>> >>>> >> the
>> >>>> >>>> >> new
>> >>>> >>>> >> QVTKOpenGLWidget. Notice how in the Windows 7 screenshot, the
>> >>>> >>>> >> plain
>> >>>> >>>> >> VTK rendering works fine, but the QVTKOpenGLWidget one is not
>> >>>> >>>> >> showing
>> >>>> >>>> >> the volume.
>> >>>> >>>> >>
>> >>>> >>>> >> Versions used:
>> >>>> >>>> >>
>> >>>> >>>> >> Kubuntu Linux 16.04
>> >>>> >>>> >> VTK 8.0.0.rc1, OpenGL2
>> >>>> >>>> >> Qt 5.5.1
>> >>>> >>>> >>
>> >>>> >>>> >> Windows 7
>> >>>> >>>> >> VTK 8.0.0.rc1, OpenGL2
>> >>>> >>>> >> Qt 5.6.2
>> >>>> >>>> >>
>> >>>> >>>> >> Any ideas what the problem might be?
>> >>>> >>>> >>
>> >>>> >>>> >> I can provide a standalone .zip distribution of my build of
>> >>>> >>>> >> the
>> >>>> >>>> >> test
>> >>>> >>>> >> case if you want.
>> >>>> >>>> >>
>> >>>> >>>> >> Note that this issue is orthogonal to the alpha issue I
>> >>>> >>>> >> reported
>> >>>> >>>> >> and
>> >>>> >>>> >> got solved in my other thread.
>> >>>> >>>> >>
>> >>>> >>>> >> Many thanks in advance,
>> >>>> >>>> >> Elvis
>> >>>> >>>> >>
>> >>>> >>>> >>
>> >>>> >>>> >> main.cpp:
>> >>>> >>>> >>
>> >>>> >>>> >> #include <algorithm>
>> >>>> >>>> >>
>> >>>> >>>> >> #include <vtkColorTransferFunction.h>
>> >>>> >>>> >> #include <vtkGenericOpenGLRenderWindow.h>
>> >>>> >>>> >> #include <vtkGPUVolumeRayCastMapper.h>
>> >>>> >>>> >> #include <vtkImageData.h>
>> >>>> >>>> >> #include <vtkNew.h>
>> >>>> >>>> >> #include <vtkPiecewiseFunction.h>
>> >>>> >>>> >> #include <vtkProperty.h>
>> >>>> >>>> >> #include <vtkRenderer.h>
>> >>>> >>>> >> #include <vtkRenderWindow.h>
>> >>>> >>>> >> #include <vtkRenderWindowInteractor.h>
>> >>>> >>>> >> #include <vtkVolume.h>
>> >>>> >>>> >> #include <vtkVolumeProperty.h>
>> >>>> >>>> >>
>> >>>> >>>> >> #include <QVTKOpenGLWidget.h>
>> >>>> >>>> >>
>> >>>> >>>> >> #include <QApplication>
>> >>>> >>>> >>
>> >>>> >>>> >> int main(int argc, char *argv[])
>> >>>> >>>> >> {
>> >>>> >>>> >>     auto defaultFormat = QVTKOpenGLWidget::defaultFormat();
>> >>>> >>>> >>     defaultFormat.setSamples(0);
>> >>>> >>>> >>     QSurfaceFormat::setDefaultFormat(defaultFormat);
>> >>>> >>>> >>
>> >>>> >>>> >>     QApplication app(argc, argv);
>> >>>> >>>> >>
>> >>>> >>>> >>     // Set up volume rendering
>> >>>> >>>> >>     vtkNew<vtkColorTransferFunction> colorFunction;
>> >>>> >>>> >>     colorFunction->AddRGBPoint(0.0, 0.0, 0.0, 0.0);
>> >>>> >>>> >>     colorFunction->AddRGBPoint(1.0, 0.0, 0.0, 0.0);
>> >>>> >>>> >>
>> >>>> >>>> >>     vtkNew<vtkPiecewiseFunction> opacityFunction;
>> >>>> >>>> >>     opacityFunction->AddPoint(0.0, 0.0);
>> >>>> >>>> >>     opacityFunction->AddPoint(1.0, 1.0);
>> >>>> >>>> >>
>> >>>> >>>> >>     vtkNew<vtkImageData> imageData;
>> >>>> >>>> >>     imageData->SetExtent(0, 200, 0, 200, 0, 200);
>> >>>> >>>> >>     imageData->AllocateScalars(VTK_FLOAT, 1);
>> >>>> >>>> >>     std::fill_n(static_cast<float
>> >>>> >>>> >> *>(imageData->GetScalarPointer()),
>> >>>> >>>> >> 8000000, 0.01);
>> >>>> >>>> >>
>> >>>> >>>> >>     vtkNew<vtkGPUVolumeRayCastMapper> volumeMapper;
>> >>>> >>>> >>     volumeMapper->SetInputData(imageData.Get());
>> >>>> >>>> >>
>> >>>> >>>> >>     vtkNew<vtkVolumeProperty> volumeProperty;
>> >>>> >>>> >>     volumeProperty->SetScalarOpacity(opacityFunction.Get());
>> >>>> >>>> >>     volumeProperty->SetColor(colorFunction.Get());
>> >>>> >>>> >>     volumeProperty->ShadeOff();
>> >>>> >>>> >>
>> >>>> >>>> >>     vtkNew<vtkVolume> volume;
>> >>>> >>>> >>     volume->SetMapper(volumeMapper.Get());
>> >>>> >>>> >>     volume->SetProperty(volumeProperty.Get());
>> >>>> >>>> >>
>> >>>> >>>> >>     vtkNew<vtkRenderer> renderer;
>> >>>> >>>> >>     renderer->AddVolume(volume.Get());
>> >>>> >>>> >>     renderer->SetBackground(1.0, 1.0, 1.0);
>> >>>> >>>> >>
>> >>>> >>>> >>     if (argc > 1) {
>> >>>> >>>> >>         // Render with QVTKOpenGLWidget
>> >>>> >>>> >>         vtkNew<vtkGenericOpenGLRenderWindow> window;
>> >>>> >>>> >>         window->AddRenderer(renderer.Get());
>> >>>> >>>> >>
>> >>>> >>>> >>         auto widget = new QVTKOpenGLWidget();
>> >>>> >>>> >>         widget->SetRenderWindow(window.Get());
>> >>>> >>>> >>         widget->show();
>> >>>> >>>> >>
>> >>>> >>>> >>         return app.exec();
>> >>>> >>>> >>     } else {
>> >>>> >>>> >>         // Render with "plain" render window / interactor
>> >>>> >>>> >>         vtkNew<vtkRenderWindow> window;
>> >>>> >>>> >>         window->AddRenderer(renderer.Get());
>> >>>> >>>> >>
>> >>>> >>>> >>         vtkNew<vtkRenderWindowInteractor> interactor;
>> >>>> >>>> >>         interactor->SetRenderWindow(window.Get());
>> >>>> >>>> >>         interactor->Start();
>> >>>> >>>> >>
>> >>>> >>>> >>         return 0;
>> >>>> >>>> >>     }
>> >>>> >>>> >> }
>> >>>> >>>> >>
>> >>>> >>>> >>
>> >>>> >>>> >> CMakeLists.txt:
>> >>>> >>>> >>
>> >>>> >>>> >> cmake_minimum_required(VERSION 3.1)
>> >>>> >>>> >>
>> >>>> >>>> >> project(TestCase)
>> >>>> >>>> >>
>> >>>> >>>> >> find_package(VTK 8.0 COMPONENTS
>> >>>> >>>> >>     vtkCommonCore
>> >>>> >>>> >>     vtkCommonDataModel
>> >>>> >>>> >>     vtkCommonExecutionModel
>> >>>> >>>> >>     vtkCommonMath
>> >>>> >>>> >>     vtkFiltersSources
>> >>>> >>>> >>     vtkGUISupportQt
>> >>>> >>>> >>     vtkInteractionStyle
>> >>>> >>>> >>     vtkRenderingCore
>> >>>> >>>> >>     vtkRenderingOpenGL2
>> >>>> >>>> >>     vtkRenderingVolume
>> >>>> >>>> >>     vtkRenderingVolumeOpenGL2
>> >>>> >>>> >>     REQUIRED
>> >>>> >>>> >> )
>> >>>> >>>> >>
>> >>>> >>>> >> find_package(Qt5Widgets REQUIRED)
>> >>>> >>>> >>
>> >>>> >>>> >> add_executable(TestCase main.cpp)
>> >>>> >>>> >>
>> >>>> >>>> >> target_link_libraries(TestCase PUBLIC
>> >>>> >>>> >>     vtkCommonCore
>> >>>> >>>> >>     vtkCommonDataModel
>> >>>> >>>> >>     vtkCommonExecutionModel
>> >>>> >>>> >>     vtkCommonMath
>> >>>> >>>> >>     vtkFiltersSources
>> >>>> >>>> >>     vtkGUISupportQt
>> >>>> >>>> >>     vtkInteractionStyle
>> >>>> >>>> >>     vtkRenderingCore
>> >>>> >>>> >>     vtkRenderingOpenGL2
>> >>>> >>>> >>     vtkRenderingVolume
>> >>>> >>>> >>     vtkRenderingVolumeOpenGL2
>> >>>> >>>> >>     Qt5::Widgets
>> >>>> >>>> >> )
>> >>>> >>>> >>
>> >>>> >>>> >> target_include_directories(TestCase PUBLIC
>> >>>> >>>> >>     ${VTK_INCLUDE_DIRS}
>> >>>> >>>> >> )
>> >>>> >>>> >>
>> >>>> >>>> >> target_compile_definitions(TestCase PUBLIC
>> >>>> >>>> >>     ${VTK_DEFINITIONS}
>> >>>> >>>> >> )
>> >>>> >>>> >>
>> >>>> >>>> >> set_target_properties(TestCase PROPERTIES
>> >>>> >>>> >>     CXX_STANDARD 14
>> >>>> >>>> >>     CXX_STANDARD_REQUIRED ON
>> >>>> >>>> >> )
>> >>>> >>>> >> _______________________________________________
>> >>>> >>>> >> Powered by www.kitware.com
>> >>>> >>>> >>
>> >>>> >>>> >> Visit other Kitware open-source projects at
>> >>>> >>>> >> http://www.kitware.com/opensource/opensource.html
>> >>>> >>>> >>
>> >>>> >>>> >> Search the list archives at:
>> >>>> >>>> >> http://markmail.org/search/?q=vtk-developers
>> >>>> >>>> >>
>> >>>> >>>> >> Follow this link to subscribe/unsubscribe:
>> >>>> >>>> >> http://public.kitware.com/mailman/listinfo/vtk-developers
>> >>>> >>>> >>
>> >>>> >>>> > --
>> >>>> >>>> >
>> >>>> >>>> > Sankhesh Jhaveri
>> >>>> >>>> >
>> >>>> >>>> > Sr. Research & Development Engineer | Kitware | (518) 881-4417
>> >>>> >>>
>> >>>> >>> --
>> >>>> >>>
>> >>>> >>> Sankhesh Jhaveri
>> >>>> >>>
>> >>>> >>> Sr. Research & Development Engineer | Kitware | (518) 881-4417
>> >>>> >>
>> >>>> >> --
>> >>>> >>
>> >>>> >> Sankhesh Jhaveri
>> >>>> >>
>> >>>> >> Sr. Research & Development Engineer | Kitware | (518) 881-4417
>> >>>> _______________________________________________
>> >>>> Powered by www.kitware.com
>> >>>>
>> >>>> Visit other Kitware open-source projects at
>> >>>> http://www.kitware.com/opensource/opensource.html
>> >>>>
>> >>>> Search the list archives at:
>> >>>> http://markmail.org/search/?q=vtk-developers
>> >>>>
>> >>>> Follow this link to subscribe/unsubscribe:
>> >>>> http://public.kitware.com/mailman/listinfo/vtk-developers
>> >>>>
>> >>>
>> >> _______________________________________________
>> >> Powered by www.kitware.com
>> >>
>> >> Visit other Kitware open-source projects at
>> >> http://www.kitware.com/opensource/opensource.html
>> >>
>> >> Search the list archives at:
>> >> http://markmail.org/search/?q=vtk-developers
>> >>
>> >> Follow this link to subscribe/unsubscribe:
>> >> http://public.kitware.com/mailman/listinfo/vtk-developers
>> >>
>
>


More information about the vtk-developers mailing list