I am working on a GPU problem of Ray Tracing and using the Glass.cpp example as a starting point in understanding OPTIX and CUDA. I replaced the wine glass with my own wine glass that contains an object of wine. Now the inside surface of the wineglass and outside surface of the wine are the same. Solidworks was used to create the objects, but when it converted the objects to a mesh (.WRL) the actual faces overlap each other. This causes the “Glass.CU” CUDA code to see the start of a new refraction (wine) before it sees the exit of the glass refraction. (See picture #1). Now I can solve the problem by reducing the XY model of the wine by say .95 and the problem goes away. (See picture #2). But I need to solve this problem without changing the model.
I think the solution is to change “glass.cu” to remember when it is ray tracing to handle both the exit of the old refraction and the start of the new refraction when it detects a new refraction before it was exited the old ray. Does anyone have any examples of solving the problem?
Here are my two pictures.