help a newbie out with d3d

Started by
5 comments, last by nickvbs 21 years, 10 months ago
I have been going through alot of trouble trying to make this stupid thing work but no luck... I am reading the book ''DirectX 3D Graphics Programming Bible'' and the first d3d example loads a .x file(teapot) but when I export my .x file from maya 4 it will not load right!! My .x files will load in the dX sdk XFILE example but not in the books example...... char szXfile[] = "cube.x" ; // File to load LPDIRECT3DRMMESHBUILDER3 meshbuilder = NULL; // Create the meshbuilder object retval = lpD3DRM->CreateMeshBuilder(&meshbuilder); if (FAILED(retval)) goto ERROR_EXIT; // Use meshbuilder to load a mesh from a DirectX file retval = meshbuilder->Load(szXfile, // Source NULL, D3DRMLOAD_FROMFILE, // Options NULL, NULL); if (FAILED(retval)) { D3DError("Failed to load file."); goto DIRECT_EXIT; } It always fails to load file..with my ''.x'' maya files but not there ''teapot.x'' please anyone help..any ideas would be very helpful
Advertisement
Hellow
Nothing wrong with the code I used the same book samples. I converted my own 3Dstudio models to 3ds and use the SDK converting utility to convert to .x file using the proper switches of the command.

There are plenty of threads in this site that can help you convert your maya file.



If love is illusion and hate is real, I would rather be crazy
I would love going home to M7, but I can't detect black holes.
hi, i''m also havin problem loading a maya 3d model exported to .x, if you could provide the thread where you found the discussion would be very helpful, i can''t seem to find it, thanks,

http://www.dualforcesolutions.comProfessional website designs and development, customized business systems, etc.,
I just enter Maya in the search window and it gives many hints.
Here are some examples.
1-GameDev.Net Forums DirectX X-File export for Maya 4.0
2- GameDev.Net Forums DirectX transition between Maya & DX8
3- http://www.oroboro.com/rafael/maya.html .
4- GameDev.Net Forums DirectX Maya -> directx8: anyone use this combo?


If love is illusion and hate is real, I would rather be crazy
I would love going home to M7, but I can't detect black holes.
So let me get this straight! the code is good its just my Maya 4 exporter or something? My Xfiles seems to work with different programming examples but not the one from the current book Im reading...Is it because Im using dx 7 or what...???(Im frustrated)..also dont flame me for this but what is d3dutil.h exactly do or I mean why do alot of people use it...is it just easier to use and makes some dx code alot less complex or what?
For those other people looking for Maya 4 exporter..here ya go.

http://therabbithole.redback.inficad.com/tricks/directx81/Extras_Direct3D/Tools/Maya40/

the files look exactly like the maya 3.0 exporter but this one actually does work for version 4.

late
nickvbs
I am not the expert on this. I just did not see any replies so I decided to offer my limited knowledge. All what I am saying that using 3dStudio-->3dms-->.xfile--> in this example has worked for me. I spent only 4 weeks in DX7 last year and quit for a year, and I just started a month ago on DX8.

Sorry I could not be of any more help.

If love is illusion and hate is real, I would rather be crazy
I would love going home to M7, but I can't detect black holes.
thanx anyways

This topic is closed to new replies.

Advertisement