0
$\begingroup$

Using 3.1.

I'm linking the output of Align Euler to Vector (fed by a curve normal vector) to the Rotation input of Transform. So far, so good.

enter image description here

Spying on the value shows the rotation data is embedded in a Vector. XYZ components are π/2, π/4 and π/4 which is likely the correct rotation for my test case.

Now I'm adding a Switch with option Vector in order to be able to switch the rotation on/off:

enter image description here

The data type and value at Output of Switch have not changed, but the red link indicates a problem with the output. According to Blender development documentation:

This turns links red if no implicit conversion can be made between the from socket and the to socket. For geometry nodes this happens with object, geometry, collection, and string sockets that are connected to a different type.


  • Why is there a conversion error? What is the underlying data type for Rotation input? I assume it is a Vector containing the 3 angles.

  • How can I make this Switch node work?


Adding the test file:

$\endgroup$
7
  • $\begingroup$ The Switch output has a diamond shape, and the Transform inputs are circles. The connecting line is dashed, which means it carries a field of values, which means multiple values - and that doesn't mean three, because it's a vector, it means multiple vectors. The circle inputs tell you that they only accept single values - in this case, one vector, not multiple vectors. The Geometry > Transform node is used to transform the input geometry as a whole, not it's mesh or points individually. But the Switch output assigns vectors to each point or vertex of the geometry individually. $\endgroup$ Commented Aug 12, 2022 at 12:25
  • $\begingroup$ It looks like you are using a single value for Vector as input in your first image, and yet in your second image you are feeding that input with the vectors of a geometry (which means, as @GordonBrinkmann has already correctly noted, that you are using one vector per element here). Please show us more of your node tree. $\endgroup$
    – quellenform
    Commented Aug 12, 2022 at 12:34
  • $\begingroup$ @Gordon Brinkmann: I understand what you said. However it seems the Switch node is inconsistent. For example without its inputs connected, it can only output one of the two constant preset vectors and the output mode (constant/series) should adapt. Anyway how to switch constants? $\endgroup$
    – mins
    Commented Aug 12, 2022 at 12:55
  • $\begingroup$ @mins ...it looks like your Group Input is a field (multiple elements, multiple values). But in this case you need a single value (single Vector). Please have a closer look at this part of the documentation: docs.blender.org/manual/en/latest/modeling/geometry_nodes/… $\endgroup$
    – quellenform
    Commented Aug 12, 2022 at 12:58
  • 1
    $\begingroup$ docs.blender.org/manual/en/latest/modeling/geometry_nodes/… $\endgroup$
    – Crantisz
    Commented Aug 12, 2022 at 13:25

2 Answers 2

2
$\begingroup$

This is actually fun that I can't reproduce it in 3.2 and even in 3.1, But there is an Attribute Statistics node, that can be used to convert field values to singular ones:

enter image description here

The actual problem in this node is that it has hidden connections. If we switch it back to geometry mode, they are show up:

enter image description here

Then I trim connections:

enter image description here

And back to vector mode, everything works fine:

enter image description here

This line indicates not an error in data, but actually a loop in parents:

enter image description here

Bug report: https://developer.blender.org/T100374

$\endgroup$
4
  • $\begingroup$ Ah ah, good trick. Would you mind adding the reason the link is red and the need for a conversion, to have a complete answer I could select? $\endgroup$
    – mins
    Commented Aug 12, 2022 at 13:17
  • $\begingroup$ I don't know, because I can't reproduce this issue. Drop file here: blend-exchange.com Maybe I miss something $\endgroup$
    – Crantisz
    Commented Aug 12, 2022 at 13:23
  • $\begingroup$ Oh that's fun, It's a bug $\endgroup$
    – Crantisz
    Commented Aug 12, 2022 at 13:32
  • $\begingroup$ I appreciate you took the time to dig down to the loop. So the red link is actually an indication of an invalid link, but not limited to casting problems... $\endgroup$
    – mins
    Commented Aug 12, 2022 at 13:47
2
$\begingroup$

Switch the node Switch back to Geometry (Default setting). Then remove the existing connections. Then switch the node back to Vector.

The node remembers the connections you have tried before and will not be reset.

$\endgroup$
5
  • $\begingroup$ Good find. And a bug indeed. $\endgroup$
    – mins
    Commented Aug 12, 2022 at 13:39
  • $\begingroup$ @mins I wouldn't necessarily call it a "bug," but you're right: it does lead to a little confusion sometimes. ;-) $\endgroup$
    – quellenform
    Commented Aug 12, 2022 at 13:40
  • $\begingroup$ Switching geometries using inactive and hidden links while it should switch vectors using visible links... I call that a bug, not a feature. $\endgroup$
    – mins
    Commented Aug 12, 2022 at 13:44
  • $\begingroup$ If you find bugs, please post it here: developer.blender.org Thank you. $\endgroup$ Commented Aug 12, 2022 at 13:51
  • $\begingroup$ Already reported: developer.blender.org/T100374 $\endgroup$
    – Crantisz
    Commented Aug 12, 2022 at 14:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .