Stabilize investor visual smoke build

This commit is contained in:
2026-05-19 22:28:35 -07:00
parent d2b8185333
commit 4e17cede2d
19 changed files with 149 additions and 135 deletions
+8
View File
@@ -0,0 +1,8 @@
@echo off
setlocal
set "PACKAGE_DIR=%~dp0..\Builds\WindowsDevelopment"
set "GAME_EXE=%PACKAGE_DIR%\AgrarianGame\Binaries\Win64\AgrarianGame.exe"
cd /d "%PACKAGE_DIR%"
"%GAME_EXE%" -windowed -ResX=1280 -ResY=720 -ExecCmds=AgrarianInvestorSmokeTest -nosound
+35 -12
View File
@@ -30,9 +30,9 @@ PLACEHOLDER_MESHES = {
for name in PLACEHOLDER_MESH_SOURCES
}
FOLIAGE_MESHES = {
"tree": PLACEHOLDER_MESHES["SM_AGR_Placeholder_Cylinder"],
"shrub": PLACEHOLDER_MESHES["SM_AGR_Placeholder_Cube"],
"grass": PLACEHOLDER_MESHES["SM_AGR_Placeholder_Cylinder"],
"tree": "/Engine/BasicShapes/Cone",
"shrub": "/Engine/BasicShapes/Sphere",
"grass": "/Engine/BasicShapes/Plane",
}
VARIATION_MESHES = {
"cube": PLACEHOLDER_MESHES["SM_AGR_Placeholder_Cube"],
@@ -40,29 +40,31 @@ VARIATION_MESHES = {
"cylinder": PLACEHOLDER_MESHES["SM_AGR_Placeholder_Cylinder"],
"quarter_cylinder": PLACEHOLDER_MESHES["SM_AGR_Placeholder_QuarterCylinder"],
"plane": PLACEHOLDER_MESHES["SM_AGR_Placeholder_Plane"],
"sphere": "/Engine/BasicShapes/Sphere",
"cone": "/Engine/BasicShapes/Cone",
}
MATERIAL_FOLDER = "/Game/Agrarian/Materials"
ENVIRONMENT_MATERIALS = {
"terrain": {
"path": f"{MATERIAL_FOLDER}/M_AGR_GZ_Terrain_CoastalScrub",
"color": unreal.LinearColor(0.28, 0.24, 0.16, 1.0),
"color": unreal.LinearColor(0.16, 0.23, 0.12, 1.0),
"roughness": 0.92,
},
"tree": {
"path": f"{MATERIAL_FOLDER}/M_AGR_GZ_Tree_CoastalOak",
"color": unreal.LinearColor(0.18, 0.31, 0.16, 1.0),
"color": unreal.LinearColor(0.07, 0.18, 0.06, 1.0),
"roughness": 0.88,
"used_with_instanced_static_meshes": True,
},
"shrub": {
"path": f"{MATERIAL_FOLDER}/M_AGR_GZ_Shrub_CoyoteBrush",
"color": unreal.LinearColor(0.31, 0.39, 0.20, 1.0),
"color": unreal.LinearColor(0.15, 0.28, 0.10, 1.0),
"roughness": 0.9,
"used_with_instanced_static_meshes": True,
},
"grass": {
"path": f"{MATERIAL_FOLDER}/M_AGR_GZ_Grass_DryCoastal",
"color": unreal.LinearColor(0.47, 0.42, 0.23, 1.0),
"color": unreal.LinearColor(0.32, 0.34, 0.13, 1.0),
"roughness": 0.95,
"used_with_instanced_static_meshes": True,
},
@@ -88,7 +90,7 @@ ENVIRONMENT_MATERIALS = {
},
"fresh_water": {
"path": f"{MATERIAL_FOLDER}/M_AGR_GZ_FreshWater",
"color": unreal.LinearColor(0.08, 0.28, 0.38, 1.0),
"color": unreal.LinearColor(0.02, 0.16, 0.30, 1.0),
"roughness": 0.35,
},
}
@@ -349,7 +351,7 @@ WEATHER_EXPOSURE_ZONES = [
ENVIRONMENT_VARIATION_ACTORS = [
{
"label": "AGR_GZ_EnvVar_Tree_Canopy_01",
"mesh_key": "chamfer_cube",
"mesh_key": "sphere",
"material_key": "tree",
"location_xy": unreal.Vector(-27500.0, 6900.0, 0.0),
"z_offset": 390.0,
@@ -367,7 +369,7 @@ ENVIRONMENT_VARIATION_ACTORS = [
},
{
"label": "AGR_GZ_EnvVar_Tree_Canopy_02",
"mesh_key": "chamfer_cube",
"mesh_key": "sphere",
"material_key": "tree",
"location_xy": unreal.Vector(17600.0, 31800.0, 0.0),
"z_offset": 430.0,
@@ -385,7 +387,7 @@ ENVIRONMENT_VARIATION_ACTORS = [
},
{
"label": "AGR_GZ_EnvVar_Bush_Rounded_01",
"mesh_key": "chamfer_cube",
"mesh_key": "sphere",
"material_key": "shrub",
"location_xy": unreal.Vector(-33400.0, -15200.0, 0.0),
"z_offset": 70.0,
@@ -394,7 +396,7 @@ ENVIRONMENT_VARIATION_ACTORS = [
},
{
"label": "AGR_GZ_EnvVar_Bush_Rounded_02",
"mesh_key": "chamfer_cube",
"mesh_key": "sphere",
"material_key": "shrub",
"location_xy": unreal.Vector(30400.0, -3900.0, 0.0),
"z_offset": 75.0,
@@ -810,6 +812,27 @@ def ensure_environment_materials():
unreal.MaterialEditingLibrary.recompile_material(material)
unreal.EditorAssetLibrary.save_asset(spec["path"])
unreal.log(f"Created Ground Zero environment material: {spec['path']}")
else:
base_color = unreal.MaterialEditingLibrary.get_material_property_input_node(
material, unreal.MaterialProperty.MP_BASE_COLOR
)
if base_color and hasattr(base_color, "set_editor_property"):
try:
base_color.set_editor_property("constant", spec["color"])
except Exception:
pass
roughness = unreal.MaterialEditingLibrary.get_material_property_input_node(
material, unreal.MaterialProperty.MP_ROUGHNESS
)
if roughness and hasattr(roughness, "set_editor_property"):
try:
roughness.set_editor_property("r", spec["roughness"])
except Exception:
pass
unreal.MaterialEditingLibrary.recompile_material(material)
unreal.EditorAssetLibrary.save_asset(spec["path"], only_if_is_dirty=False)
if spec.get("used_with_instanced_static_meshes"):
material.set_editor_property("used_with_instanced_static_meshes", True)
unreal.MaterialEditingLibrary.recompile_material(material)
+3 -3
View File
@@ -4,9 +4,9 @@ import unreal
MAP_PATH = "/Game/Agrarian/Maps/L_GroundZeroTerrain_Test"
FOLIAGE_LABEL = "AGR_GroundZeroFoliage_FirstPass"
EXPECTED_COUNTS = {
"trees": 42,
"shrubs": 96,
"grass": 180,
"trees": 96,
"shrubs": 220,
"grass": 420,
}