Archived

This topic is now archived and is closed to further replies.

help a newbie out with d3d

This topic is 5652 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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,

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites