Open miro-cd opened 3 years ago
The type and basis parameters are not strings, but the defined enums, so use
ospSetParam(curve, "type", OSP_UCHAR, OSP_DISJOINT);
ospSetParam(curve, "basis", OSP_UCHAR, OSP_LINEAR);
Here you can find example code how to set-up curves, which is exercised with ospExamples
when switching the scene to "curves" and then curveVariant to "cones".
Thank you @johguenther for your prompt reply. I tried modifying those lines as you suggested but now after compiling the code, the .exe stops running abruptly and the scene is not even rendered. I am only working with the C version because I had problems with the C++ version.
Is there a simple way to compile and run the example code you mentioned?
Hi all, I am trying to render a simple cylinder by following the documentation presented in https://www.ospray.org/documentation.html In order to verify if I could render just one cylinder, I started by defining the following parameters for a "curve" geometry: -->"vertex.position_radius" -->"vertex.color" --> "index" --> "type" --> "basis"
For that I modified the tutorial that comes with the OSPray package (ospTutorial.c) which I include in attachment as a .txt file.
The "type" was set to "OSP_DISJOINT" and the basis was set to "OSP_LINEAR" accordingly with the documentation. However, I just cannot render any cylinder as two displaying errors (Embree internal error 3 : invalid vertex buffer format) and (Embree internal error 3 : invalid index buffer format) keep appearing when I run the .exe file. with the --osp:debug option.
At this point I don't understand if I am defining the variables in a wrong way or if there is an issue when the Intel Embree is required by the process. The relevant changes to the original ospTutorial.c file are presented in the images below:
ospTutorial.txt