Sun 26 Nov 2006
How to make XSI and MAX friends
If you work a lot with these two softwares you end playing and trying the craziest things to make them communicate as if they were friends. Probably other people have had the same idea but since I haven’t seen it posted online, I will explain this experiment that I did a while ago that amazed people at the studio the first time they saw it but then nobody could find a real application for it… to have XSI and MAX opened side by side , move an object in XSI and MAX would replicate in realtime the same movements, it looks so cool!
I knew 3dsmax could act as an OLE server and that XSI could create ActiveX controls easily. Taking advantage of this, I created a simple script in 3dsMax that registers a function that XSI can call using the "Max.Application.8" ActiveX control. It sounds difficult but it is actually really easy to code.
What if that maxcript function just moves an object in Max ? I could create a scripted operator in XSI that calls that function everytime the object moves inside XSI.
I captured a video where you can easily see the objects moving in both applications at the same time.
The explanation:
Setting up 3dsmax OLE server:
As I said before, 3dsmax must be acting as a OLE server.I’ve included a .reg file that basically does it for you , you just have to make sure that the last line of that file contains the location to your 3dsmax program ( currently it is pointing to ‘C:\3dsmax8\3dsmax.exe’ ).
- Run the file ‘maxscript8.reg’ double clicking on it and 3dsmax will be ready to act as a OLE server. ( you can also refer to the Maxscript documentation for more details )
Making the magic happen:
- Open Autodesk 3dsmax, and run the script XSItoMax.ms that registers the example function.
- Open the 3dsmax file XSItoMax.max, that contains the cone object.
- Run SoftImage XSI, and open the XSItoMax.scn file provided , that also contains the cone object.
- Finally move the cone in XSI and, if everything went smooth, you should see it moving in 3dsmax at the same time, magic!
Just to clarify that I’ve done this experiment with 3dsmax version 8.0, and XSI version 5.0, so the scenes are saved with those versions.
In the zip file , I’ve also included a XSI plugin ("executeMaxCommandPlugin.js") that generalizes this experiment and allows to call any maxscript function from XSI, the trick is that it is just calling the "execute" maxscript function that accepts a string as input value (copy it to your XSI plugins directory, and you will have a new command ‘executeMaxCommand’ )
Download: [ xsitomax.zip
]
Download: [ xsitomax.mov 720×470
]

November 26th, 2006 at 11:44 pm
Could this sort of thing be extended further to having more than one person working in a max scene at the same time across a network? Or is it limited to what maxscript can output?
November 28th, 2006 at 8:47 am
Good question, the experiment is done one way, in theory any language that can create activex objects could access 3dsmax published functions the same way I’m doing it inside XSI. So, I don’t see why you could not do what you are saying using Python, for example.
There is a limitation though, and it is that that the parameters used in the maxscript function exposed must be simple parameters, float, strings, integers, etc.
Hope that answers your question!
November 30th, 2006 at 12:12 pm
check out verse: http://www.quelsolaar.com/verse/index.html
i think in combination with your scripts there can be done some interessting stuff on the distributed prototyping, live on over web….
cool stuff, thanks for publishing!
daniel
June 15th, 2007 at 6:29 am
Do you no if this is possible in Max 9??
June 18th, 2007 at 4:16 pm
Hi Dave,
It should work the same way. The only change is in the maxscript registry file which needs to be modified so 3dsmax9 registers as a OLE Automation server
I’ve included a new maxscript9.reg in the distribution so you can test it, by default it points to “C:\Program Files\Autodesk\3ds Max 9\3dsmax.exe”, open the file in a text editor and change that line so it points to your 3dsmax9 directory.
Download: [ XSItoMax.zip
]
January 14th, 2008 at 2:17 pm
hi Diego,
I’m new to max programming and am writting a plugin to make 3ds max a collaborating software, you think it’s possible to use your idea to achieve that?