Download

How to automate creation of 1000 textures for 1000 materials for 1000 mesh actors

Say I need 1000 individual textures (I have 1000 computer generated png files) and for each one, I want to create a material instance/static mesh actor pair (i.e., the static mesh actor has as its material the material instance). I’ve done this for a hundred textures, using a material class, texture parameter value, the property editor, etc. A lot of manual work but not too much effort. But if I want to move to 1000 textures or more, I need to automate almost the entirety of content creation.

In other words, I don’t want to manually ‘duplicate’ anything, no copy/paste allowed – I want code to do that work (I can write code). Still a beginner with Unreal so no real clue how to do this… Options:

  1. Write code outside of Unreal to create files in the proper format?
  2. Is it possible to use blueprints to script content creation?
  3. Use the Unreal C++ APIs to script content creation, either everything in advance or dynamically for the game?
  4. Other?

Thanks for any suggestions or pointers to a preferred direction.

-Tod

You might want to think about whether you can actually have that many objects and materials running, I’m thinking no

Epic started doing some work on a level importer, maybe that means they are starting to look into streamlining how we work with assets?

I’d definitely like to see some improvement with that part of the workflow, importing and exporting is the most annoying part of creating an asset. I wish Epic should get together with allegorithmic/autodesk/foundry/etc and come up with a file format that allows artists to link a mesh with materials that can have simple scalar values and textures linked in. That way I could have my model + textures + this universal material/mesh link file in one folder, and open it up in any application without plugging anything else in. A simpler solution would be for UE4 to just look at the file name of an asset, see if it matches any textures in that folder, and hook them up according to a naming scheme. So name your mesh SM_FireHydrant01, UE4 will look for textures with FireHydrant01 in the name, if it finds FireHydrant01_Basecolor It’ll create a material and immediately plug that into the basecolor.

Yes, this is the problem I’m having. Just hooking up “texture034” to “material034” to “actor034” is very time consuming across the number of textures I have.