Visual DataPreps question
I would like to import a PBR material which contains a color + metallic + roughness + normal map and do this hundreds of times for a variety of static meshes. But I want to create a single master material and then during the import of any new static meshes duplicate that master material as a material instance for each of the 100 or so individual objects I would like to do this based on the name of the object which is straightforward with datapreps. But creating a material instance is not so easy. Can this be done in blueprints perhaps?
Data preps lets me import a gltf from blender and switch a material or static mesh automatically but this does not appear to enable me to be able to create a new material instance for each new static mesh and then assign the textures to it automatically.
Can this be achieved with “visual datapreps” or is there another method to automate this without using C++ or having to manually assign the textures each time?
Running into the exact same problem. The closest I got was using the FBX importer, which can override params of a parent material. But it can only do a handful, and sadly no metal/roughness channel. I don’t have an answer but will be keeping posted just in case someone does.
I really don’t know how pipelines stay efficient if this tool doesn’t exist - using parent materials ensures that the shader isn’t swapped out for every draw call. It’s a little boggling to me.
Yea I don’t understand how it is efficient either. I feel like I’m missing something in this pipeline but can’t find out what it is. For my example. I want all characters I work on to be able to have a “flash” effect when hit. I have it setup so that a material does that. But to my understanding you can’t really just add a material to an object at runtime and blend it with the others.
Many tutorials point in the direction of a master material on all characters that would allow this. But I don’t want to have to remember to drag and drop materials to a newly created MI of a master material every time I import a character. Would be great if on import a new MI could be created and slot in the new textures from the mesh or something…Or if I could just have a material that I can add at runtime to blend the result of the other materials with?
I’ll admit I don’t have a great understanding of this system, but this feels like one of the simplest and fairly common scenarios and the solution seems pretty underbaked and not super object oriented.
This is the major benefit of the new Python scripting.
I haven’t gotten around to making my own asset importer yet, but there are tons of tutorials out there to get you started.
This tutorial in particular goes through the entire process of setting up asset importing with material instance creation/setting. Watch all 3 parts for the full breakdown.