Modo workflow for a Unity iPhone model

I finally made a decision to go with Modo as my 3D tool of choice after reviewing all the others and learning Modo. I’ll also be using Cheetah 3D for some workflow. I would love some advice from the Modo users out there for how you use it with Unity iPhone.

I am creating low poly models with lots of details including bump maps, normal maps, multiple textures, etc. I know this won’t work in Unity iPhone because of the device capabilities, so I am recreating the lighting from my game then doing a ‘Bake To Render Outputs’ to combined everything into a flat image overlaying my single UV map. The model will then use a single Diffuse texture.

All this is working fine, but the issue I have is that to then get the model into Unity I have to do all the following:

Save a copy of the scene into a new file (_stripped)
Delete all the different texture Groups and materials
Create a new material and assign the baked texture to it
Set all the mesh to the single baked Material
Delete any geometry no longer required (e.g. high poly masters)
Delete Environment maps to prevent import into Unity
Delete Cameras
Export as Autodesk FBX 2006.11 (I presume this is the right one)

This does work for me, but is quite time consuming. More importantly, if I want to the make changes I have to go back to the previous saved (none stripped) version of the scene, make the changes then perform all the above steps again.

Does anybody have any tips for improving the workflow when working with complex models like this with lots of texture detail?

Thanks

Its great that you are using modo - I love it and a BIG fan boy :slight_smile: lol

Well dont know if I can help U convert a Unity to iPhone Unity.

I do it like this:

  1. build scene in modo

  2. Bake To Render Outputs - to get all lights and colours to one map(one UV).

  3. Save the LXO in your Assets folder

  4. Press ALT K (thats what I’ve got the script attached to) - the script runs and saves a FBX with no lights, camera, locators, textures, backdrops all ready for Unity.

http://forums.luxology.com/discussion/topic.aspx?id=33396

Just use this code

You may have to reassign the textures in Unity but thats no big thing.

Awesome, that looks like exactly what I want. That will save me a ton of time. Thanks.

I love Modo too. I used to know 3D Studio inside out (not MAX) many many years ago but couldn’t get to grips with MAX. I had a go at Cinema 4D which is pretty easy to use but such a large application to come to terms with and I had quite a few issues with export into Unity. Also liked this idea of ZBrush for creating the High Poly concept stuff, but found it impossible to work with.

Watched some of the Modo videos and was impressed so I bought the 401 signature training and some of the tutorials from Luxology. Now it is crystal clear to me and combines and the power of all the above packages and is simpler to use. I bought Modo 401 two weeks ago and have uninstalled all the other trial software.

PS Have you found a way to export animation into Unity?

Steddy

Your comment on the link you sent through says this does not work in Modo 401 any longer, which is the version I am using. Or, did I misread that?

Thanks
Steddy

Yes modo and ZBrush (GoZ) which should be out with ZB 3.5 at the end of this month(aug) - will be so great - will cut down so much on workflow :slight_smile:

Well 401 as Inverse Kinematics

But I’m looking at getting:

and I use

But not played that much with animation - but modo should work :slight_smile:

lol what was me (a bit mad) - NO I was wrong it does work with 401 - been using it today, couldn’t live with out that bit of code :slight_smile:

I can be a silly bugger sometimes, I forgot to save my LXO file - lol; it needs that to make the FBX file.

Yes it does work :slight_smile:

Hi

The Animation in 401 looks sufficient for my needs. I thought I had read something on these forums that said modo didn’t export animation in the FBX format, but that could have been pre-401. I’ll give it a try,

Thanks for clarifying that the script works. I just tested it by saving the file onto my MAC then typing @UnityExport.pl into the Command window and it works (though it seemed to leave some model bits hidden).

I can’t work out how to assign it to a keypress though. Looks like I should be using the Input Editor and show unused key bindings, but I cant see an option for script. I tried Command History / Script, but that didn’t then execute when I pressed the assigned key. Odd

Steddy

Ignore that bit. Worked it out eventually :slight_smile: I didn’t realize I was specifying where the key was valid too.

Steddy

Do you work to a grid in modo?

this is the best way to work.

I have two scenes one for high and low baking and the other one for just low (end game results).

If you work to the grid than its so easy to (Polygon) select all polygons COPY and PASTE to the other scene.

So once I have all the maps from the HIGH Level I select all the low models polygons and move it to the second scene (my game real game level).

Hope you follow - :slight_smile:

For me the script still left quite a bit of junk in the exported model. It left behind all the group locators for the textures which stopped it working.

