Questions tagged [matrix]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
15 views

Apply matrix correctly to posebone

I am trying to import 3D models and animations from binary files. When importing animation matrices and apply them to posebones.matrix, the animation mesh up when I set parent for each editbone (...
0
votes
1answer
8 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
0answers
10 views

Object Matrix Output, animation nodes problem

I have some problems with my animation nodes, when I node from object instancer to object matrix output, the cube transformed back to the default, it doesn't transform like the cube a make, hope ...
0
votes
0answers
14 views

I need help on matrix not rotating

I'm using an effect like this: https://www.youtube.com/watch?v=0TVGnTiYhwQ However when i try to rotate it and parent it, it doesn't want to keep formation with the plane, i think it's rotating on ...
0
votes
3answers
103 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 ...
1
vote
0answers
15 views

Order of operations when calculating object transform matrix (matrix_world, viewport channels, OpenGL model matrix)

With its Python API, Blender allows us to directly assign the transforms of objects, using matrix_world attribute. Under the hood Blender renders objects via ...
2
votes
1answer
20 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. ...
0
votes
0answers
22 views

Create object over face aligned-with and nearest to the 3d-cursor

The following-code purpose is to create a cilinder over the 3d-cursor and rotate the cilinder so that is aligned with the nearest face of the selected-object to it. For it to work the active object ...
1
vote
1answer
36 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 ...
0
votes
1answer
40 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
40 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 ...
0
votes
0answers
17 views

How to convert pose_bone.matrix and set to pose_bone.local_transform (localtion / rotation / scale)?

My character animation flow needs to be keyframed when the "child of 01" value is 1 and the "child of 02" value is 0, and then curve optimization is performed when the "child of 01" value is 0 and the ...
0
votes
1answer
59 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
29 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 ...
1
vote
1answer
62 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? ...
0
votes
0answers
27 views

Python : Negative scale causes global rotation discrepancies

I'm currently working on a system using Blender to export some scenes to a game engine. To do so, I've written a Python script reading the scenes and writing the files as needed. So far I've had no ...
1
vote
1answer
142 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
307 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): ...
1
vote
0answers
27 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 ...
1
vote
1answer
83 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: ...
0
votes
1answer
30 views

Custom exporter and problems with matrix and rotation order

I'm trying to write a custom exporter for cameras from/to Blender, but I'm having some problems with rotations and rotation order. In my mind I should be able to extract euler values from the world ...
0
votes
0answers
23 views

Get world_matrix without using frame_set()

Is there a way to get an objects world matrix without changing the frame before queying the value? I assume chaning frame will become pretty slow if the scene is heavy. I need the final value, ...
0
votes
0answers
31 views

Camera matrix is modified after rendering

I am using Blender based software from this project: https://cs.stanford.edu/people/jcjohns/clevr/ adopting it to my own one. My Blender version is 2.79 on Mac OS. Essentially, I have to create a ...
2
votes
1answer
315 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
89 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
237 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
23 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
147 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
21 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
51 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
464 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
411 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
81 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
1answer
278 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
293 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 ...
19
votes
1answer
566 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
854 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 &...
13
votes
1answer
4k views

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

Blender 2.8 produces the following error whilst multiplying a combination of matrices and vectors ...
0
votes
1answer
105 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
63 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
195 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
1k 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
43 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
348 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
94 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
467 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
65 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
795 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
411 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 ...