first
This commit is contained in:
95
.gitignore
vendored
Normal file
95
.gitignore
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
Binaries
|
||||
DerivedDataCache
|
||||
Intermediate
|
||||
Saved
|
||||
.vscode
|
||||
.vs
|
||||
*.VC.db
|
||||
*.opensdf
|
||||
*.opendb
|
||||
*.sdf
|
||||
*.sln
|
||||
*.suo
|
||||
*.xcodeproj
|
||||
*.xcworkspace
|
||||
|
||||
# ---> UnrealEngine
|
||||
# Visual Studio 2015 user specific files
|
||||
.vs/
|
||||
|
||||
# Compiled Object files
|
||||
*.slo
|
||||
*.lo
|
||||
*.o
|
||||
*.obj
|
||||
|
||||
# Precompiled Headers
|
||||
*.gch
|
||||
*.pch
|
||||
|
||||
# Compiled Dynamic libraries
|
||||
*.so
|
||||
*.dylib
|
||||
*.dll
|
||||
|
||||
# Fortran module files
|
||||
*.mod
|
||||
|
||||
# Compiled Static libraries
|
||||
*.lai
|
||||
*.la
|
||||
*.a
|
||||
*.lib
|
||||
|
||||
# Executables
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
*.ipa
|
||||
|
||||
# These project files can be generated by the engine
|
||||
*.xcodeproj
|
||||
*.xcworkspace
|
||||
*.sln
|
||||
*.suo
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.VC.db
|
||||
*.VC.opendb
|
||||
|
||||
# Precompiled Assets
|
||||
SourceArt/**/*.png
|
||||
SourceArt/**/*.tga
|
||||
|
||||
# Binary Files
|
||||
Binaries/*
|
||||
Plugins/**/Binaries/*
|
||||
|
||||
# Builds
|
||||
Build/*
|
||||
|
||||
# Whitelist PakBlacklist-<BuildConfiguration>.txt files
|
||||
!Build/*/
|
||||
Build/*/**
|
||||
!Build/*/PakBlacklist*.txt
|
||||
|
||||
# Don't ignore icon files in Build
|
||||
!Build/**/*.ico
|
||||
|
||||
# Built data for maps
|
||||
*_BuiltData.uasset
|
||||
|
||||
# Configuration files generated by the Editor
|
||||
Saved/*
|
||||
|
||||
# Compiled source files for the engine to use
|
||||
Intermediate/*
|
||||
Plugins/**/Intermediate/*
|
||||
|
||||
# Cache files for the editor to use
|
||||
DerivedDataCache/*
|
||||
|
||||
Content
|
||||
Plugins
|
||||
Config
|
||||
tool
|
||||
9
.ignore
Normal file
9
.ignore
Normal file
@@ -0,0 +1,9 @@
|
||||
/.vscode
|
||||
/build
|
||||
/Content
|
||||
/DerivedDataCache
|
||||
/Intermediate
|
||||
/Saved
|
||||
/Plugins/UEPanoTool/Content
|
||||
/Plugins/UEPanoTool/Intermediate
|
||||
/Plugins/UEPanoTool/Tool
|
||||
129
KL_EstivaPark.uproject
Normal file
129
KL_EstivaPark.uproject
Normal file
@@ -0,0 +1,129 @@
|
||||
{
|
||||
"FileVersion": 3,
|
||||
"EngineAssociation": "5.6",
|
||||
"Category": "",
|
||||
"Description": "",
|
||||
"Plugins": [
|
||||
{
|
||||
"Name": "DatasmithImporter",
|
||||
"Enabled": true
|
||||
},
|
||||
{
|
||||
"Name": "InterchangeEditor",
|
||||
"Enabled": true,
|
||||
"SupportedTargetPlatforms": [
|
||||
"Win64",
|
||||
"Linux",
|
||||
"Mac"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "DatasmithCADImporter",
|
||||
"Enabled": true,
|
||||
"SupportedTargetPlatforms": [
|
||||
"Win64",
|
||||
"Linux"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "DatasmithC4DImporter",
|
||||
"Enabled": true,
|
||||
"SupportedTargetPlatforms": [
|
||||
"Win64",
|
||||
"Mac"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "AxFImporter",
|
||||
"Enabled": true,
|
||||
"SupportedTargetPlatforms": [
|
||||
"Win64"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "DataPrepEditor",
|
||||
"Enabled": true
|
||||
},
|
||||
{
|
||||
"Name": "VariantManager",
|
||||
"Enabled": true
|
||||
},
|
||||
{
|
||||
"Name": "SunPosition",
|
||||
"Enabled": true
|
||||
},
|
||||
{
|
||||
"Name": "HDRIBackdrop",
|
||||
"Enabled": true
|
||||
},
|
||||
{
|
||||
"Name": "PythonScriptPlugin",
|
||||
"Enabled": true
|
||||
},
|
||||
{
|
||||
"Name": "SequencerScripting",
|
||||
"Enabled": false
|
||||
},
|
||||
{
|
||||
"Name": "ModelingToolsEditorMode",
|
||||
"Enabled": true
|
||||
},
|
||||
{
|
||||
"Name": "MovieRenderPipeline",
|
||||
"Enabled": true
|
||||
},
|
||||
{
|
||||
"Name": "MoviePipelineMaskRenderPass",
|
||||
"Enabled": true
|
||||
},
|
||||
{
|
||||
"Name": "GeometryScripting",
|
||||
"Enabled": true
|
||||
},
|
||||
{
|
||||
"Name": "DowntownMiamiKit",
|
||||
"Enabled": false
|
||||
},
|
||||
{
|
||||
"Name": "IslandHomesKit",
|
||||
"Enabled": false
|
||||
},
|
||||
{
|
||||
"Name": "StorefrontsKit",
|
||||
"Enabled": false
|
||||
},
|
||||
{
|
||||
"Name": "Sample_CityKit",
|
||||
"Enabled": false
|
||||
},
|
||||
{
|
||||
"Name": "ConstructionKit",
|
||||
"Enabled": false
|
||||
},
|
||||
{
|
||||
"Name": "ModernEssentials",
|
||||
"Enabled": false
|
||||
},
|
||||
{
|
||||
"Name": "RailwaysKit",
|
||||
"Enabled": false
|
||||
},
|
||||
{
|
||||
"Name": "LittleHavanaKit",
|
||||
"Enabled": false
|
||||
},
|
||||
{
|
||||
"Name": "CityBLD",
|
||||
"Enabled": false
|
||||
},
|
||||
{
|
||||
"Name": "NNEDenoiser",
|
||||
"Enabled": false,
|
||||
"SupportedTargetPlatforms": [
|
||||
"Win64",
|
||||
"Linux",
|
||||
"Mac"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
41
a.ps1
Normal file
41
a.ps1
Normal file
@@ -0,0 +1,41 @@
|
||||
# --- Configuration ---
|
||||
$ProcessName = "E:\project\unity\CryEngineToolForDev\x64\Release\CryEngineTool.exe" # Replace with your executable
|
||||
$Arguments = "test.txt" # Replace with your arguments
|
||||
$WarningTimeoutSec = 20 # 10 minutes
|
||||
$KillTimeoutSec = 30 # 15 minutes
|
||||
|
||||
# Start the process
|
||||
$proc = Start-Process -FilePath $ProcessName -ArgumentList $Arguments -PassThru
|
||||
|
||||
Write-Host "Process started with ID: $($proc.Id). Monitoring..." -ForegroundColor Cyan
|
||||
|
||||
# Monitor loop
|
||||
$StartTime = Get-Date
|
||||
$WarningSent = $false
|
||||
|
||||
while (-not $proc.HasExited) {
|
||||
$Elapsed = (Get-Date) - $StartTime
|
||||
|
||||
# 10 Minute Warning
|
||||
if ($Elapsed.TotalSeconds -ge $WarningTimeoutSec -and -not $WarningSent) {
|
||||
Write-Warning "Process has been running for over 10 minutes!"
|
||||
$WarningSent = $true
|
||||
}
|
||||
|
||||
# 15 Minute Kill
|
||||
if ($Elapsed.TotalSeconds -ge $KillTimeoutSec) {
|
||||
Write-Host "Process exceeded 15 minutes. Terminating..." -ForegroundColor Red
|
||||
Stop-Process -Id $proc.Id -Force
|
||||
break
|
||||
}
|
||||
|
||||
# Sleep briefly to save CPU cycles
|
||||
Start-Sleep -Seconds 5
|
||||
}
|
||||
|
||||
# Final Status
|
||||
if ($proc.HasExited) {
|
||||
Write-Host "Process exited with code: $($proc.ExitCode)" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "Process was killed by script." -ForegroundColor Yellow
|
||||
}
|
||||
13
config.json
Normal file
13
config.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"apiurl": "http://192.168.10.33/360/EstivaCharm/",
|
||||
"confighigh": "/Render360/ConfigPreset/360_PT",
|
||||
"configlow": "/Render360/ConfigPreset/360_PT_low",
|
||||
"editor": "\\Engine\\Binaries\\Win64\\UnrealEditor-Cmd.exe",
|
||||
"enginedir": "C:\\epic\\UE_5.6",
|
||||
"lastupdate": 1762502523,
|
||||
"map": "/Game/RA_Project/KL_EstivaPark/Maps/KLEP_WP/L_KLEP_WP",
|
||||
"name": "TrungPC",
|
||||
"projectdir": "C:\\project\\EstivaParks",
|
||||
"projectfile": "KL_EstivaPark.uproject",
|
||||
"projectserverdir": "W:\\2025_KeppelLand_EstivaPark\\Apps\\PC\\KL_EstivaPark"
|
||||
}
|
||||
5
download.ps1
Normal file
5
download.ps1
Normal file
@@ -0,0 +1,5 @@
|
||||
$src ="W:\2025_KeppelLand_EstivaPark\Apps\PC\KL_EstivaPark"
|
||||
|
||||
robocopy "$src\Config" "Config" /MIR
|
||||
robocopy "$src\Content" "Content" /MIR
|
||||
robocopy "$src\Plugins\RA3D" "Plugins\RA3D" /MIR
|
||||
91
ra-tool.ps1
Normal file
91
ra-tool.ps1
Normal file
@@ -0,0 +1,91 @@
|
||||
param(
|
||||
# Parameter help description
|
||||
[switch]
|
||||
$buildproject,
|
||||
[switch]
|
||||
$cookproject,
|
||||
[switch]
|
||||
$updateproject,
|
||||
[switch]
|
||||
$updatecode,
|
||||
[switch]
|
||||
$genproject,
|
||||
[switch]
|
||||
$cleancode
|
||||
)
|
||||
|
||||
$enginedir = "C:\epic\UE_5.6"
|
||||
$builddir = ".\build"
|
||||
if(!(Test-Path -Path $builddir)){
|
||||
New-Item $builddir -ItemType "directory" -Force
|
||||
}
|
||||
$builddir = Resolve-Path $builddir
|
||||
# $defaultmap = "0_TTG_Legacy.umap"
|
||||
$projectfile = Get-ChildItem . -Filter "*.uproject"
|
||||
$projectfilepath = Resolve-Path $projectfile
|
||||
$projectname = (Get-Item $projectfilepath ).Basename
|
||||
|
||||
$f7z = "$env:ProgramFiles\7-Zip\7z.exe"
|
||||
if(-not (Test-Path $f7z)){
|
||||
throw "7z not found $f7z"
|
||||
return
|
||||
}
|
||||
Set-Alias 7zip $f7z
|
||||
|
||||
|
||||
function GenProj (){
|
||||
Invoke-Expression "$enginedir\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.exe -projectfiles -project=$projectfilepath -game -rocket -progress -engine -VSCode"
|
||||
}
|
||||
function BuildProj() {
|
||||
|
||||
Invoke-Expression "$enginedir\Engine\Binaries\Win64\UnrealEditor-Cmd.exe $projectfilepath -run=cook -targetplatform=Windows -iterate -CookAll"
|
||||
Invoke-Expression "$enginedir\Engine\Binaries\DotNET\AutomationTool\AutomationTool.exe -ScriptsForProject=$projectfilepath BuildCookRun -project=$projectfilepath -noP4 -clientconfig=Shipping -serverconfig=Shipping -nocompile -nocompileeditor -installed -ue4exe=$enginedir\Engine\Binaries\Win64\UnrealEditor-Cmd.exe -utf8output -platform=Win64 -build -skipcook -compressed -stage -deploy -stagingdirectory=$builddir"
|
||||
}
|
||||
function CookProj() {
|
||||
Invoke-Expression "$enginedir\Engine\Binaries\Win64\UnrealEditor-Cmd.exe $projectfilepath -run=cook -targetplatform=Windows -iterate -CookAll"
|
||||
}
|
||||
function UpdateProj() {
|
||||
|
||||
Invoke-Expression "$enginedir\Engine\Binaries\Win64\UnrealEditor-Cmd.exe $projectfilepath -run=cook -targetplatform=Windows -iterate -CookAll"
|
||||
Robocopy.exe .\Saved\Cooked $builddir /XO /S
|
||||
}
|
||||
function ConvertMapToWorldPartition {
|
||||
param (
|
||||
[string]
|
||||
$map
|
||||
)
|
||||
Invoke-Expression "$enginedir\Engine\Binaries\Win64\UnrealEditor.exe $projectfilepath -run=WorldPartitionConvertCommandlet $map -AllowCommandletRendering"
|
||||
}
|
||||
function UpdateCodeOnlyProj() {
|
||||
Robocopy.exe .\Binaries\Win64 "$builddir\Binaries\Win64" /XO /S "$projectname*.exe"
|
||||
}
|
||||
function CleanCode() {
|
||||
$ls = Get-ChildItem .\Plugins
|
||||
foreach ($item in $ls) {
|
||||
Remove-Item ".\Plugins\$item\Intermediate" -Recurse
|
||||
Remove-Item ".\Plugins\$item\Binaries\Win64" -Recurse
|
||||
}
|
||||
}
|
||||
|
||||
function ZipBuild(){
|
||||
7zip a -r ".\zip\$projectname.7z" "$builddir\*" -mx=9 -v2000m
|
||||
}
|
||||
if($buildproject){
|
||||
BuildProj
|
||||
}
|
||||
if($updateproject){
|
||||
UpdateProj
|
||||
}
|
||||
if($updatecode){
|
||||
UpdateCodeOnlyProj
|
||||
}
|
||||
if($cleancode){
|
||||
CleanCode
|
||||
}
|
||||
if($cookproject){
|
||||
CookProj
|
||||
}
|
||||
|
||||
if($genproject){
|
||||
GenProj
|
||||
}
|
||||
1
render.cmd
Normal file
1
render.cmd
Normal file
@@ -0,0 +1 @@
|
||||
powershell -ExecutionPolicy Bypass -File .\render.ps1
|
||||
144
render.ps1
Normal file
144
render.ps1
Normal file
@@ -0,0 +1,144 @@
|
||||
# default map if not found map in json
|
||||
$defaultmap = "/Game/RA_Project/KL_EstivaPark/Maps/KLEP_WP/L_KLEP_WP"
|
||||
|
||||
|
||||
$editor = "C:\epic\UE_5.6\Engine\Binaries\Win64\UnrealEditor-Cmd.exe"
|
||||
$project = "C:\project\EstivaParks\KL_EstivaPark.uproject"
|
||||
#$config = "/Render360/ConfigPreset/360_PT_low"
|
||||
$config = "/Render360/ConfigPreset/360_PT"
|
||||
|
||||
# 10 minutes * 60
|
||||
$WarningTime = 10*60
|
||||
# 15 minutes * 60
|
||||
$ErrorTime = 20*60
|
||||
|
||||
|
||||
|
||||
$projectname = "Estiva"
|
||||
$Uri = "http://192.168.10.33/virtual-360/api/v1"
|
||||
$Headers = @{
|
||||
'Content-Type' = 'application/json';
|
||||
"Authorization" = "Bearer $BearerToken"
|
||||
}
|
||||
function Login {
|
||||
$Body = @{
|
||||
username = "render"
|
||||
password = "Nami2009"
|
||||
grant_type = "password" # Common for direct credential flow
|
||||
} | ConvertTo-Json
|
||||
|
||||
$AuthResponse = Invoke-RestMethod -Uri "$Uri/login" -Method Post -Body $Body -ContentType 'application/json'
|
||||
$Headers.Authorization = "Bearer $($AuthResponse.data.token)"
|
||||
}
|
||||
|
||||
function Noti {
|
||||
param (
|
||||
$title,
|
||||
$txt
|
||||
)
|
||||
$Body = @{
|
||||
title = $title
|
||||
body = $txt
|
||||
} | ConvertTo-Json
|
||||
$Response = Invoke-RestMethod -Uri "$Uri/noti" -Method Post -Body $Body -Headers $Headers -ContentType 'application/json'
|
||||
Write-Host $Response.data
|
||||
}
|
||||
|
||||
|
||||
function Start-Render {
|
||||
param (
|
||||
$ProcessName,
|
||||
$ArgumentsArguments,
|
||||
$WarningTimeoutSec,
|
||||
$KillTimeoutSec,
|
||||
$ProcessLabel
|
||||
)
|
||||
|
||||
# Start the process
|
||||
$proc = Start-Process -FilePath $ProcessName -ArgumentList $Arguments -PassThru
|
||||
|
||||
Write-Host "Process started with ID: $($proc.Id). Monitoring..." -ForegroundColor Cyan
|
||||
|
||||
# Monitor loop
|
||||
$StartTime = Get-Date
|
||||
$WarningSent = $false
|
||||
|
||||
while (-not $proc.HasExited) {
|
||||
$Elapsed = (Get-Date) - $StartTime
|
||||
|
||||
# 10 Minute Warning
|
||||
if ($Elapsed.TotalSeconds -ge $WarningTimeoutSec -and -not $WarningSent) {
|
||||
Write-Warning "$ProcessLabel run over warning time"
|
||||
Noti $projectname "$ProcessLabel run over warning time"
|
||||
$WarningSent = $true
|
||||
}
|
||||
|
||||
# 15 Minute Kill
|
||||
if ($Elapsed.TotalSeconds -ge $KillTimeoutSec) {
|
||||
Write-Host "$ProcessLabel exceeded Error time. Terminating..." -ForegroundColor Red
|
||||
Noti $projectname "$ProcessLabel exceeded Error time. Terminating..."
|
||||
Stop-Process -Id $proc.Id -Force
|
||||
break
|
||||
}
|
||||
|
||||
# Sleep briefly to save CPU cycles
|
||||
Start-Sleep -Seconds 5
|
||||
}
|
||||
|
||||
# Final Status
|
||||
if ($proc.HasExited) {
|
||||
Write-Host "Process exited with code: $($proc.ExitCode)" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "Process was killed by script." -ForegroundColor Yellow
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function Render(){
|
||||
Login
|
||||
Get-ChildItem ".\Saved\MovieRenders" -Filter *.json |
|
||||
Foreach-Object {
|
||||
$cam = $_.BaseName
|
||||
$jsonData = Get-Content -Path ".\Saved\MovieRenders\$_" -Raw | ConvertFrom-Json
|
||||
$map = $jsonData.map
|
||||
if (!$map){
|
||||
$map = $defaultmap
|
||||
}
|
||||
|
||||
for ($j = 0; $j -lt 36; $j++) {
|
||||
$img = ".\Saved\MovieRenders\$cam\$j.png"
|
||||
if (Test-Path $img){
|
||||
continue
|
||||
}
|
||||
$arguments = @($project,$map,"-game","-MoviePipelineConfig='$config'","-LevelSequence='/Render360/Sequence/$cam/$j'","-windowed","-resx=1280","-resy=720")
|
||||
Start-Render $editor $arguments $WarningTime $ErrorTime "$cam ($j/36)"
|
||||
# Invoke-Expression "$editor $project $map -game -MoviePipelineConfig='$config' -LevelSequence='/Render360/Sequence/$cam/$j' -windowed -resx=1280 -resy=720"
|
||||
$tmp = ".\Saved\MovieRenders\$cam\tmp.png"
|
||||
if (Test-Path $tmp){
|
||||
Rename-Item ".\Saved\MovieRenders\$cam\tmp.png" "$j.png"
|
||||
Noti $projectname "save $cam ($j/36)"
|
||||
}else{
|
||||
Noti $projectname "crash $cam ($j/36)"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
# Set-Location ".\Saved"
|
||||
# net use M: "\\192.168.10.200\xampp5.6\htdocs\test\360"
|
||||
# $pold = Test-Path ".\pano\$cam\pano.mi"
|
||||
# .\ptool
|
||||
# $pnew = Test-Path ".\pano\$cam\pano.mi"
|
||||
|
||||
# if ($pnew -and !$pold){
|
||||
# robocopy "pano\$cam" "M:\pano\$cam" /s
|
||||
# #robocopy "pano\$cam" "M:\pano\$($cam)_final" /s
|
||||
# Noti $projectname "render final $cam finish"
|
||||
# }
|
||||
|
||||
# net use M: /delete
|
||||
# Set-Location ".."
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Render
|
||||
3
upload.ps1
Normal file
3
upload.ps1
Normal file
@@ -0,0 +1,3 @@
|
||||
$src ="W:\2025_KeppelLand_EstivaPark\Apps\PC\KL_EstivaPark"
|
||||
|
||||
robocopy "Plugins\Render360" "$src\Plugins\Render360" /MIR
|
||||
Reference in New Issue
Block a user