# Tag Info

24

To get something like this: Create an icosahedron (20-sided regular solid) and subdivide the faces to get a sphere (see code below). The idea is basically: Create a regular n-hedron (a solid where every face is the same size). I use an icosahedron because it's the solid with the greatest number of faces where every face is the same size. (There's a ...

18

Once it's in memory, verts are verts.

17

The best results I've seen for this when a mesh is decimated. Decimating the mesh attempts to reduce the polygon count with minimal shape changes. The decimated meshes retain their shapes fairly well and this would be ideal for non-organic structures like buildings. Though it even works on organic structures as you can see here: There are a few different ...

17

Triangles, the reason is triangles' ratesrization algorithm is faster, and also natively supported in hardware. So it would be faster to convert one quad into two triangles and do the rasterization. Actually that is what happens when you draw a quad on modern graphics hardware. So the question is what makes it faster ? There are certain characteristics in ...

15

I can't give you a Unity-specific answer (sorry!), but I can tell how I would solve this. I would generate a bunch of points on a circle using the blue vector. First, what is a circle? Well, a circle looks like this: However, graphics hardware can't really draw perfect circles. You're always going to end up with a polygon approximation: We do this ...

14

On each object you will choose one or more faces that will be removed. In between these faces will be your connection. Select both objects in object mode. Press Ctrl+J to join the objects into one. Then enter edit mode and change to face manipulation mode. Remove the faces that will be joined. Select them and press X, remember to delete faces, not ...

13

"Cracks" in the geometry mostly. These games have a few things in common, they have gravity and they have collision detection. These anomalies are locations where the collision detection failed in some way. It could have been sharp edges, gaps or a number of other geometry anomalies. Could even been issues with time steps in the physics engine, where the ...

12

To map your texture once on the mesh, your UV coordinates should go from 0..1 over the whole mesh. But depending on the mesh at hand, this can get really tricky. Since it's a plane, this should be simpler. Just look at the plane from it's "up" direction and assign 0,0 to the top left and 1,1 to bottom right. The vertices in between should be fractions. Eg. ...

10

COLLADA was over-complex in my opinion. Suffered from the designers trying to make it handle every conceivable combination of 3D asset; e.g. every possible vertex/index format and configuration. Sounds great but in practice this placed a huge burden on any piece of software that needed to read the format. It didn't help that every supposedly compatible ...

9

There are three reasons collision margins may exist in physics simulations. As you suggested, a collision margin gives the physics engine some room for error in detecting contacts and resolving contacts, prior to actual penetration. This helps with the appearance of realism as objects do not visibly poke through the ground, etc. There are nuances here for ...

8

Sketchup can export to Collada (.dae) which I know is readable by Unity. Sketchup Pro will export to .3ds, .dxf, .fbx, .obj which gives you plenty of options for other engines. That said the automatic triangulation in Sketchup can sometimes create some weird topography. Not that big a deal if you just want to import some shapes, but if you are doing mesh ...

8

The best way in my opinion is to write your own parser for .obj exported with Blender or your preferred 3D modeling software. It will really only take you a maximum of one hour and you won't have to worry about distribution/licence issues. Here is a video about this question: http://youtu.be/izKAvSV3qk0.

8

What you speak of is called "unwrapping". This is the process of generating UV coordinates for your mesh, so that it will allow UV mapping. UV coordinates are in the range of 0..1, where 0, 0 is the top left of the texture and 1, 1 is the bottom right of the texture. The process of unwrapping a 3D mesh to a 2D surface is something tricky. Imagine a cube. ...

8

What you ultimately end up using at runtime is going to be processed version of your exchange formats whether you do it offline or at runtime. The main differences are: If you do it at runtime then you're going to end up paying the processing cost repeatedly and You probably want to spend as little time processing and optimizing as possible so your load ...

8

Here is a tutorial on using vertex and index buffers in XNA; vertex buffers are probably the ideal way to approach this, but if that seems a bit daunting to you right now you could use the simpler DrawUserPrimitives function. A related tutorial outlines that process. Essentially, you'll want extract the vertex data from the .stl file (the format is ...

7

Box2D was written as a tutorial on how to write 2D physics engines. The site contains links to a lot of presentations on how the algorithms work and how to make it efficient. You might also want to look into this presentation done by the Pixeljunk Shooter team, describing how they did 2D fluids. If you are interesed in 3D, read Realtime Collision Detection....

