Hot answers tagged

116

Real-time rendering, even modern real-time rendering, is a grab-bag of tricks, shortcuts, hacks and approximations. Take shadows for example. We still don't have a completely accurate & robust mechanism for rendering real-time shadows from an arbitrary number of lights and arbitrarily complex objects. We do have multiple variants on shadow mapping ...


109

The current answer has done a very good job of explaining the general issues involved, but I feel it misses an important technical detail: Blender's "Cycles" render engine is a different type of engine to what most games use. Typically games are rendered by iterating through all the polygons in a scene and drawing them individually. This is done by '...


28

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


28

The Simple Way Add a quad which connects adjacent slices to each other. Texture this with a nice, melted cheese texture, complete with holes. As the slice is moved away the quad will naturally be stretched and thus stretch and skew the texture. This should look reasonable, although there will be no break. What to do here is make that texture an animated ...


26

If I understand correctly what you want to achieve, you are looking for the concept of "imposters". These are precisely 2D representations of 3D objects, used to decrease the geometric complexity of rendering the 3D environment. You can think of them pretty much as pictures of the 3D objects that are used as textures of 2D objects. The canonical reference ...


18

There does exist a flavour of Wavefront's *.obj that facilitates Vertex Coloring.. I know of two applications that can export these namely "MeshLab" (free) and "MeshMixer" (also free from Autodesk).. The vertex colours is actually found just after each vertex definition as shown below.. (Piece of *.obj) #### # # OBJ File Generated by Meshlab # #### # ...


14

You can't. All right, that was a bit harsh. Let me illustrate this with two examples. Let's get outside of the computer graphics world. Suppose you are given a piece of paper with the texture you gave us printed on it. There's a faintly printed millimeter grid in the paper as well. Now you get some scissors and some paste, and your task is to make a ...


10

Every "UV seam" in your model - that is, every place where the model's faces are continuous while the UV map for the same edge is cut up - is a problem both for the artists and for the hardware. It makes it harder to texture the model properly. This is especially true when the editing is done on the texture directly, in 2D, not in a 3D painting program. The ...


10

I am assuming your intention is to use this normal map in a game, as it was explained in other comments, you most likely don't want world space normals since they only work for a fixed world. Your problem with tangent normal baking is that you don't have a mesh with less detail to bake the map to. This is how you do it: 1 - Create a lower-res version of ...


9

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.


9

Blender can export PLY files (.ply), which are text-based, very easy to parse, and include vertices colors. The hard way is to change the OBJ exporter code so that it includes the vertices colors (thus breaking obj compatibility).


8

@Michael directed me to an excellent resource for exporting bones from Blender. It provides all the information I needed. It's actually already built into Blender, it's the DirectX Model Format. Go to user preferences, addon section, "Import-Export" category and install "DirectX Model Format (.x)". Then use File->Export to select the newly added format. ...


7

Wavefront OBJ supports materials, which color groups of meshes the same color. Material statements look like this: newmtl redMtl Kd 1.00 0.00 0.00 Ks 0.50 0.50 0.50 Ns 18.00 So, Kd is the diffuse component, Ks specular. These would be specified inside a .mtl file that accompanies the .obj file. Inside the .obj file are statements like usemtl redMtl f 1/...


7

I'm currently working on a similar system. Procedural animation + dismemberment etc. How do I define animations to know which ones are allowed give the current state of the body (missing arms/legs and so on)? I don't quite follow this bit, if the limbs aren't there, then who cares if it's being animated or not, because it can't be seen. Does each limb/...


7

My suggestion is honestly just to find a format that Blender will export its bones as well, and then look through the script of that format exporter. I was doing something similar and realized how much of a pain it was to find a good resource on exporting bones. But here's this specification that helped me a lot, on armature modules


7

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


7

You need to implement either something like bones or morphs. As stephelton suggests, a WebGL framework would make this easier. Since you're using Blender, how about using three.js ? It already has a Blender exporter and there is also a python script to convert objs to the json format the framework uses, in case you need to use other applications. Among ...


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

The Collada exporter in blender does not support what Collada calls "animation clips", so only the current animation will be exported. You have a few options I can think of: Fix the exporter (or convince someone to do it for you). Write a script that loops through the actions and exports a new file for each action. Use the NLA editor to create a track that ...


6

Two big reasons are making sense of the unwrapped texture and edge artifacts. As you mentioned, it can be very difficult for an artist to make sense of how their 2D edits will wrap around the 3D model if the seams don't make sense. In the case where every face was separated and optimally placed with some kind of bin packing algorithm, it would be nearly ...


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

First, ok-to-good question. Definitely not a bad question. To answer it, you just have to know what a shader is and why you need one. A shader is exactly what it sounds like - it "shades" vertices and pixels different colors. "Shading" isn't just "making it darker" (as the technical artistic term means I believe), it's application of textures, lighting, ...


6

When you're reading the model into your game, you'll be iterating through each vertex of the model. Simply keep track of the max/min for each X, Y and Z axes. Using these values you can find the center of your model as well as the extents. The width is the distance between X min and X max, the depth and height are similarly calculated depending on which axis ...


5

Your best option is to cut off the limbs and use multiple submodels depending of the current state of the wounds. Your approach of using a VBO per keyframe is just overkill; use a skeletal animation system and play different animations depending of the damage received (limping with one leg, crawling without the two legs, etc). Valve published a good set of ...


5

Those instructions are for Blender 2.49 and before. Scripting API is completely different (and much better) since 2.5. Import and export is in the file menu. What you are looking for is the add-on list, where you can enable them and see where are they located. File -> User preferences... -> Add-ons. Maybe you need to install the appropiate add-on for ...


5

After countless tests (and some coding) I was able to find two valid approaches to the problem. Both aren't optimal solutions, but apparently there is none (exporting a simulation from Blender to Unity simply doesn't work). Approach 1: Export as obj sequence and swap meshes in Unity Pretty straight-forward. Exporting a simulation using the obj exporter ...


5

The canonical middleware for loading and manipulating FBX data in C++ would likely be the official FBX SDK from Autodesk.


5

Alright, found my issue. Not sure if this applies to OpenGL but for my DirectX application I needed to invert the v coordinate for sampling the texture. u = u v = 1 - v;


5

Luckily, Blender's BMesh support is finally here, as of 2.63. You're looking for the "Knife" tool. See http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.63/BMesh hit K in edit-mode to switch to the knife, and click to set up points to "cut". Spacebar exits knife mode.


5

For those who had the same problem I did, where you've installed the OGRE exporter in Blender 2.6 but still don't get .material files, the reason for this is in the configurations. When you are in the export menu (File > Export > Ogre3D), in the lower-left corner there are configurations. By default, "Separate Materials" is checked. Uncheck this and you're ...


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