Viewer with segmentation, and first version of primitive grouping part