-
Notifications
You must be signed in to change notification settings - Fork 5
Tutorial 2
This tutorial will walk you through loading a 1D mesh, generating a cylinder representation for it, and other effects. This all assumes you've done the first tutorial and are familiar with how to start Eidolon and do a few of the basic things.
-
Choose Import -> CHeart Object and select the files 1d_FE.X and 1d_FE.T from the tutorial/MeshData directory, with Line as the geometry and order 2. This states that we are loading a series of quadratic lines from the files.
-
Click on the scene object that was loaded, and choose Import -> CHeart Field. Click Add Field Files... and select the file 1d_rad_avg_FE.D from the same directory as the mesh. This field is used as the per-node radius values for the lines loaded in the data set, so leave the Data Dimensions value at 1 since there's only one value per node.
-
The first representation we'll create is a cylinder representation of the lines. This involves creating cylinder meshes for each line, defining their radii using the loaded data field. In the Create Representation section of the object's property dialog, choose Cylinders as the type, 30 as the refinement value, 1d_rad_avg_FE.D as the data field, and 5 as the radial refinement (Rad Refine) value, then click Create.
-
Once the task completes, click See All. You should see something like this:
-
To make the cylinders semi-transparent, we will need to clone the default material and set the alpha value of the new material to something less than 1.0 (0.0 being totally transparent and 1.0 being opaque). Click the Asset tab and then on the default material in the list. Click the Clone button and set the material name to whatever you like. Click on that material and set the Transparency value to 0.5.
-
Go back to the Scene tab and click on the cylinders representation. In the Material section set the material name to whatever your new material was called and click Apply. Your cylinders will become darker but also transparent.
-
It looks nice to also draw 1-pixel wide lines for the vessels as well, this helps define the cylinders and shows where the center line is. Create another clone of the default material and set its absolute point size to 3, uncheck Use Lighting and Depth Check, and set its diffuse colour to some pretty shade of red. Return to the scene object's dialog and create a new representation with Line as the type, a value of 30 for refinement, and None for the data field. When that new representation appears, click on it to bring up its dialog and set its material to your new one and click Apply again.
-
You can also create a representation that shows only the element nodes by selecting Element Nodes as the representation type. Setting your new red texture to this representation will create 3-pixel wide red points for each element node of each line.
-
If you've been too lazy to do all this, the script tutorial2.py performs the same operations. You can load it by invoking ./run.sh tutorial/tutorial2.py from Eidolon's root directory.