RenderKit / ospray

An Open, Scalable, Portable, Ray Tracing Based Rendering Engine for High-Fidelity Visualization
http://ospray.org
Apache License 2.0
1.01k stars 182 forks source link

Objects are not rendering in VTK/ParaView on Windows with 2.12.0 #573

Closed mathstuf closed 7 months ago

mathstuf commented 1 year ago

I'm updating ParaView's build to use OSPRay 2.12.0 (along with updates to just about everything). Currently everything is working except rendering on Windows. Linux and macOS (arm64 and x86_64) are working enough for the smoke test we have with the package.

However, on Windows, all we get is the background color. Having OSPRay log what it is doing shows that it is seeing triangles it should work with (this is the default sphere source in ParaView); see logs below. I'll note that the ospTutorial does render useful pixels (beyond the background), so it can work. I don't know if there's some API call we're missing that is benign on the other platforms.

See this report as well: https://gitlab.kitware.com/vtk/vtk/-/issues/19039

Where should I start looking to dig into where things might be going wrong?

`OSPRAY_DEBUG=1` `OSPRAY_LOG_LEVEL=debug` output ``` VisRTX 0.1.6, using devices: 0: NVIDIA GeForce GTX 750 (Total: 1.1 GB, Available: 0.9 GB) Embree Ray Tracing Kernels 4.2.0 () Compiler : Visual C++ Compiler 19.28.2992.4 Build : Release Platform : Windows (64bit) CPU : Sandy Bridge (GenuineIntel) Threads : 8 ISA : XMM YMM SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT AVX Targets : SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX MXCSR : FTZ=1, DAZ=1 Config Threads : default ISA : XMM YMM SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 POPCNT AVX Targets : SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX (supported) SSE2 SSE4.2 AVX AVX2 (compile time enabled) Features: raymasks intersection_filter Tasking : TBB2021.10 TBB_header_interface_12100 TBB_lib_interface_12100 general: build threads = 0 build user threads = 0 start_threads = 0 affinity = 0 frequency_level = simd256 hugepages = disabled verbosity = 2 cache_size = 134.2 MB max_spatial_split_replications = 1.2 triangles: accel = default builder = default traverser = default motion blur triangles: accel = default builder = default traverser = default quads: accel = default builder = default traverser = default motion blur quads: accel = default builder = default traverser = default line segments: accel = default builder = default traverser = default motion blur line segments: accel = default builder = default traverser = default hair: accel = default builder = default traverser = default motion blur hair: accel = default builder = default traverser = default subdivision surfaces: accel = default grids: accel = default builder = default motion blur grids: accel = default builder = default object_accel: min_leaf_size = 1 max_leaf_size = 1 object_accel_mb: min_leaf_size = 1 max_leaf_size = 1 [openvkl] CPU device instantiated with width: 8, ISA: AVX Using ISPC device with AVX instruction set ospray::render::SciVis: found unused (or of wrong data type) parameter 'maxContribution' ospray::render::SciVis: found unused (or of wrong data type) parameter 'maxPathLength' ospray::render::SciVis: found unused (or of wrong data type) parameter 'rouletteDepth' ospray::pathtracer::obj: found unused (or of wrong data type) parameter 'ka' ospray::pathtracer::obj: found unused (or of wrong data type) parameter 'ka' ospray::Mesh created: #primitives=96, #vertices=50 ======================================================= Finalizing instance, which has 1 geometries, 0 volumes, 0 clipping geometries and 0 lights segments: 0 ----------------------------------- flat_linear_curve: 0 round_linear_curve: 0 oriented_linear_curve: 0 flat_bezier_curve: 0 round_bezier_curve: 0 oriented_bezier_curve: 0 flat_bspline_curve: 0 round_bspline_curve: 0 oriented_bspline_curve: 0 flat_hermite_curve: 0 round_hermite_curve: 0 oriented_hermite_curve: 0 flat_catmull_rom_curve: 0 round_catmull_rom_curve: 0 oriented_catmull_rom_curve: 0 triangles: 96 quads: 0 grid: 0 subdivs: 0 sphere: 0 disc: 0 oriented_disc: 0 usergeom: 0 instance_cheap: 0 instance_expensive: 0 building BVH8 using avx::BVH8BuilderFastSpatialSAH ... finished BVH8 : 0.5ms, 0.2 Mprim/s, 0.0 GB/s primitives = 96, vertices = 0, depth = 2 total : sah = 5.356 (100.00%), #bytes = 0.01 MB (100.00%), #nodes = 37 ( 71.74% filled), #bytes/prim = 75.33 getAABBNodes : sah = 3.000 ( 56.01%), #bytes = 0.00 MB ( 31.86%), #nodes = 9 ( 50.00% filled), #bytes/prim = 24.00 leaves : sah = 2.356 ( 43.99%), #bytes = 0.00 MB ( 68.14%), #nodes = 28 ( 85.71% filled), #bytes/prim = 51.33 histogram : 100.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% alloc : used = 0.007 MB, #bytes/prim = 75.33 alloc : used = 0.007 MB, free = 0.001 MB, wasted = 0.001 MB, total = 0.009 MB, #bytes/prim = 96.00 total : used = 0.009 MB, free = 0.000 MB, wasted = 0.001 MB, total = 0.010 MB, #bytes/prim = 108.00 4K : used = 0.000 MB, free = 0.000 MB, wasted = 0.000 MB, total = 0.000 MB, #bytes/prim = 0.00 2M : used = 0.000 MB, free = 0.000 MB, wasted = 0.000 MB, total = 0.000 MB, #bytes/prim = 0.00 malloc: used = 0.009 MB, free = 0.000 MB, wasted = 0.001 MB, total = 0.010 MB, #bytes/prim = 108.00 shared: used = 0.000 MB, free = 0.000 MB, wasted = 0.000 MB, total = 0.000 MB, #bytes/prim = 0.00 created scene intersector accels[0] intersector1 = avx::BVH8Triangle4Intersector1Moeller intersector4 = avx::BVH8Triangle4Intersector4HybridMoellerNoFilter intersector8 = avx::BVH8Triangle4Intersector8HybridMoellerNoFilter selected scene intersector intersector1 = avx::BVH8Triangle4Intersector1Moeller intersector4 = avx::BVH8Triangle4Intersector4HybridMoellerNoFilter intersector8 = avx::BVH8Triangle4Intersector8HybridMoellerNoFilter ======================================================= Committing world, which has 1 instances and 5 lights segments: 0 ----------------------------------- flat_linear_curve: 0 round_linear_curve: 0 oriented_linear_curve: 0 flat_bezier_curve: 0 round_bezier_curve: 0 oriented_bezier_curve: 0 flat_bspline_curve: 0 round_bspline_curve: 0 oriented_bspline_curve: 0 flat_hermite_curve: 0 round_hermite_curve: 0 oriented_hermite_curve: 0 flat_catmull_rom_curve: 0 round_catmull_rom_curve: 0 oriented_catmull_rom_curve: 0 triangles: 0 quads: 0 grid: 0 subdivs: 0 sphere: 0 disc: 0 oriented_disc: 0 usergeom: 0 instance_cheap: 1 instance_expensive: 0 building BVH8 using avx::BVH8BuilderSAH ... finished BVH8 : 0.0ms, 0.0 Mprim/s, 0.0 GB/s primitives = 1, vertices = 0, depth = 0 total : sah = 1.000 (100.00%), #bytes = 0.00 MB (100.00%), #nodes = 1 (100.00% filled), #bytes/prim = 16.00 leaves : sah = 1.000 (100.00%), #bytes = 0.00 MB (100.00%), #nodes = 1 (100.00% filled), #bytes/prim = 16.00 histogram : 100.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% alloc : used = 0.000 MB, #bytes/prim = 16.00 alloc : used = 0.000 MB, free = 0.001 MB, wasted = 0.000 MB, total = 0.001 MB, #bytes/prim = 1024.00 total : used = 0.001 MB, free = 0.000 MB, wasted = 0.000 MB, total = 0.001 MB, #bytes/prim = 1152.00 4K : used = 0.000 MB, free = 0.000 MB, wasted = 0.000 MB, total = 0.000 MB, #bytes/prim = 0.00 2M : used = 0.000 MB, free = 0.000 MB, wasted = 0.000 MB, total = 0.000 MB, #bytes/prim = 0.00 malloc: used = 0.001 MB, free = 0.000 MB, wasted = 0.000 MB, total = 0.001 MB, #bytes/prim = 1152.00 shared: used = 0.000 MB, free = 0.000 MB, wasted = 0.000 MB, total = 0.000 MB, #bytes/prim = 0.00 created scene intersector accels[0] intersector1 = avx::BVH8InstanceIntersector1 intersector4 = avx::BVH8InstanceIntersector4Chunk intersector8 = avx::BVH8InstanceIntersector8Chunk selected scene intersector intersector1 = avx::BVH8InstanceIntersector1 intersector4 = avx::BVH8InstanceIntersector4Chunk intersector8 = avx::BVH8InstanceIntersector8Chunk ```

Cc: @demarle

carsonbrownlee commented 1 year ago

no easy answer comes to mind that changed from 2.11 to 2.12 and would be windows specific. Is the ospray module itself building and running without error?

mathstuf commented 1 year ago

Not sure about build warnings, but it definitely doesn't have errors. The ospTutorial project was able to render successfully. It could be something VTK is missing on Windows?

carsonbrownlee commented 1 year ago

We don't have any regular windows users in our group, but I'll try to replicate this on another machine later this week and get back to you.

mathstuf commented 1 year ago

You can get the ParaView binary that exhibits the problem from our CI. I recommend getting the .zip (it can be extracted and run anywhere). To reproduce:

demarle commented 1 year ago

I tried to reproduce with the nightly binary first, that of course worked fine. Only then did I read that you said from our CI. Doh! Downloading the CI binary now and building locally as well. Been a while since I built on windows.

mathstuf commented 1 year ago

Note that the CI branch has been merged, but OSPRay 2.12.0 and its newer deps are gated on ospray_SOURCE_SELECTION. Without that, you might get 2.7.1 from the superbuild.

johguenther commented 10 months ago

devel 29ef593a8a87bc88783031e7c47a786e7cff65b3 fixes the root cause in OSPRay.