HARFANG®3D is an all-in-one 3D visualization library usable in C++, Python, Lua and Go.


HARFANG® 3D engine

HARFANG®3D is an all-in-one 3D visualization library usable in C++, Python, Lua and Go.

Table of contents

  1. About
  2. Download
  3. Building the SDK
  4. Using the C++ SDK
  5. Version
  6. License


HARFANG®3D is an easy-to-adapt, cross-platform, multi-language, powerful and optimized solution to integrate with embedded systems, into existing environments and combining features to meet the industrial standards of real-time 3D imaging.

The HARFANG®3D architecture makes it easy to meet the requirements for hardware integration, display performance and security.

HARFANG®3D is written in C++ and is based on the open-source bgfx library supporting Vulkan, Metal, DirectX (from 9 to 12), OpenGL and OpenGL ES. It Builds on Windows, Linux, Intel and ARM.


Platforms supported

  • Win32 and Win64 Intel
  • Linux 64 Intel
  • Aarch 64 ARM

Scene API

  • Node & component based
  • Performance oriented

Rendering pipeline

  • Low-spec PBR rendering pipeline
  • High-spec 'AAA' rendering pipeline (screen space GI & reflection)
  • Support of user pipeline shaders


  • VR support via OpenVR/SteamVR with Eye tracking
  • Compatible with the HTC Vive/Vive Pro, Valve Index, Lenovo Explorer, Oculus Rift S

Physics API

  • Rigid bodies, collisions, mechanical constraints, ray casting

Audio API

  • Play/stream WAV/OGG formats
  • 3D audio spatialization


The following screenshots were captured on a 1080GTX in 1080P running at 60FPS.

alt text

alt text

(Sun Temple, courtesy of the Open Research Content Archive (ORCA))


You can download the HARFANG binaries from the official website: https://www.harfang3d.com/download

Build the SDK


  • Git
  • CMake 3.19+
  • CPython 3.2+
  • Go 1+ (for Harfang Go module)
  • Doxygen (for Harfang C++ SDK documentation)


  • Visual Studio 2019 (C++ compiler and IDE)
  • MinGW (for Harfang Go module)


  • GCC 9 or above
  • CLang


  1. Clone the Harfang 3D repository including its submodules.

    git clone --recursive -j8 https://github.com/harfang3d/harfang3d.git
  2. Create build directory. Note that the described directory layout is not mandatory.

    mkdir build
    cd build
  3. Clone Fabgen.

    git clone https://github.com/ejulien/FABGen.git
  4. Download and install Autodesk FBX SDK.

  5. Create a directory that will hold the build system generated by CMake.

    mkdir cmake
    cd cmake
  6. Generate build system using CMake. For example, on Windows it wil be:

    cmake ../.. -G "Visual Studio 16 2019" -A x64 \
        -DCMAKE_INSTALL_PREFIX:PATH="D:/harfang/build/install" \
        -DPYTHON_EXECUTABLE:FILEPATH="C:/Python36/python.exe" \
        -DHG_FABGEN_PATH:PATH="D:/harfang/build/fabgen" \
    • CMAKE_INSTALL_PREFIX specifies the directory where the Harfang SDK will installed.
    • PYTHON_EXECUTABLE is the path the Python 3 interpreter.
    • FABGEN_PATH is the path to Fabgen binding generator.
    • HG_FBX_SDK is the path to Autodesk FBX SDK.

    Here is the list of available CMake options.

    • C++ SDK
      • HG_BUILD_CPP_SDK : Build C++ SDK (default: OFF).
      • HG_BUILD_TESTS : Build C++ SDK unit tests (default: OFF).
      • HG_BUILD_DOCS : Build API and C++ SDK documentations (default: OFF).
      • HG_ENABLE_BULLET3_SCENE_PHYSICS : Enable Bullet physics API (default: ON).
      • HG_ENABLE_RECAST_DETOUR_API : Enable Recast/Detour navigation mesh and path finding API (default: ON).
      • HG_ENABLE_OPENVR_API : Enable OpenVR API (default: OFF).
      • HG_ENABLE_SRANIPAL_API : Enable VIVE Eye and Facial Tracking SDK (SRanipal) API (default: OFF).
    • Tools
      • HG_BUILD_ASSETC : Build AssetC asset compiler (default: ON).
      • HG_BUILD_ASSIMP_CONVERTER : Build Assimp based 3D model converter (default: ON).
      • HG_BUILD_FBX_CONVERTER : Build FBX converter (default: ON).
      • HG_BUILD_GLTF_IMPORTER : Build GLTF importer (default: ON).
      • HG_BUILD_GLTF_EXPORTER : Build GLTF exporter (default: ON).
    • Bindings
      • HG_BUILD_HG_LUA : Build Harfang LUA module (default: OFF).
      • HG_BUILD_HG_PYTHON : Build Harfang Python module (wheel) (default: OFF).
      • HG_BUILD_HG_GO : Build Harfang GO module (default: OFF).


  7. Build the SDK.

    cmake --build . --config Release --target INSTALL

    Note: On Linux you will need to explicitly specify the build type with -DCMAKE_BUILD_TYPE=Release

    Depending on the set of option passed to CMake the install directory will contain the following subdirectories:

    • cppsdk : Harfang C++ SDK.
    • hg_python : Harfang Python module.
    • hg_lua : Harfang LUA module.
    • hg_go : Harfang Go module.
    • assetc : Asset compiler.
    • assimp_converter : Assimp 3D model converter.
    • fbx_converter : FBX converter.
    • gltf_importer : GLTF importer.
    • gltf_exporter : GLTF exporter.

