Archived

This topic is now archived and is closed to further replies.

yanuart

MAX to X Files Exporter

Recommended Posts

yanuart    162
Does anybody know a good exporter plugin to convert scene from MAX to DirectX X files ?? Or at least the resource on how to make the plugin urself

Share this post


Link to post
Share on other sites
Liquid    122
Well, if you own a copy of MAX, you have everything you need to write your own plugins (3dsmax4/maxsdk) and if not, you can always use the exporter included with the DirectX 8 SDK, though it supposedly has some "issues"...

Share this post


Link to post
Share on other sites
JonStelly    127
"if you own a copy of MAX, you have everything you need to write your own plugins (3dsmax4/maxsdk) and if not..."

If not, there isn''t much need for an exporter, is there? *cough cough*

Share this post


Link to post
Share on other sites
yanuart    162
I do own a MAX of course, but probably to lazy to read the whole documentation of SDK to make my own exporter, there is only one exporter from DirectX and it fails to export the way I wanted, maybe there''s a better one ??

Share this post


Link to post
Share on other sites
Strange Monkey    122
Get milkshape3d... You can export to a .3ds format from max and then you would import it in milkshape3d and then you''ll be able to export it as a .x file format. Here''s the website: http://www.swissquake.ch/chumbalum-soft/


I hope it helped.

Share this post


Link to post
Share on other sites
yanuart    162
I''ve been using Milkshape for the character mesh and simple stuffs, but Milkshape is too simple to do a scene, is there any ways or tools ??

Share this post


Link to post
Share on other sites
Brobanx    136
Download the X-file exporter for 3DS MAX 4, it''s an extra option to download with the SDK, just serach on microsoft.com for it. Once that''s installed, from 3d max you just say "export->directx .x file". It gives you some decent option for exporting too. The exporter works with character studio animations too, it''s a nice little exporter, but it does have some VERY weird (undocumented) quirks for exporting tex coordinates properly. email me if you need some help.

Share this post


Link to post
Share on other sites
yanuart    162
Everytime I tried to export my scene using the exporter that DirectX provides (8.1 SDK) it always shows an error message and then the program closed..
The scene that I used is the Level Design tutorial from the MAX L&T CD
why ???

Share this post


Link to post
Share on other sites
Brobanx    136
There''s a lot of "prep work" involved before you can properly export the .max file to .x. Read the readme for the plug-in.

You must make sure that all objects are meshes, and that any transformations are collapsed to the highest level, leaving only one "editable mesh" for each object in the max file.

Share this post


Link to post
Share on other sites
Brobanx: I would really like to know those quirks for exporting the texture coordinates!
I have mapped my object with an Unwrap UVW modifier and using map channel 1. Even if I collaps it all to an editable mesh I still won''t get any exported texture coordinates.
How do I make it export the texcoords?

Share this post


Link to post
Share on other sites
malyskolacek    121
One question: isn't there any way(perhaps in max) to get the exporter plugin working same as the evil conv3ds with -m parameter? The -m parameter saves maaaaany FPS, and I don't want to use conv3ds, because it always *crashes* the scene

Edited by - malyskolacek on January 15, 2002 3:38:52 PM

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Truespace does this really well. Just open the MAX file, then save as an X file.

Share this post


Link to post
Share on other sites
Brobanx    136
To get tex coords in the .x file, you must make sure that when you make the texture map, you give it the exact same name as the mesh it is being applied to. I don''t know why they made it that way...

Also, each mesh must be completely collapsed so for every object there is just one "editable mesh".

Share this post


Link to post
Share on other sites
rtoometoo    122
I''m exporting a textured sphere from max4.2 with the dx8.1 xfile exporter plugin. I followed all the tips in the readme file that came with the plugin, plus all the tips from brobanx (collapsing the modifier stack, texture_name = mesh_name). Still the UVs are missing from the text xfile.

I''ve also tried exporting the sphere with the max4.2 3ds exporter, and then using conv3ds to create an xfile. This method yields UVs in the text xfile, but it also adds extra vertices to both the 3ds file and the xfile. The extra vertices produce a visible crease when the mesh is viewed with a D3D viewer. Since the extra verts are in the exported 3ds file, it must be the 3ds exporter in max4.2 that''s adding them. Can''t find a way to get rid of the extra vertices, or the crease.

Any help with either of these issues would be appreciated.

Share this post


Link to post
Share on other sites
rtoometoo    122
I rebuilt the xSkinExp x file exporter plugin with the max42 sdk, dx81, and vc++6. I made debug and release builds. Neither build of this plugin produced UVs in the output x files. So I still have the same issues:
1) max42 -> 3ds -> conv3ds produces x files with creases that were not in the original .max file.
2) max42 -> xSkinExp produces x files without UVs.
Neither of these "standard" methods of producing x files works for me. And many other people are having the same problems.

I''ve also tried 3D Exploration with these results:
1) 3ds -> x = crease in x file that was not in .max file
2) .max -> x, cannot import .max although the documentation says that .max import is supported

