On this page:
9.42.1 Examples
9.42.1.1 Creating a triangular subset
9.42.1.2 Creating an animated circular subset
9.42.1.3 Creating a rectangular subset of the original image.
9.42.1.4 Breaking a picture into 4 individual rectangles

9.42 TextureSubset

Selects a portion of its input image.

If you want to break up your picture (or video) into 4 smaller rectangles that move in different directions, "TextureSubset" is the effect for you. Three shapes are supported. You have have a rectangular subset of your original image. You can also have circular subset of your picture (or video) and finally you can have a triangular subset of your picture (or video).

 

Parameters

 

Default

 

Range    

 

Description

 

mode

 

0

 

{0 ,1 ,2}

 

Three distinct shapes can be drawn.
  • 0 : rectangle shape

  • 1 : circle shape

  • 2 : triangle shape

 

 

 

 

 

centered

 

0.0

 

{0 ,1}

 

Centers the texture subset on the screen.

The interpretation of other parameters depends on mode.

For Rectangle shape:

Only parameters x0, y0, x1 and y1 are used. They extract a region bounded by coordinates (x0, y0) and (x1, y1). The coordinates (0, 0) refer to the bottom-left corner of the texture image, while (1, 1) refer to the top-right corner.

 

Parameters

 

Default

 

Range    

 

Description

 

x0

 

0.0

 

(0.0 - 1.0)

 

Left boundary of the texture image.

 

 

 

 

 

y0

 

0.0

 

(0.0 - 1.0)

 

Bottom boundary of the texture image.

 

 

 

 

 

x1

 

1.0

 

(0.0 - 1.0)

 

Right boundary of the texture image.

 

 

 

 

 

y1

 

1.0

 

(0.0 - 1.0)

 

Top boundary of the texture image.

For Circle shape:

Only parameters x0 and y0 and radius are used. (x0,y0) refers to the center of the circle. radius is the radius of the circle. (really?)

 

Parameters

 

Default

 

Range    

 

Description

 

x0

 

0.0

 

(0.0 - 1.0)

 

x coordinate of center point of circle.

 

 

 

 

 

y0

 

0.0

 

(0.0 - 1.0)

 

y coordinate of center point of circle.

 

 

 

 

 

radius

 

1.0

 

(0.0 - 1.0)

 

The radius of the circle.

For Triangle shape:

Only parameters x0, y0, x1, y1, x2 and y2 are used. The three (xn,yn) coordinates refer to the three points of the triangle.

 

Parameters

 

Default

 

Range    

 

Description

 

x0

 

0.0

 

(0.0 - 1.0)

 

x coordinate of first point of triangle.

 

 

 

 

 

y0

 

0.0

 

(0.0 - 1.0)

 

y coordinate of first point of triangle.

 

 

 

 

 

x1

 

1.0

 

(0.0 - 1.0)

 

x coordinate of second point of triangle.

 

 

 

 

 

y1

 

1.0

 

(0.0 - 1.0)

 

y coordinate of second point of triangle.

 

 

 

 

 

x2

 

1.0

 

(0.0 - 1.0)

 

x coordinate of third point of triangle.

 

 

 

 

 

y2

 

1.0

 

(0.0 - 1.0)

 

y coordinate of third point of triangle.

Input pattern: (A)

9.42.1 Examples
9.42.1.1 Creating a triangular subset
; muSE v2
; 
;  My kick-butt style
;  This style creates a triangular subset of the original image
 
(style-parameters)
 
(segment-durations 8.0)
 
(define muvee-global-effect (effect-stack
                                (effect "CropMedia" (A))
                                (effect "Perspective" (A))))
 
(define muvee-segment-effect (effect "TextureSubset" (A)
                                     (param "mode" 2)
                                     (param "x0" 0.25)
                                     (param "y0" 0.25)
                                     (param "x1" 0.75)
                                     (param "y1" 0.25)
                                     (param "x2" 0.5)
                                     (param "y2" 1.0)))

9.42.1.2 Creating an animated circular subset
; muSE v2
; 
;  My kick-butt style
;  This style creates an animated circular subset of the original image
 
(style-parameters)
 
(segment-durations 8.0)
 
(define muvee-global-effect (effect-stack
                                (effect "CropMedia" (A))
                                (effect "Perspective" (A))))
 
(define muvee-segment-effect (effect "TextureSubset" (A)
                                          (param "mode" 1)
                                          (param "x0" 0.5)
                                          (param "y0" 0.5)
                                          (param "radius" 1.0 (linear 1.0 0.0))))

9.42.1.3 Creating a rectangular subset of the original image.
; muSE v2
; 
; My head-banging earth-shaking style
; This style creates a small rectangular subset of the original image.
; 
; Copyright (c) 2008 muvee Technologies Pte Ltd.
; All rights reserved.
 
(style-parameters)
 
(segment-durations 8.0)
 
(define muvee-global-effect (effect-stack
                             (effect "CropMedia" (A))
                             (effect "Perspective" (A))))
 
 
(define muvee-segment-effect (effect "TextureSubset" (A)
                                     (param "mode" 0)
                                     (param "x0" 0.25)
                                     (param "y0" 0.25)
                                     (param "x1" 0.75)
                                     (param "y1" 0.75)))

The above example breaks up our picture into 1 rectangle. I have chosen coordinate (0.25, 0.25) as the bottom left corner of my rectangle and (0.75, 0.75) as the top right coordinate.

9.42.1.4 Breaking a picture into 4 individual rectangles
; muSE v2
; 
; My head-banging earth-shaking style
; This style breaks up the input into 4 rectangles
; 
; Copyright (c) 2008 muvee Technologies Pte Ltd.
; All rights reserved.
 
(style-parameters)
 
(segment-durations 8.0)
 
(define muvee-global-effect (effect-stack
                             (effect "CropMedia" (A))
                             (effect "Perspective" (A))))
 
(define (texture-subset A (x0 y0) (x1 y1))
  (effect "TextureSubset" ()
          (input 0 A)
          (param "mode" 0)
          (param "x0" x0)
          (param "y0" y0)
          (param "x1" x1)
          (param "y1" y1)))
 
(define muvee-segment-effect (layers (A)
        ; Bottom Left
        (texture-subset A (0.0 0.0) (0.499 0.499))
 
        ; Bottom Right
        (texture-subset A (0.501 0.0) (1.0 0.499))
 
        ; Top Left
        (texture-subset A (0.0 0.501) (0.499 1.0))
 
        ; Top Right
        (texture-subset A (0.501 0.501) (1.0 1.0))))

The above example breaks up our picture into four rectangles. We are now introducing the concept of functions in this example. We have defined a function called texture-subset which takes five arguments, input A and four coordinates (x0 y0) and (x1 y1). Inside the muvee-segment-effect, our function is called four times with different coordinates. Do note that we can move each rectangle independently by adding an effect-stack on top of each "TextureSubset" followed by a Translate effect. Each rectangle has a width and height of 0.499. This creates a small black boundary between them. If the width and height is set to 0.5 we will end up with four rectangles that are perfectly aligned with one another. You are also free to use combinations of different "TextureSubset" modes or different numbers of "TextureSubset" instances at arbitrary coordinates. It’s all up to you.