An array of numbers, symbols or expressions, arranged in row and columns. The numbers, symbols or expressions themselves are called elements or entries.

learn more… | top users | synonyms (1)

0
votes
1answer
387 views

Optimizing hierarchical transform

I'm transforming objects in 3D space by transforming each vector with the object's 4x4 transform matrix. In order to achieve hierarchical transform, I transform the child by its own matrix, and then ...
0
votes
2answers
525 views

getting bone base and tip positions from a transform matrix?

I need this for a Blender3d script, but you don't really need to know Blender to answer this. I need to get bone head and tip positions from a transform matrix read from a file. The position of base ...
3
votes
0answers
240 views

Blender - creating bones from transform matrices [closed]

Notice: this is for the Blender 2.5/2.6 API. Back in the old days in the Blender 2.4 API, you could easily create a bone from a transform matrix in your 3d file as EditBones had an attribute named ...
6
votes
1answer
228 views

Matrices: Arrays or separate member variables?

I'm teaching myself 3D maths and in the process building my own rudimentary engine (of sorts). I was wondering what would be the best way to structure my matrix class. There are a few options: ...
4
votes
1answer
975 views

Multiplication for MVP matrices: Any benefits to doing so within the vertex shader?

I'd like to understand under what circumstances (if any) it is worth doing MVP matrix multiplication inside a vertex shader. The vertex shader is run once per vertex, and a single mesh typically ...
1
vote
1answer
461 views

Translate along local axis

I have an object with a position matrix and a rotation matrix (derived from a quaternion, but I digress). I'm able to translate this object along world-relative vectors, but I'm trying to figure out ...
0
votes
1answer
1k views

Trouble with Collada bones

I have a Collada file with a rigged mesh. I've read the node tags in the library_visual_scenes tag and extracted the matrix for each node and stored everything in a hierarchical bone structure. My ...
2
votes
1answer
530 views

Why use 3d matrix and camera in 2D world for 2d geometric figures?

I'm working in XNA on a 2d isometric world/game and I'm using DrawUserPrimitives to draw some geometric figures... I saw some tutorials about creating dynamic shadows but I didn't understood why they ...
5
votes
2answers
1k views

Should the modelview and projection matrices be calculated in the shader or on the CPU?

At minimum I would have a camera with rotation and world position; projections parameters such as angle of view and perspective vs. orthographic; and meshes with scale, angle, and world position. ...
2
votes
1answer
316 views

Transform 3D vectors between coordinate systems

I've got 6 points in 3D space: A,B,C,D,E,F, that represent 4 vectors. AB is perpendicular to AC and DE is perpendicular to DF. I need to find a transformation matrix M, that transforms AB to DE and ...
2
votes
2answers
2k views

How to port animation from one skeleton to another?

While I need to do this in a Blender3D modeler script, the math should be similar for other modelers or realtime engines. Blender3D specific terminology: Armature = skeleton EditBone = rest pose bone ...
0
votes
2answers
490 views

Vectors from matrix

In XNA you can get front/back/left/right vector of Matrix class. How get these vectors without XNA, through C++ using standart 4x4 matrix ? I dont understand what exactly they mean but found them very ...
-1
votes
1answer
386 views

Create plane matrix from three 3d points

I have three 3d points (x, y, z). I am trying to create a 3d plane and get a 3d Matrix from those points. The XYZ values are not accurate in this case but should give an idea on what I am looking. ...
3
votes
1answer
318 views

Retrieving model position after applying modeltransforms in XNA

For this method that the goingBeyond XNA tutorial provides, it would be really convenient if I could retrieve the new position of the model after I apply all the transforms to the mesh. I have edited ...
2
votes
1answer
769 views

Is it possible to billboard a sprite using a transformation matrix?

None of the current topics on billboarding seemed to answer this question. But, given a sprite (or quad) that has it's own 4x4 transformation matrix a camera with a view matrix (a standard 4x4 ...
5
votes
2answers
249 views

Randomly generated track

I would like to create randomly generated track from one point to another with specified length of that track (it can be 2 more or less as a result of that function) in matrix. I have function called ...
8
votes
1answer
6k views

