Jump to content
  • Advertisement
Sign in to follow this  
cybbe

OpenGL Maya 6 .X Exporter, no materials?

This topic is 5092 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

Hello, I'm quite new to DirectX and been working with OpenGL before. Now I was more than happy try out the .X model format. I tried a couple of tutorials / examples and was amazed how easy it was. Then I saw that DirectX 9.0c comes with an .x exporter for maya 6. But now when trying it it seems that even if I set every material setting there is in maya the .x files still are plain black with no material properties what so ever, not even textures. I've not tried this that much but I took a poly cube in maya and did it green with a texture. After I'd exported it I opened it in MeshViewer (all black) so I looked in the file and the material is completely zerofied. Is is just me or is it broken beyond all recognition? I was lucky enough to get a maya 6 license for no use? >< Sad if I would be better off with maya 5. I've searched several forums but no success. However I couldn't search this since the search function is disabled. :S

Share this post


Link to post
Share on other sites
Advertisement
Are you calling LoadMeshFromX() (something like that). Then again, maya does use it's own texture format, iff. In my case, the mesh had the uv's defined but yes, it did not reference any textures correctly. What i do is assign a placeholder texture to the model.

Personally I prefer the x exporter for 3dsmax. Then again, I simply prefer to use 3dsmax.

Share this post


Link to post
Share on other sites
vajuras and WilyCoder. I'm using the official MeshViewer that comes with the DirectX SDK (or is it Windows...) Well anyhow. It supports lighting at least and textures aswell I guess. However it always displays it black. And if I open the model the material bracket looks something similar to this:

Material {
0.00000;0.00000;0.00000;0.00000;
0.00000;
0.00000;0.00000;0.00000;
0.00000;0.00000;0.00000;
}

So I don't think it's because of the application I'm loading the model with.

However, Bassraf: I don't think I have any options like that. I'm using File->Export All (or Export Selection) and I don't think there is any options at all regarding the .X format. I'm not that sure though but I remember being surprised when I first exported. I'm at home now and Maya is at work. I'll post here when I get to work so I can see if I find any options. It really seems that my problem could be caused by that option if it exists. The DirectX documentation has nothing on the maya exporter but it has a help page about the 3dsmax exporter and in a screenshot from that page it shows quite many different options ><

Could you please post a screenshot of the .x exporter from maya 6? Or perhaps you're using an older version?

Share this post


Link to post
Share on other sites
Hi friends!
I've the same problem!
I've tried to export every mesh but seems that new Microsoft's exporters (included in December 2004 Update of DirectX' SDK) not exports materials... I've nticed that if, in Maya, I put a color for a vertex the output 'll be right but that is so uncomfortable... I've tried to check some options while exporting but in evry case meshes are black in MeshView (with or without lighting)...

There is a possible reason?! Should I change something working in Maya or should I find the error in Microsoft Exporter code?! Is it only a problem of cybbe and mine?!

THANKS ^__^


Share this post


Link to post
Share on other sites
Ok it seems I'v found the solution:


Limitations
The tool does not currently support non-uniform rational b-splines (NURBS), subdivided surfaces, or graphics cards that do not run vertex or pixel shaders.
Only DirectX shader materials can be exported; the tool cannot export standard Maya materials.
The tool does not support Export Selection in the Maya File menu.
To avoid unnecessary processing overhead, the Gather Animation option in the DirectX menu is off by default and will only activate once each time you select it.


That is posted here: MSDN Libray

Byez,

Share this post


Link to post
Share on other sites
Aha! I see. Well that was at least good information. But one question arises... In that MSDN page GENTS posted there is a step by step "howto". In the last step it says:

Save your object with the newly-applied effect by using Save or Export in the Maya File menu, or by using Export All in the DirectX menu. Select Export Options in the DirectX menu, and then, in sequence, set any options for saving your exported mesh, skin, adjacency, material, effect, texture, and animation data. Relative paths are with respect to the saved .x file location.

And shows a screenshot of a options dialog. I have "Export All" but no "Export Options" in the DirectX menu... That has to be a miss? Is it just me that don't have it or is it for maya 5 only and not for version 6? O.O

Well well. At least I can export with colors now :)

A followup question: Where can I learn the absolute basics about .fx files? I guess I could do some cool effects with them if I just knew how they worked. Searched the DX SDK folder for some .fx files but couldn't really get them to work. All I find about them looks too complicated. There has to be some newbie tutorial. Well well. I'll just may start another thread about it.

Happy new year btw :)

Share this post


Link to post
Share on other sites
Ok! That's all...

I've tried some tricks for colors but seems that to export a simple color I've to use a "PureTexture" FX file (NVIDIA FX Composer SDK) and a JPG file filled with just the color...
I've also noticed that not always colors or textures are exported in the right way...

Is this a common problem?!

PS: Use NVIDIA SDK to have a lot of FX files ad FX composer to create other ones...

Byez,

Share this post


Link to post
Share on other sites
I've also noticed that not always the "PureTexture.fx" effect file works fine...

Could you try it and find out if it's a common problem or not?!

THANSK TO YOU ALL and HAPPY NEW YEEEEAAAARRRRR!!!


Byez,

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!