Model file formats
#1
Posté 10 novembre 2009 - 01:57
Also, I have not found a real discussion on this kind of thing which leads me to believe there isn't one. If there is, would someone please point me to it? If not, I say we make a place for one, say this thread for example.
#2
Posté 11 novembre 2009 - 02:50
This is my outline, I have tried it with various different attributes/data and nothing has worked, not even a helpful error message from the compiler.
<?xml version="1.0" encoding="UTF-8"?>
<ModelMeshData name="string" Version="int">
<!-- must have 0 or more of these, obviously having at least 1 would be required for being useful -->
<MeshGroup name="string"><!-- optional attributes: Optimize="string"<< all,none, or indicies -->
<!-- must have at least 1 of these -->
<!-- I believe each separate data element contains data of the type specified in Semantic
--dont know what default behaviour is when Semantic is not specified--
for instance, first will hold all vert data, second hold normals, third hold triangle indecies etc
-->
<Data>
<!-- optional attributes:
ElementCount="int" -- If semantic is not "indices", this is the number of tuples in the CDATA.
IndexCount="int" -- If semantic is "indices", this is the number of integers in the data's CDATA.
IndexType="string"> -- Every example of this has the value "Index32", without exception.
Semantic="string" -- "POSITION", "Indices", "TEXCOORD", "TANGENT", "BINORMAL", "NORMAL", "BLENDWEIGHT", "BLENDINDICES"
Type="string" -- indicates how many elements and of what type are in the tuples in the CDATA.
"Float4" (four floating point numbers), "Float2" (two floating point numbers), "Short4" (four integers)
-->
data <!-- contains CDATA with tuples of numbers. For example, a Float2 type MSH had this: <![CDATA[0.195959 0.999994 0.195959 0.266686 0 0.266683 0 1. 0.999999 0.999994 1. 0.166668 ]]> -->
</Data>
</MeshGroup>
</ModelMeshData>
Modifié par ChewyGumball, 11 novembre 2009 - 02:51 .
#3
Posté 11 novembre 2009 - 06:55
#4
Posté 11 novembre 2009 - 11:55
At the time I got the files, they were useful to get some missing information, but that information (the usage/type enums), has now been added to the MSH wiki page.
The only real use for the XML files is if anyone is writing a model import tool that will convert from some 3D format to the XML format - as for really understanding the model format, I found it more useful just to look at the binary files.
Modifié par Adinos, 11 novembre 2009 - 11:56 .
#5
Posté 12 novembre 2009 - 12:19
I have also thought that it might be easier to just make a converter that would take a .obj for example and spit out a straight MSH file. Unfortunately I'm not so adept at backwards engineering to be able to understand a MSH file farther than what the editor shows when I open one up.
#6
Posté 12 novembre 2009 - 07:10
EDIT: Apparently its too long/wide to format decently here, and I cant seem to find a place to upload a file anywhere. I'll get back to you with the actual file...
EDIT2: I created a project and uploaded a .rar with the formats from the wiki and my example xml files
I have also added a few comments of my own on some parts, some guessing what parts are for, others clarifying how many elements are required or optional.
PLEASE NOTE: I have not actually compiled anything successfully yet, hopefully once I do I will get more insight into the actual structure of a valid file.
Also, Adinos:
Kinda sucks that you're under an NDA with those files
Modifié par ChewyGumball, 12 novembre 2009 - 07:28 .
#7
Posté 12 novembre 2009 - 09:05
#8
Posté 13 novembre 2009 - 12:19
#9
Posté 13 novembre 2009 - 12:42
#10
Posté 13 novembre 2009 - 12:45
#11
Posté 13 novembre 2009 - 01:07
#12
Posté 13 novembre 2009 - 11:10
It's reasonably easy to convert from many 3D formats to this XML format, and combined with BioWare's tools to create the MSH/MMH files, it should give you a functioning import tool.
Modifié par Adinos, 13 novembre 2009 - 11:15 .
#13
Posté 13 novembre 2009 - 07:29
So far I have been able to get my own MMH to work, and I have an empty bounding box that I can place anywhere I like in a level. It just references a msh file that doesn't exist
#14
Posté 13 novembre 2009 - 07:58
#15
Posté 13 novembre 2009 - 09:05
1.Open cmd and navigate to the export_processors folder
2. run GraphicsProcessorMSH.exe -outdir testing -indir testing (i made a new folder containing an mmh.xml and msh.xml called testing in the same directory ie export_processors\\testing)
3. It says Sucessfully processed 1 files
4. there are the original xml files along with a mmh file and a phy file
I tried it with the GraphicsProcessorMMH.exe as well and the same thing happens. Might it be that its just the same program renamed different things by accident?
Modifié par ChewyGumball, 13 novembre 2009 - 09:07 .
#16
Posté 13 novembre 2009 - 09:10
#17
Posté 14 novembre 2009 - 04:28
#18
Posté 14 novembre 2009 - 04:05
#19
Posté 17 novembre 2009 - 04:27
EDIT: Making a converter from some file formats to the required msh format doesn't really seem too hard. I just have to find the time to do it
Modifié par ChewyGumball, 17 novembre 2009 - 04:58 .
#20
Posté 17 novembre 2009 - 05:12
#21
Posté 17 novembre 2009 - 05:17
Modifié par ChewyGumball, 17 novembre 2009 - 05:19 .
#22
Posté 17 novembre 2009 - 07:10
#23
Posté 17 novembre 2009 - 02:23
I believe the samples should be sufficient for anyone wanting to write a converter that writes the xml files.
#24
Posté 17 novembre 2009 - 02:58
#25
Posté 17 novembre 2009 - 03:38
Sweet news indeed





Retour en haut