Transform Matrix multiplication order

I am experiencing difficulties trying to figure out the correct multiplication order for a final transform matrix. I always get either strange movement or distorted geometry. My current model is ...
0
votes
2answers
5k views

Scaling Model in XNA, keep position

I am trying to create a little fun 3D game in XNA, but I am having some problems with scaling my models. I use models from random sites, so my battleship is for an example 10 times larger than my ...
3
votes
3answers
2k views

How to calculate the inverse of a 4*4 opengl transform matrix

I am transforming my camera like any other object. I would like to set the view model matrix to the inverse of this so that I can draw the rest of the objects relative to the camera. How do i ...
2
votes
2answers
1k views

XNA Camera 2D confusion

I have followed the tutorial at http://www.david-amador.com/2009/10/xna-camera-2d-with-zoom-and-rotation/ to implement my 2D camera and everything works just fine. However this leaves me confused. ...
2
votes
1answer
393 views

multiply matrix by vector: what to do if need to change y-up to z-up?

I multiply a matrix with a position vector to get a new position, however, now I need to change my matrix from y-up coordinate space to z-up. Changing only the matrix won't work: how to apply the ...
4
votes
1answer
2k views

Moving a rotated model in XNA

This seems like a simple problem with an equally simple solution that is invisible to me. I have a model that spawns at the origin and looks at my player model wherever it goes. I would like it to ...
2
votes
1answer
180 views

Rotation going wrong

I'm calculating matrices by hand. Translations are fine: void Translate (float x, float y, float z, float[4][4] m) { Identity (m); m[3][0] = x; m[3][1] = y; m[3][2] = z; } If ...
2
votes
2answers
2k views

calculate new vertex position given a transform matrix?

How can I get the new position of my vertex given a 4x4 transform matrix or simply 9 floats (positionX, positionY, positionZ, rotationH, rotationP, rotationR, scaleX, scaleY, scaleZ)? Usually I can ...
0
votes
1answer
151 views

Calculate vertex coordinates

Newbie here! I need to know the effective coordinates of a triangle after applying transformations (rotations & translations) to the current (MODELVIEW) matrix. That is, given a vertex P, I ...
4
votes
1answer
318 views

Translation from one coordinate system to another having Z-offset issues

I'm using ARToolkit to do an augmented reality application, but my problem is really with the 3D coordinates. In this application, I use my webcam to generate the scene. I have two markers (printed ...
4
votes
1answer
2k views

Bones Animation - Matrices and calculations

We are 'on final' when it comes to finishing the project, but just before implementing the animation system. Our Client decided to choose "Bones Animation" - which is that I should export each ...
1
vote
4answers
2k views

Rotating a model AND translating it forward in XNA

I have this enemy class, and I want it to 1) Spawn at a certain place Vector3 pos 2) Rotate to face my player position 3) Move forward As this code is now, it will appear at it's specified place: ...
5
votes
1answer
381 views

How do I create weapon attachments?

My question is; I am developing a game for XNA and I am trying to create a weapon attachment for my player model. My player model loads the .md3 format and reads tags for attachment points. I am able ...
3
votes
1answer
3k views

Unity3d vector and matrix operations

I have the following three vectors: posA: (1,2,3) normal: (0,1,0) offset: (2,3,1) I want to get the vector representing the position which is offset in the direction of the normal from posA. ...
2
votes
1answer
1k views

Flip rotation matrix

I'm doing character control with kinect. I need to mirror the joint orientation because the character faces the player. Somehow by Googling through internet I've done it and everything works very ...
0
votes
3answers
479 views

Xna Equivalent of Viewport.Unproject in a draw call as a matrix transformation

I am making a 2D sidescroller and I would like to draw my sprite to world space instead of client space so I do not have to lock it to the center of the screen and when the camera stops the sprite ...
1
vote
2answers
785 views

Matrix rotation of a rectangle to “face” a given point in 2d

Suppose you have a rectangle centered at point (0, 0) and now I want to rotate it such that it is facing the point (100, 100), how would I do this purely with matrix math? To give some more specifics ...
5
votes
1answer
1k views

Problem with Assimp 3D model loader

