OmniSurface Image Alpha Mode not transferring to Omniverse

I’m using OmniSurface material in Unreal. When I export to Omniverse and open the USD-file in Create the Image Alpha Mode for all images in the material is set to alpha_default. Doesn’t matter what I set it to in Unreal, always alpha_default in Create. I need to have this parameter set to alpha_average in Create. How can I solve this?

br
/Micke H

It looks like the Connector presents the alpha modes, but doesn’t provide the enumeration text (so you just get the float representation since Unreal doesn’t support integers or enums as material parameters).

This enum definition is copied from the MDL library: mdl/OmniSurface/OmniImage.mdl

export enum alpha_mode [[ anno::description("Alpha mode")]]
{
    alpha_default = 0 [[ anno::display_name("Default") ]],
    alpha_red = 1 [[ anno::display_name("Red") ]],
    alpha_green = 2 [[ anno::display_name("Green") ]],
    alpha_blue = 3 [[ anno::display_name("Blue") ]],
    alpha_white = 4 [[ anno::display_name("White") ]],
    alpha_black = 5 [[ anno::display_name("Black") ]],
    alpha_luminance = 6 [[ anno::display_name("Luminance") ]],
    alpha_average = 7  [[ anno::display_name("Average") ]]
};

You can change all of the image alpha modes in the Unreal material editor by checking an modifying the value of the various ***** Alpha Mode N parameters like this:

If you’d like a more thorough explanation or walkthrough just reply and I’ll provide one.

@mikael.hertz33d1j

I did some further digging and found that the Unreal Connector is not properly handling the OmniSurface Image Alpha Modes. It might work every now and then, but there are some issues with it for sure. I filed an internal issue OM-76404 to address this and will update this thread when we fix it. Thanks for reporting this workflow issue!

1 Like

We have fixed the issue in our dev branches and the fix will be in the next update. I can’t say exactly the next update will be, so if you’re crafty with applying code patches I’ll provide one here. Also note that these affected files have changed since the release, so the patch is against our current dev branch, not the latest release.

FixMDLEnumParamSaving-c8e3e5a951f0128ad6af9ec040f7a4ee5d15dc6a.patch (5.3 KB)

Thanks for the help. I’m impressed by the speed of the fix. Do you have a git repo for the ue4 connector where I can find the source code?

Do you have a git repo for the ue4 connector where I can find the source code?

The source is included alongside the prebuilt binaries when you install the Connector (plugins) from the Omniverse Launcher. We do this so you can modify it however you like, or put it in a source Unreal Editor built with modified Public interfaces.

Also, the previous patch needs another, fairly simple patch to the omniverseUSDMdlSchema.cpp file:

FixMDLEnumParamSaving-Part2-c05ff0b11944c280826d2728796eb5b2b06d271e.patch (1.2 KB)

Thanks. I’ve applied the patch and compiled it for Unreal 4.27.2 and 5.1. It works for both.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.