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.
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 ]