[Closed] Plugin development – getting started = pain
I’m experienced with computers, experienced with 3dsmax, I know some programming and developed a bunch of stuff with Maxscript.
I decided it was time to stop suffering with some shortcomings from 3ds max and get myself programming plugins. Looked for documentation on Area, installed MSVC++ 2010 Express, installed maxSDK 2012 and prepared to start. Then the pain began.
MSCV++ 2010 kept crashing on start and it took hours of peregrination throud MSDN, Stackoverflow and sort in order to find out how to fix that. Hours, just to make MSVC run.
Then, another extra hour just to make that 3d wizard from maxSDk to show up in MSVC, cause the online documentation was incomplete: the instructions for MSVC Express were different from the Pro version of the program and I only found out in a readme.txt.
After I finally made the wizard to show up, I will fill out the parameters required in the three pages, press finish and… CRASH. Again. :banghead:
This time, I found nothing that could help me.
The official documentation trully sucks. For instance, while some plugin types are kind of obvious, there’s nowhere to be found information on how to decide if, for an specific task, I should go for a regular modifier or I should go for a global utility plugin. Same thing for the “Implement extended channels” (or something like that) and “Implement parameter block” (or something). I failed to find any comprehensive enough info on these. And the wizard fails to create a project for me.
Does anybody have any resource to point me to, something a little more step-by-step?
Any clues about the wizard not concluding? Are there special paths that are preferential for installing the maxSDK? Am I just too stupid?
To avoid this thread becoming just my personal rant, I’m considering creating here some more detailed step by step for beginners. I can go as far as making the wizard showing up.
Any help is welcome.
Does Express require you to install the appropriate Windows SDK? There is free SDK training you can download from the Autodesk Developer Network.
Also David Lanier has some helpful tutorials:
http://dl3d.free.fr/resources/3DSMAX_SDK_DavidLanier.pdf
Good luck!
I think it’s unlikely to be the problem, since what happens is a crash, and not an error message. Anyway, it’s the only thing I’ve got so far, will check it out.
This one seems to be old but gold! Thank you a lot!
first port of call for any plugin development is the samples in the sdk. Find the plugin that most closely matches what you want to do and start from there. Also when plugin developing don’t get stuck in a mxs tool mind frame, chances are it will be a modifier you want/quickest/easiest to implement.
I know the initial learning curve is steep/near vertical! but stick with it. Because creating the initial project is a real pain it worth knowing that a single sdk project can contain any number of plugins and adding a new plugin is, for the most part, “boiler plate” coding copy paste find and replace. So unless you working on a stand alone plugin you might find it best to group them into projects, modifiers (.dlm) , objects (.dlo), mxs (.dlx), tools (.dlu) etc it also enables similar plugins share core functions.
as for using the wizard i don’t bother I usually create the project from scratch or copy and existing samples project and bend it to my will ! mwahahaha ;). Also if creating a project from stratch don’t forget to add the Resource build properties, easily overlooked and causes a world of linkage pain !
I was kind of thinking that using the wizard was sort of mandatory. Maybe I should just try to compile a sample and start from there.
For the plugin types, I want to start with a relax-like modifier that conserves volumes, and I want it to present itself both as a modifier and a poly operation. So I’m considering a modifier/GUP duo. I’ll try to get the modifier on and, from there, see what happens.
Thanks!
And a happy new year to all.
Here are the links to the ADN SDK training:
http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=19118898
http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=7481355
You should make a open ADN Account (Autodesk Developer Network). There is this “3ds Max SDK Training Webcast Archive” from Kevin Vandecar he explain every thing step by step.
If you have a standard ADN Account you also get support for you plugins in 72 hours. Good luck
I considered the option, but I want something that can manipulate a large number of vertices. C++ would be orders of magnitude faster than C#.
I considered the option, but I want something that can manipulate a large number of vertices. C++ would be orders of magnitude faster than C#.
I am not going to try and convince you to move to managed since I’m sure you have other reasons to stick with the C++ SDK, but I just had a couple of notes for anyone else who hasn’t made up their mind yet.
I used the ‘regular’ Max SDK and now the .NET SDK (formerly Ephere Max.NET, now bought and maintained by Autodesk directly), and much prefer the managed SDK. Many of the reasons for which you pointed out in your original post! But there are other advantages such as not having to recompile when the versions change, easy inter-operation with MaxScript, being able to build UIs with the Winforms design tools & controls, and being able to explore and search the binaries helping overcome some of the documentation deficiencies.
With regards to speed yes C++ is faster than C#, but the true performance characteristics depend on how you write your code and the operations you are executing. For example in C# you can fix an array in memory and perform operations on it with pointers as fast as you would in C++ (I do this in mine). You could also put algorithms which require extra performance in an unmanaged DLL and use it in your managed assembly. Visual Studio has some nice profiling tools which will tell you when and where in your code these kind of techniques are required.
being able to build UIs with the Winforms design tools & controls
everything available to c# is also available to visual studio c++ and visual basic come to that.
What I do with my projects (exporters for renderers, game engines) is to simply write all shaders, custom camera\lights\helpers as scripted plugins in maxscript, then the mesh export itself is written as a c++ plugin which exposes it’s function to maxscript.
which is something like:
MyExportObjectFunction myobj "c:\\myobject.mesh"
For me and my projects it’s been a great way to work,
super easy to add to the exporter since it’s maxscript.
Only downside is that I have to update the c++ plugin between releases, but if you keep it simple then it should not be any trouble.