|
||||||||||||||||||
Add Forum to Favorites | Send Topic To a Friend | View Forum FAQ | Track this topic |
Last Thread Next Thread ![]() |
| How to parse .X files |
|
![]() Anonymous Poster |
||||
|
||||
| this is one of the crapiest articles I've ever read... thanx for wasting my time. I use the term "article" very loosely since it usually means the paper has content. |
||||
|
||||
![]() Anonymous Poster |
||||
|
||||
| Whatever dude, you just don't know what you're doing. Haha. Actually, this article very nicely fills the gap between the documentation just leaves you hanging, with no guidance whatsoever. |
||||
|
||||
![]() dexabraxis Member since: 2/8/2002 From: USA |
||||
|
|
||||
| Actually, I found this article super helpful, after beating my head against the horrible documentation for too long. Thanks Jim! One correction, though. In ParseXFileData(), pName is allocated as "new char[9]", but deleted without the array version of delete. Just change the last line from delete pName; to delete [] pName; |
||||
|
||||
![]() tollingbell Member since: 9/19/2001 From: LaVerne, USA |
||||
|
|
||||
| This article is helpful in that it explains how to get skinning and animation information from x-files. Without that, there can be no animation in your 3D engine! However, there are a few problems. The code does not compile on DX 8.x systems because the retained mode GUID's have been left out. And of course, it won't work on DX 7 and lower systems. So basically, if you want to compile this code, you need to put in the correct libraries manually and link them. This is an enormous pain in the butt. However, this is mostly Microsoft's fault, not the author's. |
||||
|
||||
![]() Anonymous Poster |
||||
|
||||
| Hey, Im looking for a lightwave or 3D studio Max to .X file converter, anyone know where I could find one??? .lwo version 6 / 7 .3DS 3 & > thanks |
||||
|
||||
![]() Anonymous Poster |
||||
|
||||
| You can get the 3d max and maya exporters to .x files from the directx 8 SDK in the microsoft downloads area. |
||||
|
||||
![]() Anonymous Poster |
||||
|
||||
| this file is conv3ds.exe. |
||||
|
||||
![]() feet dont fail me now Member since: 11/6/2002 |
||||
|
|
||||
| There is a plug-in, to export to x-file format, for 3ds max here: http://www.pandasoft.demon.co.uk/directxmax4.htm |
||||
|
||||
![]() MrTors Member since: 12/10/2000 |
||||
|
|
||||
| I'm having trouble extracting STRING data types from .x file types. Here's a message I posted on the DX forums. Hello, I am using the DX API to parse .x text files and things are going well, but I have run into one problem. I am having trouble extracting STRING types from the text file data. I am using GetData() from the IDirectXFileData interface, walking that buffer and extracting the data. Every STRING data type seems to always be 3 bytes + 1 NULL terminating. I have searched the sample code and the web a bit, looked over some fourms, but I can't seem to find anything. The documentation doesn't mention anything about the STRING data type being any type of handle or reference, compressed string or anything. It simple states: "STRING - NULL terminated string". Has anyone delt with this? Anyone have any pointers? Anyone want to smack MS? -robert |
||||
|
||||
![]() balajee Member since: 7/26/2003 From: India |
||||
|
|
||||
| Thanks to JimAdams! I had found the way of parsing .x files.Before reading this article,iam unable to properly organize the scanning of templates(embedded).After reading this article i simply used the CList MFC Class to give life to my 3D character. balau |
||||
|
||||
![]() GrahamZ Member since: 8/15/2003 |
||||
|
|
||||
| I'm working through the tutorial and it won't build. With dxfile.h included and d3dx8of.lib in my additional dependencies where I already have dxguid.lib I get: 'D3DRM_XTEMPLATE_BYTES' : undeclared identifier 'D3DRM_XTEMPLATES' : undeclared identifier If I change d3dx8of.lib to d3dxof.lib I get the same. If I also include rmxfguid.h I still get the same. If I include rmxftmpl.h I get: LNK2005: "unsigned char * D3DRM_XTEMPLATES" (?D3DRM_XTEMPLATES@@3PAEA) already defined I also tried adding odbc32.lib and odbccp32.lib that the demo had with no change. The other includes my project already had are windows.h, ddraw.h, D3d8.h D3dx8mesh.h, stdio.h, iostream and fstream. The other library files are ddraw.lib, D3d8.lib and D3dx8.lib. How do I get around this? |
||||
|
||||
![]() Stellar Developer Member since: 9/26/2005 From: odenton, MD, United States |
||||
|
|
||||
| * bump * Im now in the previous posters spot... wont compile.. i get 'D3DRM_XTEMPLATES' : undeclared identifier :( anyone sucessfully enumerate an x file with dx9? thx, -sd |
||||
|
||||
![]() MatthewEva Member since: 10/12/2001 From: United Kingdom |
||||
|
|
||||
| just make sure the files: #include "rmxftmpl.h" #include "rmxfguid.h" are included (in the .CPP not the header) |
||||
|
||||
![]() eudora Member since: 1/6/2006 From: New York, NY, United States |
||||
|
|
||||
| Hi, I am trying to use this code but I am not sure how I can obtain the data from the xfile. Say I want the data of the Mesh template, how should I do that? // Get the template data if(FAILED(pData->GetData(NULL, &dwSize, (PVOID*)&pBuffer))) return; // Do whatever with data. Note that you can cast // the pointer to anything. Be sure to copy data // out of buffer before proceeding. I try to print out pBuffer but it gives me weird stuff. Is it possible for the code to read in the data line by line after it has found the template? |
||||
|
||||
![]() Anonymous Poster |
||||
|
||||
| I know that X-files are considered Legacy files by Microsoft since DirectX 9.0c, so I was wondering whether it would be helpful or not to convert the parsing routine to DirectX 9.O. Any ideas? or should I just junk the whole parse routine? - Sturm |
||||
|
||||
All times are ET (US)![]() |
Last Thread Next Thread ![]() |
|