I changed the otherTypes line to this:

otherTypes = [“camera”, “locator”, “txtrLocator”, “backdrop”, “groupLocator”]

And now it works perfect. I get a single exported object with a single mesh. Just set the texture once imported.

There may be instances where you one to keep the Group Locators, like for bones, but I didn’t want them messing up the mesh.

Thanks

Hi

No, not even sure what Grid modo is.

I was following the Dumpster tutorial on Luxology.com which takes a high poly dumpster then recreates a low poly mesh over the top of it.

Sounds really interesting. Do you have any interesting links or a pointer to the best place in the manual to check this out?

Thanks for all your help
Steddy

Its more for level design

that everything should snap to the grid

Don’t have a video but read the following from GOW markers

http://www.zbrushcentral.com/zbc/showthread.php?t=69232&highlight=gow

About using the grid

this is the best bit

http://www.zbrushcentral.com/zbc/showthread.php?t=69232&page=5&pp=15&highlight=gow

its called kit basting (so you can reuse parts over and over again).

Man I should love ZBrush because it is such a cool piece of tech, but until they remove 2.5D painting I will forever hate it.

I spent two hours watching tutorials and thought I had it sussed. Tried to use it and get hopelessly frustrated. Most counter intuitive application ever.

Thanks for the tips on the using grids though. I’m current not doing an FPS that would require this kind of level design, just individual models but it is fascinating stuff. The work on gow2 in that link is mind blowing.

Steddy

I tried the script but am getting an ‘invalid syntax’ on line 2 :?
Any ideas? I just saved it out as a .py file in unitron and placed it in my scripts folder… is there more to it?
(sorry, I have no idea what I am doing )
thanks

#python
import lx
import sys

lightTypes = ["pointLight", "domeLight", "spotLight", "areaLight", "cylinderLight", "sunLight", "photometryLight" ]
materialTypes = ["lightMaterial", "envMaterial", "advancedMaterial", "mask"]
otherTypes = ["camera", "locator", "txtrLocator", "backdrop"]

#check for scene save for revert

changed = lx.eval("query sceneservice scene.changed ? current") 
if(changed == 1) :
    sys.exit("Scene not saved. Please save so revert can be done after export")

deleteTypes = lightTypes +  materialTypes + otherTypes
lx.out(deleteTypes)

count = lx.eval("query sceneservice item.N ?")
toDelete = []
for x in xrange(count):
   type = lx.eval('query sceneservice item.type ? %s' % x)
   if type in deleteTypes:
      toDelete.append(lx.eval('query sceneservice item.Id ? %s' % x))

for item in toDelete:
   lx.eval('select.item %s set' % item)
   lx.eval("!item.delete")

#peform export
currentFilePath = lx.eval("query sceneservice scene.file ? current")
fbxFilePath = str(currentFilePath).replace(".lxo", ".fbx")
lx.out("Exporting to %s" %fbxFilePath)
lx.eval("!scene.saveAs {%s} FBX true" %fbxFilePath)

#revert
lx.eval("!scene.revert")

its not for Unity (unitron) but for modo, do you have modo?

If you have modo System->Run Script and open the py script and it will run.

Make sure you save the LXO file first in your asset folder, the script should save out FBX for Unity.

yeah, I am using modo… saved the script out of unitron to make sure it was plain text.

Does it matter where the .lxo is saved?

Don’t know if it makes any difference but I saved mine as a .pl (probably should have been .py).

I would try saving the file in something else. I used TextEdit on the MAC, set it to Plain Text, then saved it as a UTF-8 format file with the .pl extension. Maybe Unitron is saving in some other text format like UTF-16?

Steddy

I have tried plain text through TextEdit, changing extensions… still get the error. Would you mind uploading the script you’re using? Cheers.

I am still using 302, not sure if that matters.

Hi it should be py (pl is perl)

The script can be placed anywhere modo script folder is a good place :slight_smile:

I save my LXO in asset folder then run the script it should save a FBX where the LXO is (asset folder)

Are you on a mac and using textedit? RTF may be adding extra formatting

I just did it on my mac which as the old version 302 and it works - try using terminal to save the file :slight_smile:

open terminal → type nano filename.py (which open a new file) command V to paste and the control X to save the file.

Here is my (renamed) .py file. It doesn’t really matter what the extension is because the first line tells the python interpreter what language it is using.

This one also deletes Group Locator objects (folders) prior to export.

Steddy

191218–6772–$unityexportpy_466.zip (1.05 KB)