Tag Info

New answers tagged

3

3d terrain always comes with a cost: Objects get obscured behind cliffs, so the player needs to rotate the camera to maintain situational awareness. This takes time and disorients the player. They end up fighting the camera more than they fight the enemy. So before you add height levels just for the heck of it, consider how much it adds to your game in ...


1

The supporting point is the point that lies at the penetration depth. If you already have working SAT then you've already used the supporting point as otherwise you'd have no way to find penetration depth for OBBs. The supporting point might be buried or abstracted by the specific implementation of SAT you're using, though (if you derive from basics, you'll ...


0

The problem is that L.Direction vector is not normalized, so the dot product "max(dot(v, toEye)" is calculating |v|*cos Θ instead of cos Θ, which is not what we want. So normalizing it on CPU side solves the problem. Thank you @snake5 for helping me on chat with it.


0

You can use just the camera() method to change the perspective more easily. To use it, you probably want two variables: rotationAngle and elevationAngle. Moving the mouse sideways changes rotationAngle between 0 and TWO_PI. You can then set variable float centerY to sin(rotationAngle) and float centerX to cos(rotationAngle). Moving the mouse up and down ...


1

You want to use the following technique to modify the projection matrix. It moves the near plane to a given location (like the plane of the portal). http://www.terathon.com/lengyel/Lengyel-Oblique.pdf


0

I have not implemented this myself, but I would imagine using the the stencil buffer would solve your problem. Render the portal to the stencil buffer and then render the objects in the portal's frustum. You will then get pixel-perfect culling of the object. Here's a website with some details: ...


1

Can't speak to the exact implementation details (and if I could it would be off-topic), but here's some obvious ingredients to put together: The camera is using an orthographic projection. You can tell this because a vertical wall is exactly vertical on-screen no matter where it is — if the camera were perspective then they would be "leaning outward" from ...


1

A quote from the document you pasted: 15.070 If I draw a translucent primitive and draw another primitive behind it, I expect the second primitive to show through the first, but it's not there? Is depth buffering enabled? If you're drawing a polygon that's behind another polygon, and depth test is enabled, then the new polygon will typically ...


0

The simple solution is to not pre-render the background at all. Draw everything live, in 3D, with a fixed camera angle. Modern GPUs can achieve live results that look better than what we often had to pre-render for back in the day (especially with good art). That said, if you want to reproduce the technique for "authenticity," efficiency, or simply to ...


2

The 3-tuple diagonally opposite the translation tuple in a 4x4 transformation matrix (in other words, the bottom row in your example, but note that it could be the right column if you are multiplying you vertices on the right instead, which is another equally valid convention) usually isn't used. It will have non-zero values when the matrix is used to ...


2

The fourth column (or row, depending on your preferred convention) is used for projection. For example, the following page gives a good overview of perspective projections in Direct3D: Projection Transform (Direct3D 9) and the following for orthographic projection.


0

Personally, I needed something with a little longer range than the default when I needed this. If that's the case for you too, I pretty much copied getMouseOver(), changing a few variables and names to get what I needed. Here's the original: public void getMouseOver(float par1) { if (this.mc.renderViewEntity != null) { if (this.mc.theWorld ...


2

You may do what you need in 2 step: Clustering: First you can cluster your point. There are many clustering algorithms which will put your points into multiple close-distance group. K-means is one of your options. Convex Hull: Then you can create Convex Hull for each cluster. such as: Gift wrapping algorithm, Quick Hull, Bridge, ... There is a trade-off ...


6

You're not missing anything. The normal matrix exists in case the upper-left 3x3 of your regular model-view transformation is unsuitable for transforming normals (that is, contains non-uniform scale or other craziness). If you know the upper-left 3x3 is always suitable for use in the transformation of normals, there's no reason to bother with a separate ...


1

There's quite a selection of display methods for voxel data. The most easy to grasp is certainly, one voxel=1 box, but it will leave you with a very cubic looking world. You can also look into marching cubes (going through your grid and testing how full each set of 8 voxels is, and filling with a selection of pre-generated meshes). There are a number of ...


1

I imagine it's because you're only passing the iterators i, j, k to SetCell which will limit cell placement to 60 along all three axes, creating the outline of a cube.


0

Your task is to find the forward vector (the blue one) that is pointing towards the other player. This vector can be approximated by finding the tangent at the player position on the shortest arc between the player and the enemy. The tangent of the arc between the two players can be approximated using an approximated derivative (delta). So should we ...



Top 50 recent answers are included