Tag Info

Hot answers tagged

9

The graphics pipeline (typically) involves transformation from model space to world space, from world space to view space, and from view space to clip space. There is a transformation matrix associated with each of these (the world, view and projection transformations, respectively). There are of course stages of the pipeline after geometry reaches clip ...


6

They're both similar, in that they are both parallel projections (lines that are parallel in the source are parallel in the projection). In a parallel projection of (x, y, z) onto the xy plane becomes (x + az, y + bz, 0). When a and b are equal, the projection is orthographic; otherwise the projection is oblique. Another way to look at it is that in an ...


3

One of the visualization methods I like is to represent quaternion (orientation in 3d space) as vector (x,y,z components) + spin (the rotation around that vector, stored in w component). If you are looking for some online visualizer for quaternions, you can always use wolframalpha: http://www.wolframalpha.com/input/?i=quaternion%3A+0%2B2i-j-3k&lk=3 ...


3

The Euler method as applied to games is pretty much just the naive Position + (Velocity * TimeSinceLastUpdate) formula I think you were getting at. The other methods (without getting into the calc too much) are just more accurate ways of estimating velocity and position based on multiple simultaneous forces, like friction, gravity, air density, etc. It's ...


3

Welcome to the wonderful world of continuous state motion planning. A few years ago I wrote a Gamasutra article on this topic. Here are some solutions to your problem: Navigation Meshes This works by constructing a graph of nodes and edges of your scene based on some simple rules. For instance, you can construct a Visibility Graph of the scene, which is ...


3

You get the path the same way you'd move the object when you shoot it. Just have a tight loop that simulates the movement of the object and keep track of the position every so often. Now you have a list of positions, if you draw a dot at each position, you have a dotted line the represents the path of the object if it were to be shot from that angle.


2

You wil want to subtract the touch with the ref point: //180 is inversed? 180 is when touch is on the right side... let dy = (touch.y - refPoint.y) //opposite let dx = (touch.x - refPoint.x) //adjacent This results in the (dx, dy) vector being from the refPoint to the touch point (as you would expect).


2

You're not taking into account the inverted Y axis in comparison to the normal X axis in most (maybe all?) programming languages. The top left corner of the screen is (0, 0), and is positive in the right and down directions. So if the bottom middle of your screen is, for example, (300, 400), and you click at (0, 400), then your triangle will be a first ...


2

A homogenous transformation matrix (aka a "World matrix") is a 4x4 matrix that defines the translation and rotation of one coordinate system with respect to another. It looks like this: H = [xx, xy, xz, tx; yx, yy, yz, ty; zx, zy, zz, tz; 0, 0, 0, 1]; (Note on notation: This just lays out the matrix row by row. Each row is separated by ...


2

Byte56's answer is very good, especially for the example image given where simulating the movement of each "ball" in the line will work well. I'll give you an alternative idea however which might work better, or might be easier to implement if you are trying to work with a dashed line (with or without animation), something like -- -- -- -- Calculate the ...


2

The camera analogy is a lie because there is no camera. Instead all that happens is a transformation of points in 3D space to points on a 2D screen, and the matrices define how that transformation happens. Modelview and projection are conceptually different although mathematically the same (it's all just matrix multiplication). Modelview just moves points ...


2

I would comment on Josh's accepted answer, which is certainly correct, but you need 50 rep to do that and I just happened to see this on the "Hot Network Questions" sidebar. But I digress... Coming from a background in geography, there's an easy example of orthogonal vs oblique projections in remote sensing data (like the aerial imagery you see on Google or ...


2

Edit: Okay, with a little bit of testing I'm prepared to revise my answer. Going from 2D to 3D, you must now consider that "Y" isn't always going to be up. When you try to treat 3D as 2D, you can actually make things a little more complicated. So I'll do it both ways and you can decide which way works better for you. 2D in 3D As usual, we want the ...


2

In theory, it will take the same time to render regardless. However, if a point occluded points in the back, then some pixels may be discarded before they are rasterized (because they failed the depth test), and I can imagine that that would be slightly faster.


1

I need a way of translating a set of points P I suppose you mean rotating here? Let Z = (0,0,1). If cross(N,Z) has length 0, it means that all your points already lie in the desired plane. Otherwise we can build a basis of the target plane: U = normalize(cross(N,Z)) V = cross(N,U) Now to transform a point P = (x,y,0) so that it lies in your target ...


1

You should be moving the car positive X axis instead of the environment around the car negative X axis. Then move the camera with the car.


1

I also had exactly the same thoughts as you. For my final university project I studied different methods of voxel mesh smoothing. The best method I found was Surface Nets. It produces a result that looks very similar to March Cubes but without all that lookup table hassle. You can also choose how smooth you want the object by performing more passes of the ...



Only top voted, non community-wiki answers of a minimum length are eligible