UE4 Automatic Level Builder :: Construction and Pipeline Scripts

I recently received an email from someone struggling with a Maya to UE4 conversion workflow for bringing a finished product from an external application to UE4 automatically.

Here is the actual email quote:

After I created a possible solution and new pipeline for this issue, I thought something like this would be useful to share for free with the UE4 community.
I have begun constructing a 3DS Max script that will make this process a breeze with massive environmental scenes.

Here is the Pipeline Idea:

The 3DS Max script will have 2 main functions:

  • Function 1 :: Scene Prep :: This part of the script will look at the scene and collect important mesh data, then hide all geometry accept unique duplicates, and export them for UE4.
  • Function 2 :: By simply typing in a folder name and clicking a button, all scene data from unique and instanced meshes will be written to a directory for UE4 C++ access

The UE4 Script / Plugin:
After importing the mesh library (unique meshes generated from Function 1 in maxscript above) the UE4 script / plugin will have a browse option. Simply click and browse to the batch directory and click compile. UE4 will load each data file, access the proper mesh from the content browser, create an instance of it in the level and place it where it was in 3DS Max. This will be an automatic process. Within a few minutes, the scene will completely re-build itself before your very eyes, potentially saving days worth of work.

I have already got 2/3 of the script finished and am just implementing the default exporter.

Completed:
Data Collection
Batch Export
Directory Creation
Save options
Menu Options
Scene Collection - Based on Edit Poly and Mesh checks
Field Population - Vertex and Mesh Name information

Still Needing Work:
Finishing Automatic Unique Mesh Identification and Naming Sequence (user-based)
Finishing Large Scale Export Cleanup
UE4 Script / Plugin

Here is a picture of the Maxscript so far:

http://i59.tinypic.com/feqn0m.jpg

If this might be useful to you, please make sure to comment with any additional thoughts!

Thanks everyone :slight_smile:
More updates soon.

-Jeremy-

Plans to make a MEL/Python version for Maya?

I am not too familiar with MEL, but once I get this Maxscript wrapped up (And working with UE4) then I would definitely like to dive in and get a version working for Maya :slight_smile:

That sounds amazing, Great idea!
Would it be possible to add some kind of placeholder with an ID inside of 3DS that could be assigned to an actor or blueprint for automatically placing stuff other than static meshes? Would be useful so you don’t have to place each window, lamp, container and such that you want to be able to interact with in houses for example.

Good point Sitrec. This definitely is something I will look into. I could probably write a data set for doing this, the only thing I really need to look into is seeing how I could get Unreal Engine 4 to read it properly and construct it based off the data set generated from Max.

Sounds great. What 3DS versions do you plan on supporting? 3DS scripts tends to be very version specific.

@Sitrec - I believe this should work on 2009+. Don’t quote me on that though just yet :stuck_out_tongue:
I am developing it on 3ds max 2014 - but once I am done, I will port it over to 2011 and see if everything works. By that time it should be public for everyone to download and test as well.

Update:
A new section was added for generating unique parent meshes. (This is a 1 click solution for preparing a mass scene rename - for export purposes) This will safely maintain each mesh and its instances while at the same time identify meshes based on their vertex count for the library batch to be created (for ue4 purposes).

Great! Really excited to try it out once you release it.

Well, as and when you get it working in Maya, you’ll have me as a happy consumer. The one thing thats stopping me going crazy and building a lot of map stuff in Maya right now is the pain-in-the-**** of reimporting it all back into UE4.

This would be very useful and like you stated a true time saver. Would you be able to import LOD’s in the same batch? Say i have some city buildings set up in max all with the level of detail versions. Lod-0, Lod-1, Lod-2, could i just place them in the same position inside of max and all three versions will be imported without being combined? Just curious… setting those up manually isn’t much trouble just wondering if one mesh is on top of the other what might happen. This also has to do with collision if we create it in max and not inside the engine will it import the collision mesh separate from the game mesh?

great job so far!

@X.E.R.T. - I could definitely look into this as well :slight_smile: It is yet another great feature that would save even more time. To answer your question about LOD’s in the same position, yes. I can do a location check and temporarily group all meshes that share that location for export (Without ever actually combining the meshes). I will also look into collision :slight_smile:

Update:
No need to select anything. All data collection is now done with a simple click of (2 buttons).
The Collect Scene Meshes button will grab vertex information and mesh names from any geometry in the scene that is editable poly or editable mesh and ignore everything else. It will then populate the first 2 fields with that data.
The Generate Unique button will cycle through using the previous filter and determine 2 things. One: it will find all the duplicate meshes. Two: It will then choose a unique mesh from each of those gathered sets and populate it in the 3rd field. These will serve as the export meshes and drivers for all other meshes that share the same vertex count (All other instances or duplicates of these same meshes).

On to the next stage - Preparing the Scene Rename and Batch Export pipeline:

Update:

Cleaned up and fully implemented Parenting System for Export
Better implemented data collection

::Edit - This works with Editable Poly, Editable Mesh, or a combination of both.

Finished the maxscript :slight_smile:
After I get the plugin for UE4 working, I will build in more features (ex: collision, LOD, etc)
Moving on to the UE4 plugin development now.

Here is a simple video demonstrating the script:

Wow, that was fast! Good job, looks great.

Thanks Sitrec :slight_smile:
I can’t wait to get the UE4 plugin finished so I can release the first pack version!

Looking very promising.

Are you planning to sell this, or make it open source? If its the latter, I may be able to convert it to Python as a Maya script.

maya maya maya maya

This is just a tool for free to anyone who wants to use it, strip it, use parts of it for other scripts, etc.
I will release a .mse file for those who just want to use it, and a .ms for those who want access to the actual script.
If some people do not have max, I will also post the raw code.

For Blender Please!

I am glad to see you all are interested :slight_smile: It is nice to know you are working on something that people might use.

@bzinventor - I will see what I can do about a blender version. :cool:

Awesome!!!