Is there a script for 3dsmax that re-applies modifiers (or would it be possible to create one).
The workflow would be as follows:
1) Export Scene objects using FBX (Without the modifiers).
2) Unwrap and Pack in an external program like Unfold 3D
3) Re-import the FBX.
4) The Script should re-apply the modifier stack to each object (and delete the old scene object). *
* - Instances / References should also be taken into account
The advantage would be fast unwrapping and packing while maintaining the modifier stack.
Replies
Also, instance support could be built in. Just export only one instance and during import replace the instance object with the imported object.
As long as you don't need to insert objects into hierarchies it should be relatively straightforward to do the swaps.
You can get a list of instances easily,
You can get a list of modifiers on an object easily,
Instancing modifiers from object to object is easy
You can copy/apply transforms easily
You've designed your script already and theres no maths or weird shit required . Half a day with maxscript help/Google should be enough to knock it up yourself
1) save your scene with new name - "MyScene_01_temp"
2) "MyScene_01_temp" is currently loaded so, delete all modifiers from all objects and add suffix to the names of all objects.
3) export scene objects using FBX. There will be no modifiers at all
4) Unwrap and Pack in Unfold 3d
5) re-import the FBX
6) merge "MyScene_01".
7) now object by object(using the suffix applied in step 2) you can tranfer the UV from objects of re-improted FBX file to merged objects(your original objects in "MyScene_01"). Finally you will have all objects in "MyScene_01" with proper modifiers and unwrapped.
8) delete all objects from re-imporeted FBX.
Some modifeirs can't be copy-pasted using maxscript. Edit poly modifeir is one of them.
2) unwrap Teapot002 inside 3ds Max just to see how the code will work
3) execute this
This code will copy the map channel 1 of unwrappedObj(Teapot002) and will paste it to originalObj(Teapot001)
The last 3 rows are not important to the script that you need.
1) Imports one or more FBX files.
2) Apply the UVW of each FBX object to the corresponding object in the 3dsmax scene
3) Delete imported FBX.
The workflow would be:
1) - Manually export FBX of multiple meshes from 3dsmax to Unfold 3D
2) - Manually unwrap and pack in Unfold 3D
3) - Manually export from Unfold 3D with FBX
4) - Use the script to import FBX and transfer UVW's to the corresponding objects in the 3dsmax scene (based on name/object ID?)
1) - Use the script to export meshes to FBX *
* With an option to only export the base object (without modifiers)
2) - Manually unwrap and pack in Unfold 3D and export to FBX
4) - Use the script to import FBX and transfer UVW's to the corresponding objects in the 3dsmax scene (based on name/object ID?) *
* the existing modifier stacks of these objects should remain unchanged.
Later I also found a separate script: Unfold3D Bridge that works great and leaves the modifier stack intact (though it seems to have some problems with instances for me):
http://forum.unfold3d.com/thread/186/3dsmax-import-export-bridge-addon?page=4&scrollTo=2017