Welcome Guest, you are in: Login

ScrewTurn Wiki



Search the wiki


Renderer Element

Modified on 2016/05/08 15:25 by Maria Categorized as Base Elements, Elements, Visual Stimuli

Element Icon Renderer Element
Category: Visual Stimuli AddIn: Base Elements
Creator: OkazoLab Team Scope: Parent Event
Owns Snippets: no Usage: Runtime Screen,Snippets

Synchronized Internal Actions

Experiment StartParent Event OnsetStatus change between Onset/OffsetParent Event OffsetExperiment End
Is displayed on screen Is removed from screen


+=== Properties inherited from the Visual Element class ===
NameDescriptionConstraintsValue TypeUpon Runtime Change
Alpha MaskingDefines whether the visual content rendered by this element will be used as an opacity mask which is applied onto the given event surface. The active opacity mask allows one to expose pixels of the parent event surface through a solid background of the given event. If the value is true, the darker pixels of the content will make more transparent holes on the entire event surface.Boolean
AntiAliasingIf true, the rendered content will be anti-aliased for smoother visual appearance. If false, rendering will be authentic to its source, e.g. a bitmap. Boolean
PositionDefines the position of the element viewport on the screen. The position can be set in any of three coordinate systems: a) pixels, b) polar, c) central. clPoint
SizeDefines the size of the element viewport on the screen. The size can be set in any of three coordinate systems: a) pixels, b) visual degrees, c) 'relative-to-screen' size. clSize
Z OrderIndicates the current depth order of the element viewport on the surface of the parent event. The greatest number corresponds to the top position. The order can be changed by moving the element up and down in the element list.Int32
Pivot PointDefines the pivot point (coordinate and the rotation centers) within the element viewport. stAlignment or Int32
VisibleDefines whether the element is currently visible on the event surface. The property is convenient for switching visual content on and off. Boolean
RotationDefines the rotation angle (in degrees) of element viewport relative to the its pivot point. Double in the range 0..360
Transparent ColorThe color of the original pixels of rendered content that will be set as transparent. stColor
Transparency ToleranceTolerance ratio for choosing colors that become transparent. Zero means that effect is not applied, 1 denotes that all colors will become trasparent. Int32, range (0..100)
Color MaskProduces a multiplicative combination of the original pixels and the selected mask color (except the alpha channel). The effect emulates a look through a colored glass. White or transparent mask color doesn't change the original pixels. stColor
OpacityOpacity of the rendered content. Int32, range (0..100)
ContrastContrast of the rendered content. Int32, range (-100..100)
BrightnessDefines the brighness of the rendered content. Int32, range (-100..100)
SaturationSaturation of the rendered content. Double
PixelationDefines the pixel scale of the rendering. Int32, range (0..100)
BlurringThe radius used in the gaussian blur of rendered content, as a pixel-based factor. The default is 0 which means no blurring. Int32
Reset JitterSet to true at runtime to reset the current positional jitter.Boolean, set true for action
Current JitterJitter range, in pixels (non inclusive)..clSize
Jitter RangeJitter range, centered at the original position of the element.. clSize

+=== Properties inherited from the Library Element class ===
NameDescriptionConstraintsValue TypeUpon Runtime Change
Material List
Selected IndexDefines the index of the active item in the material list of the element. Int32A change causes the current item to be reloaded and an update of the element.
Selected ItemDefines the name of the active item in the material list of the element. The name matches to a name of item in the Material Library StringA change causes the current item to be reloaded and an update of the element.
Item CountReturns the total number of items in the material list of the element.Int32
Equalize RGBThe property is only available in the visual element. If the value is true, the average RGB pixel intensity will be equalized across all items in the material list. You can turn on this property, when you need to obtain a luminance-balanced set of visual stimulus. Boolean

+=== Properties inherited from the base Element class === Inherited properties of clElement
NameDescriptionConstraintsValue TypeUpon Change
Is EnabledIf set to false the element is completely omitted when the experiment is run.Boolean
TitleTitle of the element.String

Renderer element can load and draw any visual items stored in the Material Library, e.g. bitmaps or vector graphics. The element performs rendering within an adjustable viewport that can be placed anywhere on the screen. Spatial transformations and hardware-accelerated effects can be applied in rendering. The element also allows to create a visual stimulus set, when multiple material items are loaded into element's list.


3D Graphic

3D Graphic

Jpg/Png pictures

Jpg/Png pictures

Vector Graphic

Vector Graphic

Built-in library  vector graphic

Built-in library
vector graphic

Practical use

The rendering can be tuned with various properties of the Renderer element. For example, you can adjust the size and contrast of the original graphics item and set its rotation angle.

Each Renderer element works with its own list of loaded Library items. It's handy for experimental scenarios where you need to present a visual stimulus selected randomly from a stimulus set. You can form a list by simply dragging library items to a Renderer element in the Element Panel. The items included in the list can be always reordered such that each item has its own integer index. Renderer elements has a property that defines which item is currenlty selected and rendered on the screen. Changing this property will cause rendering of a new item.

Creating a single Renderer on a visual scene

  1. Click on "add element", and select the Renderer element.
  2. Navigate to the Material Library.
  3. Drag selected visual materials (e.g an image or images) onto the Renderer element, in the element list on the left of the main window. Notice that you can change sorting order
  4. Click on an expander button of Renderer icon to check a list loaded items and rearrange them, if necessary.
  5. Adjust a position and size of the Renderer viewport on the event surface.
  6. Check other properties of the Renderer element in the property grid (the element has to be selected first)

Using Renderer to create a switchable stimulus list

  1. The procedure is the same as above, except that you may drag & drop multiple visual materials onto the element.
    You may click on the down arrows to expand the list of elements.

    You may double click on one of the material items in the element to draw it on screen.

    The 'Selected Index' property will hold the index of the item in the element and the 'Selected Item' property will hold the name of the item. These properties can be changed at run time as described below.

Multiple Materials

Multiple Materials

Adjusting the renderer at runtime using a proxy variable

You can change what the Renderer Element shows at run time by using code and a Proxy Variables.

  1. Create a Renderer Element with multiple material items as above.
  2. Create a Proxy Variable from the "Selected Index" property. (please see Proxy Variables if you do not know how to do this). E.g name it "StimulusIndex"
  3. Now you can use the following code to change which item is displayed in the Renderer Element:
  4. Alternatively, one can create a Proxy Variable for the "Selected Item" property, and then use code to change the item according to it's name.
    StimulusItem="Red Circle";

ScrewTurn Wiki version Some of the icons created by FamFamFam.