PDA

View Full Version : How to write an exporter for 3dsMax


MrSparkle
09-01-2006, 02:54 PM
Hi,

I'm stuck writing my own exporter with MaxScript. At the moment, I'm using this MaxScript function to export my scene objects with the Panda DirectX Exporter:

exportFile "someobject.fx" selectedOnly:true

The Panda Exporter saves the geometry, the texture coordinates and the shader parameters to an .x file, which I load from my own application.

But because the Panda Exporter does not exactly do what I want to do (e.g. it saves some texture coordinates to the FVFData and also it exports *all* existing Shaders, not only the Shader used by the object), I need to write my own Exporter for objects and materials.

Because I'm not familiar with C++, I tried first to find information abount how to write an 3dsMax plugin with a .NET language like C# or VB.NET, but I couldn't, so I guess it is not possible. If anyone knows how to do this (e.g. if there is an .NET wrapper for the 3dsMax SDK), please let me know!

I downloaded the 3dsMax SDK and the Visual Studio 2005 C++ Express Version from Microsoft, and tried to enable the 3dsMax SDK Wizard, but it didn't work at all.

All I could find is how to setup the SDK with VS C++ 2003, but it seems to be quite different to the 2005 Version. Could anybody give me a hint, how to start with writing my own exporter plugin?

Thank you,
Christian

StratusFarm
09-27-2006, 02:32 AM
I can't help you with writing it, but I will confirm that VS2005, even the standard edition, does things in a different manner in that you can't use the wizard from the Max SDK.

Further, and more importantly, using the VS 2005, you wind up creating a plugin-in that is going to handle memory in a different manner than Max does, and you'll have issues with the resulting plugin.
It has something to do with the runtime libraries. Max is built with Visual Studio 7, and a conflict will arise with a plugin made from VS2005 that requires a different runtime.

There is a work around for using VS2005, somehow involving a memory wrapper, but I have no idea what or how that works. From what I understand, this will no longer be an issue in Max 9 - however they have redone Max's memory managment.
I saw a good article about it some months back (it was nothing too difficult to implement), if I can find it I'll post a link.

CGTalk Moderation
09-27-2006, 02:32 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.