Difference between revisions of "Scripting Node"
(Created page with "The scripting node allows to perform operations on the data using a javascript-like syntax. This node can be added to any other node, for example a Volume Node (i.e. to produ...") |
|||
Line 5: | Line 5: | ||
A Volume Node for a vector field will visualize a volume rendering as following: | A Volume Node for a vector field will visualize a volume rendering as following: | ||
+ | [[File:flame_vfield.png|350px]] | ||
Since the data has 3 components the default visualization uses the 3 components as RGB channels. | Since the data has 3 components the default visualization uses the 3 components as RGB channels. |
Revision as of 22:49, 31 July 2017
The scripting node allows to perform operations on the data using a javascript-like syntax.
This node can be added to any other node, for example a Volume Node (i.e. to produce a volume rendering of the data).
A Volume Node for a vector field will visualize a volume rendering as following:
Since the data has 3 components the default visualization uses the 3 components as RGB channels.
If we want to evaluate and visualize the squared magnitude of this (three-dimensional) vector field the user can simply insert a scripting node with the following script:
output= ((1.0*input[0])*input[0]) + ((1.0*input[1])*input[1]) + ((1.0*input[2])*input[2]);
Where the input
field represent the input data that enter the scripting node, the output represents the result of the computation.
The output will be a scalar field that will be rendered as following: