This allows artist to provide a custom LUT describing specular behavior for view and light angles. The LUT can be procedurally generated or provided from a texture.
#rb sebastien.hillaire
#jira none
#preflight 646b6b392c0a5da0dcc8a2ab
[CL 25564387 by Charles deRousiers in ue5-main branch]
New algorithm is in MovieScenCurveChannelImpl where we calculate auto tangents. Since they work off tangents and not key positons, need to make sure to recalc them if the tangent changes now. Since FRichCurve will not support these new auto tangents, they only do 2 key interps with the old auto key algorithm that doesn't average the tangents at all, had to add a SupportedTangentType to FCurveEditor so that we can use that with the curve editor context menu/commands/SCurveEditorPanel since they are all shared between Sequencer and the Curve Asset viewer. Most of the code is making sure we treat smart auto's the same as the old autos
#jira UE-171811
#rb max.chen
#preflight 6446d596dc71c13446fa361a
[CL 25175842 by mike zyracki in ue5-main branch]
#rb graham.wihlidal, brian.karis
#preflight skip
This changelist contains all of the improvements we've made to the texture painting system during our development time.
Here is the full list of included CLs:
1)
"
Improved texture painting debug draw
Before this change, debug draw for the vertex/texture painting tool only displayed vertex colors. This changelist improves the debug draw to show the texture painting data on the mesh proxy in a similar way as the vertex painting.
As part of this changelist, I fix a bug found in FColoredTexturedMaterialRenderProxy::GetParameterValue. The problem was that the FColoredTexturedMaterialRenderProxy overrides a color and a texture parameter, but we only considered the texture parameter. This was preventing the texture painting to display different color channels on request.
Full list of changes:
Added directory of new special material, TexturePaintingMaskMaterial, to BaseEngine.ini
Updated Engine.h/UnrealEngine.cpp to keep a texture painting mask material. (TexturePaintingMaskMaterial.uasset). This material splits has a color parameter and a texture parameter. The texture parameter is filtered based on the color parameter for RBG channels. When all channels (RBG) are set to 0, we display the alpha as the color purple instead of opacity because alpha is typically used as a texture mask in the use cases for texture painting.
Updated FColoredTexturedMaterialRenderProxy::GetParameterValue to call base class functions in order to correctly query the color parameter.
Added the transient weak object pointer "OverridePaintTexture" to "UMeshPaintingSubsystem". This is set by the texture painting system to override the texture painting debug draw during active drawing.
Added the weak object pointer global "GVertexViewModeOverrideTexture" which is used to propagate debug draw behavior to relevant meshes that are being painted. This follows the method already in place for the vertex color debug draw.
Updated StaticMeshRender.cpp/SkeletalMesh.cpp to now handle the new "GVertexViewModeOverrideTexture" weak object pointer.
Added the enum class "EMeshPaintActiveMode" which is used by the paint mode subsystem when setting the viewport color mode. This is used to differentiate when to show debug draw for normal color, weights, and texture. The names chosen here follow the same names as the tools themselves.
"
2)
"
Support for Texture Painting Flood Fill tool
This changelist adds the feature for a "Flood Fill" tool option for Texture painting.
To use the new feature:
1) Change to Mesh Paint Mode using the gamemode drop-down in the top right corner of the editor.
2) Change to the "Textures" tab in the Mesh Paint window.
3) Click on the new "Paint Bucket" button near the paint button on the texture painting tool to fill the texture using the current options.
The flood fill tool takes into consideration the UV channel, brush texture, alpha channel, and all color channels on the option configuration. This is accomplished by using the same texture painting shader passes as normal painting. The difference is there is now a new permutation for the paint bucket fill which no longer limits the draw to just the selected area.
Full list of changes:
Added the boolean "bUseFillBucket" to FMeshPaintParameters to pass forward whether or not we are using the fill bucket tool.
Updated "UMeshPaintMode::BindCommands" with a new action for the paint bucket "TextureFill".
Updated UMeshPaintMode with a new function "FillWithTextureColor" which is bound to the paint mode command "TextureFill".
Updated "MeshPaintPixelShader.usf" with the shader permutation macro for "MESH_PAINT_USE_FILL_BUCKET" which will output a simple flood if no paint brush is selected. If a paint brush is selected, it will fill the texture using the brush texture which respects an input rotation.
Added permutation FMeshPaintUseFillBucket to "TMeshPaintVertexShader".
Added logic in "UMeshTexturePaintingTool::OnTick" to handle paint bucket requests.
"
3)
"
Fixes for Mesh Painting Texture Filter, Infinite Loop
This change resolves two mesh painting UI bugs.
The first issue was the Paint Texture filter always returning no results, resulting in only the first texture in the list being paintable. This was due to the filtering function using a generic editor asset name instead of the candidate texture's full name when comparing against the list of valid paintable textures. This change resolves this issue by using the full name from the asset's associated UTexture2D instead.
The second issue was an infinite loop that freezes the editor UI. This would occur when opening the texture painting options for a mesh with a non-instance material associated to it. This change resolves this issue by adding the appropriate break condition to handle this case.
"
4)
"
Fixed Material Texture Parameter Override not refreshing
Before this change, the texture painting system would not properly show active textures being drawn on layered materials. This was because "UMaterialInstance::OverrideTextureParameterValue" only overrode the surface level material and did not consider parent materials.
To fix this, I have now updated "UMaterialInstance::OverrideTextureParameterValue" to also call this function on any existing parents. Along with this, "UMaterialInstance::ResetAllTextureParameterOverrides" is now recursive on its parent for proper texture parameter override cleanup.
As part of this change, I have now also updated IMeshPaintComponentAdapter::DefaultQueryPaintableTextures to query parent material instances for suitable textures for painting. This is needed because parent paintable textures were not being shown in the texture painting tool.
"
5)
"
Fixing a mesh painting bug due to the source texture not being checked for validity. This happens on a "Default_RenderTarget_Clear" texture that has no source texture.
"
6)
"
Texture Painting - Improved material parameter visiblity
Before this change, the texture painting tool only considered textures visible on the top level of a material script. This meant artists needed to to purposely expose any textures needed for painting outside of any material functions in order to paint the texture using the tool. This changelist fixes this problem by now iterating on a given material's texture parameters when filtering out paintable textures.
Full list of changes:
Added helper function "IsTextureSuitableForTexturePainting" in "IMeshPaintComponentAdapter.cpp" to avoid code duplication.
Updated "IMeshPaintComponentAdapter::DefaultQueryPaintableTextures" to iterate through texture parameter values.
Removed the local boolean "bIsTextureUsed" from "UMeshTexturePaintingTool::StartPaintingTexture". This is because "IMeshPaintComponentAdapter::DefaultQueryPaintableTextures" already filters out any unused textures, so filtering again here is unnecessary.
This change was needed in this CL because "UTexturePaintToolset::DoesMeshComponentUseTexture" does not consider texture parameters. I opted to completely remove "bIsTextureUsed" instead of updating the function. This is to prevent any future bugs relating to "DoesMeshComponentUseTexture" not matching "DefaultQueryPaintableTextures".
"
7)
"
Improved texture painting undo/redo stability
Before this change, a 2 crashes could occur when rapidly hitting the undo/redo key when using the texture painting tool. This changelist fixes both crashes.
The first crash would happen due to the internal bulk data being invalid. This can happen when texture streaming is cancelled mid-stream and a new texture 2D is assigned. To fix this, I now use the "Texture2D::Modify" function to refresh the bulk data if needed and wait for any streaming before doing any painting.
The second crash would happen if undo/redo was triggered while the user is currently painting. This is because the function "UMeshTexturePaintingTool::StartPaintingTexture" would assume that the current texture is streamed in if "bStartedPainting" is true. However, this isn't the case if the user "undos" a painting operation while holding down the paint button. To fix this, I now condition both "bStartedPainting" and "bIsSourceTextureStreamedIn" when attempting to continue a painting operation.
"
8)
"
Fixing a Texture Painting crash that occurs when editor is using SM6
"
9)
"
Feature Support for Texture Painting Brushes
Before this changelist, it was only possible to use the texture painting tool to paint a single color using a solid brush. This changelist adds support for custom texture painting brushes on the texture painting tool.
To use the new feature:
1) Change to Mesh Paint Mode using the gamemode drop-down in the top right corner of the editor.
2) Change to the "Textures" tab in the Mesh Paint window.
3) Use the "Paint Brush" parameter to select from any texture in-editor as a brush.
4) Use the "Paint Brush Rotation Offset" parameter to set the initial 2D rotation of the texture on a mesh.
5) Optionally select "Rotate Brush Towards Direction" to continously paint a texture in a given direction on a mesh.
6) Paint onto any surface
Full list of changes:
Added the variable "BrushPosition2D" to FMeshPaintParameters which is now used for tracking our current and previous 2D brush position.
Added the variable "PaintBrushRenderTargetTexture" to "FPaintTexture2DData" to hold a local copy of any texture brush being used for painting.
Updated "MeshPaintPixelShader.usf" with seperate painting paths for applying a paint brush texture.
Updated "TMeshPaintPixelShader" to now bind and pass in the new paint brush parameters.
Updated "TMeshPaintPixelShader" with two new permutation domains (FMeshPaintUsePaintBrush and FMeshPaintUseRotateTowardDirection).
Fixed a small bug in SetMeshPaintShaders where the normal mesh paint pass was using the GMeshPaintDilateVertexDeclaration instead of the GMeshPaintVertexDeclaration declaration. I have opted to correct this in this changelist since I was already editing this area of code with the new permutation vectors.
Updated "FMeshPaintShaderParameters" with the new paint brush related parameters.
Updated "UMeshTexturePaintingToolProperties" with the new paint brush related parameters.
Added optional parameter to "UMeshTexturePaintingTool::PaintTexture" to pass in last attempt's parameters which is used for calculating our 2D movement vector for the "Rotate Brush towards direction" feature.
Updated "UMeshTexturePaintingTool" to now keep track of LastPaintRayResults to use when determining the 2D movement vector.
Potential improvements:
Update the dilate texture painting to also support the texture painting brushes. Currently, it doesn't seem that artists are using the dilate feature, so this changelist only targets the normal texture painting.
Add support for triplanar mapping.
"
10)
"
Updated Active Texture Painting Selection
This changelist is a quality of life improvement for texture painting to always have paintable texture selected if one is available.
Before this change, it was possible to have no paint texture selected even if we have available options. This ended up causing confusion when debug draw was enabled. In this case, the debug draw would show no texture painting information because the draw shows only the currently active paintable texture.
This changelist fixes that by now recaching the paint texture in the function "UMeshTexturePaintingTool::OnTick" when a paintable texture is available but the texture properties has the active texture set to nullptr.
"
11)
"
Default UV Channel to light map coordinate index
Before this change, the default value for UV Channel was always 0 which doesn't always align with what the user would like to paint. This caused confusion when trying to paint, but the channel was incorrect. This change updates the constructor for UMeshTexturePaintingToolProperties to now set the default UVChannel value to the light map coordinate index of the first selected mesh. It is still possible to change the UVChannel manually, but this index is likely the one users would be wanting to paint when using the mesh painting tool.
"
12)
"
Fixed texture parameters not taken for consideration for texture painting
Before this change, it was not possible to texture paint a material's texture if that texure was registered as a texture parameter. This was clearly not intentional because the texture painting tool gathers texture parameters as paintable textures in the function "IMeshPaintGeometryAdapter::DefaultQueryPaintableTextures". The reason why texture parameters weren't being painted is because the "UMaterialInterface::OverrideTexture" editor only function did not consider texture parameters when assigning an override texture. This meant that the painted texture would never override the texture parameter actually being used for render.
To fix this, I have now updated the "OverrideTexture" method to also override any appropiate texture parameters. I believe this is an overlooked edge case of the override texture functionality, so it is necessary to modify the function here instead of creating a workaround in the texture painting system. My implementation in this changelist stores an array of "texture parameter overrides" which is a custom struct with an object pointer to the old texture and the new one, and then on setting new textures, we reference this array. This is editor-only.
With these changes, I have tested the texture painting tool on materials with and without texture parameters along with the following scenarios:
saving/loading texture painted materials in-progress and committed/saved.
undo/redo
copy/paste
destroy/creation
moving/edit transform
All cases tested worked as expected.
Detailed changes:
Updated UMaterialInstance::GetTextureExpressionValues to consider the override textures. This function is used to collect all textures used by a given material instance.
Updated UMaterialInstance::OverrideTexture to now also override the texture parameter value.
Updated UMaterialInstance::Serialize to reset all texture parameter overrides on serialize to avoid serializing any in-progress texture parameters.
Updated UMaterialInstance::ClearParameterValuesInternal to reset the texture parameter overrides if we are resetting the normal texture parameters.
Created the new function "UMaterialInstance::OverrideTextureParameterValue", which is used to manage any registered overridden textures in editor. Requesting an override texture with "nullptr" will remove a given entry from the overrides. This function is meant to work the same way on the texture parameters as "UMaterialInstance::OverrideTexture" does on the internal texture transient overrides.
Created the new helper function "UMaterialInstance::ResetAllTextureParameterOverrides" which iterates through all of our overrides and properly removes them.
Made the function "UMaterialInterface::GetTextureParameterValue" virtual and created the function "UMaterialInstance::GetTextureParameterValue" which overrides any relevant texture parameter value using the internal transient texture parameter overide array. Outside of editor, the function will end up only calling the base function.
Updated "UMeshTexturePaintingTool::OnTick" to clear all texture overrides when a recache is necessary. This fixes a problem where "undo" wasn't reflecting in the texture at times because a stal texture override was being used. By clearing at this spot, any necessary texture overrides will be registered later.
"
13:
"
Fix Texture Painting Visualization
The visualization for texture painting was not showing before this change. The issue is that ShouldProxyUseVertexColorVisualization was returning false when it shouldn't be. GVertexViewModeOverrideOwnerName seems to be an empty string when it should still be the currently painted component name. The string is being set in UMeshTexturePaintingTool::CanBeginClickDragSequence but is then being immediately reset by a call to UMeshTexturePaintingTool::ClearAllTextureOverrides. To fix this I also set GVertexViewModeOverrideOwnerName in the function UMeshPaintModeSubsystem::SetViewportColorMode. This function gets called every frame and will re-register the name string after being cleared. It is also where another override variable, GVertexViewModeOverrideTexture, is already being re-registered.
"
#ushell-cherrypick of 24639501 by Jess.Kube
[CL 24667907 by graham wihlidal in ue5-main branch]
* Deprecate Render method for BP Brushes, RenderLayer should now be used
* Adds FLandscapeBrushParameters struct that should be used to pass arguments when rendering a layer
* Modifies ELandscapeToolTargetType to be an enum class, usable by blueprints
* Adds BP Brush visibility layer toggle in Landscape Editor
* Adds visibility layer editing for LandscapeCircleHeightPatches
* Adds visibility layer editing for LandscapeTexturePatches
* Adds helper method to determine if a layer info object name is a visibility layer
#jira UE-163386
#rb Jonathan.Bard
#preflight 63ebb119e92f139c51b2a842
[CL 24251734 by luc eygasier in ue5-main branch]
It was the initial bug, but while looking at it, I noticed that the MultilineEditableTextBox was containing both a Font via FEditableTextBoxStyle, and another one via FTextBlockStyle, thus being error prone / inconsistent.
In order to fix the underlying issue (in addition to fix the initial bug), I removed the Font from FEditableTextBoxStyle, and moved the FTextBlockStyle from MultilineEditableTextBox to FEditableTextBoxStyle.
It solves the duplication issue and so make it clear where the Font should be set/read from.
However, as the text block style is now embedded in the editable text box style, it cannot be initialized the exact same way, and I had to do some changes to ensure there was no regression, by configuring various FEditableTextBoxStyle in some style files. I also change the default value for TextBlockStyle to better match our default theme.
-Default font is not set for text widgets.
EditableWidget: ensure to have a default font, and to set the style when calling SynchronizeProperties to ensure it reacts directly without having to force a refresh (by moving the widget for instance)
Bonus:
-Move to cpp some private methods that where 'forced' inline (and we were using function pointer on them). It will avoid some noise in public interface and speed up iteration / compile time when playing with them.
#jira UE-96464
#jira UE-137126
[RN] MultilineEditableTextBox was containing both a Font via FEditableTextBoxStyle, and another one via FTextBlockStyle, thus being error prone / inconsistent.The Font from FEditableTextBoxStyle has been removed, and the FTextBlockStyle moved from MultilineEditableTextBox to FEditableTextBoxStyle. It solves the duplication issue and so make it clear where the Font should be set/read from.
However, as the FTextBlockStyle is now embedded in the FEditableTextBoxStyle, it cannot be initialized the exact same way, and you can now configure the FTextBlockStyle of FEditableTextBoxStyle when creating one from scratch, by calling SetTextStyle on it.
Test
- created a Widget blueprint with different editable types combination: multiline or single line, box or no box.
-Validated that everything was reacting live as expected now.
-Created a blue print to set the text style and validated it was working.
-Create data with old version, then open it with updated version to validate that the visual was still the same and deprecation of style working as expected.
-checked different places in the editor using variation of editable text to ensure they were behaving as before (detail view, console command entry, comment on blueprint node).
#preflight 63344b9f110bb3721ef8aa77
[CL 22232366 by yohann dossantos in ue5-main branch]
- Refactored viewport's current level combobox and added "current data layers" in data layer outliner and "current folder" in world outliner to use this system.
- Can optionally be hidden from viewport using advanced flag in ULevelEditorViewportSettings.
#robomerge FNNC
#rb patrick.enfedaque
#preflight 6227604a7077eb04cf696c33
[CL 19302351 by Richard Malo in ue5-main branch]
- Added ability to toggle Private Content Edit mode at Folder level in Content Browser
- You cannot edit an asset's Private/Public state unless it's within a Private Content Editable folder
- Private Assets do not show up unless their within a Private Content Editable folder
#preflight 621fbc63e15c51d8c509559d
#rb Rex.Hill
#ROBOMERGE-OWNER: rex.hill
#ROBOMERGE-AUTHOR: scott.nelson
#ROBOMERGE-SOURCE: CL 19226371 via CL 19235626 via CL 19238850 via CL 19238931 via CL 19245779
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v924-19243027)
[CL 19247024 by rex hill in ue5-main branch]
- Allows for toggling an individual Asset's Public/Private state in the Content Browser by adding/removing the flag PKG_NotExternallyReferenceable
- Content Browser Tooltips now show Asset states (Public, Private, Read Only)
- Includes CVar ContentBrowser_EnablePublicAssetFeatureCVar to hide UI until we reach MVP
#preflight 61fc3281af01d3caef1ee7bb
#rb Francis.Hurteau
#ROBOMERGE-AUTHOR: scott.nelson
#ROBOMERGE-SOURCE: CL 18853374 via CL 18855692 via CL 18855705 via CL 18855722 via CL 18857313 via CL 18857594
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)
[CL 18857607 by scott nelson in ue5-main branch]
For each pixel it shows the worst case missing mip level in all of the virtual textures sampled at that pixel.
Useful to analyze where late virtual texture page streaming is happening.
#rb ben.ingram
#preflight 615b5ecb255462000117288c
#lockdown michal.valient
#ROBOMERGE-OWNER: jon.nabozny
#ROBOMERGE-AUTHOR: jeremy.moore
#ROBOMERGE-SOURCE: CL 17716764 via CL 17979410 via CL 18366649 via CL 18366731
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)
[CL 18366789 by jon nabozny in ue5-release-engine-test branch]
This is useful in gameplay especially for debugging per frame evaluations
#rb matt.hoffman
#preflight 6136ea65d9c85a00010008e1
#ROBOMERGE-AUTHOR: max.chen
#ROBOMERGE-SOURCE: CL 17448303 via CL 17902803 via CL 18360631 via CL 18360781
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)
[CL 18360848 by max chen in ue5-release-engine-test branch]
* Rename blacklist to excludelist (requested by high management)
* Support section exclusion rule to be able to exclude entire section of tests (ie PathTracing is only supported on Win64 for now)
* Mark excluded test as skipped in the report instead of entirely removed for test list. Check for exclusion just before running the test.
* Remove NotEnoughParticipant state in favor of Skipped (same conditions lead to Skipped state with appropriate messaging)
* Add support for exclusion management from the Test Automation window. (added a column at the end of each row)
* Expose device information to UE test report
* Add support for metadata in Gauntlet test report for Horde
Limitations:
* Management through the UI is limited to which test is available through in the active worker node. That's mean Runtime only tests are not listed from a worker that is Editor(the default) and platform specific are not clearly identified.
* For platforms, the mechanic to access their config and save it will remain to be done. In the meantime, it needs to be done manually through the target platform config file.
#jira UE-125960
#jira UE-125974
#ROBOMERGE-AUTHOR: jerome.delattre
#ROBOMERGE-SOURCE: CL 17607554 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)
[CL 17607557 by jerome delattre in ue5-release-engine-test branch]
- Tighten up Sequencer and Curve Editor toolbars
- Fix key navigation sizing/spacing
- Remove transparent style for pill text input which makes it hard to read and inconsistent with the new starship style.
#rb trivial
#rnx
#preflight 612d19b5423a8f00012fe911
#ROBOMERGE-SOURCE: CL 17357654 via CL 17357658
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)
[CL 17357666 by max chen in ue5-release-engine-test branch]