-
Notifications
You must be signed in to change notification settings - Fork 5
Application Concepts
Eidolon is organized around various conceptual objects, much like how it's object-oriented code is defined. The key concept is that all operations involve creating or manipulating objects. Loading data creates an object storing that data, creating a representation of that data creates another object containing the information needed to create a rendering. Other objects exist which represent materials defining lighting and other appearance properties, GPU programs used by material objects, cameras and other objects in a scene, data structures, and mathematical concepts.
The general workflow for loading then visualizing a piece of data is as follows:
- Load a Scene Object using a plugin
- Generate a Scene Object Representation from the Scene Object
- Set visual parameters of the representation by applying a Material
- Manipulating the Scene by moving the Camera around to render the objects
- Scene -- The notional 3-dimensional space where objects are rendered. A 3D visualization is created by setting up the properties of a scene, adding objects (also called figures or actors) to the scene with their own configuration properties, and then invoking a rendering operation to turn these objects into visual images.
The scene is represented as the rendering window in Eidolon, which comprises most of the main window. The Config tab lists information and properties about the scene, most importantly the location of the main camera.
- Camera -- When a scene is rendered this must be done in terms of a notional eye position and orientation, which is represented with the idea of a camera. These can be moved around the scene by setting their position and orientation, much like a real-world camera would move around a scene. Cameras actually are purely mathematical and represent transformations applied to all objects in the scene before rendering.
There is always at least one camera in the scene, the main camera being used to render to the rendering window, so it is this one that you "see" the scene through. The camera is moved through the user interface by mouse actions applied to the rendering window, such as dragging to rotate. (See [wiki:Docs/Interface User Interface])
- Scene Object -- A scene object represents the loaded data set for a mesh, image series, or other discrete collection of information which can be represented visually. A node file or data file is not a scene object, but a set of nodes and a topology with a basis definition is since these are sufficient for producing a visual representation. A scene object doesn't itself have a visual representation, one has to be explicitly created for it.
When a scene object is loaded is appears in the Objects tree in the Scene tab. It is represented by this tree entry and its properties dialog which appears when clicked. All interaction with a scene object is done through this dialog, including creating representations.
- Scene Object Representation -- An object derived from a scene object which represents a visual form of the scene object's data. This is a distinct object and there can be many of them for one scene object. Each representation has its own notion of how to represent the scene object in whole or in part. Representations also have notions of dimension, location, and transformation in 3D space, therefore they are one type of 3D object the graphics engine uses to render. An example is a set of triangles which represents the external volume of a mesh.
These are represented in the user interface as children of their scene objects in the Objects tree and by their properties dialog when clicked. All interaction with a scene object is done through this dialog, including apply materials and reordering the mesh (if present).
-
Assets -- Materials, GPU programs, textures, and others are classes of assets, which are any resource contributing to the scene other than actual scene objects and representations. There will be others to be added later, and plugins can define their own categories of assets as well. These will always appear in the Assets tab.
-
Material -- A material represents the visual properties which can be applied to a representation or otherwise control how it appears. This includes colour for the various types of light that exist (diffuse, specular, etc), a spectrum of colours that can be used to visually represent a data field or image, point size, control of how rendering operations are performed, lighting, texture, etc. Materials are applied to representations to change their colour and rendering properties, and if a field is selected are used to calculate values at discrete points to produce a interpolated colour field using the spectrum as the colour guide.
Materials are listed in the Objects tree of the Assets tab. Clicking on an item brings up the properties dialog which provides all the controls for configuring a material. Some changes are applied immediately to an representation that uses a material, others require you to click Apply which invokes a computation operation.
- GPU Programs -- Materials can also be associated with a GPU program used to manipulate how a representation is rendered. Usually these are pixel shaders used to implement special effects on a per-pixel basis, specifically for rendering images they are used to implement the colour transfer function defined by the material's colour spectrum.
GPU Programs are listed in the Objects tree of the Assets tab. The property dialog allows the user to edit the program code and compile new versions, as well as set properties that should only be changed with great care.
- Texture -- a 2D surface of colours derived from an image file or calculated from values. These can be applied to objects to colourize them based on the texture information, for example applying a texture derived from imaging data to a plane to represent that slice of information in space.
Textures are listed in the Objects tree of the Assets tab. They don't have a properties dialog yet, that's on the TODO list.
- Projects -- An optional component often used by plugins are projects. A project is created through the ''File -> new Project'' menu where the user selects a project type, a name, and a root directory. A project is given its own directory into which data can be loaded, a config file containing custom information as well as basic parameters, and a script file which contains the code for reloading the project in the future. The purpose of projects is to have a compartmentalized mechanism for loading, organizing, and manipulating data which plugins can use. A plugin may, for example, have the user import data which it then stores into its project directory without having to worry about overwriting existing user data. Plugins will also generate the necessary code into the project script to reload the data in the future.