Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [matrix]

The tag has no usage guidance.

0
votes
0answers
11 views

pose.bones.matrix does not update after frame change via script

I write an exporter to retrieve the pose bone matrix for every frame. The concept looks like this, the code is called from an exporter class via an operation button in the tool shelf: ...
1
vote
1answer
21 views

matrix_basis vs. matrix_local for object parented to bone

How does matrix_basis vs matrix_local work for object parented to bones? Looks like ...
15
votes
1answer
211 views

Cycles generates distorted depth

The depth map generated by the Cycles rendering engine seems to have (radial) distortion, while the Blender renderer does not. However, I could not find anywhere information on the internal camera ...
1
vote
2answers
63 views

Apply Transformation Matrix to Existing Mesh

How can I apply a 3x3 or 4x4 transformation matrix to a mesh such that the matrix's transformation is baked into its geometry? E.g. applying the following matrix... \begin{bmatrix} 1 & 0 &...
1
vote
1answer
117 views

TypeError: Element-wise multiplication: not supported between 'Matrix' and 'Vector'

Using 2.8 I am getting the following error when trying to multiply matrices and vectors ...
0
votes
1answer
67 views

How to change color only of selected objects in a matrix?

I'm trying to exempt a couple of objects from being colored by an 'empty' which is coloring the cube matrix based on the distance. In the image there are 2 empties: one is coloring the cubes blue, ...
2
votes
0answers
27 views

Variable invalidated after CTRL+Z

I recently observed a behavior in blender scripting which I do not understand. Can you help me understand what is happening in the following example? Start blender, add a cube, go to scripting view ...
2
votes
3answers
86 views

Transformation matrix problem with matrix_world, with different results based on the same values in different form

When I created a matrix transformation in the console as follows, blender file ...
1
vote
1answer
283 views

How to apply transformations to an object using the world matrix?

I'm taking a computer graphics course. In one assignment I had to check if a matrix transformation maps points to another set of points I thought that the best way to learn how this was to use ...
1
vote
0answers
19 views

What is the position of my keyframe animated object?

I'm an experienced developer but completely inexperienced with 3d modeling and python. I have a modeled a Rubik's cube containing 26 (center omitted) cubes where the center cube, if I had one, would ...
0
votes
0answers
64 views

Python API: How to calculate the head and tail positions for Bones from matrix?

So I think this question has been asked on this exchange at least once before. But since it hasn't gotten a response in more than one year and six months, hopefully it's fair to ask again. I am ...
0
votes
0answers
22 views

What are these three set of quaternion of a bone?

I need to find global location of bone. I found three set of quaternion of a bone. I am not sure what they are.... ...
0
votes
1answer
129 views

How to get a bone’s Pose Mode transform matrix

With my script I want to export these values for bones: I have tried using PoseBone.matrix_basis but I got incorrect values. For instance the expected quaternion ...
0
votes
0answers
63 views

How to get rest pose bone matrix relative to parent?

I would need something like "matrix_basis" in the PoseBone class, but this is for pose bone not rest. What is the recommended method to get the matrix for bone relative to its parent ? In the bone ...
1
vote
0answers
59 views

How to get access to Bone Matrix on the Previous frame with Python? (or animation nodes)

Does anyone know if it is possible to get access to a bone matrix on the previous frame with python? (or any offset value for that matter) I'm trying to figure it out but it isn't possible to sample ...
1
vote
1answer
111 views

What is the difference between matrix_basis and matrix_world?

I know it is a bad question sorry but I haven't found any information about these matrices expect in the blender documentations. The docs say that matrix_basis is: Matrix access to location, ...
0
votes
1answer
23 views

Set the world_matrix of a bone

I need to copy the world matrix of a bone and assign it to another bone. Both have different parents. Pretty much what the copy transforms constraint does, but for a single frame without dependencies, ...
2
votes
1answer
211 views

How can I move a PoseBone to a specific world space position?

