Navigation

Ventuz 6 Quick Guide

  • Introduction
  • Getting Started
  • Ventuz Editions
  • Designer Overview
  • Ventuz System Requirements
  • Configuration
  • Video/Audio Configuration
  • Machine Configuration
  • GPI Configuration for Runtime or Director
  • Optimize Rendering Performance
  • Supported Formats
  • Supported Hardware
  • Multisampling / Anti-Aliasing
  • Input Subsystem
  • Ventuz Proprietary Files
  • What's new
  • FAQ
  • Common Mistakes
  • Deployment
  • Migration Guide
  • Ventuz 5 Migration Guide
  • Summary Shortcuts

Ventuz 6 Designer

  • Index
  • Getting Started
  • Designer Options
  • Designer Overview
Projects & Scenes
  • Projects and Scenes
  • Project Browser
  • Project Properties
  • Project Maintenance
  • Project and Scene Data
  • Scene Tree
  • Scene Management
  • Scene Statistics
  • Deployment
Interface
  • Designer Interface
  • Renderer Window
  • Realtime Rendering
  • Optimize Scene Performance
  • Performance Statistics
  • Transformation Gizmo
  • Render to Disk
  • Camera Navigation
  • Isolated Objects
  • Manipulate Objects with Gizmos
  • Layer Editor
  • Common Layer Properties
  • IPP Effects
  • Color Correction FX
  • Distortion FX
  • Filter FX
  • Layer Editor Shortcuts
  • Hierarchy Editor
  • Working with Nodes
  • Containers
  • Find and Replace
  • Shortcuts Hierarchy Editor
  • Content Editor
  • Working with Nodes
  • Containers
  • Content Editor Shortcuts
  • Toolbox
  • Property Editor
  • Project Data and Scene Data
  • Property Groups
  • Shader Editor
  • Text Editor
  • Scene Tree
  • Message View
  • Stage Editor
  • Container Outline
  • Watches Editor
  • Animation Editor
  • Animation and State Engine
  • Templates
  • Template Engine
  • Shortcuts Animation Editor
  • Text Rendering
  • Text Editor
  • Character Sets
  • Geometry Import
  • Input Subsystem
  • Multitouch
  • TUIO Protocol
  • Open Sound Control
  • How to work with Head Mounted Displays
  • Cluster
  • Multi Display Setups and Shaping
  • Warping, Soft Edging and Masking
  • Available Nodes
  • Animation Nodes
  • Material&Color Nodes
  • Data Nodes
  • Geometry Nodes
  • Interaction Nodes
  • IO Nodes
  • Layers
  • Light Nodes
  • Logic Nodes
  • Render Option Nodes
  • Slides Nodes
  • Sound Nodes
  • Text Nodes
  • Texture Nodes
  • VR Nodes
  • World Nodes

Ventuz 6 Node Reference

ANIMATION
  • Mover
  • Alternator
  • Simple Control
  • Timeline Control
  • Anmation Rig
  • Keyframe Animation
  • Animation Group
COLOR/MATERIAL
  • Alpha
  • Fog
  • Ground Fog
  • Sky Box
  • Color to RGBA
  • HSLA to Color
  • RGBA to Color
  • Color Transformer
  • HLSL Shader
  • Color
  • Material
  • Color Picker
  • Substance Material
DATA
  • Database
  • Excel
  • JSON
  • RSS Feed
  • Resource Linker
  • Text File
  • XML
GEOMETRY
  • Rectangle
  • Rounded Rectangle
  • Gradient Rectangle
  • Overlay Rectangle
  • Cube
  • Circle
  • Sphere
  • Cylinder
  • Cone
  • Torus
  • Chart
  • Random Points
  • Mesh Loader
  • Geometry Import (Live)
  • Volume
  • Get Bounding Box
  • Arrow
  • Particle System
  • Path Renderer
  • Geometry Renderer
INTERACTION
  • Interaction Rect
  • Touch Button
  • Touch Excluder
  • Touch Marker
  • Touch Paint
  • Touch Pattern
  • Touch Proxy
  • Touch Ripples
  • Touch Transformations
  • Web Browser
  • Touch Teleport
  • Touch Simulator
INPUT/OUTPUT (I/O)
  • GPI
  • Joystick
  • Keyboard
  • MIDI
  • Mouse
  • Network
  • Open Sound Control
  • Serial
  • Timecode
  • DMX
