» Пины и типы данных
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

Пины и типы данных

English | Italian

The original english version of this page is newer and may contain information this translation does not have! Click here to view the english version.

Соединять можно только выходы со входами. Не возможно соединить только 2 входа или только 2 выхода. Рисовать связи очень просто: можно начать от выхода ко входу, а можно - наоборот. Но не все пины можно соединить друг с другом - каждый пин относится к определенному типу данных vvvv. Можно соединять числа с числами, цвета с цветами и т.д. Нельзя напрямую соединить пины разных типов данных.

Совет: Как только вы начинаете рисовать линию связи, пины подходящего типа становятся больше, поэтому ошибиться с типом пина не возможно.

Когда к входящему пину подключено соединение, он использует данные из подключенного выхода. Нельзя в ручную изменить значение подключенного пина (нужно изменять значения нода, отдающего данные). Каждый вход может принять только одно соединение.

Совет: Если вы подключаете новую линию к уже занятому входу, старая линия связи автоматически удалится.

см. так же видео урок на английском video tutorial.

Values (Числа)

Числовые значения (или просто числа) возможно самый распространенный тип данных в vvvv – главным образом потому, что числа стоят во главе всех значимых моделей вычислений. В отличие от других языков, в vvvv нет принципиальных различий между разными типами чисел: целые числа, дробные числа с разным количеством знаков после запятой, буленовы числа, флаги, и байти понимаются просто как "числа".
Это упрощает создание патчей и открывает широкие возможности для обмена данными между нодами разных категорий (i.e. one can connect a number generating node to a logic node that responds to boolean input - and the logic node will respond as if it were receiving boolean data) All numeric pins are built to be robust, so you can connect anything to anything, similar to an analogue synthesizer. Modern processors usually spend more time converting between different representations than using floating point all the time, so this is not a fundamental performance issue any more.

When using a floating point value as an integer, the value is rounded.
When using a floating point value as a Boolean, everything larger than 0.5 is TRUE and everything below is FALSE.
Boolean outputs return either 0 or 1.

Подтипы

The concept of connecting anything to anything may be refreshing or may give some revolutionary feeling, but it may also give uninteresting results with everyday formulae: We tried very hard to fill gaps in the definition of logical and mathematical functions. These extensions were selected to give aesthetical results in special cases, but obviously there is never a general solution for this. Mostly these extensions are like converting negative values to positive values or extending integer ranges with a modulo operation. But even with all that freedom it doesn’t make sense to edit a Boolean value in 0.001 steps. Therefore the concept of subtypes was introduced:

Subtypes assist you in using the right values for your application. All numeric values do have an associated subtype, which includes flags for cyclic values (like angles), specification of default, minimum and maximum values, step sizes, dealing with integers, booleans, positive and negative flanks etc. Each value can also be associated with a physical unit. The subtype is ignored by the calculation, but is used by the GUI to edit or display the values.

Strings (Тексты)

A wide variety of text processing nodes exist, which allow you to create text processing applications. Strings can have any length, can include all possible UNICODE (UTF8) characters including zero. The user can choose between UTF8 and the ANSI character set.

Strings also do have a subtype system which contains information on whether the string is meant to be a filename, a directory, whether it can contain multiple lines of text, what the default value is etc. These informations are used in the GUI when entering and editing strings.

Colors (Цвета)

A system oriented at creating visual output should treat color as a fundamental data type. This simplifies the objects dealing with colours. You can add, subtract and blend colors without knowing anything about that or convert to different color models like HLS or RGB. This makes dealing with color really intuitive.

Enumerations (Списки)

Modern programming is mostly about selecting between already existing options. Therefore a basic data type for exactly doing that is implemented. It is mostly used to create pull down menus on the fly, but there are also some basic operations on enumerations. Anyway, we mostly try to avoid enumerations, but you will see that there is a love and hate relationship to them.

Note that it is not possible to connect pins with different enumerations.

Node Pins (Универсальные пины для сложных типов данных)

Apart from the above basic data types there are Node Pins, which use an advanced data type. These Node Pins do some deeper magic in the data flow graph. These pins have in common that you generally won’t be able to see or manipulate the actual data. This is partly because of performance reasons, but also because the data might be to abstract to visualize anyway.

From the users’ perspective, the most important difference between basic data types and node pins is that they don’t keep their value when they get disconnected. Instead the default value is used.

Currently the following types of node connection types are available:

Transforms

Transforms are used in the DirectX Renderer to change the shape of the render objects or textures. You can connect different transforms to create compound transforms. Note that the link between transformations doesn’t hold the values which get transformed but more the quality of the transformation. This allows you to create complex hierarchical motion systems.

Transforms internally use 4x4 matrices for all classic things which are concatenated on the fly, but can also switch to a general method, which will allow for arbitrary transformation in a 3d x 3d space.

Renderstates and Samplerstates

Render states are used in DirectX internally to control various parameters of the graphics card. You can combine various render states to get compound render states. Think of the links as transmitting things like "the wireframeness" or "the sourceblendmodeness" which will help the render object doing the right things.

Textures

Meshes and Vertexbuffers

DirectShow Audio- and Videostreams

Various nodes from the DirectShow category have DirectShow Stream pins. These pins directly map to internal connections of the Microsoft DirectShow data flow graph. As the data is potentially transmitted in highly efficient kernel memory or in dedicated hardware, it can not be displayed in the tool tip.

Note that due to a limitation in DirectShow you can only connect one output to one input pin.

anonymous user login

Shoutbox

~13d ago

~17d ago

joreg: The Winter Season of vvvv workshops is now over but all recordings are still available for purchase: https://thenodeinstitute.org/ws23-vvvv-intermediates/

~23d ago

schlonzo: Love the new drag and drop functionality for links in latest previews!

~1mth ago

joreg: Workshop on 29 02: Create Sequencers and Precise Clock Based Tools. Signup here: https://thenodeinstitute.org/courses/ws23-vvvv-08-create-sequencers-and-precise-clock-based-tools-in-vvvv-gamma/

~1mth ago

joreg: Workshop on 22 02: Unlocking Shader Artistry: A Journey through ‘The Book of Shaders’ with FUSE. Signup here: https://thenodeinstitute.org/courses/ws23-vvvv-12-book-of-shaders/

~2mth ago

joreg: Talk and Workshop on February 15 & 16 in Frankfurt: https://visualprogramming.net/blog/vvvv-at-node-code-frankfurt/

~2mth ago

woei: @Joanie_AntiVJ: think so, looks doable