Blender / Quixel Mixer / UE4 workflow

  1. Does anyone know a way to create ID Masks in blender that does not include generating extra materials? The manual way and the slightly automated way of using the TexTools addon all implement a new material slot for new IDs, which you can then bake out in cycles.

I know that having duplicates of a model to bake normals and such is common, but is this the workflow I’m expected to do with ID masks? Duplicating the object and setting up the materials separately isn’t a lot of work, but the problem is, if I end up making adjustments to the original model, I’d have to redo the ID masks as well on a separate model.

  1. Quixel Mixer uses Y-coordinate as up, but both Unreal and Blender have Z as up. So if I paint a model in mixer, the resulting textures are rotated and the files would have to be manually modified to rotate them back. Bridge doesn’t yet support custom 3D models so that doesn’t work either.

Or am I missing something here as well?

Right now I’m primarily baking ID masks in blender and slapping some texture and related values in the UE4 material editor. I don’t really create high quality models and I understand mixer is WIP, and for the ID mask thing, all the tutorials have pointed out this way more or less though I’m wondering if there’s some addon that might do the trick.

  1. I make them manually. Especially because more often than not they arent different materials in blender, since texturing in blender is wholly pointless.
    You have a limited range of colors, about 128 give and take. But you need to save files in png16 to be able to have the tints read in mixer.

Yes, if you need to make changes to the model, either you don’t change the UVs at all, or you need to re-do the mask.

a possible improvement here would be to create an addon that stores the colors in the vertex colors, and/or baking out the vertex colors to the UV image. Not sure something like that exists yet, but it can.

  1. I just added a custom button to my blender plugin for it that sets the correct mixer export settings.
    however you misunderstand how things work. Your textures won’t be backwards because of a different import axis. The model is a model. How you paint it, you paint it. Unless you scale by -1 nothing is changing. An import axis is not a scale factor.

I’m considering making a small addon to use the vertex paint bake as a way to color a mask and retain the color data of the mesh. However this data needs to be voided before you import in engine, so its not the “cleanest” approach. Its also limited to vertex obviously, so in reality I will probably just stick to texturing and mapping ID manually.

There is also a 3rd way, which is to map the different blender materials. This Also works like vertex paint (only full faces can be painted) but you need to remove all the materials before export, making it a painful process - from which you can’t go back without a copy of the original object.

Material IDs work but it has the exact same problem as with diffuse maps; with TexTools both processes are actually the same, you just change the map you bake.

The mixer textures are just aligned sideways after paint, though I can probably flip them somewhere without too many issues, somehow…

EDIT: Nvm, I was dumb on this one - I used the first map from the mesh that was imported sideways, so I painted it sideways for testing purposes, reimported another correctly but that wasn’t the object which I exported the map from ._.

I’m somewhat thinking I’m “doing things wrong”, but maybe it’s just that the average artist pays way more time with their modeling / texturing process that the export / import process doesn’t bother them too much. I tend to iterate and bring stuff to UE4 to see how it looks in the intended environment before finalizing it. Even the Epic export tools are done a bit differently, they expect only one object per scene whereas I like to use larger scenes for easy scale references. Meanwhile I’ve used scripts to rename stuff quickly to keep larger collections manageable, and have thought of implementing something like what Batex does to pull the object’s transform origin to the origin of the blender viewport during the export.

Turns out there is a way to not import material ID masks without deleting the material slots! I haven’t written any addons for blender, only short scripts, and my python skills are garbage, but I decided to take a look at the source code of the .fbx exporter plugin anyway.

In Blender 2.91, change the line 2410 in the .fbx exporter from


if ma is None:

to


if ma is None or ma.name.startswith('TT_'):

The TT_ prefix is what TexTools adds to any material added by it. As long as you don’t use that prefix on any materials you use on your own, you are good to go.

This will also affect the behaviour of Epic’s Blender -> UE4 pipeline addon.

Makes sense. However remember that mixer only supports 1 material at this time.
to me this is actually beneficial, since it cuts down possible performance issues…

I do use text tools, but I never really bothered with the texture ID since I never really set the materials out of habit.

As far as your other comments. It’s fairly normal to import the same item at least 20 times. Especially as you make modular sets and find that they don’t really fit correctly with one another.
Making complex interlocking items takes time no matter what. Texturing them to prevent obvious seams takes even longer.

The skyrim texture approach is looking more and more appropriate to me, even if limiting compared to having each object have its own texture.