Max To XML

Hi all,

Just an update, and a request, I have gotten far with the XML from max thing, infact, im about ready to create my first export for show, :slight_smile:



Just one thing, Max doesn’t use indexes (at least I dont think) and I have to find a way to work them out using only vertices and faces as my guide.



Any ideas?

The faces don’t index the vertexes? You can always just have an index list that is 0 1 2 3 4 5 6 …

well, each face has sorta this kind values:



Face 1: [1 3 5]



Would that be the index referencing to the first vertex, 3rd vertex and 5th?

right, heres the initial cut without normals, without color, without texture coordinates, just a plain TriMesh:







There are alot of artifacts because the meshes are interconnecting. To make sure that this doesn’t happen. Select each mesh and export accordingly.



Btw, Its a plant :wink:

Everthing is in now. Texture Coordinates, Normals, Vertex Colors and Vertices ofcourse. One thing. THE INDEXES!







Btw, its meant to be a box, a simple box! :frowning:

Is there any way to make a GMAX exporter or would we have to pay?

We would have to pay yeah, how much, i haven’t got an idea. If you really really really want it, you could contribute X amount and then we could raise the necessary cash required to have the ability to create a plugin.



But I think it would be easier to go and buy max, its around $600. Like a new pc I guess.



DP

is the first vertex indexed 1 or 0???

:// , i was indexing them as 1, they are 0 based, and now its working…





hurray!



Anybody want it?

That sounds very neat. Maybe you could include it as part of the CVS? I can get it from there, and add stuff as I add to the XML.

its in MaxScript, so if you know that, im more than happy to add it to CVS. Il add it to CVS when ive ironed it all out and made it more user friendly. :slight_smile:

I just thought about what this means in terms of Jme.



NO MORE 500 VERTEX LIMIT! (in md2)



hurray! :smiley:

here’s the tool at last:







Its more of a level builder than a model exporter to be honest, as you can export different meshes in a single .jme file. v. useful.



Its also has animations on the meshes, so that bat ontop of the church can fly around :slight_smile:



It also converts UV coordinates to Jme coordinates, automatically.



If anybody wants this, email me @ am_alhindawi at hotmail dot com



PS. Can anybody think of a better name to put in that RollOut instead of “Green green grass of home” ?

I have replied as soon as I received the email. But il say it again for people to know.



The tool obtains vertices rather than joint animation. It used to (animation have gone out of the tool, will be introduced again later) loop through the timeline obtaining the new verticed of the required mesh and adding the information.



So which ever way your doing it, either by changing the vertices yourself by hand, cstudio, bones…etc, it will export.



P.S. TextureCoords have been taken out as well, they are coming back, the animation somehow relied on texturecoords being there.



DP

ok, I have managed to isolate textures from animation, and animation is back in.



Ive changed the way its used too, to make it ALOT easier.



Things to do:



texture coords

check if colors are not wanted

currently, bones are not supported, but that can be easily rectified. However, in Max, the bones affect the vertices of the mesh, and its the vertices that you are exporting. So skeletal animation is already supported in a sense. However, when Jme has Rag-Doll abilities, the availability of Bones will be a must.



Personally, the day I posted the topic, is the first day i ever looked at MaxScript and I learned it all from the MaxScript references that come with max, im afraid I dont know any other resource.



DP

DP, can you email me your maxscript? I wana take a look at it and see what I can come up with about supporting animation



cep221_at_gmail_dot_com

The tool already has animation support, vertex type.



All thats left is joint animation and TextureCoordinates.



DP

Neat. I’ld still like to see it though :slight_smile: