Potential Issue with OCIO in 5.6 nDisplay ?

We have a plugin that exposes the OCIO config in the settings menu. This is then used to apply it to the scene like so

RootActor->GetConfigData()->StageSettings.ViewportOCIO.AllViewportsOCIOConfiguration.ColorConfiguration = settings->OCIOConfig.ColorConfiguration;

As far as I can tell, we’re applying a valid colour configuration, and changing the destination colour space changes the output (so applying the config has an effect). But the output is not correct. This worked fine in previous versions, did something change with how OCIO needs to be set ?

HI there,

Hi there, I have done a quick compare 5.5 and 5.6 colour configuration to make sure the base is working.

As for setting the OCIO color configuration, from reviewing the code, it seems sufficient to affect a change.

I’d like to test your same setup. What color configuration settings are you using?

Kind Regards

Keegan Gibson

I’m using this ocio config file and I have the Transform source set as Linear Rec.709 (sRGB) and the Transform destination set as Rec.2100-PQ-Display-Un-tone-mapped.

Thanks for providing your OCIO config, I have set up a test 5.5 nDisplay project and setting the OCIO directly on the nDisplay config and a 5.6 project where I set it from a custom Developer Settings.

For simplicity, I used an actor placed in the level on begin play, but that probably wouldn’t be a viable option in a production environment, and set it the same way that you do.

I couldn’t see any difference setting it this way. I have attached a screenshot comparing the two.

What do you notice as different, or do you not see any effect from the OCIO settings?

It might be related to when it’s set, perhaps being set too early? When do you apply the new config?

[Image Removed]Here is how I am settingit within the begin play of an actor. It might be worth a quick test to see if it’s a timing issue.

// Initialize OpenColorIO configuration
if (const UMyDeveloperSettings* Settings = GetDefault<UMyDeveloperSettings>())
{
	// Find the root actor in the world
	for (TActorIterator<ADisplayClusterRootActor> Itr(GetWorld()); Itr; ++Itr)
	{
		ADisplayClusterRootActor* RootActor = *Itr;
		if (RootActor)
		{
			// Set the OpenColorIO configuration
			RootActor->GetConfigData()->StageSettings.ViewportOCIO.AllViewportsOCIOConfiguration.ColorConfiguration = Settings->OCIOConfig.ColorConfiguration;
		}
	}
}

Let me know how you get on.

Kind Regards,

Keegan Gibson

[Image Removed][Image Removed]This is the result I see after running it through our software. The first image is how it looks when using 5.6 and the second is what it is expected to look like and is using 5.5.

As for the timing issue, it’s being called every frame using the OnBeginFrame delegate so that would seem unlikely to me. Unless you’re saying that this has to be done once during init ? Here’s the full function:

void FRenderStreamModule::OnBeginFrame()
{
    if (!IsInCluster())
        return;
 
    // UpdateSyncObject
    IDisplayClusterClusterManager* ClusterMgr = IDisplayCluster::IsAvailable() ? IDisplayCluster::Get().GetClusterMgr() : nullptr;
    const bool IsController = !ClusterMgr || ClusterMgr->IsPrimary();
    if (IsController)
        m_syncFrame.ControllerReceive();
 
    const URenderStreamSettings* settings = GetDefault<URenderStreamSettings>();
 
    ADisplayClusterRootActor* const RootActor = IDisplayCluster::Get().GetGameMgr()->GetRootActor();
    if (RootActor && settings->OCIOConfig.ColorConfiguration.ConfigurationSource != nullptr)
    {
        RootActor->GetConfigData()->StageSettings.ViewportOCIO.AllViewportsOCIOConfiguration.bIsEnabled = true;
        RootActor->GetConfigData()->StageSettings.ViewportOCIO.AllViewportsOCIOConfiguration.ColorConfiguration = settings->OCIOConfig.ColorConfiguration;
    }
}

Thanks for your help.

Hi there,

I haven’t been able to reproduce the issue you are having. I’m uploading my sample project. Could you test to see if you are seeing the same result on your hardware?

If, that project works for you. I might need you to create a minimal repo project for me to debug.

If it doesn’t work, we might need to look at hardware-related changes.

Do you have any engine modifications?

Kind Regards,

Keegan Gibson