Writing my own import format is clearly the way to go, but for now I''d like to get x files working.

This issue with x files is the topic of many threads in the dx forum... it would be great if our moderator provided some guidance on this topic.

Thanks.

Share this post


Link to post
Share on other sites
Ruval    122
I had this problem, and and posted it on the flipcode message boards

http://www.flipcode.com/cgi-bin/msg.cgi?showThread=00004148&forum=3dtheory&id=-1

There's a tool in the 8.1 SDK called Mesh Viewer, it's got a few options for optimising and cleaning the mesh.


Edited by - Ruval on February 6, 2002 12:34:14 PM

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
the method I''m using is this:
1) export from MAX as ASCII file (.ASE)
2) convert from ASE to X with 3d exploration (i usually don''t export vertex normals, cause the way 3d exploration calculates them is kinda weard)
3) if there are texture names in the x-file, they must be modified, cause 3d exploration screws them up: every "\"-character must be duplicated to "\\" so that directx can load the right textures. (at least i cannot load the textures if i don''t do this)
4)use directx sdk meshviewers "weld vertices" command to eliminate the duplicate vertices created by 3d exploration (or then it''s just the ase file format, i''m not sure). this can be done individually for each object in the file (check "hierarchy" command) so some necessary sharp edges can be left to the mesh
5)use meshviewer to calculate normals for each vertex
6)optimize mesh (strip reorder etc.)

there''s quite much work, but that''s the best method i know.. or are there any better ideas?

Share this post


Link to post
Share on other sites
rtoometoo    122
To anonymous:
I tried method "A" [max42 > .ase > 3d exp > .x -> meshview > .x]
The first part of method A:
[max42 > .ase > 3d exp > .x]
yields an x file with the crease, the same as is produced by method "B":
[max42 > .3ds > conv3ds > .x]

Regarding the second part of method A:
[.x -> meshview > .x]
the only meshview weld function that seems to have any effect on the model is the "Weld All Vertices" function, which does remove the extra vertices, but also makes a mess of the UVs along the crease. None of the optimize-mesh functions of meshview seem to repair the damaged UVs. So I still end up with a useless x file. If you have a specific procedure with method A that produces x files without the crease, and with good UVs at every vertex of the model, please post the details so that we can follow it. For example, what is the exact sequence of steps within meshview that removes the crease and leaves the texture coordinates intact?

Thanks.

Share this post


Link to post
Share on other sites
malyskolacek    121
Please, could anybody send me or post a link to download max exporter recompiled for Character studio 3.1? The exporter at microsoft is compiled with CH studio 3.0 and doesn't work for my version(it always freezes during saving X file).
Thanks

Edited by - malyskolacek on February 8, 2002 1:04:36 PM

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
to rtoometoo:
well.. that really has been a problem.. i mean making a smooth edge between faces when they use different textures or when the texture coordinates in the shared edge are pointing to different parts of the texture. that''s because there has to be duplicated vertices, and the meshviewer computes 2 different normals for them, leading to visible crease. The normals could also be calculated manually, but that''s kind of hard too.
so you have to be careful when selecting the objects to weld. it works just fine when the texture coords of the duplicate vertices are the same.

but anyway, don''t have to worry about it anymore, cause i made a cool discovery yesterday.. you can adjust the smoothing in the 3d explorer!!! you can left 3d expl to export normals if you specify the minimum angle in which the creases are created, and this can also be done for each object separately.. ("smoothing" in "render"-menu or "attributes" in object properties) If you set the angle to 180 degrees, no creases are created!! This means that nothing has to be done in meshview anymore, except some optimizations =)

Share this post


Link to post
Share on other sites
pixelstar    122
I noticed a plugin for proper skin & animation exports in the extras - though I haven''t tried it. As far as conv3ds goes - it seems to work fine for a solid mesh(most of the time). My tactic is to simply export the objects, mesh, cameras, lights, etc via the built-in ASE/ASCII export(which prevents duplicate vertices that come with the 3ds export). You''ll notice if you export to 3ds and import to max - when viewing vertices - select-box all of them, set the tolerance in selected under weld to say .1 for example, and you''ll notice apparently random duplications of vertices -- like 5 here or 7 over there -- without any seeming ryhm or reason.
Anyways, once the ASE file is exported - it''s pretty straight forward format if you read it. You can easily create your own converter which will transform that one into a more compact one -- for better load times and adding whatever other features you''d like preprocessed. Anyway, I''m still dealing with this problem - because now I want to import skinmesh animation into my game(which ASE export doesn''t seem to export) and I''m seeing that I might have to take 3ds animesh and string it over into my new file format along with the other ASE which makes for a slow and tiresome export. Hmm.. If only there was a way to export skin via ASE - it would be a lot smoother transition..
Obviously my solution isn''t good. Surely there''s something better.
Anyone?
...
I''m thinking now - maybe I should just program an export plugin.
Any good reference sites?

Share this post


Link to post
Share on other sites