Tag Info

Hot answers tagged

18

Once it's in memory, verts are verts.


18

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 ...


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 ...


14

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 ...


13

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 ...


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 ...


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

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. ...


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

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

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 ...


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

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

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 ...


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 ...


6

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.


6

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 ...


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

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 ...


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 ...


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

I won't refer to any specific formats, but here's points for your "yea or nay" question: Reasons to use custom formats: Speed up loading of your game Can do all preprocessing your heart desires and store the results Support for features not in generic formats Doesn't include anything you don't want to .3ds, for instance, has tons of stuff you'll never ...


5

I think before you go pointing fingers, you make sure that this is in fact the problem. It might very well be, but before you invest a lot of time an effort in the number solutions below, try profiling your code. You should be looking for large CPU usage areas. If improving that improves performance, then awesome, mission accomplished. Some devices ship ...


5

I'd say that your main problem is that you're giving meshes non-mesh properties, thus leading to a fat interface. A mesh is a set of per-vertex data and the information about what those vertex attributes means. That's all it should be. It may have some information, like where the "center" of it is and a bounding box perhaps, but that's about it. A mesh ...


5

In Blender 2.5 and later, select the face or edge you want to measure in Edit Mode, and turn on the Properties shelf by pressing 'N'. In here, scroll to Mesh Display > Numerics. You can select to display the edge length and the face area of the faces. To get the size of an entire object, the Properties shelf in Object Mode will list the X, Y and Z ...


5

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 ...


5

There isn't really a standard format -- and there really shouldn't be, because you're asking about several widely different domains and applications of geometry data and efficient representations will differ for each. That said, there are formats designed to facilitate content interchange. The most popular are Collada and FBX. This doesn't completely ...


5

One example is for light maps. Usually texture space is maximized by overlapping faces which have the same diffuse texture, like the six sides of a crate. With light mapping this would mean that all six sides get the same light and shadow, not to mention it would almost assuredly confuse the light mapper because it can't tell which point in space it should ...



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