I am new with blender, and as a first step with Blender animations I have done a tutorial I found on the Internet (I can’t post de URL).
It looks great in blender, but now I need to export a MD2 file to use it in an Android application. I got a MD2 file but when I load it in Android it doesn’t have textures, it looks white. Why? What did I do wrong?
In the other hand, my design has more than one object, how can I export all the object in a single .MD2 file?
My blend file: Gus.blend (592 KB)
I’m working with v2.49
A .md2 file will require a seperate texture file (usually in .pcx format for strict .md2 implementation, but I think the usual image types will work for modern implmentations of .md2). The texture is not embeded into the .md2 file (so you can apply different textures to the same model in game applications for which it was developed.
Yor model is white 'cause the texture file has not been found/loaded.
Your android application will either need the texture loaded and then applied to the model or located somewhere (try the same directory where you load the .md2 file into you application from) for it to find and apply to the model.
To export all, select all your objects in Blender and CTRL-J to join them into a single file. Then export to a .md2.
Yeah, I assumed that the .md2 doesn’t embed the texture. The problem is that I didn’t used any image to create the textures, I created directly in blender, por example, “Texture Type: Stucci” and so on. Therefore, how can I get the textures I applied?
md2’s need to be unwrapped & then have a texture applied. A “cheating” way to do what you want would be to duplicate your model, apply the progressive texture (stucci) to it & some how paint that on to the other model that’s unwrapped.
I’ve never gotten blender to export an md2 with proper texture references anyway: blender doesn’t support pcx so it’s useless for older Quake 2 based games & it doesn’t always get the folder setup right anyway. I use the Quake 2 model editor to apply my textures to md2’s: http://www.moddb.com/members/thehappyfriar/downloads/quake-2-model-editor-v090
Then you can always open up the md2 in notepad & replace the “.pcx” with “.tga” or whatever your app wants, that should work.
Split the main view, switch one to 3D and the other to UV/Image Editor.
On the UV/Image Editor one go to image->new, set the parameters to your liking.
Go back to the 3D view, select the mesh using the texture on.
Switch from object mode (or whatever you’re in) to UV Face Select.
Press “A” such that all faces are selected.
If you haven’t UV mapped your mesh, go to either in 3D view Face->Unwrap UVs then Unwrap, OR in the UV/Image Editor UVs->Unwrap.
Finally go to the main Menu on top of the window and go to Render->Bake Render Meshes->Texture Only.
So I get a png file with the texture, but it only has one color and my design has more than one. Where did I do the mistake?
Then I export the md2 file and I get my design in Android with the texture I get in the png, but it isn’t the right one, all the geometry looks in the same color.
and so this is why it’s happening? or you didnt not set in material buttons to use the texture in the material or sth. Or did not link the material to the object…