String attribute

This topic is not a proposal (and please do not suggest anything that is not related to the plans of the module).


The reason for this topic is that now proposals have begun to appear that solve a narrow and specialized range of problems, the general solution of which will be the string attribute.

So let’s explore the possibilities of variable sized data as an attribute.

The first is that we now have an attribute field. This is important to clarify, because there is a technically big difference between an attribute (an array) and a field (a function in a context).

For an attribute (array), I will not describe functions, since there are none outside of nodes. And in nodes everything is simpler in either as a single or as in a context


First of all, we need to make string lines for each point. Of course, we will not make a switching node to enter a bunch of lines into the multisocket for each point, as input. It just doesn’t make sense.

Instead, a class of nodes is presented that, for each index entered, can return its own row.

That is, we can:

  1. Split the string to single letters: “abcd” → “a”, “b”, “c”, “d”.
  2. Split string by delimiters: “a+b=c”, “=” → “a+b”, “c”. “a+b”, “+” → “a”, “b”.
  3. Split the string into islands of scopes: “a + (a + d * 2) =”, “(”, “)” → "a + “, “a + b * 2”, " =”.

Agree, if you want, you can already make a language on this to describe your procedural model of a castle or a guitar
That is, if you want, you can how to decode the obj file, enter indexes, or describe the city


Further, we can transfer those nodes that are now in the field so that they can work for individual row instances.


Now new nodes capable of working in the field:

  1. The number of characters or parts of a string that are in the string: “abb,ccdd”, “ab” → 1.
  2. Case substitution (upper, lower): “abcd, ffAAff” → first : “Abcd, ffAAff”, all : “ABCD, FFAAFF”, invert : “ABCD, FFffFF”.
  3. Convert strings to numeric data types: “12324” → 12324, “1234.124” → 1234.124f
  4. String comparison: “abc” == “abc” → true
  5. Comparing characters in alphabetical order: “A. …” > “B. …” → true
  6. Adding Unicode characters to each other, which can be represented as x4 ordinary characters: “-” + “>” → " → "

The main use for strings, besides converting them to curves, is to interact with fields. Most of the procedural generation takes place on the basis of the fields, and strings act only as a way to enter these fields.

Also, you may have noticed that for the example of a node for converting a string to a number, I did not show vectors and logical or color ones.
The reason for this is that there may be different formatting:

  1. “true”, “yes”, “agree”, “t”.
  2. “false”, “no”, “f”.
  3. “<1,2,3>”, “{1,2,3,4}”, “(1,2,3,4)”, “1 2 3 4”.

Any recording standard can be chosen and documented. But while this is not discussed, this is exclusively a user agreement.
All this leads to the fact that users can expand the possibilities and make the largest possible projects. To simply achieve the goal. It’s easy to reuse created groups and apply them to anything.

4 Likes

Visual aids will help imagining the concept further, describing the problem and solution we can take.

1 Like

Could you mention the range of problems you saw this to solve? Seems great, would simply like some examples to really get the idea

1 Like