NVIDIA / VisRTX

NVIDIA OptiX based implementation of ANARI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rendering issues

lynetcha opened this issue · comments

Hi, I am trying to render the nvidia/vMaterials/Design/Wood/Bubinga.bubinga_chocolate_oiled material (from NVIDIA's vmaterials) using sampleMDL.cpp but the result I get is different than what I expected. Any idea what might be wrong? The logs do not highlight any issues.

Result
Result

Expected
Expected

Log
log

The main thing that seems off in the log is that it says that OptiX version is 7.1.0 but I actually downloaded OptiX 6.0.0.

Thank you for your bug report!

A simple reproducer would be great. Since you're using sampleMDL.cpp as basis, can you please send me a diff?

Thanks!
Tim

Thanks!

The problem is that a sphere geometry does not produce texture coordinates at the hit point as you might expect. Currently, you can specify a single constant tex coord per sphere. This has historic reasons from a scientific visualization background. Additionally, there is no canonical sphere surface to 2D texture coord mapping.

In the following screenshot you can see a manually tesselated sphere (TriangleGeometry) with the material's texture correctly applied based on a spherical mapping:

wood

Modified patch: texcoord.zip

Thank you!

Btw, if you need to render many spheres with spherical texture mapping (or any other specific mapping), it shouldn't be complicated to adjust VisRTX's sphere intersection code and simply compute and output the correct texture coordinates at the hit point. Let me know if you need any help with this.

Depending on your scene, you still might be better off with a tesselation, especially on Turing where you have hardware-accelerated triangle intersection.