of Vinícius Arcoverde

Introduction

Initially, the goal was to create a ‘Cinematic Render.’ However, after discussions with the mentors, after some research, we realized that the task should focus on improving the 3D visualization within the software. Consequently, we shifted our focus to enhancing the InVesalius render by incorporating the ability to toggle the ambient occlusion post-effect, a feature recently introduced to the VTK library already in use by the project. It is a shading and rendering technique used in 3D computer graphics to simulate how light interacts with objects in a scene, specifically how light is occluded or blocked by the surrounding environment. The effect helps to create more realistic and visually appealing images by adding subtle shadows where objects meet or where surfaces are close to each other.

Goal

The goal agreed with the mentors was to create a global Ambient Occlusion realtime render for polygon data using VTK inside invesalius.

Work Report

The first step was to successfully create the visualization with ambient occlusion outside the InVesalius project. This was important for understanding the VTK rendering workflow, which is not only for visualization but is also capable of manipulating, processing, and displaying various scientific file formats.

The ambient occlusion (AO) for meshes was feasible to implement, perhaps because it is more mature and has existed since 2001. However, AO for volume rendering, another type of rendering commonly used for medical images, proved very difficult to find references for, as it was only introduced in late 2023. When results were obtained, the performance deteriorated considerably. Therefore, we decided to proceed with AO only for meshes.

Below are images on the left without and on the right with the ambient occlusion effect.

Slide 16_9 - 3.png

Slide 16_9 - 2.png

Slide 16_9 - 1.png

The icon for the Ambient Occlusion effect was added as a feature in the software. We opted to place it as an icon in the right bar of the 3D view so that the user would know it pertains to the 3D render and is global (applicable to all structures), similar to the other icons for orthographic camera perspective, anaglyph 3D, and DICOM view planes over the 3D surfaces.

https://youtu.be/BAfSXtx1KQg

The pull request is in the link below. Some conflicts need to be fixed because the pre-commit system changed the code.

https://github.com/invesalius/invesalius3/pull/809#issuecomment-2248002028