Closed syoyo closed 8 years ago
Yeah, I'll look into this more...though I didn't see it until I ran on an OS X machine (MBA, Haswell CPU). I didn't see this artifact on my linux machine at the office, though I wasn't explicitly looking for it. It appears in multiple renderers too: I've been using AO ("-r ao1") and SciVis ("-r scivis").
Here's the image rendered on Ubuntu 1604, using gcc-5.3.1:
Here's the exact same dataset/renderer/viewpoint in OS X (10.10) on my MBA, using Clang :
I'll check clang on Linux....maybe this is something in NanoRT itself?
Hmmm, clang-3.8 on Ubuntu seems OK too....strange...
I also see artifact on CentOS7(g++ 4.8.5). Probably there are some bugs in NanoRT which relates to compiler optimization...?
Ah, you didn't set geometric normal of the hit surface correctly. Fixed in this commit: https://github.com/jeffamstutz/module_nanort/commit/2c0262ec08f889bf3f44a5994ea20709eac2b4d5
Hmm... The artifact still appears with CentOS 7 + gcc 4.8. Primary ray looks OK, thus it looks intersection computation after the first hit is not working well.
Is there any visual debugging feature(e.g. show shading normal, geometric normal, texcoord, etc) in OSPRay, @jeffamstutz ?
Re normal: Yes, I was super lazy with calculating the geometric normal as that's typically something a ray intersection library does for you...thanks for adding that!
Re bug: With your fix for the geometry normal, the rendering artifact on the city geometry I used above on my MBA seems to have been fixed. However, if you are still seeing artifacts, you could try using one of the following renderers:
...where you pass a different renderer to the viewer on the command line via "-r [renderer]". All of our debugging renderers are in ospray/renderer/raycast/RaycastRenderer.cpp, where you can see all of the ones we register there.
With your fix for the geometry normal, the rendering artifact on the city geometry I used above on my MBA seems to have been fixed
Yes, it looks Mac are OK. The problem may only exist in Linux platform.
However, if you are still seeing artifacts, you could try using one of the following renderers:
Thanks! This is great. I'll investigate further with this feature.
Ah, filling geomID
with RTC_INVALID_GEOMETY_ID was missing for non-hit ray. Now linux build works fine.
NanoRT rendering in ospGlutViewer has an artifact in its rendering.
It looks shadow ray computation is not working well(ray offset?)