Questions tagged [matrix]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3
votes
1answer
152 views

What does ''Axis'' input of Vector Rotate node do?

What does the Axis input do? I’m aware that if the input is 0-1-0, the rotation will be performed around Y axis, 1-0-0 for X axis and 0-0-1 for Z axis. The math to perform the rotation using those ...
1
vote
0answers
36 views

Matrix multiply a Vector using Loc/Rot/Scale Attributes

I am making a setup that uses Object Coordinates from an Empty as Normals. This works great until you start moving the object with a rig, at which point you realize that these "Normals" are ...
2
votes
0answers
19 views

Trying to get the right orientation matrix

So i'm using a importer that uses a matrix and changes the transform and when i try and import with my keyframe data the arms and legs are like backwards? Crossed not sure how to explain it. So i'm ...
0
votes
0answers
11 views

How to add a bone with selected object's rotation, location and dimensions/length?

Currently I am able to spawn a new bone and place it at a selected object's location and to match thee selected object's length but how does one transfer the selected object's rotation over to the ...
1
vote
1answer
23 views

Create a list of matrix_world.translation for child object for n frames of animation

I want to save the location of a child object during the parent's animation. My code populates the list with the last read value and none of the other values. If I print the z location each iteration ...
1
vote
1answer
57 views

matrix_basis doesn't set to the values I am setting it to

So, I'm importing animation data from a text file, containing the bonematrix for each frame and each bone. I am simply setting the matrix_basis of each bone and adding a keyframe, and repeating. The ...
0
votes
1answer
54 views

bpy.types.Bone.matrix vs matrix_local

According to the doc: matrix 3x3 bone matrix matrix_local 4x4 bone matrix relative to armature I guess matrix_local is the full transform matrix that describes ...
0
votes
1answer
23 views

axis_conversion producing unexpected result?

I am attempting to convert the world transforms of scene objects into a different coordinate system (-Z forward Y up) using axis_conversion method as follows: ...
3
votes
1answer
220 views

How to Decompose and Compose the local transform matrix

The Setup: I have a simple setup with two cube objects with a parent child relationship like so: The Red cube is a child object of the green cube. The Red cube has the following transforms: The ...
0
votes
0answers
13 views

How to keep two object relative position and set one to origin

I'm writing Python code to intergrade the VIVE tracker to the Scenes, but OpenVR only provides absolute and separate positions. right now I'm successful to get two trackers position and rotation, one ...
4
votes
2answers
87 views

Align viewport rotation to normal vector like Shift+7 in edit mode

I know this question has been asked and answered before but the behavior I want is what ⇧ Shift + Num 7 exactly does in edit mode which is to align the viewport to "face" the element ...
1
vote
0answers
26 views

Different euler rotation from same Matrice between Blender and Maya

My problem is the following: I start from the same matrix between Blender and Maya and I want to get the euler rotation in degrees of this matrix. The problem is that I don’t get the same results at ...
1
vote
0answers
136 views

Convert quaternion from Blender to Unity

I want to convert an euler or quaternion rotation from Blender to an euler or quaternion rotation on Unity. The goal is not to export an object from Blender to Unity, but only to convert the rotation ...
0
votes
1answer
69 views

Get vector location list from matrix list via script node in Animation Nodes

I want to be able to view the coordinates of the locations of the matrices after I have manipulated the matrices with matrix nodes. Would someone be able give me an example script, which I assume ...
0
votes
1answer
44 views

Random step between instances on animation nodes

Can the step distance between instances on animation nodes with a matrix distributed in a spline be random or varied? I just need the distances between the cubes to not be even.
0
votes
0answers
44 views

How to set the parameters to get the same imaging results as Azure Kinect DK?

Through the camera parameters, I can unproject the depth map to get a point cloud. For the obtained point cloud, I can project it to get the depth map, but how to set it in blender, to get the same ...
2
votes
1answer
54 views

Rotate vertices to any arbitrary rotation

I'm trying to rotate a set of vertices (in the example code they form a triangle but will be an arc) to any arbitrary rotation. I start by building a base triangle on the X,Y plane with a Z normal. ...
2
votes
1answer
288 views

Python, How to get pose bone to rotate with another pose bone from a different armature? Finding Rotational difference

I have two Armatures with different bone structure. The goal is to get the rotational difference of one bone from a one Armature and translate it to the bone of the other Armature. Code **For a ...
3
votes
1answer
161 views

Which matrix to use to transform children local coordinates to global?

Setup I have an object Plane with 6 vertices. To each vertex I assign another object as child. Then I apply two keyframes on location to object Plane: In frame 0 it goes to Z = 5 In frame 81 it goes ...
0
votes
0answers
14 views

mocap, bone(s) rotation re-target with python

I have two armatures, source and target, for each bone I want mapped from source I add an empty parented as bone (tail), for each bone in target I want mapped I add a copy-rotation (global) constraint ...
0
votes
0answers
41 views

Getting correct particle location with Python

I'm trying to export the transforms of hair-type particles with Python, like this: ...
0
votes
0answers
42 views

recreating a scene from THE MATRIX

for a video project I am trying to re-create a scene from the Matrix. https://www.google.com/url?sa=i&url=https%3A%2F%2Fgfycat.com%2Fru%2Fhelpfullavishboilweevil-virtualworlds-thematrix-fairuse&...
0
votes
1answer
32 views

Converting program specific functions to Blender in python

I'm sorry the title is vague, but I couldn't come up with a summary of my problem. I am trying to convert a script made for a model viewing tool called Noesis to Blender. I'm stuck on some Noesis ...
1
vote
0answers
73 views

How does blender scaling works?

I am new to blender. I have been looking into a github code, and trying to understand the operations. I am confused about the blender scaling operation. This is the code for scaling: ...
1
vote
0answers
182 views

