Regression: no specular effect with OSPray since pv58 to pv59 switch

hi there,

since I switched from paraview 5.8 to paraview 5.9 (and consequently from ospray 1.x to 2.x), I observed what I suspect to be a regression regarding the handling of specular effects.
of course, I may also have done something wrong on my end XD but several members in my team observed the same issue. it may also be possible that ospray 2.x requires more user input to enable specular effects but I haven’t found them (neither when building paraview or ospray, nor at runtime when playing with various parameters, including the new light kit).

under paraview 5.8, I created a simple state file, which only contains a sphere source, below rendered with OpenGL with a maximum specular value (1):

when rendered with the ospray raycaster, the specular effects are still fine:

I can even play with the level of specular effect (down to 0.1):

with the pathtracer, things are kind of working too:

when switching to paraview 5.9 with opsray 2.x, with the same state file, everything’s flat no matter what value I enter in the gui for the specular effect:

and with the pathtracer, things are still flat:

is this a known bug in the port to ospray 2.x?
is there a specific build option I should use for paraview or ospray (which I wouldn’t have seen before)
is there more user input needed to get this specular effect back?

thanks a lot for your feedback. I use ospray’s raycaster on a nearly daily basis and I really miss my shiny specular effects.

thanks!

Hey Julian,

Not a known bug.

I suspect we missed this parameter capiltolization change in the switch to OSP 2.x.

diff --git a/Rendering/RayTracing/vtkOSPRayPolyDataMapperNode.cxx b/Rendering/RayTracing/vtkOSPRayPolyDataMapperNode.cxxindex a52add5d42…2640299eb0 100644
— a/Rendering/RayTracing/vtkOSPRayPolyDataMapperNode.cxx
+++ b/Rendering/RayTracing/vtkOSPRayPolyDataMapperNode.cxx
@@ -788,8 +788,8 @@ OSPMaterial MakeActorMaterial(vtkOSPRayRendererNode* orn, OSPRenderer oRenderer,
{
ospSetVec3f(oMaterial, “kd”, diffusef[0], diffusef[1], diffusef[2]);
}

  • ospSetVec3f(oMaterial, “Ks”, specularf[0], specularf[1], specularf[2]);
  • ospSetFloat(oMaterial, “Ns”, specPower);
  • ospSetVec3f(oMaterial, “ks”, specularf[0], specularf[1], specularf[2]);
  • ospSetFloat(oMaterial, “ns”, specPower);
    ospSetFloat(oMaterial, “d”, static_cast(opacity));
    }
2 Likes

Thanks @Dave_DeMarle for the quick answer, @LfxPaul will check it.

1 Like

thanks a lot @Dave_DeMarle !
I tried your patch and it worked!
rock’n’roll :slight_smile:

1 Like