I tried it but am I doing something wrong ? I’m launching nDisplay through the button in the top right. I tired it with OCIO both on and off but it looks the same. I also tried using the both the provided ways of setting it in the code.

[Image Removed][Image Removed]The first image has OCIO disabled second is with in enabled.

Hi there,

Apologies, I hadn’t set it up to be enabled and disabled via the check box. Here is a newer version that allows you to turn it on and off.

Ok I can see that it changes now, is there any way within Unreal to check if it’s correct ? Like a built in colour checker. I’m just trying to determine where exactly it breaks. Through our software I can see there is a difference between turning it on or off but as you can see in the picture the final colour is very off.

To confirm, is the problem that your code is failing to apply the OCIO config, or is it applying incorrectly?

From my testing, it looks the same in 5.5 and 5.6. Are you running it through some other software?

Is the color config settings the same?

The problem is that the OCIO config seems to be applied incorrectly. If I toggle it on and off I can see there is a difference but when it is enabled the colour is completely wrong. I guess it must be something wrong with our software but the confusing thing is it works with 5.5. We maintain a UE plugin that interfaces with the software and when it was updated for 5.6 there weren’t any significant changes or anything that would seem to effect OCIO. I know that’s not a lot of information to go on but if you can think of anymore ideas I can try or things to look in to I would appreciate it.

There were some updates to the OCIO library, as well as some changes to when OCIO was applied to allow each node to apply its own OCIO settings with media multicasting.

If you apply the color config directly to the nDisplay config, does it look any different than via your plugin?

If you would like, I might re-assign this issue to an epic staff member who may have more insight into the changes in OCIO between 5.5 and 5.6

How do I apply it directly to the nDisplay config ? As far as I know the .ndisplay file doesn’t have any colour info right ?

No, I don’t think it contains that information within the .ndisplay config file or some of the newer features, but you can import the .ndisplay config, and it will be converted into the new nDisplay Config UAsset within the content browser and then edit it within Unreal. You can then export .ndisplay config files from the Uasset editor to launch a cluster. It is recommended to use the nDisplay 3D Config editor for configuring the nDisplay clusters.

You can edit the OCIO config applied to all or some viewports within the nDisplay config blueprint under OCIO.

[Image Removed]

Kind Regards

Keegan GIbson

I’m not sure this will work for our case unfortunately. Our software generates an ndisplay config then launches UE. This seems like this only works if the config is a UE asset. Even when I export it and try to use it, there is no info about OCIO so it essentially looks like the same config. Unless I’m misunderstanding ?

Correct, the .nDisplay config file does not contain that information. It is an older format. As of 4.27, you can continue to import .nDisplay configuration files into the project, but they will be converted to the new .uasset format.

Usually, the nDisplay configs reference back to the uasset when exported, via the assetPath

	"nDisplay":
	{
		"description": "nDisplay configuration",
		"version": "5.00",
		"assetPath": "/Game/ExampleConfigs/NDC_Cave.NDC_Cave",

As this won’t work in your case, to debug your situation, you’ll need to provide a repo project that reproduces the error you are experiencing.

I was unable to see any difference with OCIO on 5.5 or 5.6 when setting it via the UAsset config or setting it via C++.

Could you provide more information on how you are setting the OCIO config? Were you able to see any difference when set via a UAsset config? Is the color correct when set via the UAsset config, in 5.6. That would rule out any regression within the engine.

It doesn’t seem to work either when setting the asset path. I have no idea what’s going on. It seems like it’s something to do with how our software interacts with it. I think it’s something I’ll have to investigate further. Unless you have any more ideas. I can’t really provide a repro because it doesn’t seem to happen with just UE, it’s if it’s run through our software. The puzzle is that we didn’t change anything in regards to OCIO. From debugging it looks like the config is actually being applied it just looks wrong and I don’t know a lot about how OCIO works.

Hi there,

Thanks for the details, since this only seems to occur when running through your software and not directly in UE, it’s unfortunately very difficult for us to debug on our side. This will likely need some deeper investigation on your end to narrow down what might be interfering with OCIO. A couple of things that might help: try verifying whether your software is overriding environment variables or paths that OCIO relies on, and double-check that color space transforms are consistent with the config you’re applying.

Feel free to reach back out when you have had a chance to debug further.

Regards,

Thomas