In my game I have model loading functions for Assimp model loading library. I can load the model and render it, but the model displays incorrectly. The models load in as if they were using a seperate ...
3
votes
2answers
566 views

Passing an objects rotation down through its children

In my topdown 2d game you have a player with a sword, like an old Zelda game. The sword is a seperate entity, and its collision box "rotates" around the player like an orbit, but always follows the ...
10
votes
1answer
2k views

Screen space to world space

I am writing a 2D game where my game world has x axis running left to right, y axis running top to bottom, and z axis out of the screen: Whilst my game world is top-down, the game is rendered on a ...
2
votes
1answer
7k views

Transform between two 3d cartesian coordinate systems

I'd like to know how to get the rotation matrix for the transformation from one cartesian coordinate system (X,Y,Z) to another one (X',Y',Z'). Both systems are defined with three orthogonal vectors as ...
1
vote
4answers
5k views

Transform coordinates from 3d to 2d without matrix or built in methods

Not to long ago i started to create a small 3D engine in javascript to combine this with an html5 canvas. One of the issues I run into is how can you transform 3d to 2d coords. Since I cannot use ...
2
votes
2answers
468 views

3D Translation using only distance and angles

So I'm starting to foray into 3D game programming, but I've hit something of a snag. I have an object I want to move around. It should always move either forward or backward relative to its local Z ...
3
votes
2answers
537 views

Trying to understand 2D vector -> projection space conversion

I'm trying to understand how I can transform 2D vectors (x, y) to projection space. Something hasn't quite clicked for me yet. As per my previous question, here's the effect I'm trying to achieve: ...
0
votes
3answers
267 views

Project rendering onto a polygon in the scene

I have a function that renders a simple OpenGL scene. I want to display this scene on a polygon within another scene, without the function having to know about it. For example, to display the scene on ...
6
votes
2answers
2k views

Matrix for 2D perspective

I'm trying to determine whether what I'm attempting to achieve is even possible mathematically. I'm obviously not a seasoned game developer so I'm having trouble even coming up with the terminology to ...
3
votes
1answer
1k views

How do I know if a perspective matrix is right or left handed coordinate system?

For example, if I define my perspective matrix as the following: m[0] = 1.f / ( aspect * focalLength ); m[5] = 1.f / focalLength; m[10] = -zFar / (zFar - zNear); m[11] = -1; m[14] = ...
6
votes
3answers
917 views

Arbitrary projection matrix from 6 arbitrary frustum planes

A projection matrix represent a tranformation from the camera view space to the rendering system clip space. In other words, it defines the transormation between a 6-sided frustum to the clip cube. ...
1
vote
1answer
854 views

Translating local to global coordinates in ARToolkit / OpenGL

Ok, so I've tried reading over the other questions and something's just not clicking for me. I am working on an augmented reality application using ARToolkit, however it should just be straight ...
1
vote
2answers
836 views

Transformation order when dealing with Meshes

I have created a player model out of primitive types. To do this I have created a Model class and Component (mesh) class. Each model consists of one or more components my problems start when you have ...
1
vote
1answer
332 views

How to prevent 2D camera rotation if it would violate the bounds of the camera?

I'm working on a Camera class and I have a rectangle field named Bounds that determines the bounds of the camera. I have it working for zooming and moving the camera so that the camera cannot exit its ...
2
votes
2answers
860 views

What is the difference between Vector2.Transform and this method?

I've been working on some steering behaviors and ran into trouble with my logic for converting points in world space into points in local space. I had this (it's not optimized for multiple points yet, ...
2
votes
1answer
372 views

How do you extract a Vector3 positions only from a world matrix in an array of positions (from Kinect)

've just started building a physical camera class for the depth data you get from a Kinect. I have a Vector3 array of [imageWidth, imageHeight] describing the LOCAL positions I get in from the kinect ...
3
votes
1answer
388 views

Confused about order of operation when using a Matrix in XNA, C#

Here are two different pieces of code This is what I started with Vector2 hold = Vector2.Transform(pos1, mat1); Matrix inv = Matrix.Invert(mat2); Vector2 pos2 = Vector2.Transform(hold, inv); And ...