Rhino geometry visualization in Viktor

Is it possible to visualize a rhino model (saved as model.obj file) in GeometryView without having to reconstruct it in Viktor? Just to call it from Rhino and preview it.

Hi @MonicaB

As far as I know, no, not directly. If you want to use the GeometryView you have to supply a GeometryResult, which takes a Group of VIKTOR Geometry objects. So you would need to create a group of Geometry objects (extrusions, spheres, beams, etc.) from your model.obj file. While we don’t supply a from_obj method in the SDK I don’t think it should be too difficult to write a from_obj_to_viktor_geometry function, because the .obj file is open and the file structure is well documented, see for example https://www.cs.cmu.edu/~mbz/personal/graphics/obj.html It would depend on your specfic .obj file structure a bit how much work that would be.

As you can see in the Automate the boring, engineer the awesome section here, @mslootweg has made something partially similar for mayavi models.

We are currently working on supporting GLB files (glTF format in single binary file) in the GeometryView, as this is the de-facto file format for 3D scenes and models. Likely Rhino also has the possibility to expert to glTF/GLB, or there are (Python) tools available to convert .obj to GLB.

More info to come…

1 Like