Thu, 03/12/2026 - 12:08
Hi there,
I'm working on a 3D-Viewer for loading OBJ-files with the OpenCascade-rendering-technology. It works perfectly, but now I run into a possible limitation regarding materials/textures. In the Graphic3d_RM_RASTERIZATION-mode I can load any OBJ-file with hundrets of different materials with textures and all will be displayed accordingly. If I switch to the Graphic3d_RM_RAYTRACING-mode (and furthermore the GlobalIllumation = True for pathtracing) only roundabout 70 materials with their textures are displayed correctly, the rest fall back to a default material. See the attachted images for further explanation.
Is there a limitation inside OpenCascade? If I use CAD-Assistent with the same test-files I get the same visual result for raytracing/pathtracing and missing materials.
I'm using the currently latest OpenCascade-version 7.9.3.
Thanks for your help.
Thu, 03/12/2026 - 17:19
Currently this is a hard-coded limit in the code
OpenGl_RaytraceGeometry.hxx. It should be possible to extend it or make it configurable, but for this one have to modify OCCT:Fri, 03/13/2026 - 10:02
Thanks for your answer, with this I can work.