xskinexp.dle exporting textures + animation as text file

xskinexp.dle exporting textures + animation as text file

Post by Odlie » Thu, 20 Dec 2001 02:33:14



Hi,
I've been using Microsofts plugin for MAX (xskinexp.dle)
to export character animation to load in the skinnedMesh
sample. I've been able to export
1) Models with textures and NO animation
2) Models with animation and NO textures

problem is- it won't export my model with textures +
animation! :(
The wierd thing is, it does work if I export as a binary
file?? I need to edit the texture file path, since it
exports the absolute location of the texture files.

DOes anyone know why it doesn't work with text files
and/or how I can edit the binary file so the texture file
path is local.

Cheers!  

 
 
 

xskinexp.dle exporting textures + animation as text file

Post by MS » Thu, 20 Dec 2001 03:47:13


There is no difference in the exporter between binary and text modes, so
there is something else that is different that is causing the problems with
textures and animation.  Can you send me a repro .Max file for me to see the
problem?

As to the texture filename being fully qualified... I would either change
the source of the exporter to strip the path off, or do what all my viewers
do.  First check the location specified by the file, then strip the path and
check the current directory, and lastly check the model's diretory.  (The
main thing is use GetFullPathName.  It makes your life a lot easier).

the following is similar to what MView does, except that it also checks the
SDK media directory.
/---------------------------------------------------------------------------
--
// Name: DXUtil_FindMediaFile()
// Desc: Returns a valid path to a DXSDK media file
//--------------------------------------------------------------------------
---
HRESULT DXUtil_FindMediaFile( TCHAR* strPath, TCHAR* strFilename )
{
    HANDLE file;
    TCHAR strFullPath[1024];
    TCHAR *strShortName;
    DWORD cchPath;

    if( NULL==strFilename || NULL==strPath )
        return E_INVALIDARG;

    // Build full path name from strFileName (strShortName will be just the
leaf filename)
    cchPath = GetFullPathName(strFilename,
sizeof(strFullPath)/sizeof(TCHAR), strFullPath, &strShortName);
    if ((cchPath == 0) || (sizeof(strFullPath)/sizeof(TCHAR) <= cchPath))
        return E_FAIL;

    // first try to find the filename given a full path
    file = CreateFile( strFullPath, GENERIC_READ, FILE_SHARE_READ, NULL,
                       OPEN_EXISTING, 0, NULL );
    if( INVALID_HANDLE_VALUE != file )
    {
        _tcscpy( strPath, strFullPath );
        CloseHandle( file );
        return S_OK;
    }

    // next try to find the filename in the current working directory (path
stripped)
    file = CreateFile( strShortName, GENERIC_READ, FILE_SHARE_READ, NULL,
                       OPEN_EXISTING, 0, NULL );
    if( INVALID_HANDLE_VALUE != file )
    {
        _tcscpy( strPath, strShortName );
        CloseHandle( file );
        return S_OK;
    }

    // last, check if the file exists in the media directory
    _stprintf( strPath, _T("%s%s"), DXUtil_GetDXSDKMediaPath(),
strShortName );

    file = CreateFile( strPath, GENERIC_READ, FILE_SHARE_READ, NULL,
                       OPEN_EXISTING, 0, NULL );
    if( INVALID_HANDLE_VALUE != file )
    {
        CloseHandle( file );
        return S_OK;
    }

    // On failure, just return the file as the path
    _tcscpy( strPath, strFilename );
    return E_FAIL;

Quote:}

Craig Peeper
Microsoft, Direct3D
--
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. ? 2001 Microsoft Corporation. All rights
reserved.


Quote:> Hi,
> I've been using Microsofts plugin for MAX (xskinexp.dle)
> to export character animation to load in the skinnedMesh
> sample. I've been able to export
> 1) Models with textures and NO animation
> 2) Models with animation and NO textures

> problem is- it won't export my model with textures +
> animation! :(
> The wierd thing is, it does work if I export as a binary
> file?? I need to edit the texture file path, since it
> exports the absolute location of the texture files.

> DOes anyone know why it doesn't work with text files
> and/or how I can edit the binary file so the texture file
> path is local.

> Cheers!


 
 
 

1. UVW Map texture coordinates can't be export from xskinexp.dle

Hi,
   I am using xskinexp.dle to export model in 3dsmax,but after I render it
in my application, the texture wasn't mapped as it was in 3dsmax.  Whatever
I change of uvw map in 3dsmax,the texture coordinate in .x file always are
fixed.  Does anyone know why ?
  thanks alot!

yours sincerely
Ken

2. 3Dsmax Bad buisness

3. Documentation about XSkinExp.dle and SkinnedMesh sample?

4. QTVR Panoramas

5. XSkinExp.dle

6. Metashade and Metatarget plugins crashes LW 5.0

7. Patched XSkinExp.dle??

8. lighten shadows in part of an image

9. 3ds Max xskinexp.dlu Camera export

10. KEYFRAMING TEXT: can you add text from input file to animation

11. XSkinExp problem with textures

12. XSkinExp problem with tiles (X-file)

13. DELPHI EXPORT TEXT AND IMAGES TO POSTSCRIPT FILES ???