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)

5
votes
3answers
2k views

Mapping 3D object coordinates to 2D screen coordinates with perspective projection

Sort of following on from where this person was in their topic: Matrix for 2D perspective What I have at the moment is a transformation matrix that's defined as follows: http://pastebin.com/GM6BhP0R ...
7
votes
2answers
814 views

How can you extract orientation from a transformation matrix?

I have a 4x4 transformation matrix M, and I want to find out the shape of a sphere when transformed by M. (Sphere is at the origin and has radius 1.) I know I can find the center by just multiplying ...
0
votes
1answer
62 views

Assigning bone transform in every draw a good idea?

In my Draw method, I am doing the following: thisMesh.CopyAbsoluteBoneTransformsTo(transforms); Is this a good idea? Or should I do this once at the constructor level?
1
vote
1answer
349 views

2D Matrix Transformation (with a Player and Ground)

I have a simple game that I'm trying to do for learning purposes, but Matrices are a bit hard, especially in DirectX. I currently have a tilesystem that renders tiles at the screen and a character ...
0
votes
1answer
598 views

All of my matrix functions not working? OpenGL ES 2.0

I am trying to make a projection matrix scaling the screen and making a coordination system. For some reason I don't think any of my matrix calling is working... the 3 function I am using are ...
3
votes
1answer
636 views

Rotating 3d plane to XY plane

I have a triangle in 3d space and would like to create a grid over the triangle, such as in the image below. The purpose of this is to store information about each block of the grid. In order to ...
0
votes
0answers
318 views

Stacking Drawing Matrix for SpriteBatch in XNA

I'm trying to make a 2D engine for XNA with SpriteBatch. My object unit is Entity, which can include other Entities as its children. However, when drawing them, the rotation and scaling stacking do ...
2
votes
1answer
246 views

Handling Origin/Anchor Points in a Scene Graph

I'm trying to implement a simple scene graph on iOS using GLKit but handling origin/anchor points is giving me fits. The requirements are pretty straightforward: There is a graph of nodes each with ...
1
vote
0answers
167 views

How do I implement a physics gun?

I'm currently trying to implement a physics gun for my game. What I want is for the entity to stay in the same position on the screen no matter how I wiggle the camera about, what is the correct way ...
1
vote
1answer
191 views

Is my idea of how to use matrices to layer 2D on top of 3D correct?

I'm new to using matrices, so I'd like some input on whether I've understood the use of them in the context described in the title. Right now I have a small Direct3D 11-based game engine which ...
0
votes
0answers
58 views

Transform a Screen Delta

I have a delta in screen coordinates that I want to transform to a 3d delta in world space. The delta is in this case a movement across the (x,y) coordinates in screen space on the near projection ...
1
vote
2answers
605 views

Matrix Rotation with three Angles

I want to rotate a form with three given angles fo each of the three axis. But the GLM rotation function takes only one angle and a vector as arguments. How can I convert between both formats?
4
votes
1answer
222 views

How attach a model with another model on a specific bone?

I meet a difficulty attached to a model to another model on a "bone" accurate. I searched several forums but no result. I saw that many people have asked the same question but no real result see no ...
2
votes
1answer
382 views

Scaling along an arbitrary axis (Dealing with non-uniform scale)

I'm trying to build my own little engine to get more familiar with the concepts of 3D programming. I have a transform class that on each frame it creates a Scaling Matrix (S), a Rotation Matrix from ...
1
vote
2answers
507 views

convert orientation vec3 to a rotation matrix

I've got a normalized vec3 that represents an orientation. Each frame of animation, an object's orientation changes slightly, so I add a delta vector to the orientation vector and then normalize to ...
8
votes
4answers
2k views

Staggered Isometric Map: Calculate map coordinates for point on screen

I know there are already a lot of resources about this, but I haven't found one that matches my coordinate system and I'm having massive trouble adjusting any of those solutions to my needs. What I ...
0
votes
1answer
185 views

Y Axis inverted on vertex output

I've got my project running and somehow it seems my vertex y components are inverted. 10 in the positive on Y goes down and 10 negative on the Y axis goes up. I can't find anything with the ...
1
vote
1answer
499 views

