Commit Graph

82 Commits

Author SHA1 Message Date
charles bloom
04ffabc485 ImageWrapper and import/export refactor
FImage is now the standard preferred type for a bag of pixels
FImageView can point at pixels without owning an allocation
ERawImageFormat (FImage) converts to ETextureSourceFormat
FImageUtils provides generic load/save and get/set from FImage
major cleanup in the ImageWrappers
new preferred API is through ImageWrapperModule Compress/Decompress
SetRaw/GetRaw functions cleaned up to not have undefined behavior on unexpected formats
ImageWrapper output added for HDR,BMP,TGA
RGBA32F format added and supported throughout import/export
EditorFactories import/export made more generic, most image types handled the same way using FImage now
Deprecate old TSF RGBA order pixel formats
Fix many crashes or bad handling of unusual pixel formats
Pixel access functions should be used instead of switches on pixel type

#preflight 6230ade7e65a7e65d68a187c
#rb julien.stjean,martins.mozeiko,dan.thompson,fabian.giesen

[CL 19397199 by charles bloom in ue5-main branch]
2022-03-15 18:29:37 -04:00
julien stjean
99239ba819 Fixed an undefined behavior caused by a stack variable being use after the end of its scope.
#jira UE-144620
#preflight 622148262c722ee170df140c
#lockdown Simon.Tourangeau

#ROBOMERGE-AUTHOR: julien.stjean
#ROBOMERGE-SOURCE: CL 19267937 in //UE5/Release-5.0/... via CL 19268121
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v924-19243027)

[CL 19270643 by julien stjean in ue5-main branch]
2022-03-04 13:39:15 -05:00
David Harvey
e774435219 ImageWrapper enabled for all Windows platforms.
#jira UE-131865
#rnx
#preflight 620bdc67475fb819ddc6b82b
#rb Brandon.Schaefer, Josh.Adams

[CL 19011663 by David Harvey in ue5-main branch]
2022-02-16 03:59:09 -05:00
marc audy
6553e6cd0a Remove as much C++ deprecation as possible up to 4.17 (along with a few scattered removals from beyond)
#preflight 61eefc77ba69a4fdb220bf23

#ROBOMERGE-AUTHOR: marc.audy
#ROBOMERGE-SOURCE: CL 18712765 in //UE5/Release-5.0/... via CL 18712784 via CL 18713147
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18713191 by marc audy in ue5-main branch]
2022-01-24 15:07:48 -05:00
will damon
2aaf9ecda5 Add Mac support for libjpeg-turbo
- Rebuild libturbojpeg as a universal static lib.

#rb dave.hunter
#jira UE-115885
#rnx
#preflight trivial

#ROBOMERGE-AUTHOR: will.damon
#ROBOMERGE-SOURCE: CL 18545397 in //UE5/Release-5.0/... via CL 18545415
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18545446 by will damon in ue5-release-engine-test branch]
2022-01-07 11:24:45 -05:00
swarm
eea09b206f LibTiff for linux.
Unfortunatly it doesn't support the old jpeg format yet. Not sure why currently, but modern tiff encoded using jpeg are fully supported.

#rb Alexis.Matte
#preflight 61a52da9c3287aab277a80d5

#ROBOMERGE-AUTHOR: swarm
#ROBOMERGE-SOURCE: CL 18314926 in //UE5/Release-5.0/... via CL 18315830
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18316193 by swarm in ue5-release-engine-test branch]
2021-11-29 16:27:35 -05:00
Marc Audy
0c3be2b6ad Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
2021-11-18 14:37:34 -05:00
aurel cordonnier
69fe095547 Merge from Release-Engine-Staging @ 17636544 to Release-Engine-Test
This represents UE4/Main @17638339 and Dev-PerfTest @17636504

[CL 17638842 by aurel cordonnier in ue5-release-engine-test branch]
2021-09-27 19:54:25 -04:00
paul chipchase
4d1f50ce05 Some minor clean ups for the WITH_UNREALPNG/WITH_UNREALJPEG code paths in ImageWrapper.
#rb Mark.Lintott
#rnx
#preflight 614040873aa82d00013a13ab

- When libjpeg-turbo is enabled we now disable libJPG, before we were including both and relying on libJPG being stripped out.
- Fixed IcoImageWrapper.cpp to compile if WITH_UNREALPNG is 0.
- Cleaned up code comments around enabling libjpeg-turbo with a reminder to investigate the exe size increase if anyone tries to enable it on a console platform.

#ROBOMERGE-AUTHOR: paul.chipchase
#ROBOMERGE-SOURCE: CL 17502250 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17502312 by paul chipchase in ue5-release-engine-test branch]
2021-09-14 05:42:35 -04:00
rolando caloca
f6cd88c157 UE5 - Remove platform
#rb Steve.Smith
[FYI] Jules.Blok, Ryan.Durand, Ben.Marsh

#ROBOMERGE-SOURCE: CL 17295935 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v861-17282326)

[CL 17295945 by rolando caloca in ue5-release-engine-test branch]
2021-08-24 19:28:38 -04:00
zahra nikbakht
8f27bfa7f6 - Custom thumbnail for Widget blueprints #RB patrick.boutot #jira ue-118803
#preflight 610a9c562b002800016b5e53

#ROBOMERGE-SOURCE: CL 17052085 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v850-17047176)

