Jump to content

There seems to be a bug in the XPresso Vector2Matrix Node


SharpEars

Recommended Posts

If a simple Y Unit Vector goes through the Vector2Matrix transformation XPresso node, whose Function Node property is set to Y-Axis, the end result, as displayed by a Result node configured to display Matrix values, is quite surprisingly the following (with the seemingly erroneous member vector in question shown in red text):

[ 0;0;0 | -1;0;0 | 0;1;0 | 0;0;1 ] 

 

The expected result is: [ 0;0;0 | 1;0;0 | 0;1;0 | 0;0;1 ]

 

Attached is an image highlighting the issue in the context of other possible transformations. Please note that for all other cases, whether fundamental or where the input Unit Vector is transformed to the direction of an alternate Axis, there is never an inversion in sign. The seemingly incorrect sign is only present for the case marked in red:

 

xpresso-Vector2-Matrix-bug.png

Edited by SharpEars (see edit history)
Link to comment

Let's show what happens due to this bug in a larger context.

 

Say you are an adventurous chap and decide to use the XPresso Vector2Matrix node, in accordance with its documentation in the Cinema 4D Help, to control the alignment of a simple spline in the shape of an arrow (that initially has world alignment and is pointing up [i.e., in the direction of the positive Y Axis]). Judging from the bewildered look on your face when you saw the results, things did not quite turn out as planned (where "as planned" is defined in this case as a no-op with respect to re-alignment!):

 

set-arrow-alignment.png

 

Note especially the direction of the Arrow object's X axis as compared to the world X axis, thanks to the assignment of a negative scaled combined with a 180 degree bank rotation, resulting from the aberrant matrix that was constructed from a simple Y Unit Vector by the Vector2Matrix XPresso node.

 

Let's take a look at what the Help says for this node, shall we:

 

Vector2Matrix-help-with-highlights.png.c12861df185549e1573c432bb4ac8cde.png

 

Above is the current help text in which I highlighted the portion of particular relevance to the issue at hand. I suppose the node is doing what the documentation says - the Y Vector component of the Matrix is pointing in the correct direction. I take it that the added "benefits" of arbitrarily corrupting the X Vector of the Matrix to a value that "only its mother could love," to such an extreme in fact that our poor Attribute Manager is doing its best to make sense out of the ensuing mess by displaying a Y Scale value of -1 and a Bank angle of 180 ° (as pointed to by the hand drawn ᑯ ᒋᒋᘮᗐᔑ in the second attached image), is par for the course?

Edited by SharpEars (see edit history)
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • LATEST ACTIVITIES

    1. 1

      Cinema 4D 2025.1 ❄️ Winter Release 2024

    2. 1

      Cinema 4D 2025.1 ❄️ Winter Release 2024

    3. 13

      Multi Gizmo (Move, scale, rotate in one)

    4. 7

      Looking for Python Script : Create Instances from multiple Selected objects

    5. 13

      Multi Gizmo (Move, scale, rotate in one)

×
×
  • Create New...