You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
I used a confidential dataset to benchmark the performence. 112 png files weighting 3.2 GB. The old import system took 75.96 seconds to import the data while blocking the gamethread. The Interchange system took 15.06 seconds to import the data whitout blocking the game thread, but my initial testing found that it resquested around 200 MB of memory then the old system. It's possible that this is due to the memory pool of each thread (it need investigation before jumping to that conclusion). Those test where made using a machine with a Xeon E5-2643 (6 cores/ 12 Threads) #rb Alexis.Matte #jira UEENT-3845 [CL 15164350 by Julien StJean in ue5-main branch]
51 lines
1.6 KiB
C++
51 lines
1.6 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "UDIMUtilities.h"
|
|
|
|
#include "Internationalization/Regex.h"
|
|
|
|
namespace UE
|
|
{
|
|
namespace TextureUtilitiesCommon
|
|
{
|
|
uint32 ParseUDIMName(const FString& Name, const FString& UdimRegexPattern, FString& OutPrefixName, FString& OutPostfixName)
|
|
{
|
|
FRegexPattern RegexPattern( UdimRegexPattern );
|
|
FRegexMatcher RegexMatcher( RegexPattern, Name );
|
|
|
|
int32 UdimValue = INDEX_NONE;
|
|
|
|
if ( RegexMatcher.FindNext() )
|
|
{
|
|
const int32 StartOfCaptureGroup1 = RegexMatcher.GetCaptureGroupBeginning(1);
|
|
const int32 EndOfCaptureGroup1 = RegexMatcher.GetCaptureGroupEnding(1);
|
|
const int32 StartOfCaptureGroup2 = RegexMatcher.GetCaptureGroupBeginning(2);
|
|
const int32 EndOfCaptureGroup2 = RegexMatcher.GetCaptureGroupEnding(2);
|
|
const int32 StartOfCaptureGroup3 = RegexMatcher.GetCaptureGroupBeginning(3);
|
|
const int32 EndOfCaptureGroup3 = RegexMatcher.GetCaptureGroupEnding(3);
|
|
|
|
if ( StartOfCaptureGroup1 != INDEX_NONE && StartOfCaptureGroup2 != INDEX_NONE &&
|
|
EndOfCaptureGroup1 != INDEX_NONE && EndOfCaptureGroup2 != INDEX_NONE )
|
|
{
|
|
LexFromString( UdimValue, *Name.Mid( StartOfCaptureGroup2, EndOfCaptureGroup2 - StartOfCaptureGroup2 ) );
|
|
|
|
OutPrefixName = Name.Mid( StartOfCaptureGroup1, EndOfCaptureGroup1 - StartOfCaptureGroup1 );
|
|
|
|
if ( StartOfCaptureGroup3 != INDEX_NONE && EndOfCaptureGroup3 != INDEX_NONE )
|
|
{
|
|
OutPostfixName = Name.Mid( StartOfCaptureGroup3, EndOfCaptureGroup3 - StartOfCaptureGroup3 );
|
|
}
|
|
}
|
|
}
|
|
|
|
if ( UdimValue < 1001 )
|
|
{
|
|
// UDIM starts with 1001 as the origin
|
|
return INDEX_NONE;
|
|
}
|
|
|
|
return UdimValue;
|
|
}
|
|
}
|
|
}
|