Skip to main content

MVG Nodes

MVG Nodes can be created in CGI Studio SceneComposer via the Toolbox. Simply drag and drop the desired MVG Node into the Scene Editor or Scene Tree Panel.

The following MVG Nodes are available:

  • MVG Arc Node

  • MVG Ellipse Node

  • MVG Path Node

  • MVG Rect Node

drawing-5-1718378815.pngdrawing-5-1718378815.png

You can see an application of MVG nodes in Scene Composer's 2D Basic sample.

Configure MVG Nodes

An MVG node is a RenderNode2D and therefore it has the same properties that can be configured in the properties panel:

  • General. Name, Full Name, Description...
  • 2D Render Node: Render Order Rank...
  • Transformation: Position, Pivot Point, Pivot Offset...
  • Asset: Id, Symbolic Name...
  • Item: Scope Mask, Alpha Value...
  • Layout: Vertical Alignment, Horizontal Alignment, Size...

Further details like the visual appearance of MVG nodes can be configured in the node's effect. Each type of MVG node has its appropriate effect:

MVG Node
MVG Brush
MVG Arc Node  MVG Arc Brush
MVG Ellipse Node  MVG Ellipse Brush
MVG Path Node  MVG Path Brush
MVG Rect Node  MVG Rect Brush

Select the MVG Node in the Scene Tree and select the attached effect in the right side of the Scene Tree to view its properties in the properties panel.

drawing-5-1718379055.pngdrawing-5-1733485928.png

MVG Arc Node

Can be used to display arc.

The properties of the MVG Arc Node are those of a regular RenderNode2dD. In the properties of the MVG Arc Brush, the following properties can be configured.

drawing-5-1718379101.pngdrawing-5-1718379101.png
Filter
filter for rendering (choose between BilinearFilter and NearestFilter)
Line Width
width of the rendered line in pixels
Stroke Color
color of the rendered line
Size
vertical (X) and horizontal (Y) size of the arc to be rendered
Angle Start
the angle of the arc's starting point
Angle End
the angle of the arc's end point

The arcs starting and end point has to be entered as in degrees. Please also see the sketch below.

drawing-4-1700541631.pngdrawing-4-1700541631.png

MVG Ellipse Node

Can be used to display ellipse.

The properties of the MVG Ellipse Node are those of a regular RenderNode2dD. In the properties of the MVG Ellipse Brush, the following properties can be configured.

drawing-5-1718379150.pngdrawing-5-1718379150.png

Filter
filter for rendering (choose between BilinearFilter and NearestFilter)
Line Width
width of the rendered line in pixels
Stroke Color
color of the rendered line
Size
vertical (X) and horizontal (Y) size of the arc to be rendered
Angle Start
the angle of the ellipse's starting point
Angle End
the angle of the ellipse's end point
FillColor
fill color of the ellipse 
PaintMode
configures if the ellipse will be rendered with outline and filling or with either of those (choose between Both, Fill and Stroke)

MVG Path Node

Can be used to display paths with a combination of instructions.

The properties of the MVG Path Node are those of a regular RenderNode2dD. In the properties of the MVG Path Brush, the following properties can be configured

drawing-5-1718379295.pngdrawing-5-1718379295.png


Filter
filter for rendering (choose between BilinearFilter and NearestFilter)
LineWidth
width of the rendered line in pixels
Stroke Color
color of the rendered line
FillColor
fill color of the path
PaintMode
configures if the path will be rendered with outline and filling or with either of those (choose between Both, Fill and Stroke)
Segments

Defines segments.

Input value VGPathSegment number of Data Description
0 ClosePath 0

Closing a path by connecting a final coordinate to a start coordinate. Therefore, the required number of Data is 0.

2 MoveTo 2

Specify coordinates of a path starting point. Therefore, the required number of Data is two (x0, y0).

4 LineTo 2

Draws a straight line. Specify an end point coordinates. Therefore, the required number of Data is two (x0, y0). A straight line is drawn from a coordinates specified in the previous Segment to a coordinates specified in this Segment.

6 HLineTo 1

Draws a horizontal line. The required number of Data is only one (x0).

8 VLineTo 1

Draws a vertical line. The required number of Data is only one (y0).

10 QuadTo 4

Draws a quadratic Bezier curve. Specify a coordinates of a control point and an end point. Therefore, the required number of Data is 4 (x0, y0, x1, y1). Please refer the below image as an example.

12 CubicTo 6

Draws a cubic Bezier curve. Specify coordinates of two control points and an end point. Therefore, the required number of Data is 6 (x0, y0, x1, y1, x2, y2). Please refer the below image as an example.

Data Defines Data according to the specified Segment.

MVG Rect Node

Can be used to display a rect.

The properties of the MVG Rect Node are those of a regular RenderNode2dD. In the properties of the MVG Rect Brush, the following properties can be configured.

drawing-5-1718379336.pngdrawing-5-1718379336.png
Filter
filter for rendering (choose between BilinearFilter and NearestFilter)
LineWidth
width of the rendered line in pixels
Stroke Color
color of the rendered line
Size
vertical (X) and horizontal (Y) size of the arc to be rendered
TopLeftRadius
radius of the top left corner.
TopRightRadius
radius of the top right corner
BottomLeftRadius
radius of the bottom left corner
BottomRightRadius
radius of the bottom right corner
FillColor
fill color of the path
PaintMode
configures if the rectangle will be rendered with outline and filling or with either of those (choose between Both, Fill and Stroke)