LAYER
  • 3D Layers
  • 3D Layer Reference
  • 2D Layers
  • PSD Import Layer
  • Others
LIGHT
  • Light Sources
LOGIC
  • Array Processing
  • Convert To Text
  • Cluster Synchronization
  • Counter
  • Date Time
  • Directory
  • Dispatcher
  • Enumeration
  • Expressions
  • Invert
  • Log
  • Loop Breaker
  • Math Effects
  • Matrix Operations
  • Scene Event
  • Script
  • String Operations
  • System ID
  • Text Splitter
  • Timer
  • Toggle
  • URL
  • Value Switch
  • Value Buffer
  • Variables
  • Visual Indexer
RENDER OPTIONS
  • Alpha Blending
  • Color Write
  • Alpha Testing
  • Clip Plane
  • Filter
  • Mask
  • Mirror
  • Effect
  • Render Cube Map
  • Draw Modes
  • Stencil
  • ZTesting
SOUND
  • Audio Clip
  • Sound
  • Volume Control
  • Audio Analysis
SLIDES
  • Slide Manager
  • Slide
  • Slide Port
  • Pivot
TEXT
  • Text Effects
  • Text Layouts
  • Text Rendering
TEXTURE
  • Background
  • Hatch
  • Image
  • Texture
  • SVG Loader
  • Gradient Texture
  • Live Video
  • Movie Stream
  • Movie Frame
  • Movie Clip
  • Texture Loader
  • Snapshot
  • Snapshot Framebuffer
  • Texture Saver
  • Video Source Selector
  • VIO Input
  • Spout Receiver
  • NDI Receiver
  • Substance Loader
VR/AR
  • Tracked Devices
  • Draw Tracked Devices
WORLD
  • Axis
  • Billboard
  • GetWorld
  • SetWorld
  • Arrange
  • Ticker
  • Layout
  • Group
  • World Z Sort
  • YesNo
  • Switch
  • Spread
  • Filter Pass
  • Set Pass
  • Hierarchy Container
  • Scene Port
  • Content Container
  • Template Port
  • Container Info
  • Camera
  • Paths

Ventuz 6 Configuration Editor

  • Configuration
  • Machine Configuration
  • Video/Audio Configuration
  • Web Configuration Editor and License Manager
  • Render Setup Editor
  • Warping and Soft-Edging Editor
  • Supported Hardware
  • How to Setup a Cluster Render

Ventuz 6 Director

  • Application Settings
  • Assets
  • Channels
  • Command Line Options
  • Content References
  • Designing Templates
  • Environment
  • Glossary
  • Index
  • Introduction
  • Pages
  • Playlist
  • Plug-Ins
  • Project Data
  • Property Editor
  • Shortcuts
  • GPI Configuration
  • Shot Box
  • Show
  • Taking Action
  • Timeline
  • Topology
  • User Interface
  • Director Mode
  • Macros

How To

  • How to Run Ventuz
  • How to Work with Designer
  • Ventuz Designer Drag&Drop workflow
  • How to use Head Mounted Displays
  • How to work with Shadows
  • How to use Emoijs
  • How to Build a Template
  • How to use Newtek NDI
  • How to Create Visuals Loader Node
  • How to Remote Control with a Phone
  • How to Setup a Cluster Render
  • How to use a Mixed Frame Rate Cluster
  • How to use Tracking
  • How to work with 3D Reference Layers
  • How to create a Firework Particle System
  • How to use DDS with new Block Compression modes
  • How to setup Spout with Ventuz
  • How to use the Substance Integration

Keyboard Shortcuts

  • Summary Shortcuts
  • Layer Editor Shortcuts
  • Hierarchy Editor Shortcuts
  • Content Editor Shortcuts
  • Animation Editor Shortcuts
  • Director Shortcuts

Advanced and Development

  • Command Line Options
  • Remoting Overview
  • Remoting 4
  • Remoting 4 via Websockets
  • Deprecated Remoting
  • Ventuz IP Ports
  • Ventuz Machine Service
  • Remoting Machine Signature
  • TUIO
  • .NET Scripting
  • HLSL Shader Programming
  • Ventuz API and SDK
  • Ventuz VIO API
  • Ventuz File Format (VFF)
  • Ventuz Stream Out API

General Reference

  • Terminology
  • Manual Index

Miscellaneous

  • Presets
« Previous Article
» Index «
Next Article »

Table of Contents

  1. Single Statement
  2. Multiple Statements
  3. Examples
  4. Available Name Spaces

