Code Monkey home page Code Monkey logo

blender-ensight-reader's Introduction

EnSight Gold reader for Blender

This add-on lets you import geometry and scalar/vector variable data from EnSight Gold case into Blender, for scientific or engineering visualization.

Features

  • It's minimal - works with Blender 3.1+ (no extra dependencies or special builds needed)
  • It's fast - import only parts/variables you need
  • It's native - parts are loaded as objects, variables are loaded as float vertex attributes (for use with shaders or geometry nodes)

EnSight Gold case loaded in Blender 3.1

Above: example case exported from Paraview 5.10 in EnSight Gold format and imported into Blender 3.1.

Installation

  1. Download the plug-in ZIP from GitHub releases page
  2. In Blender, go to menu Edit > Preferences > Add-ons > Install and point it to the ZIP file you downloaded (eg. blender-ensight-reader-1.1.0.zip)
  3. Enable the add-on by clicking the checkbox next to it.

Usage

You can load EnSight Gold case from the menu File > Import > EnSight Gold (*.case). The dialog has several options to specify the data you want to load:

Time step [integer]
Index of time step to load (0, 1, 2, ...); for non-transient cases, leave this at 0. Note that this is not a time value in seconds.
Variables to load [comma-delimited list of names]
Here you can select which variables should be loaded - separate them with commas, without spaces (eg. p,U). To load all variables, use *. If you don't want to load any variables, leave the field empty.
Parts to include [regular expression]
Only parts containing given expression will be loaded - you can use Python regular expressions. To load all parts, leave the field empty. Note that parts containing only 3D elements will not be loaded in any case, as the add-on creates regular Blender meshes which can only contain surface elements.
Parts to exclude [regular expression]
Parts containing given expression will not be loaded - this option takes precedence over "Parts to include". To load all parts, leave the field empty.

After the import is finished, the plugin also creates a material called EnSightMaterial which you can use as a starting point for your visualization:

  • select which attribute you want to color the part with (for vectors, you can use magnitude or X/Y/Z component)
  • define range of your palette
  • use default blue-to-red rainbow palette or make your own

EnSightMaterial shader for coloring the geometry

The material includes node setup for generating screen-space vectors which can be exported as OpenEXR layers and then used to add Line Integral Convolution (LIC) as a compositing effect in Natron or DaVinci Resolve using openfx-lic.

Shader setup for outputting screen-space vectors for LIC

Current limitations

  • only "scalar per node" and "vector per node" variables are supported
  • only "C Binary" EnSight Gold files with unstructured grids are supported
  • only 2D elements and 1D bar2 elements are supported (Blender has no concept of unstructured 3D cells; point clouds can be imported from parts with no elements or with 0D point elements)
  • there is no concept of time beyond importing data for a particular time step (once the objects are created, you cannot animate the variable data or geometry based on other time steps in the original case)
  • for more technical details, see documentation of ensight-reader, the library used by this add-on

Other visualization add-ons for Blender

  • BVTKNodes is a complex add-on bringing data pipelines from the VTK library into Blender, giving it many capabilities of Paraview. It can read EnSight Gold cases through the VTK library (selective reading of parts is not supported as of VTK 9.0).
  • COVISE nodes for Blender is another complex add-on for scientific visualization, based on COVISE library rather than VTK.
  • io_mesh_vtk is a simple add-on for reading and writing the VTK legacy text format (only polydata).
  • BlenderDataVis is an add-on for creating animated charts in Blender.

blender-ensight-reader's People

Contributors

tkarabela avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

blender-ensight-reader's Issues

Handle time-dependent datasets

As of 1.0.0 the library only allows you to pick which timestep to load from the .case, and from then on it's steady-state with access the other timesteps from within Blender.

Fix error when no parts are imported

In 1.0.0 and Blender 3.3:

Not reading part VTK Part (no surface elements)

Adding 0 objects to scene

Python: Traceback (most recent call last):
  File "blender_ensightreader\importer.py", line 140, in execute
    context.view_layer.objects.active = created_objects[0]
IndexError: list index out of range

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.