Converting bones transformation matrix from OpenGL to Blender

So, I'm trying to convert some transformation matrices from OpenGL to Blender but bone poses are wrong. I assume it's transformation matrix, I'm no expert in OpenGl but it's used in this function: <...
1
vote
1answer
399 views

Matrix math to translate, rotate, scale with respect to a pivot point in Object mode

So i need to need to replicate translate, rotate & scale with 3d cursor as pivot point action using Matrix or bmesh in a script. i read Rotate objects around their origin along a global axis (...
4
votes
1answer
221 views

Unrotate a square polygon with Python: all 3 axes

I have a rotated square polygon. And I want to 'unrotate' it so that its normal axes would match world axes. I'm able to unrotate it on the Z axis by using the face normal and rotation difference (I ...
1
vote
0answers
53 views

Bone matrices manipulating problem

So I'm trying to convert additive animations to a weird format that Source engine uses: instead of offsetting the bone relative to its local space, it uses whole armature's origin point for that. All ...
0
votes
2answers
347 views

Easy way to format mathutils.Matrix Vector as tuple (or list) for json?

Hi I am currently making simple pose preset system with json for specific Armatures. It just discribe non driven bone matrix as json (export), then import and apply for pose bones when there is same ...
5
votes
1answer
482 views

Why is this Blender matrix multiplication not distributive?

I was surprised in working on a Blender problem recently to find that matrix multiplication doesn't seem to be distributive: ...
0
votes
1answer
49 views

Matrix not applying to pose bone correctly

I'm attempting to import animations from text files but I can't seem to figure out how to properly import it. If I make a list of positions in a text file like here ...
0
votes
0answers
223 views

Move selected object with transformation matrix

I'm working on a script which exports geometry and structure data (BOM and position) from CATIA V5 into blender. Catia V5 delivers as an absolute position for each part an array with 12 elements. 9 ...
0
votes
1answer
202 views

Access elements of matrix(vectors and Euler angles) in Animation nodes using script node

I would like to know to access individual elements of a matrix or matrices from Matrix/Matrix list input in the script node. Then I can perform some operations(experimentation) on those elements and ...
0
votes
0answers
110 views

Setting the points of a nurbs curve to (XYZ) in worldspace [duplicate]

I`m trying to snap the ends of a curve, to two points in space. However, I can't get past the fact that It requires worldspace input of a matrix instead of a vector. I've tried to convert worldspace ...
0
votes
1answer
57 views

Why is the transform gizmo not aligned correctly to my Python created object?

I am having a little confusion here. Some background: the user perspective faces in a direction, I am trying to make a box that faces the user perspective. That I have been able to achieve (pic below) ...
1
vote
2answers
178 views

Bone matrix assignment behaviour change in Blender 2.80

I am trying to port an armature importer add-on from Blender 2.79 to Blender 2.8x. After the bone is being created the bone matrix is set. But the assignment of the bone matrix has a different ...
0
votes
1answer
354 views

How to calculate a parent inverse matrix?

Say I want to parent the default Cube to the camera from python without using an operator. First part is easy: ...
0
votes
3answers
252 views

Trying to find a way to make a true pixel screen

Using UVs to animate the shapes on the screen would be hard and tedious so i want to use geometry to impact which dots light up the compositor won't really help as it pixelates where the camera is ...
2
votes
1answer
79 views

Matrix from quaternion produces a different orientation

I want to convert a quaternion to a matrix and back again. The result has a different orientation than the quaternion from the beginning. To reproduce the problem, set a quaternion. ...
1
vote
1answer
178 views

How can I multiply a quaternion and a list of vectors that represent xyz vertices of an object

How can I multiply a quaternion and a list of vectors together (which will represent the x,y,z vertices of an object)? The error I get is: Error: Quaternion multiplication: not supported between ...
1
vote
1answer
78 views

How to get local rotation from Matrix but taking parent transforms into account

beI have this simplified blend file were I need to match the bone 'shoulder' to this other bone called 'shoulder_extra_snap': https://pasteall.org/blend/9f468cbe96f145eb9d77553f3ebf1b89 So, both ...
2
votes
1answer
174 views

Unexpected result setting a shear matrix as transform

I am doing a visualization where I need to transform a sphere with a matrix. Easiest solution would be to just set the matrix as local transform but this gives me unexpected results. I was trying ...
2
votes
1answer
417 views

Does a child object inherit the matrix from the parent?

When you create a hierarchy with nesting like so: Does Circle inherit the properties from the parent matrix? Or is first the matrix of ...
1
vote
0answers
60 views

Can I get the orientation matrix in real time?

I need to calculate the normal orientation matrix for the tool. There is a way to get a custom orientation matrix ...
2
votes
1answer
256 views

How do I get the normal vector of a selected vertex?(BMESH)

I'm trying to Orient my gizmo according to the normals, but I can't do it exactly. Sometimes perfect, sometimes not. Can you tell me what's wrong? ...
2
votes
1answer
928 views

blender python move faces along normal

Using the GUI you can Set Transform Orientation to Normal select a face in edit mode then hit G button then Z button to move the face in the direction of the normal. I am trying to do this with ...
2
votes
1answer
2k views

Can you work with homogeneous coordinates in the Python API?

If I do this (excuse the transpose, I'm used to looking at matrices the other way round): ...
2
votes
0answers
134 views

mathutils.Matrix, matrix_world: set + get round-trip with ndarray requires transpose?

It seems like the Blender Python API lets you set certain transform attributes, like .matrix_world, using NumPy matrices. However, it seems like there may be some ...
3
votes
1answer
2k views

How to apply all transformations to an object at low level?

I am new to Blender (and to some extent to python). I have pieced together this function that rotates and scales an Object at low level by modifying the matrices: ...