How to do geometric projection shadows?

I have decided that since my game world is mostly flat I don't need better shadows than geometric projections - at least for now. The only problem is I don't even know how to do those properly - that ...
6
votes
1answer
464 views

How can I attach a model to the bone of another model?

I am trying to attach one animated model to one of the bones of another animated model in an XNA game. I've found a few questions/forum posts/articles online which explain how to attach a weapon ...
4
votes
1answer
162 views

How to transform mesh components?

I am attempting to transform the components of a mesh directly using a 4x4 matrix. This is working for the vertex positions, but it is not working for the normals (and probably not the tangents ...
1
vote
0answers
242 views

Drawing two orthogonal strings in 3d space in Android Canvas?

I want to draw two strings in canvas. The first string must be rotated around the Y axis, for example 45 degrees. The second string must start at the end of the first string and also it must be ...
2
votes
2answers
294 views

How should I organize my matrices in a 3D game engine?

I'm working with a group of people from around the world to create a game engine (and hopefully a game with it) within the next upcoming years. My first task is to write a camera class for the engine ...
6
votes
4answers
844 views

How can I generate a view or projection matrix for OpenGL 3.+

I'm transitioning from OpenGL 2 to OpenGL 3.+ and to GLSL 1.5. I'm trying to avoid using the deprecated features. My question how do we now generate the view or projection matrix. I was using the ...
0
votes
1answer
216 views

Stage3D: Camera pans the whole screen

I am trying to create a 2D Stage3D game where you can move the camera around the level in an RTS style. I thought about using Orthographic Matrix3D functions for this but when I try to scroll the ...
1
vote
0answers
228 views

Matrix.CreateBillboard centre rotation problem

I'm having an issue with Matrix.CreateBillboard and a textured Quad where the center axis seems to be positioned incorrectly to the quad object which is rotating around a center point: Using: ...
2
votes
2answers
806 views

The purpose of using invert and transpose

In openGl ES and the World of 3D - why use the invers matrix? The thing is that I dont have any intuition to, why it is used, therefore please correct me: As fare as I understand, it is used in ...
1
vote
1answer
141 views

Deformation of Sphere using Transformations

I have a graphic related question. I need to have a transformation matrix that I have no idea about what it is. The problem is to create right image from the right sphere. I created those images in ...
1
vote
1answer
184 views

Camera lookAt target changes when rotating parent node

have the following issue.I have a camera with lookAt method which works fine.I have a parent node to which I parent the camera.If I rotate the parent node while keeping the camera lookAt the target , ...
0
votes
1answer
104 views

coordinate transformation

I have two coordinate systems, like so How can I transform a point on the one of the coordinate system to other ? Pxyz = M . Px'y'z' what is M ?
1
vote
0answers
196 views

How do I convert my matrix from OpenGL to Marmalade?

I am using a third party rendering API, Marmalade, on top of OpenGL code and I cannot get my matrices correct. One of the API's authors states this: We're right handed by default, and we treat y ...
1
vote
2answers
633 views

How can I reflect a point with respect to the plane?

How can I reflect a point with respect to a plane? Example: I have three points (0,0,2), (4,0,0) and (0,8,0). And I have a point (x,y,z). From these, I want derive a composite transformation matrix. ...
0
votes
1answer
99 views

How to Draw texture between 2 Vector3

My scenario: RTS combat style, 1 unit fires beam on another unit My problem is i want to draw a flat texture between 2 Vector3 points. I have looked at various Billboarding styles but that doesn't ...
5
votes
1answer
6k views

How does gluLookAt work?

From my understanding, gluLookAt( eye_x, eye_y, eye_z, center_x, center_y, center_z, up_x, up_y, up_z ); is equivalent to: glRotatef(B, 0.0, 0.0, 1.0); ...
2
votes
1answer
224 views

Movement on the X an Z axis are combined?

This is probably a stupid question, but I'm trying to simply move a 3D object up, down, left, and right (Not forward or backward). The Y axis works fine, but when I increment the object's X position, ...
50
votes
9answers
12k views

Why do we move the world instead of the camera?

I heard that in an OpenGL game what we do to let the player move is not to move the camera but to move the whole world around. For example here is an extract of this tutorial: OpenGL View matrix ...
2
votes
1answer
313 views

Billboarding restricted to an axis (cylindrical)

I have succesfully created a GLSL shader for a billboarding effect. I want to tweak this to restrict the billboarding to an arbitrary axis, i.e. a billboarded quad only rotates itself about the ...
3
votes
2answers
983 views

How can I implement smooth rotation from one direction to another?

I'm having a problem with animating rotations with 1Matrix.CreateRotationY() with my basic 3D game. Based on where you click the mouse, I want the 3D object to rotate to that direction and then move. ...
3
votes
2answers
422 views

3D rotation matrices deform object while rotating

I'm writing a small 3D renderer (using an orthographic projection right now). I've run into some trouble with my 3D rotation matrices. They seem to squeeze my 3D object (a box primitive) at certain ...
1
vote
1answer
527 views

how can i get rotation vector from matrix4x4 in xna?

i want to get rotation vector from matrix to realize some parent-children system for models. Matrix bonePos = link.Bone.Transform * World; Matrix m = Matrix.CreateTranslation(link.Offset) * ...
0
votes
1answer
791 views

Building View Matrix in Direct3D11

Am I doing it right? I converted this. m_ViewMatrix = XMMatrixLookAtLH(XMLoadFloat3(&m_Position), lookAtVector, upVector); to this one. XMVECTOR vz = XMVector3Normalize( lookAtVector - ...
0
votes
2answers
776 views

OpenGL, objects disappear at a certain z distance

I'm writing a managed OpenGL library in C++, and I'm having a pretty annoying problem. Whenever I set an objects Z coordinate to -2.0 or lower, the object disappears. And at coordinates 0 through ...
3
votes
1answer
132 views

How to make an object stay relative to another object

In the following example there is a guy and a boat. They have both a position, orientation and velocity. The guy is standing on the shore and would like to board. He changes his position so he is ...
3
votes
1answer
159 views

Extract derived 3D scaling from a 3D Sprite to set to a 2D billboard

I am trying to get the derived position and scaling of a 3D Sprite and set them to a 2D Sprite. I have managed to do the first part like this: var p:Point = sprite3d.local3DToGlobal(new ...
2
votes
2answers
1k views

Rotating a child shape relative to its parent's orientation

When rotating a shape using a quaternion value I also wish rotate its child shape. The parent and child shapes both start with different orientations but their relative orientations should always be ...
1
vote
1answer
157 views

Orthogonal projection and world transform

I'm reading about projection matrix. Needs of perspective projection is obvious, but I'm not sure about orthogonal projection. Because orthogonal projection effect looks possible with only world ...
2
votes
1answer
97 views

Camera closes in on the fixed point

I've been trying to create a camera that is controlled by the mouse and rotates around a fixed point (read (0, 0, 0)), both vertical and horizontal. This is what I've come up with: camera.Eye = ...
0
votes
1answer
125 views

What's the standard location of a 3D clipping box?

The way I understand 3D rendering, polygons are transformed using several matrices, and they are then clipped if they are not inside a certain box, before projecting the box onto the screen. Before ...
2
votes
1answer
295 views

Does XNA 4 support 3D affine transformations for 2D images?

Looooong story short I'm essentially trying to code Mode 7 in XNA. Before I continue bashing my brains out in research and various failed matrix math equations; I just want to make sure that XNA ...
3
votes
1answer
317 views

D3DXMatrixDecompose gives different quaternion than D3DXQuaternionRotationMatrix

In trying to solve this problem, I tracked down the problem to the conversion of the rotation matrix to quaternion. In particular, consider the following matrix: -0.02099178 0.9997436 -0.008475631 0 ...
3
votes
2answers
393 views

How to derive euler angles from matrix or quaternion?

Currently working on steering behavior for my AI and just hit a little mathematical bump. I'm in the process of writing an align function, which basically tries to match the agent's orientation with ...