Old versions of Morphs2OBJs

This page contains an OLD version and description in case users want to try it for older versions of Lightwave.  If you are after the latest version look here.

v0.95

Lightwave 3D Modeler LScript plugin
Tested in: LightWave 9.6.1, 11.03 (probably works in v 8.x+ )
download Morphs2OBJs v0.95 for all platforms Win 32bit, 64bit,  (this version is broken on Mac – see latest version for fixes)
build date: 12-Jul-2011
terms & conditions of download & use

This script was designed to enable the ease of exporting Lightwave endomorph morph maps / vertex maps as OBJ files for use in other morphing applications such as the Mega-Fiers mesh modifier 3rd-party product for the Unity 3D game engine. However, this script can be used by itself to just dump out all the morphs of a LWO model as OBJs in one click, for use in any other application as well, and is not in any way specific to Mega-fiers for Unity 3D (except for the OBJ prefs settings that must be set for it to be compatible with Unity).

how to use it:

  1. Close all Objects in Lightwave Modeler (just as a precaution to make things easier)
  2. Load an object which contains Endomorphs / morph maps into Lightwave Modeler
  3. Go to the Utilities Tab and select LScript/RT (to run a compiled LScript file) – OR if you use this a lot, go to the Edit > Menu Layout and add this as a button in your interface
  4. Select the Morphs2OBJs script
  5. The script will warn you if there are things with your object it can’t handle otherwise it will continue
  6. Select the morph maps you want to export to OBJs by Ctrl-clicking on them in the listbox – or click the “SELECT ALL” button (if you are sure all of the morphs listed are contained in your currently loaded object)
  7. Check “Export additional OBJ of base map” to export the neutral morph base vertex map (this is loaded as “Base Mapping” in Mega-fiers)
  8. Check “Ensure ‘General Options’ OBJ prefs are set correctly” to make sure Modeler saves the OBJs in a format that Megafiers understands. (this also ensures the point orders remain consistent between morph OBJs and
  9. the morphs will work correctly). Click the help ? button next to that checkbox for more info.
  10. Enter a Filename Prefix which will be pre-pended to the files exported. The Base file (if selected) will be named as so: “Prefix_ObjectName_Base.obj” and the morphs like: “Prefix_ObjectName_Morph1.obj” and “Prefix_ObjectName_Morph2.obj” etc.
  11. Select an output folder where you would like your exported OBJs to be saved.
  12. Click (and highlight) “Verbose Mode” to make this script give you more feedback on what it is doing and why. This is recommended until you are used to it. You can turn this switch off and it will NOT give you message box dialogs with additional information unless it is critical – this may speed things up and save you a few confirmation clicks.
  13. Click OK to run the Exporter or Cancel to abort and do nothing.

notes:

  • This script remembers its basic settings between runs of it.
  • BACKUP YOUR OBJECTS!! – This script is tested and does not directly modify your source object run against this, HOWEVER, it is better to be safe than sorry in case an unlikely bug happens or you accidentally in a dialog decide to overwrite your object.
  • The script works pretty well and is mostly bulletproof, but I haven’t *exhaustively* tested it for all wacky permutations. But it makes going from LW to Mega-fiers / Unity a piece of cake and saves alot of tedious steps in the workflow.
  • This is designed to work with one layer only – I can’t get LW Modeler’s OBJ Exporter to handle multiple layers. You may wish to collapse your objects to one layer before export or export separately for each layer
  • TO BE SAFE, ONLY RUN THIS WITH ONE OBJECT LOADED WITH MORPHS. Otherwise it may crash if you try to export a morph of the non-selected object. You should be sure to only select Morphs in the listbox that apply to the currently open object or else the script might exit inelegantly. If you have multiple morphable objects loaded into LW and select to export a morph that is not in the current object when you run the script, it might crash — there is a limitation(perhaps by design) of LW LScript that gives you ALL loaded morphs (not just the morphs for the current object) and the only way to determine which morphs belong to which object, is to iterate through each point of every vertex map, which obviously slows down the script a great deal, so I opted to leave that safety check out of the script for speed’s sake.
  • This script was originally intended for use with Unity 3D and the Mega-Fiers mesh modifier morphing system by West Racing (I highly recommend this excellent product – see the Unity Asset Store for it). However, this is a fairly generic script which could be useful for getting LW Endomorphs into other apps such as Poser or DAZ.
  • This ZIP file also contains a sample set of objects to test this script with. It contains:
    – TestBox.lwo – the original Lightwave object containing 4 vertex maps (morph maps)
    – TestBox.fbx – the same Lightwave object exported as FBX format for ease of import as an Asset into Unity 3D
    – Megafier_TestBox_Base.obj – the base morph map of this .lwo exported by this script to be used as the “Base Mapping” in Mega-fiers
    – Megafier_TestBox_BallMorph.obj – these are all examples of exported Endomorphs from that .lwo to show that loading these into
    – Megafier_TestBox_FaceMorph.obj Megafiers will work. See the documents about morphing at http://www.west-racing.com/megadoc/
    – Megafier_TestBox_ThingMorph.obj to see how Megafiers works once you’ve exported your OBJs.
    – Megafier_TestBox_TwistMorph.obj