Transformation in game development is usually refers to linear algebra operations on points, vectors and matrices.
1
vote
1answer
335 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
1answer
48 views
How to calculate the Screen Position of a bounding sphere/box?
Synopsis: What I have is an object rendered on the screen. I need to calculate the top-left / bottom-right of it's location on the screen in Screen Coordinates.
Explanation: The object is ...
2
votes
2answers
144 views
Realtime fisheye to cubic or spherical panorama transformations with OpenGL or pixelshaders
I'd like to transform a sequence of circular fisheye-images to cubic or spherical panorama images to be used in a panorama-viewer based on OpenGL. The viewer-part is nemas problemas but the transform ...
-1
votes
1answer
39 views
Android OpenGLES 2 ray picking, resulting coordinate jumpy in certain spots?
I am trying to implement object picking based on touch coordinates via an intersecting ray test.
I am having trouble finding information on converting the touch coordinates to the coordinate system ...
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
...
0
votes
2answers
177 views
OpenGL: Transformations
I'm not sure if I correctly understand 3D transformations in OpenGL. Let's assume I'm using the typical matrix stack.
It seems like you move the world X units over, drop in a bag of verts (a mesh) ...
0
votes
1answer
65 views
XNA Camera Positioning All Wrong
I've been working in 3DSMax for years now and decided to give XNA 4.0 a try. I've got the majority of it working, however the camera is being a pain to me and I can't discern what's gone wrong. I ...
2
votes
1answer
64 views
Translating Viewmatrix is inverted, why?
So I've defined a Projectionmatrix, Viewmatrix and a Modelmatrix using OpenGL (LWJGL).
But when I translate my Viewmatrix to +X it moves my object to the right (hence my camera is moving to the ...
2
votes
1answer
166 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 ...
0
votes
2answers
53 views
Transform translation relative to world space
What is common algorithm for translating a transform matrix relative to world space axis?
E.g. Matrix M is representing some local space.
When I want to translate M relative to it's own local axis, I ...
-1
votes
1answer
52 views
Transformations are not correct using GLM and OpenGL
The aim of my program is to render a simple colored triangle in rotation. The rotations are correct if all Z values of my vertices are equals to 0.0f. If one of these values are different of 0.0f the ...
-2
votes
1answer
191 views
What intuitively meaningful 2D transform can three-finger multitouch represent? [closed]
With two fingers on a touch sensing plane, we can "grab" (control) two points within a section of 2D plane.
It means it is possible, using two fingers, to translate, rotate, and scale a 2D object ...
3
votes
2answers
272 views
How is the gimbal locked problem solved using accumulative matrix transformations
I am reading the online "Learning Modern 3D Graphics Programming" book by Jason L. McKesson
As of now, I am up to the gimbal lock problem and how to solve it using quaternions.
However right here, ...
1
vote
1answer
53 views
changing coordinate system
I'm currently trying to transform a system by scaling it on x and y axis and have some uncertainty. I have the general concept that scaling works as such:
My original box has corners at (0, 0) and ...
0
votes
1answer
174 views
Interpolating a player between two 2D points?
I would like a player to be able to move in a direction smoothly, whilst sticking to a fixed grid. Much like in Pokemon, how the player can move, but when the key is pressed and released quickly, they ...
2
votes
1answer
88 views
transformations of matrices
I'm in the process of reading up on 3d matrices and trying to following this powerpoint and had a few questions as to how to exactly determine the type of transformation from a matrix.
If I have a ...
3
votes
1answer
102 views
Calibration of a 6 DOF tracking device
Setting: In our facility we have a 3D laboratory with 3 large displays (two edge-to-edge on orthogonal walls, one on the ground, also edge-to-edge). Its primary use-case is exploring 3D virtual ...
1
vote
1answer
112 views
Canvas isometric translations to integer coordinates
I'm creating a canvas based game with an isometric playing board. I use the following transformations to get my square tiles to render on the screen:
'applyViewportTransformation' : function() {
...
0
votes
1answer
491 views
How to extract euler angles from transformation matrix?
I have a simple realisation of entity/component game engine.
Transform component have methods to set local position, local rotation, global position and global rotation.
If transform is being set new ...
2
votes
1answer
305 views
How can I create a 2D camera with upscaling and translation?
I've computed a Viewport that is fair in size (a proper aspect ratio to the given device) and then I calculate my ScaleMatrix like so:
scaleMatrix = Matrix.CreateScale(
(float) ...
1
vote
1answer
105 views
Proper approach to handle transformation matrix and extract its components
Basically I have a Transformation component object with following structure(pseudo):
TransformComponent{
Vec3 position;
Vec3 rotation; //in euler angles
Vec3 scale;
Mat4 worldMatrix; ...
3
votes
2answers
112 views
Calculating transform of arrow model pointing at some point in 3D space
I'm working on a 3D flight game and I'd like to implement a simple "navigation arrow" pointing at the next waypoint in world which the player has to fly to.
I have position of both airplane (=camera) ...
0
votes
1answer
67 views
How to change Vectors due to change in it's dependent Base Vector?
PLOT :
I have been developing a game where the player falls down on Y axis and the camera is a Top-Down view camera. The camera, player (main character in the game) movements etc. have all been ...
0
votes
1answer
132 views
Rotation of Rectangle along Y-axis transformed to parallelogram
After the rotation of a rectangular view along the Y-axis, about its center, transformed into parallelogram, how do I get the rotated parallelogram coordinates?
By Y-axis, I mean perpendicular to the ...
0
votes
0answers
52 views
Proper matrix rotation and storing rotation values
I have GameObject's transform component(position+rotation) and shape mesh(array of vertices).
On each game tick I update coordinates of vertices relatively to game object's rotation.
And my current ...
1
vote
2answers
254 views
Render rotated rectangle inside other rectangle bounds using Libgdx
I have this code to generate a red rectangle inside a grey rectangle:
new Rectangle(grey_rectangle_position_x, Game.SCREEN_HEIGHT/2-Rectangle.height/2,0);
This code makes the following:
Now, I ...
3
votes
1answer
115 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 ...
0
votes
1answer
168 views
Apply bone tranforms when importing FBX in XNA
Preconditions: I have some models, that does only contain some meshes and one texture. There is no animation within the model. An example: a model of a table.
I want to draw the Model with a custom ...
6
votes
2answers
357 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 ...
1
vote
1answer
182 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 ...
1
vote
1answer
101 views
SimpleOpenNI: Check if user hand is in specific area on image
Concerning our Microsoft Kinect project, we need some help.
We control a robot with our movements tracked by the Kinect sensor. We display the depth image of the Kinect sensor on our screen, so we ...
0
votes
0answers
267 views
Transformation Matrix in Android Canvas?
This question is following up my previous question that I asked it in stackoverflow: Hide a face of a 3D shape behind another,Android canvas?
I have a canvas and I have to get the normal vector of a ...
0
votes
0answers
44 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 ...
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 ...
2
votes
1answer
51 views
How to transform a subset of a vertex in a vertex buffer?
float linePos[6]={0.0f,5.0f,0.0f,0.0f,30.0f,0.0f};
...
glGenBuffers(1, &buffer);
glBindBuffer(GL_ARRAY_BUFFER, buffer);
glBufferData(GL_ARRAY_BUFFER, sizeof(float)*3*2, linePos, ...
1
vote
1answer
171 views
Bullet Physic: Transform body after adding
I would like to transform a rigidbody after adding it to the btDiscreteDynamicsWorld.
When I use the CF_KINEMATIC_OBJECT flag I am able to transform it but it's static (no collision response/gravity). ...
1
vote
1answer
290 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
3answers
393 views
Transforming a primitive tetrahedron into a primitive icosahedron?
I've created a tetrahedron by creating a BoundingBox and building the faces of the tetrahedron within the bounding box as follows (see image as well):
VertexPositionNormalTexture[] vertices = new ...
0
votes
1answer
108 views
Rotate/Translate object in local space
I am just trying to create a movementcontroller class for game entities. These class should transform the entity affected by the mouse and keyboard input. I am able to calculate the changed rotation ...
-1
votes
2answers
135 views
How to transform gameObjects in array? [closed]
I have an array of available gameObjects in the scene. An array of GO should be transformed according to received floats through UDP connection. I know it is simple, but can't figure it out how to ...
1
vote
1answer
104 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 ...
0
votes
2answers
380 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
78 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 ?
0
votes
2answers
207 views
3d vertex translated onto 2d viewport
I have a spherical world defined by simple trigonometric functions to create triangles that are relatively similar in size and shape throughout.
What I want to be able to do is use mouse input to ...
1
vote
1answer
137 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 ...
1
vote
0answers
57 views
How to work with edge Texture
Im not sure if i use the right terms, but im not able to find something to start with.
Im trying to develop a little HTML5 game. I have a ground with a texture and now I want to make a surrounding ...
1
vote
1answer
183 views
Transformation matrix that maps a window
I'm currently learning OpenGL at uni, and they give us questions to help us learn (these are not worth anything), however I'm stuck on this one question and would have to travel over an hour and a ...
2
votes
1answer
397 views
OpenGL: Move camera regardless of rotation
For a 2D board game I'd like to move and rotate an orthogonal camera in coordinates given in a reference system (window space), but simply can't get it to work.
The idea is that the user can drag the ...
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));
...
0
votes
0answers
101 views
Translating multiple objects in GUI based on average position? [closed]
I use this method to move a single object in 3D space, it accounts for a local offset based on where the cursor ray hits the widget and the center of the widget.
var cursorRay = cursor.Ray;
...