I have written some code that calculates the world space coordinate I want to move the bone to but i am having trouble figuring out how to get that back into the bones coordinates. ...
1
vote
1answer
67 views

how to interpret the camera world matrix?

If I check the world-matrix of a camera, that views the default cube from the negative world y-axis location:(0, -6, 0) I see ...
1
vote
0answers
70 views

How do I use world_matrix.rotate() correctly?

I've been hammering away on my keyboard for the last few hours to get something seemingly simple done. What I want to do is further rotate an object's world matrix. So I'm grabbing the world matrix ...
0
votes
0answers
115 views

Apply Transformation to Pose Bone Along Its Local Axis in Python

How can I move a pose bone along its local axis in python? I am trying to programmatically achieve the following It seems similar to this question but for a pose bone, not an object. Previously I ...
2
votes
2answers
434 views

Set matrix rotation value (not add to it)

The below code will rotate a selection of objects around an arbitrary location (using the active object's location here) by the chosen angle (45 in this example). I cobbled this code together from a ...
0
votes
1answer
103 views

Converting Matrices to translations and back changes geometry in Animation Nodes

I was just working on an AN function to tilt a ring of points inwards or outwards from their center. The circle is generated from the Distribute matrix node, and then Z values are added from another ...
2
votes
0answers
57 views

Python script that takes xyz and returns the perspective matrix vertex coordinates [duplicate]

I've been trying to write a script that receives the xyz coordinates of a vertex of a 3D object and returns the xyz coordinates of the vertex in a prespective projection plane, more or less like in ...
0
votes
2answers
354 views

Rotation matrix addition

I suck at programming but am trying to rotate an object a specific way. The line own.localOrientation=mathutils.Matrix(x, y, z) is giving me an error: ...
0
votes
0answers
36 views

Bone animation key export problem

Here is my simple bone rig in rest position (First bone has its head at the origin) In blender, the quaternion(W,X,Y,Z) rotation values for the first bone read: (1,0,0,0) at t = 0 and the second bone ...
0
votes
1answer
163 views

Rotation Matrix

i am having a hard time trying to dechiper how blender game engine allocate the rotation values on the rotation Matrix, this website describes the values like this. But when i print the rotation ...
2
votes
2answers
145 views

Match two planes with different origin locations (Blender Python Matrix Math)

We see two identical Plane objects: A(blue) and B(red) They are oriented arbitrarily in the 3D space. Notice that the origin of A is located in the center and the origin of B is located in the lower ...
1
vote
1answer
284 views

Move one pose bone to the location of another in the same armature

Could someone help me get out of the starting blocks I suspect I'm making this harder than it needs to be. with python Lets say in pose mode I have bone A at location (0.00,0.00,2.00) world space ...
5
votes
1answer
287 views

How to get XYZ euler rotation of 3DView?

I'd like to extract the user view orientation of the current 3DView. Since I didn't find a direct command to get it, my approach would be to take its matrix using ...
1
vote
0answers
160 views

Cycles Convolution Matrix (Kernel)

According to this post: voronoi cracks fac Is it possible to refactor the texture and use it from outside the node group? So it would be possible to have an Convolution Matrix Node. P.S. Why are the ...
1
vote
2answers
250 views

Animation nodes: rotate around axis

How do you rotate an object around a given unit vector and angle? I thought I could use this matrix, but I'm unable to create a custom 3x3 matrix inside animation nodes. $$R= \begin{bmatrix} \cos\...
2
votes
0answers
208 views

Change rotation order of a matrix

So, I am writing an exporter to another scenegraph format. Trouble is I suspect it has a different order of rotation (not 'XYZ'). So how do I change a Blender Matrix 3x3 or 4x4 into one that has same ...
4
votes
1answer
266 views

How can I decompose a matrix for use in DirectX?

I'm writing a custom exporter from Blender that will work with DirectX. I am using as a guideline the DirectX exporter found in Blender 2.76. The Blender export script for DirectX uses the following ...