Making Block & Rectangle

Blocks

A Block is mostly defined by its Width and Height in pixels, its Color Model and its Channel Depth.

From Texture 2D to Odyssey Block Reference

This node is automatically created when you connect a Texture 2D asset to an input “Block”. For instance, it is automatically created when you connect a variable Texture 2D to the input Block from a Stamp.

../../../_images/odysseybrush-nodes-block-to.gif

Create Block

../../../_images/odysseybrush-nodes-block-create.png

This node creates a Block whose the return value is an “Odyssey Block Reference” (to be connected to a Block input). Basically, it makes an empty Block to be filled later with a color.

  • Width | Height: require a size in pixels as an Integer to create the block.

  • Color Model | Channel Depth: choose the color model and channel depth from the list, or connect the respective input.

Rectangles

A rectangle is specifc area inside a Block. Rectangles have a size (Width / Height) and a starting point (X / Y). These 4 values are in pixel (Integers).

Using “Crop Block” & Make Odyssey Rectangle

Initial situation

In the following examples, we will use this stamp as a Block, which is 128*128.

../../../_images/odysseybrush-nodes-block-rectangle-example01.png

The Blueprint:

../../../_images/odysseybrush-nodes-block-rectangle-example01-bp.png

The result when we paint a stroke:

../../../_images/odysseybrush-nodes-block-rectangle-example01-draw.png

Let’s see what happens when we combine the node “Crop Block” and “Make Odyssey Rectangle together”.

Crop Block

../../../_images/odysseybrush-nodes-block-crop.png

This node will allow you to crop the Block to make it smaller. The “Area” input needs an Odyssey Rectangle Structure. The output returns an “Odyssey Block Reference”.

Make Odyssey Rectangle

../../../_images/odysseybrush-nodes-block-make-rectangle.png

Use this node to make a Rectangle with X-Y coordinates and a specific size. By default, X Y is equal to 0 and correspond to the top left corner of the Block. “Make Odysey Rectangle” must be then connected to the node “Crop Block”.

Examples

  1. Width and Height = 20px | Y and X = 0

The Rectangle made into the Block:

../../../_images/odysseybrush-nodes-block-rectangle-example02.png

the Blueprint:

../../../_images/odysseybrush-nodes-block-rectangle-example02-bp.png

The result:

../../../_images/odysseybrush-nodes-block-rectangle-example02-draw.png
  1. Width and Height = 50px | Y and X = 60px

The Rectangle made into the Block:

../../../_images/odysseybrush-nodes-block-rectangle-example03.png

the Blueprint:

../../../_images/odysseybrush-nodes-block-rectangle-example03-bp.png

The result:

../../../_images/odysseybrush-nodes-block-rectangle-example03-draw.png

Get Block Rectangle

../../../_images/odysseybrush-nodes-block-get-rectangle.png

This node will turn a Block into a Rectangle.

Break Odyssey Rectangle

../../../_images/odysseybrush-nodes-block-break-rectangle.png

This node will break a Rectangle to get its size and coordinates.