Notes on Visual Studio Code

  1. Install the CMakeTools extension.

  2. Copy the harfang/.vscode/template_settings.json file to harfang/.vscode/settings.json and edit it to reflect your local installation.

  3. Open the harfang folder in Visual Studio Code. CMakeTools should succesfully configure the project.

Use the SDK

The Harfang C++ SDK directory cppsdk contains the following:

  • bin : depending on the configuration used, this directory contains either a Release or Debug subdirectory with all the shared libraries.
  • lib : like the bin directory, it contains a subdirectories named after the configuration used during build (Release or Debug) with all the generated static libraries.
  • include : contains all the C++ include files of Harfang public API.
  • cmake : contains the CMake configuration files.

To add the Harfang C++ SDK to your CMake project, just add the following to the CMakeLists.txt file:

find_package(harfang REQUIRED
    COMPONENTS cppsdk

with HG_CPPSDK_PATH the path to the cppsdk directory. For example, if we follow the directory layout given above, it will be D:/harfang/build/install/cppsdk.

Targets should link against the following libraries.

  • hg::engine
  • hg::foundation
  • hg::platform
  • hg::libluadll

The install_cppsdk_dependencies function installs the Harfang C++ SDK shared libraries dependencies.

install_cppsdk_dependencies(destination component)
  • destination : is the library where the shared libraries will be installed.
  • component : installation component name.


Harfang follows the Semantic Versioning Specification (SemVer) (http://semver.org).

Given a version number MAJOR.MINOR.PATCH, increment the:

  • MAJOR version when you make incompatible API changes,
  • MINOR version when you add functionality in a backwards-compatible manner, and
  • PATCH version when you make backwards-compatible bug fixes.


Harfang is licensed under the GPLv3, LGPLv3 and a commercial license:

  • 3.2.2 Release.

    3.2.2 Release.

    This minor release brings several fixes, a better implementation of the AAA rendering pipeline including probe reprojection and a more stable screen space raytracer.
    Improvements were made in the usability area, for Python development, as HARFANG will now output warnings as much as possible when users are calling for invalid API operations.
    The Python build script was worked out to make the wheel available on Pypi for Linux OSes.

    Framework integration and source code maintenance

    • Improved the Python source package creation, to allow a pip install from the source package and address this issue.
      • The following development packages are necessary to rebuild Harfang:
        • ubuntu: uuid-dev, libreadline-dev, libxml2-dev, libgtk-3-dev
        • centos/fedora: uuid-devel, readline-devel, libxml2-devel, gtk3-devel
      • See languages/hg_python/pip/setup.py.
    • Allowed the tools to be called from a Python script.
    • Allowed the tools to be called from a Lua script.
    • External libraries update.
    • Moved mikktspace and stb_image to extern.
    • Fixed the License URL, removed a useless URL indirection.
    • Removed the external libraries samples and tests from source package.
    • Removed AssetsSource from assets.h.


    • Fixed Assetc to prevent it from processing invalid geometries.
    • GLTF importer:
      • Better management of geometry instances
      • Improved material translation.
    • Sanitized the filenames when outputting files from the FBX and GLTF converters.
    • FBX converter now exports materials as PBR by default.
    • Assimp converter now exports materials as PBR by default.
    • GLTF exporter:
      • Added a filter_disabled_node options to avoid exporting node.
      • Fixed several bugs.


    • :warning: Multiplication and maths API fixes:
      • Removed vec * mat multiplications.
      • Swapped row/column in the API to match the correct mathematical order.
      • Removed mixed Vec4/Vec3 operations as the result was ambiguous.
    • Added a binding for Vec3 on CubicInterpolate.
    • :beginner: Introduced a defensive programming approach in HARFANG Python, assuming the programmer is learning the API by trial and error:
      • This is done using the debug log method so it can be completely deactivated when working on C++ projects.
      • Demote most errors to warning. Errors are now strictly reserved for conditions from which a program written using HG cannot recover by itself/is not aware of.
    • Fixed the AddQuad method in the model builder. Added an helper method to quickly build common vertex configurations, see MakeVertex.
    • Animations support:
      • Code cleanup to support the animation editor cleanup.
      • Remove duplicate keys from animation track when calling SortAnimTrackKeys.
      • Added a function to quantize scene animation.
      • Additional scene animation APIs.
      • Added the support of camera fov animations.
    • Text input callback is now a signal, see TextInputSignal.
    • Added a size field to ListDir output.


    • Added a sharpen post-process.
    • Added functions for orthographic projection to clip and screen space. See ProjectOrthoToClipSpace, ProjectOrthoToScreenSpace.
    • Added functions for orthographic unprojection. See UnprojectOrthoFromClipSpace, UnprojectOrthoFromScreenSpace.
    • Implemented a light probe reprojection in the Forward and AAA pipelines.
    • Fixed the orientation of the cubemap in the probe generation.


    • Load/save scene collision components.
    • Added a missing cone collision component creation.
    • Setup physics for instantiated nodes.
    • Fixed a bug with local transformation for single collision shape nodes.


    • Documented the coordinates system.
    • Doxygen documentation update
    opened by harfang3dadmin 0
  • 3.2.1 release.

    3.2.1 release.

    This minor release brings both code and submodules maintenance, several fixes in the toolchain, in the scenegraph and physics interchange and in the rendering pipeline.

    Source code maintenance

    • Updated GLFW (3.3.6).
    • Updated BGFX to the latest version.
    • Updated OpenAL (v.1.6.10b).
    • Updated OpenVR (v1.16.8).
    • Fixed the debug build with Visual Studio Build Tools 2022.
    • Fixed the installation of PDB files.
    • CMake misc. fixes and updates.


    • FBX Importer: changed the unit of command line argument max smoothing angle to degrees and fixed the internal vertex/tangent computation.
    • GLTF Importer: improved the way non-Windows-compliant filenames are handled.


    • Fixed an issue in the Wavefront OBJ export that flipped the model on the X axis.
    • Improve the error message issued by OpenAssets in case of missing file.
    • Fixed a crash when parsing a corrupted .HPS file.
    • Added hg::Picture::SaveBC7 and hg::Picture::SaveBC6H functions.
    • Switched to a time limit based resource queue processing
    • Return the size on disk of a folder
    • Implemented a ComputeNodeWorldMatrix to compute a node world matrix on the fly (ComputeWorld, GetWorld, SetWorld). :warning: This function is slow but useful when scene matrices are not yet up-to-date
    • Improved the way unicode paths are handled on Windows
    • Preliminary support for scene properties animation (AmbientColor, FogNear, FogFar, FogColor) while preserving the legacy file format.
    • Add an LSSF_Silent scene flag, add many boolean flags to silence errors in the rendering IO.
    • Allow 32 bit indices in geometries (In the future we might introduce a force 16 bit indice flag if required).
    • Validate index and vertex buffer handles when creating geometries.
    • Flag instantiated nodes as NF_InstanceDisabled if the host node is disabled.
    • Added file filter descriptions to the file selector dialogs (OpenFileDialog, SaveFileDialog).


    • Added a depth only pass to render shadow maps (DEPTH_ONLY=1).
    • Set a higher probe resolution by default (from 64 to 512, using the --glossScale 20 --glossBias 0 parameters sent to CMFT).
    • Load/save AAA config (LoadForwardPipelineAAAConfigFromFile, LoadForwardPipelineAAAConfigFromAssets, SaveForwardPipelineAAAConfigToFile)
    • Tweaked the default light values (default_shadow_bias set to 0.0001, pssm_split of a the linear light set to 200m).
    • Switched the jitter sequence to Halton (2,3).
    • Added a function to retrieve the size of the OpenVR framebuffers
    • Added a RGBA32 pixel format to improve the performance when playing a video stream.


    • Fixed an issue in synchronizing state from scene to kinematic body


    • Added an explanation of why using integer representation for time is important.
    • Documented the profiler API.
    • Added a HARFANG logo in the Doxygen documentation
    opened by harfang3dadmin 0
  • 3.2.0 release.

    3.2.0 release.

    This minor release brings several fixes, performance improvements and new features to the rendering, physics and audio APIs.

    Source code maintenance

    • Cleanup sources, remove spurious hg namespace specifiers and run clang format on affected sources.
    • Updated the GLFW CMake to improve the resolution of the library path on Linux.
    • Updated ImGui to v1.87.


    • Implement model load queuing (see ProcessModelLoadQueue, ProcessLoadQueues, LSSF_QueueTextureLoads, LSSF_QueueModelLoad).
    • Support replay and streaming of OGG files (see LoadOGGSoundFile, LoadOGGSoundAsset, StreamOGGFileStereo, StreamOGGAssetStereo, StreamOGGFileSpatialized, StreamOGGAssetSpatialized).
    • Added a Mat4 copy constructor.
    • Added missing declarations for LoadImage* functions.
    • Added a flag to prevent changing the current camera when loading a scene, if the current camera points to a valid node (see LSSF_DoNotChangeCurrentCameraIfValid).
    • Added an is_file field to the structure returned by GetFileInfo.
    • Simplify scene binary loader, removed versioning code:
      • Removed unused members from the RigidBody_ struct.
      • Reduced memory footprint of RigidBody_ to 6 bytes.
    • Performance improvements on multiple scene loading (through instances).
    • Added a profiling API (see BeginProfilerSection, EndProfilerSection, EndProfilerFrame, CaptureProfilerFrame, PrintProfilerFrame).
    • Added a Videostream plugin interface (see MakeVideoStreamer).
    • Fixed scene animation garbage collection.
    • Fixed a bug with Unicode support in assetc.
    • Fixed an issue with trailing slashes on Linux in the assetc command line.


    • Fixed an issue in the viewport computation when upscaling half buffers in the AAA rendering pipeline.
    • Added a z_thickness param to the AAA rendering pipeline.
    • Added a series of cubemap render functions.
    • Implemented and documented all supported pipeline program features.


    • New functions to lock translations and rotations in a more consistent way with the Bullet API:
      • NodeSetLinearLockAxes, NodeSetAngularLockAxes replaced by NodeSetLinearFactor, NodeSetAngularFactor.
      • NodeGetLinearLockAxes, NodeGetAngularLockAxes replaced by NodeGetLinearFactor, NodeGetAngularFactor.
    • Added AddTorque/AddTorqueImpulse to physics API:
      • NodeAddTorque, NodeAddTorqueImpulse
    • Simplified the physics collision/contact query code, unified collision query API for NodeCollideWorld and StepSimulation (see CollectCollisionEvents).
    • Implemented NodeTeleport in Bullet physics.
    • Improved the transform synchronization logic, set node world transform using the fast scene path (see SyncTransformsFromScene, SyncTransformsToScene).
    • Added proper motion interpolation in Bullet physics synchronize to scene.
    • Added missing functions to create all supported collision shape types.


    • Added a missing reference to the requirements page in the main index.
    • Improved the LoadSceneXXX functions documentation.
    • Fixed both Lua and Python code snippets.
    • Improved the clarity of functions using bitflags by adding support for constants group in the documentation generator.
    • Update of ownership and views manual pages.
    opened by harfang3dadmin 0
  • 3.1.1 release.

    3.1.1 release.

    This minor release brings several fixes, mainly in the Bullet Physics API.


    • Added a missing texture render target flag (TF_RenderTarget).
    • Added SetSourceStreamTimecode() to the audio API.


    • Updated the Physics unit tests.
    • Fixed an issue in the Kinematic physics matrix.
    • SetRigidBodyAngularDamping() now takes a float instead of a Vec3.


    • Fixed several typos in the documentation.
    opened by harfang3dadmin 0
  • 3.1.0 release.

    3.1.0 release.

    This minor release brings several improvements and fixes, mainly in the Bullet Physics API.


    • Added new HLS colorspace functions.
    • Improved CreateInstanceFromFile/CreateInstanceFromAssets by returning a boolean to inform the caller that the hosted scene could be instantiated.
    • Fixed various bindings (CreateInstanceFromFile, CreateInstanceFromAssets, GetColorTexture, GetDepthTexture, GetTextures)
    • Added a function to center a window (GLFW).
    • Added the support for Windows refresh callback (GLFW).
    • Bind read back and blit destination texture flags.
    • Simplify the frame buffer API store less content in Harfang objects.
    • Added fog to render data.
    • Validate AAA forward pipeline and associated post processes.
    • Fixed an issue where setting up the imgui font destroyed the cursors.
    • Added time_from_xxx_d functions and fixed a precision issue with time_from_string


    • Fixed the initial transform setup code of Bullet rigid bodies.
    • Changed the sync kinematic and dynamic mechanisme.
    • Added ResetWorld, DisableDeactivation, add a way to lock axes.
    • Added a getter/setter for rolling friction.
    • Added a raycast functions to return all collisions found between two points.
    • Fixed a raycast issue with geometry hierarchy.
    • Added the support for multi collision shapes with matrices


    • Assetc cleanup error messages, do not output unless truly reporting on an error.
    • Assetc will now delete the outputs for deleted inputs. A flag was added to opt-out from this mechanism (-no_clean_removed_inputs).
    • Assetc will now delete the previous compiled lua scripts if a compilation error arises.
    • Assimp importer: fixed a mention to the wrong converter.
    • Assimp importer: added a -merge-mesh option.
    • Assimp importer: updated to Assimp v5.1.2.
    • GLTF importer: fixed the import in case of many instances.
    • Fixed the toolchain integrity check.


    • Documentation improvements and cleanup.
    • Fixed a typo in GetTextures documentation filename.
    • Fixed the reference to SceneBullet3Physics in the man Physics page.
    • Added a man.Requirements page.
    • Improved the Pypi wheel description ('Quickstart' was lacking a download URL).


    • Updated the license.
    • Fixed some cppcheck issues.
    opened by harfang3dadmin 0
  • Why aren't Linux wheels on pypi?

    Why aren't Linux wheels on pypi?

    Spotted that on pypi there's no linux wheels: https://pypi.org/simple/harfang/ But looks like they exist: https://www.harfang3d.com/releases/3.1.1/

    Why not uploading them?

    opened by JulienPalard 2
HARFANG® is a high-end platform for 2D and 3D application development
Matplot++: A C++ Graphics Library for Data Visualization 📊🗾

Matplot++ A C++ Graphics Library for Data Visualization Data visualization can help programmers and scientists identify trends in their data and effic

Alan de Freitas 2.7k Jun 27, 2022
C++14 network/graph visualization library / Qt node editor.

QuickQanava QuickQanava is a C++14 library designed to display graphs and relational content in a Qt/QML application. QuickQanava provide QML componen

null 787 Jun 22, 2022
Lightweight and modular C++11 graphics middleware for games and data visualization

Magnum — Lightweight and modular C++11/C++14 graphics middleware for games and data visualization Looking for an open-source library that gives you gr

Vladimír Vondruš 4.1k Jul 3, 2022
Powerful, easy to use, and portable visualization toolkit for mixed 3D and 2D content

Powerful, easy to use, and portable visualization toolkit for mixed 3D and 2D content

Microsoft 102 Jun 24, 2022
Alpha Plot is a free application for Scientific Data Analysis and Visualization for Windows, Linux and Mac OS X

Alpha Plot is a free application for Scientific Data Analysis and Visualization for Windows, Linux and Mac OS X (probably BSD also). Web Link Website

Arun Narayanankutty 150 Jun 14, 2022
RGL - 3D visualization device system for R using OpenGL

RGL - 3D visualization device system for R using OpenGL INTRODUCTION The RGL package is a visualization device system for R, using OpenGL or WebGL as

null 58 Jun 20, 2022
Binary visualization tool primarily aimed at videogame reverse engineering & research.

binviz Binary visualization tool. Allows you to load a binary and pan/zoom around its content. Each byte (or 4 bytes in 4-byte mode) is represented by

Nick Renieris 28 Apr 25, 2022
Vis: Asynchronous 3D Visualization Tool

English | 简体中文 Vis: Asynchronous 3D Visualization Tool Vis 是一款交互式异步3D可视化工具,旨在让3D视觉和机器人应用开发更简单。 其核心功能包括: 图形绘制 3D模型文件导入 多种交互工具 Gzimo 安装 Linux # 安装必要的依

RVBUST 109 May 17, 2022
Mandelbrot set visualization in OpenGL

Mandelbort-Set done in OpenGL Steps to build and run ( program tested only on Linux-Ubuntu 18.04,20.04 ) install the necessary packages- glut,glfw,glm

Paleti Krishnasai 2 Feb 13, 2022
The official Open-Asset-Importer-Library Repository. Loads 40+ 3D-file-formats into one unified and clean data structure.

Open Asset Import Library (assimp) A library to import and export various 3d-model-formats including scene-post-processing to generate missing render

Open Asset Import Library 7.9k Jun 24, 2022
Implementation of Peter Shirley's Ray Tracing In One Weekend book using Vulkan and NVIDIA's RTX extension.

Ray Tracing In Vulkan My implementation of Peter Shirley's Ray Tracing in One Weekend books using Vulkan and NVIDIA's RTX extension (formerly VK_NV_ra

Tanguy Fautre 764 Jun 25, 2022
Canny edge detection, one of the efficient edge detection algorithms is implemented on a Zedboard FPGA using verilog

In this project, Canny edge detection, one of the efficient edge detection algorithms is implemented on a Zedboard FPGA using verilog. The input image is stored on a PC and fed to the FPGA. The output processed image is displayed on a VGA monitor.

Jeffrey Samuel 2 May 9, 2022
My implementations of Ray Tracing in One Weekend written in many different languages.

Ray Tracing in Many Languages This repository contains my implementation of the Ray Tracing in One Weekend book written in several different programmi

Joshua Vega 1 Oct 19, 2021
2D lowpoly editor heavily based on this one

polyedit 2D lowpoly editor heavily based on this one Download Direct link Releases page Libraries This project uses: SFML Tiny File Dialogs jsoncpp im

null 19 Aug 7, 2021
C++ (with python bindings) library for easily reading/writing/manipulating common animation particle formats such as PDB, BGEO, PTC. See the discussion group @ http://groups.google.com/group/partio-discuss

Partio - A library for particle IO and manipulation This is the initial source code release of partio a tool we used for particle reading/writing. It

Walt Disney Animation Studios 401 Jun 22, 2022
Polyscope is a C++/Python viewer and user interface for 3D data such as meshes and point clouds

Polyscope is a C++/Python viewer and user interface for 3D data such as meshes and point clouds. It allows you to register your data and quickly generate informative and beautiful visualizations, either programmatically or via a dynamic GUI.

Nicholas Sharp 1.1k Jun 29, 2022
A minimal Direct3D 12 example that draws an animated triangle, written entirely in C-style C++, and all taking place inside a single function.

A minimal Direct3D 12 example that draws an animated triangle, written entirely in C-style C++, and all taking place inside a single function.

Taoufik Rida Bouftass 7 May 3, 2022
Simple console tool to get all the information from DXGI and Direct3D 12 on current system

D3d12info Simple console tool to get all the information from DXGI and Direct3D 12 (D3D12) on current system. Built and tested on Windows 10 64-bit us

Adam Sawicki 23 Jun 27, 2022
Python binding for Grasp Pose Generator (pyGPG)

Python binding for Grasp Pose Generator (pyGPG) Grasp Pose Generator is a cpp package that creat grasp candidates for 3D point clouds. This package bi

Hongzhuo Liang 9 Jun 22, 2022