An array of numbers, symbols or expressions, arranged in row and columns. The numbers, symbols or expressions themselves are called elements or entries.
9
votes
2answers
2k views
How can I rotate about an arbitrary point in 3D (instead of the origin)?
I have some models that I want to rotate using quaternions in the normal manner, except instead of rotation about the origin, I want it to be offset slightly. I know that you don't say, in 3d space, ...
4
votes
2answers
927 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
156 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 ...
3
votes
1answer
1k 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 ...
1
vote
3answers
222 views
Inverting matrix then decomposing gives different quaternion than decomposing then inverting the quat
I'm getting different signs when I convert a matrix to quaternion and invert that, versus when I invert a matrix and then get the quaternion from it:
Quaternion a = Quaternion.Invert(getRotation(m));
...
1
vote
4answers
3k 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 ...
43
votes
9answers
6k 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
...
8
votes
4answers
1k 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 ...
11
votes
6answers
3k views
Math topics for 3D graphics programming
I understand that the following math topics are required for 3D graphics programming. I have started doing some of them in my math course. Can someone point me in the direction of a resource that ...
4
votes
2answers
855 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.
...
6
votes
1answer
261 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
2answers
4k views
View matrix in opengl
Sorry for my clumsy question.
But I don't know where I am wrong at creating view matrix.
I have the following code:
createMatrix(vec4f(xAxis.x, xAxis.y, xAxis.z, dot(xAxis,eye)),
vec4f( ...
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. ...
1
vote
1answer
336 views
importing animations in Blender, weird rotations/locations
This is for the Blender 2.6 API.
There are two problems:
1. When I import a single animation frame from my animation file to Blender, all bones look fine.
But when I import multiple (all of the ...
1
vote
2answers
614 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 ...
11
votes
5answers
550 views
Is there a common word that encompasses handling of position, rotation, and scale together?
I'm looking for a name for my class that manipulates 4x4 matrices that handle position, rotation, and scale. Is there a common word that encompasses all three?
(I'm splitting the matrix math into its ...
8
votes
1answer
393 views
Downprojecting an imaginary 4D mesh to the screen
As a mental exercise, I'm trying to imagine projecting an arbitrary 4D mesh onto the screen (2D).
I'm guessing a single 4D triangle would still consist of only 3 points, however each of those 3 ...
7
votes
3answers
1k views
How do I adjust the origin of rotation for a group of sprites?
I am currently grouping sprites together, then applying a rotation transformation on draw:
private void UpdateMatrix(ref Vector2 origin, float radians)
{
Vector3 matrixorigin = new ...
7
votes
2answers
419 views
Portal Projection
Ok ok I admit, I'm bored and toying with a portal script like the one on steam.
I've figured out the following:
relative positioning of the mirrored cameras
render to texture for the portal (the ...
3
votes
3answers
292 views
Tetris - Rotations using Linear Algebra (Rotation Matrices)
I'm making Tetris in Java and am at the point of rotations... Originally I was hardcoding each rotation:
if (direction.equals("right")) {
if (shape.equals("Bar")) {
if ...
2
votes
1answer
326 views
How to linearly transform vertices for large coordinate systems
Alright, so I'm working on a space game and well, I want it to have a lot of space! So I need a large coordinate system and for my rendering pipeline to not suffer from "vertex jittering" due to ...
1
vote
2answers
582 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 ...
1
vote
1answer
611 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
1answer
941 views
Restoring projection matrix
I am learning to use FBOs and one of the things that I need to do when rendering something onto user defined FBO, I have to setup the projection, modelview and viewport for it. Once I am done ...
0
votes
1answer
238 views
3d world vertex translation to go to 2d screen coords
My technical english is a little rusty so to avoid misunderstands please be patient with me :)
I will try to be brief and clear
Situation:
- I have a 2d sprite character on the screen
- I've just ...
0
votes
2answers
295 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 ...