diff --git a/Engine/source/materials/materialDefinition.cpp b/Engine/source/materials/materialDefinition.cpp index 2b28a0f8e..22a4bd7cf 100644 --- a/Engine/source/materials/materialDefinition.cpp +++ b/Engine/source/materials/materialDefinition.cpp @@ -129,10 +129,10 @@ Material::Material() mMetalness[i] = 0.0f; mIsSRGb[i] = false; - mInvertRoughness[i] = false; - mRoughnessChan[i] = 0; - mAOChan[i] = 1; + mAOChan[i] = 0; + mInvertRoughness[i] = false; + mRoughnessChan[i] = 1; mMetalChan[i] = 2; mAccuEnabled[i] = false; diff --git a/Engine/source/materials/materialDefinition.h b/Engine/source/materials/materialDefinition.h index d087a698a..369ea4b3d 100644 --- a/Engine/source/materials/materialDefinition.h +++ b/Engine/source/materials/materialDefinition.h @@ -230,15 +230,15 @@ public: DECLARE_IMAGEASSET_ARRAY_SETGET(Material, ORMConfigMap); bool mIsSRGb[MAX_STAGES]; - DECLARE_IMAGEASSET_ARRAY(Material, RoughMap, MAX_STAGES); - DECLARE_IMAGEASSET_ARRAY_SETGET(Material, RoughMap); - - bool mInvertRoughness[MAX_STAGES]; - F32 mRoughnessChan[MAX_STAGES]; DECLARE_IMAGEASSET_ARRAY(Material, AOMap, MAX_STAGES); DECLARE_IMAGEASSET_ARRAY_SETGET(Material, AOMap); - F32 mAOChan[MAX_STAGES]; + + DECLARE_IMAGEASSET_ARRAY(Material, RoughMap, MAX_STAGES); + DECLARE_IMAGEASSET_ARRAY_SETGET(Material, RoughMap); + bool mInvertRoughness[MAX_STAGES]; + F32 mRoughnessChan[MAX_STAGES]; + DECLARE_IMAGEASSET_ARRAY(Material, MetalMap, MAX_STAGES); DECLARE_IMAGEASSET_ARRAY_SETGET(Material, MetalMap); diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui b/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui index 43351bc82..c70006c81 100644 --- a/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui +++ b/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui @@ -967,6 +967,242 @@ $guiContent = new GuiControl(MaterialEditorGui,EditorGuiGroup) { isContainer = "0"; canSave = "1"; canSaveDynamicFields = "0"; + }; new GuiContainer() { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "6 364"; + extent = "185 52"; + minExtent = "8 2"; + horizSizing = "width"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + className = "materialEditorAOMapContainer"; + + new GuiBitmapCtrl() { + bitmapAsset = "ToolsModule:unknownImage_image"; + wrap = "0"; + position = "1 1"; + extent = "48 48"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiButtonProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "aoMapDisplayBitmap"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "ao"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "56 5"; + extent = "35 8"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiBitmapButtonCtrl() { + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; + bitmapMode = "Stretched"; + autoFitExtents = "0"; + useModifiers = "0"; + useStates = "1"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "1 1"; + extent = "48 48"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiButtonProfile"; + visible = "1"; + active = "1"; + Command = "MaterialEditorGui.updateTextureMap(\"ao\",1);"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "Change the AO map for this layer."; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "None"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "56 17"; + extent = "143 17"; + minExtent = "8 2"; + horizSizing = "width"; + vertSizing = "bottom"; + profile = "ToolsGuiTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "aoMapNameText"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl() { + text = "Edit"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "134 34"; + extent = "40 16"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "ToolsGuiButtonProfile"; + visible = "1"; + active = "1"; + Command = "MaterialEditorGui.updateTextureMap(\"ao\",1);"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiBitmapButtonCtrl() { + bitmapAsset = "ToolsModule:delete_n_image"; + bitmapMode = "Stretched"; + autoFitExtents = "0"; + useModifiers = "0"; + useStates = "1"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "177 34"; + extent = "16 16"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "ToolsGuiButtonProfile"; + visible = "1"; + active = "1"; + Command = "MaterialEditorGui.updateTextureMap(\"ao\",0);"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiRadioCtrl(aoChanBtn0) { + text = "R"; + groupNum = "2"; + buttonType = "RadioButton"; + useMouseEvents = "0"; + position = "100 5"; + extent = "20 10"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiRadioProfile"; + visible = "1"; + active = "1"; + command = "MaterialEditorGui.setAOChan(0);"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiRadioCtrl(aoChanBtn1) { + text = "G"; + groupNum = "2"; + buttonType = "RadioButton"; + useMouseEvents = "0"; + position = "121 5"; + extent = "20 10"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiRadioProfile"; + visible = "1"; + active = "1"; + command = "MaterialEditorGui.setAOChan(1);"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiRadioCtrl(aoChanBtn2) { + text = "B"; + groupNum = "2"; + buttonType = "RadioButton"; + useMouseEvents = "0"; + position = "142 5"; + extent = "20 10"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiRadioProfile"; + visible = "1"; + active = "1"; + command = "MaterialEditorGui.setAOChan(2);"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiRadioCtrl(aoChanBtn3) { + text = "A"; + groupNum = "2"; + buttonType = "RadioButton"; + useMouseEvents = "0"; + position = "163 5"; + extent = "20 10"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiRadioProfile"; + visible = "1"; + active = "1"; + command = "MaterialEditorGui.setAOChan(3);"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; }; new GuiContainer() { margin = "0 0 0 0"; @@ -1205,243 +1441,6 @@ $guiContent = new GuiControl(MaterialEditorGui,EditorGuiGroup) { canSaveDynamicFields = "0"; }; }; - new GuiContainer() { - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "6 364"; - extent = "185 52"; - minExtent = "8 2"; - horizSizing = "width"; - vertSizing = "bottom"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - className = "materialEditorAOMapContainer"; - - new GuiBitmapCtrl() { - bitmapAsset = "ToolsModule:unknownImage_image"; - wrap = "0"; - position = "1 1"; - extent = "48 48"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - internalName = "aoMapDisplayBitmap"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl() { - text = "ao"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "56 5"; - extent = "35 8"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiBitmapButtonCtrl() { - bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; - bitmapMode = "Stretched"; - autoFitExtents = "0"; - useModifiers = "0"; - useStates = "1"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "1 1"; - extent = "48 48"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"ao\",1);"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "Change the AO map for this layer."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl() { - text = "None"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "56 17"; - extent = "143 17"; - minExtent = "8 2"; - horizSizing = "width"; - vertSizing = "bottom"; - profile = "ToolsGuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - internalName = "aoMapNameText"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiButtonCtrl() { - text = "Edit"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "134 34"; - extent = "40 16"; - minExtent = "8 2"; - horizSizing = "left"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"ao\",1);"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiBitmapButtonCtrl() { - bitmapAsset = "ToolsModule:delete_n_image"; - bitmapMode = "Stretched"; - autoFitExtents = "0"; - useModifiers = "0"; - useStates = "1"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "177 34"; - extent = "16 16"; - minExtent = "8 2"; - horizSizing = "left"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"ao\",0);"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiRadioCtrl(aoChanBtn0) { - text = "R"; - groupNum = "2"; - buttonType = "RadioButton"; - useMouseEvents = "0"; - position = "100 5"; - extent = "20 10"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiRadioProfile"; - visible = "1"; - active = "1"; - command = "MaterialEditorGui.setAOChan(0);"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiRadioCtrl(aoChanBtn1) { - text = "G"; - groupNum = "2"; - buttonType = "RadioButton"; - useMouseEvents = "0"; - position = "121 5"; - extent = "20 10"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiRadioProfile"; - visible = "1"; - active = "1"; - command = "MaterialEditorGui.setAOChan(1);"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiRadioCtrl(aoChanBtn2) { - text = "B"; - groupNum = "2"; - buttonType = "RadioButton"; - useMouseEvents = "0"; - position = "142 5"; - extent = "20 10"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiRadioProfile"; - visible = "1"; - active = "1"; - command = "MaterialEditorGui.setAOChan(2);"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiRadioCtrl(aoChanBtn3) { - text = "A"; - groupNum = "2"; - buttonType = "RadioButton"; - useMouseEvents = "0"; - position = "163 5"; - extent = "20 10"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiRadioProfile"; - visible = "1"; - active = "1"; - command = "MaterialEditorGui.setAOChan(3);"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; new GuiContainer() { margin = "0 0 0 0"; padding = "0 0 0 0";