[go: nahoru, domu]

Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.

BlueBrain/osgTransparency

Repository files navigation

Introduction

Welcome to OSG Transparency, a C++ library that provides 3 algorithms to render transparent geometry in OpenSceneGraph (OSG) in an improved way compared to simple back-to-front sorting at object level (what OSG does by default).

There are several online resources available which may be of interest to users:

  • The git repository
  • The online copy of this documentation To keep track of the changes between releases check the [changelog](@ref Changelog).

For code examples on how to use the library check the @ref tutorial.

Features

This library provides 3 algorithm for order-independent-transparency when built with GL2 support, plus a fourth one when built with GL3 support. The algorithms are:

  • Depth peeling: Simple multi-pass algorithm that sorts the fragment layers one by one (original paper).
  • Multi-layer depth peeling: Extension of depth peeling to peel several slices at the same time. The slices are load-balanced in a previous step. This algorithm is correct as depth peeling and also faster, but slower than bucket depth peeling.
  • Fragment-linked-lists: An A-buffer implementation using lists of fragments. This algorithm makes use of the GL extension for random access image buffer objects and so, it is only available in the GL3 build.

All algorithms are implemented as classes that inherit from osgUtil::RenderBin.

Building

OSG Transparency is a cross-platform library, designed to run on any modern operating system, including all Unix variants. OSG Transparency uses CMake to create a platform-specific build environment. The following platforms and build environments are tested:

  • Linux: Ubuntu 16.04, RHEL 6.8 (Makefile, x64)

This library depends on Boost and OpenSceneGraph, which are available as binary packages for Windows and system packages for RedHat and Debian based distributions. Once the dependencies are installed, building the GL2 version from source is as simple as:

git clone --recursive https://github.com/BlueBrain/osgTransparency.git
mkdir osgTransparency/build
cd osgTransparency/build
cmake ..
make

For the GL3 version, OpenSceneGraph needs to be compiled with GL3 support, refer to the OpenSceneGraph documentation for compilation instructions.

Funding & Acknowledgment

The development of this software was supported by funding to the Blue Brain Project, a research center of the École polytechnique fédérale de Lausanne (EPFL), from the Swiss government’s ETH Board of the Swiss Federal Institutes of Technology.

License

osgTransparency is licensed under the LGPL, unless noted otherwise, e.g., for external dependencies. See file LICENSE.txt for the full license.

Copyright (c) 2006-2022 Blue Brain Project/EPFL and Universidad Politécnica de Madrid (UPM)

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA