The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [matrix]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
42 views

Animation Nodes - Blend distribution of objects on a curve into another curve

I've been trying to recreate the effect from the Cinema 4D tutorial below: https://www.youtube.com/watch?v=BPv2HVvQfGo I'm stuck at 9:55 where he uses the inheritance effector to be able to morph ...
0
votes
0answers
25 views

Combined Matrix from LHS to RHS

I am rotating an 3D object around a point that is not the origin. To do this I perform this I create a combined matrix transform by following https://www.euclideanspace.com/maths/geometry/affine/...
0
votes
1answer
40 views

Matrix rotation not changing scale

I'm trying to use Blender to test some matrix transforms but I'm still trying to learn at the same time. The problem is how to use the Python API to apply a rotation matrix, but to start with I have ...
0
votes
0answers
9 views

How is the local bone orientation calculated based on head and tail position

I went through the Blender's source code, but wasn't able to find how the local orientation of each bone is calculated based on its the head and tail (I thought I should specify that I'm talking about ...
0
votes
1answer
24 views

Extract the rotation (or heading) from local matrix (Blender Python)

If I use physics then the objects rotation not changed but I want to detect the object rotation based an another empty axes (or the world mtrix). I tried extract rotation attribs from local matrix ...
0
votes
0answers
13 views

Creating blender objects with matrix of 3D coordinates?

I have a matrix of 3D coordinates for about 10,000 points. Is there a way to import this matrix into blender in such a way that it creates a simple sphere of the same size at each point in the matrix ...
1
vote
1answer
25 views

BGE Mouse Look Min and Max Bounds Changing?

I have written a script in python that successfully saves and loads the position and rotation of my player cube and camera for use between scene transitions. However, something is going wrong with the ...
1
vote
2answers
184 views

How to get a Center Point from multiple Vertex Locations?

tl;dr: I just want to create some curve guides along those middle points of vertex groups but with a script. I am new to Python in Blender and I can't seem to find how to do this. So far, I managed ...
3
votes
1answer
183 views

Align Object A to Object B to their respective active faces with python

i want to Align two objects depending on their active faces like in this gif below didn't find any answers but only this clue below from this question: Align to face normal vector but it only align ...
0
votes
1answer
60 views

How do I lay objects on the surface of a sphere with Python?

Just started Blender (and Python) about a week ago, so please bare with me. I apologize ahead of time for confusing/misused terminology, etc. I am working on a research project and I need to: ...
0
votes
0answers
20 views

Transformations not consistent for different animations of same model in separate FBX files

I have written my own game engine and I need to import multiple animations for the same model via FBX files, so I can blend between them and have partial animations (i.e. not all bones) for stuff like ...
0
votes
1answer
153 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
107 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 ...
18
votes
1answer
407 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
391 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 &...
6
votes
1answer
2k 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
88 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
45 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
130 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
819 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
35 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
1answer
245 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 ...
1
vote
0answers
84 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 ...
2
votes
1answer
297 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, ...
1
vote
1answer
34 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, ...
3
votes
1answer
413 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. ...
3
votes
1answer
243 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
219 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 ...
2
votes
2answers
879 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
217 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
77 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
901 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
1answer
229 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
216 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
399 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 ...
4
votes
1answer
388 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 ...
2
votes
0answers
244 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 ...
2
votes
2answers
380 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
307 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
381 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 ...