- Home /
Help with runitme objects and plaintext mesh files
HI everyone. I am trying to build a project that allows the user to build their own 3d models and textures to add to the game. I have got a basic skeleton script for this but I am having trouble deciding on a suitable format for the meshes. The wavefront .obj format seems to have what I want ie. plaintext 3d object format but there are further issues. I am currently using maya and when I export a shape using .obj in maya I get two files: a .obj file that simply has the name of the other file in it and nothing else, and an mtl file that always reads
newmtl initialShadingGroup
illum
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
no matter what shape I export. Maya also fails to reimport these files but I gather from other sources that maya just doesn't import most file types.
My questions are as follows: Is wavefront obj the best file format for my purposes? Is there a way to get maya to export these properly or should I use a different modelling program.
This question was also posted in the unity forum http://forum.unity3d.com/threads/73546-help-with-runtime-objects-and-.obj-files
Answer by Dunkhan · Jan 11, 2011 at 03:16 PM
Thanks to the nice chaps at #bay12games irc channel, I have solved my problem, and am now posting this in case others have similar questions. It turns out that .obj is the right file format for my purposes, although apparently a text version of .fbx also exists. The reason maya wasn't exporting it correctly was that maya was creating nurbs curves by default and .obj doesn't support nurbs. Converting nurbs to polygons enabled me to export the file as desired.
could you click on the 'tick' to indicate that this question has been answered please?
IIRC, you can't do that unless you have more than 10 points.
Just as a side note, I ended up using .x files ins$$anonymous$$d, .x is a way easier format to parse than .obj