3.) Can you imagine any reason, why MED shows the HMP correct with external texture, but when I load it in the engine I see nothing? Here is my source:

Code:
// save skins
if (h->numSkins > 0)
{
    for (int i = 0; i < h->numSkins; i++)
    {
        // get skin
        HmpSkin* s = (h->skins)[i];

        // determine skin type
        int skinType = 0;
        {
            if (s->isExtern)
                skinType = M7SKINTYP_EXT_FILE;

            if (s->mat)
                skinType |= M7SKINTYP_MATERIAL;
        }

        // create new skin
        hmp.Skin(skinType, s->name);

        // prepare skin size parameters
        int sizex = s->isExtern ? (int)strlen(s->externFile)+1 : 0;
        int sizey = s->isExtern ? 1 : 0;
        int bypp = s->isExtern ? 1 : 0;
        bool mips = false;

        // set skin size
        hmp.SkinSize(sizex, sizey, bypp, mips);

        // skin bits
        if (s->isExtern)
            hmp.SkinBits((BYTE*)s->externFile, 0, 0, 0);

        // material, if any
        if (s->mat)
        {
            // convert bgr var colors from material to rgb float triplets
            float diffuse[3], ambient[3], specular[3], emissive[3];
            rgbForBgrVar(diffuse, &(s->mat->diffuse_blue));
            rgbForBgrVar(ambient, &(s->mat->ambient_blue));
            rgbForBgrVar(specular, &(s->mat->specular_blue));
            rgbForBgrVar(emissive, &(s->mat->emissive_blue));

            // transfer rgb triplets to skin
            hmp.SkinMaterial(diffuse, ambient, specular, emissive, _FLOAT(s->mat->power));
        }

        // finish skin
        hmp.SkinDone();
    }
}



It is almost the same procedure you do as in the example. I also placed it before writing the height values, etc...???

[EDIT]

I only see an external texture in the engine, when I add in MED a new skin, while all faces are selected and I press "set skin"...?

Last edited by HeelX; 12/08/11 00:10.