7

For MMO due to their nature, wide adoption is a must to survive. They need to have a window which enables them to run on mediocre pc. So, no matter how tech progresses forward, MMO should be always the least to take full advantage of it. And poly count doesn't matter too much, if you can cover this up with your art style and/or other visual stuff. For ...

7

This is quite a tricky question. My idea to test if an object has no hole is to check all edges and make sure they all belong to 2 different triangles. If an edge only belong to one triangle, it means it's a border of the whole surface, meaning there's a hole. This could be harder if you have different vertex at the same position (for example to have ...

7

The two are totally different. Marching cubes is a conversion algorithm, while metaballs are mathematical constructs that can be used to represent certain 3D models. Marching cubes is a technique that lets you convert a non-polygonal 3D model (such as one represented by voxels) to a polygonal one. It works by examining cube-shaped chunks of the model and ...

7

To expand on Tetrad's answer, consider a script like this: public class GameSystem : MonoBehavior { private GameSystem m_Instance; public GameSystem Instance { get { return m_Instance; } } void Awake() { m_Instance = this; } void OnDestroy() { m_Instance = null; } void Update() { // global game update logic goes here } ...

7

From the no-texture picture, I'm pretty sure the problem is that your cube models have inappropriate normals. You need to tell Blender that your cube edges are intended to be sharp, not smooth — what you have now are cubes that are acting like six-sided approximations of spheres. I don't know Blender so I can't tell you exactly how to accomplish this, but ...

7

vec3 norm = vec3(uViewMatrix * uModelMatrix * aNormal); The normal cannot be transformed like a point, to transform a normal you use the inverse transpose matrix. If you want the fun details of why this is here is a qoute from the OpenGL Red Book that explains it better then I ever will: Mathematically, it's better to think of normal vectors not as ...

6

The probably best reference to rendering grass: Boulanger. Also, since geometry shader was mentioned: this techdemo has slightly inferior quality compared to K. Boulanger's technique, but it is stunning in another way since it draws crazy amounts of grass blades and does the culling via the geometry shader and transform feedback, which is a pretty cool idea....

6

A good reference for a wide public is to check the average computer specs around christmas discounts. Also a good option is to have severall levels of details for your game so that you can adapt your graphic performances according to the computer specs.

6

I have found the solution to this problem of yours. Instead of doing just the following in CreateBoundingBox: BoundingBox result = new BoundingBox(); do this: BoundingBox result = new BoundingBox(); result.Min = new Vector3(float.MaxValue, float.MaxValue, float.MaxValue); result.Max = new Vector3(float.MinValue, float.MinValue, float.MinValue); When ...

6

The build-in physics engine assumes 1 BU (Blender Unit) = 1 meter. However, you can use whatever you like, and since Blender 2.5 you can also set an explicit conversion to real-world units (properties editor -> scene tab -> units panel). Keep in mind what kind of values your game engine expects, too - most exporters can re-scale the model during the export (...

6

I would try using a hash table for this (for instance, std::unordered_map if you're in C++). Build a hash table that maps from a half-edge (expressed as a pair of indices, in order) to the third index of the triangle the half-edge belongs to. This can be built by simply iterating over the triangle list and adding each triangle's three half-edges to the ...

6

Your idea is correct, you just have to work more on it. Here is an article I wrote last year: http://blog.meltinglogic.com/2013/12/how-to-generate-procedural-racetracks/ It uses exactly what you described, and as you can see, the result is very good. Here is the code which explains how the mesh was generated from the spline: for(float i = 0; i <= 1.0f;)...

5

My question is: Why would you need the mesh itself to do creature movement? Can't you do the pathing calculation on a 3d matrix of id's? I think Minecraft uses a 3d matrix with 4 bits pr block. It also only simulates creatures a certain radius around the player. You could store your chunks in a oc-tree structure, where each chunk is compressed. If you ...

5

Concerning the tools, my experience is that the popular solution to access .dae files is collada-dom. It only parses the xml and give you access to the tree structure. Originally developped by Sony, it is now an open-source project (and the reference implementation). Recently, opencollada seems to get some attention, but I've never used it. It comes with ...

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