Advertisement

Exporting a model from maya with textures not working

Started by October 01, 2008 04:10 PM
3 comments, last by FurryFur 16 years, 3 months ago
I am currently working on a group project at university to create a marble track game using XNA. The problem i am having is that when i make a model in maya (in this case the ball model) and try to export it as either FBX or as .X format (which seems to work alot better in terms of the lighting) using cvXporter it doesn't seen to export my texture data or at least when i load the model up in the game the texture doesn't display. I can get the ball to be a uniform color by applying a blinn surface to it in maya then changing the color property but if i try to map a texture to the color property (I am using a fractal texture in this case) and export the model the texture doesn't seem to load up in game and i just get a uniform colour if i don't set effect.textureEnabled = true for all the mesh effect. If i do set textureEnabled my models just turn black as the effect.texture property appears to be set to null so no texture is being loaded. Also I see the same uniform color applied to the model in the DirectX SDK Viewer instead of the texture i set in maya. Does anybody know the reason that the textures don't seem to be exporting and how to fix it?
Make sure your paths are correct. Check to see if you're using relative vs absolute paths for your textures. For instance if you have a relative path and the texture is in the same directory as the model then you need to have them in the same directory when viewing the model. If the path is absolute (which I wouldn't recommend) then you need to change the path to where the texture is.

Also, make sure you're opting to actually export your textures :)
laziness is the foundation of efficiency | www.AdrianWalker.info | Adventures in Game Production | @zer0wolf - Twitter
Advertisement
when I export the model all i get is a .X file and no texture even when i set it to export the texture to a relative directory. I am using maya's built in fractal texture, will it only work if i use an external texture file for the texture?
Oh, yeah, that won't work. You need a separate image file. You'd need some sort of custom exporter/loader to get procedural textures out of Maya.
laziness is the foundation of efficiency | www.AdrianWalker.info | Adventures in Game Production | @zer0wolf - Twitter
Thanks after u told me the textured needed to be exported separately I went back and looked at the Convert to file texture option again and realized that there's a 'file format' option if u scroll to the bottom :P

This topic is closed to new replies.

Advertisement