Expressions

Float Expression Provides the possibility to write logical C# expressions with a Float as resulting output value.
Double Expression Provides the possibility to write logical C# expressions with a Double as resulting output value.
Int Expression Provides the possibility to write logical C# expressions with an Int as resulting output value.
String Expression Provides the possibility to write logical C# expressions with a String as resulting output value.
Boolean Expression Provides the possibility to write logical C# expressions with a Boolean as resulting output value. Additional it provides True and False Event outputs.

Expressions Nodes can combine multiple input properties, perform numeric/string operations on the inputs and provide the result as an output property. They can be thought of as mini C# sharp functions and follow the C# syntax. The number and types of inputs can be adjusted by using the Custom Model.You can either use a single statement or create a Codeblock with a return-statement.

The Expression Nodes have been designed for simple operations and input types only. To avoid their limitations or to use more complex variable types as inputs, use the Script Node instead.

Single Statement

A single statement expression is a simple one-line calculation that has one result, for example calculating the sum of two inputs. Using a single statement is fairly easy and you only have to input something returnable that resolves to the type of the expression.

A String Expression with four input properties and the single statement expression EXPRESSION is internally roughly translated to something like the following:

String expressionMethod(String A, String B, String C, String D)
{
   return EXPRESSION;
}

When using a one line statement you may not use control flow like an if-statement. Instead you can use an in-line if:

boolean_expression ? true_value : false_value

Loops are not possible at all with a single statement, neither are you able to assign local variables. If you want to do so, use a Multiple Statement Expression.

Multiple Statements

If you want to be able to use control flow or use local variables you can define a Codeblock with multiple statements. You need to place curly braces in front of and at the end of your code and make sure that every execution branch has a return statement. A simple Expression could look something like this:

{
   STATEMENTS
   return RESULT;
}

The STATEMENTS can consist of as many variable declarations or if-,while or for-statements as you need to. Be sure to stick to the C# syntax.

Examples

A + B Sum of A and B for numeric expressions or the concatenation for string expressions.
(A + 1.0) * B Product of B and the sum of A and 1.
Math.Sin(A / 180.0 * Math.PI) Sine of the input degrees given in angle.
Math.Asin(A) * 180.0 / Math.PI) Inverse sine of the given value A, converted to degrees.
(A == 6) ? 1:0 Return 1 if A is equal to 1.6, otherwise return 0.
(A != B) ? 1:0 Return 1 if A is not equal to B, otherwise return 0.
(A < 0) ? 0 : A Return 0 if A is smaller than 0, otherwise return A.
(A >= 0) ? 0 : A Return 0 if A is greater than or equal to 0, otherwise return A.
(A < 10) ? 10: ( (A > 20) ? 20 : A) Returns A clamped into the the interval 10 to 20.
(double)(int)A Converts A into an integral value (all fractions are removed) and converts it back to double.
Convert.ToString( Convert.ToInt32(A) * Convert.ToInt32(B)) Convert the two input strings to integers, multiply them and convert the result back to a string
{
   int b = 0;

   for(int i = 1; i <= A; i++)
	b = b + i;
	
   return b;
}

Results in the sum of all numbers from 0 to A.

{
   int b = 1;

   if(A<=1) return 1;

   for(int i = 1; i < A + 1; i++)
	b = b * i;
	
   return b;
}

Results in A! (the faculty of A). Note that there are two return statements - one of which will only be reached if A is 1 or less.

{
	int result = 0;
   for(int i = 0; i < A.Length; i++)
   {
        result += A[i];
   }
   return result;
}

Returns the sum of all elements in the numeric array A. Only succeeds if the input is an array type.

{
   var dt = System.DateTime.UtcNow.AddHours(TZ);
   var s1 = dt.ToString("MMMM d, yyyy HH:mm:ss", System.Globalization.CultureInfo.InvariantCulture);
   var s2 = dt.ToString(" tt", System.Globalization.CultureInfo.InvariantCulture).ToLower();
   return s1 + s2;
}

This expression produces a string output like this: June 3, 2015 09:35:48 am

Available Name Spaces

When creating an Expression you can consider the following using directives as given.

using System;
using System.Linq; 
using System.Xml.Linq;

Since the System namespace has been made available, all functions in the ​Math Namespace, the​Convert Class and all ​String operations are supported.

See also:
  • Script nodes

« Previous Article
» Index «
Next Article »
Copyright 2020 Ventuz Technology