[CL 17052094 by zahra nikbakht in ue5-release-engine-test branch]
2021-08-04 11:18:57 -04:00
julien stjean
2934025ddc Making the reimport of a texture by interchange thread safe.
Changed the texture payloads so that they use the new unique buffer.
Refactored the blocked texture payload and the UDIM translator to support the new payload.
Added some functions to the FTextureSource so that it can receive a FSharedBuffer instead of copying the data into the payload.
Removed the const requirement from the UInterchangeFactoryBase main functions. It was needed so that I can store the texture payload in the function CreateAsset and then consume it in the function PreImportPreCompletedCallback. Also reporting messages in the factory does affect the state of the factory.
The Interface IImageWrapper has a new function to get the raw data into an ArrayView. For now the interface provides a default implementation but I would like to make it abstract when all the existing wrapper will have an implementation for it.

#jira UETOOL-3834
#rb Alexis.Matte
#preflight 610877d603d30300010f7840

#ROBOMERGE-SOURCE: CL 17023158 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v839-17012307)

[CL 17023172 by julien stjean in ue5-release-engine-test branch]
2021-08-02 19:46:33 -04:00
charles bloom
4106e8423a Add OodlePNGz0 option for Texture asset compression
fix handling of Uncompressed Quality in JPEG image wrapper

#rb dan.thompson

#ROBOMERGE-SOURCE: CL 17020407 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v839-17012307)

[CL 17020411 by charles bloom in ue5-release-engine-test branch]
2021-08-02 16:50:21 -04:00
alexander suvorov
9283f3f96e Add full support for 32-bit float EXR image channels.
#rb Julien.StJean, charles.bloom

[CL 16454318 by alexander suvorov in ue5-main branch]
2021-05-25 15:01:03 -04:00
Brandon Schaefer
a789a5e11b Add Linux support for libjpeg-turbo
#jira UE-115886
#review-16418951 @James.Singer
#rb James.Singer

[CL 16419159 by Brandon Schaefer in ue5-main branch]
2021-05-21 10:55:26 -04:00
alexander suvorov
5ac2bda0f0 Avoid buffer overflow when using JPEG compression for small images.
#rb charles.bloom

[CL 16379865 by alexander suvorov in ue5-main branch]
2021-05-18 21:18:29 -04:00
Julien StJean
50693382d9 Moving HDR loader from runtime engine to imagewrapper.
Adding support of hdr to interchange those are now imported as standart 2d Texture.

#jira UETOOL-3244
#rb Alexis.Matte

[CL 16347572 by Julien StJean in ue5-main branch]
2021-05-17 08:44:27 -04:00
alexander suvorov
9ae202b0ca Implement image dump functionality for Oodle texture compression.
#rb charles.bloom

[CL 16319306 by alexander suvorov in ue5-main branch]
2021-05-13 17:19:11 -04:00
Zousar Shaker
6d8788c3a9 Avoid having the ImageWrapper module depend on CoreUObject so that it can be used from standalone texture build workers that don't want to link to CoreUObject.
#rb ben.ingram

[CL 16197645 by Zousar Shaker in ue5-main branch]
2021-05-04 15:06:57 -04:00
Julien StJean
547c7f160d Optimisation to the legacy texture import and improvement to texture wrapper
Minor change to FImageWrapperBase. GetRaw and GetCompressed now consume the array with the same name instead of having to do a copy of it.
I changed the api IImageWrapper::GetCompressed to return a TArray64<uint8> instead of returning a const TArray64<uint8>&.
Added the format RGBAF to the struct ERGBFormat. Changed the engine code using the EXR image wrapper to reflect that.
The EXR image wrapper now avoid doing an unessary copy of the compressed image when calling compress.

Improvement to the performence of the function UTextureFactory::ImportImage. We now use the magic bytes of the file for certains format to skip some tests.

Here is some performance metrics I captured on my desktop (6 core, 12 threads XEON)

Importing a folder of tiff files (22 files, 4.16 GB Total)
Before: 66.152738 seconds
After: 43.609245 seconds

#jira UEENT-3822
#rb Alexis.Matte

[CL 16128765 by Julien StJean in ue5-main branch]
2021-04-27 11:59:02 -04:00
Marc Audy
01b7c9f4f5 Merge UE5/RES @ 15958325 to UE5/Main
This represents UE4/Main @ 15913390 and Dev-PerfTest @ 15913304

[CL 15958515 by Marc Audy in ue5-main branch]
2021-04-08 14:32:07 -04:00
mihnea balta
0eaa5b7500 Fixing UE4 references.
#jira UE-111764 UE-111505 UE-111498 UE-111441 UE-111116 UE-111112 UE-111108 UE-111099 UE-111096 UE-111095 UE-111094 UE-111092
#rb trivial
#rnx

#ROBOMERGE-OWNER: mihnea.balta
#ROBOMERGE-AUTHOR: mihnea.balta
#ROBOMERGE-SOURCE: CL 15817879 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v783-15756269)
#ROBOMERGE-CONFLICT from-shelf

[CL 15817904 by mihnea balta in ue5-main branch]
2021-03-25 03:20:20 -04:00
Marc Audy
0cbbc781ca Merge UE5/Release-Engine-Staging @ 15740152 to UE5/Main
This represents UE4/Main @ 15709114

[CL 15740605 by Marc Audy in ue5-main branch]
2021-03-18 15:20:03 -04:00
julien stjean
8f3c505895 Mirgrated the fix for VLN-1183 into UE5 EA.
#jira VLN-1183
#rb trivial
[FYI] Alexis.Matte

#ROBOMERGE-SOURCE: CL 15623903 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v777-15581079)

[CL 15623925 by julien stjean in ue5-main branch]
2021-03-05 10:16:59 -04:00
Josh Adams
b0e4357576 - UBT Code changes to remove 32-bit Windows support (C++ code for 32-bit still exists)
#rb marc.audy (concept, not each file)

[CL 15265424 by Josh Adams in ue5-main branch]
2021-01-31 15:09:58 -04:00