forked from aws-deadline/deadline-cloud-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path3dsmax-2025-vray-and-tyflow.ps1
More file actions
80 lines (61 loc) · 4.57 KB
/
Copy path3dsmax-2025-vray-and-tyflow.ps1
File metadata and controls
80 lines (61 loc) · 4.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<#
This is an example host configuration script that downloads and installs 3dsMax 2025,
V-Ray for 3dsMax 2025 and tyFlow for 3dsMax 2025
You can configure a Windows Service-Managed Fleet to use this host configuration to
render your 3dsMax 2025 + V-Ray + tyFlow jobs.
This script was tested with the 3dsMax 2025.2, V-Ray 7 update 1, tyFlow for 3dsMax 2025 installers.
Requirements:
- S3 bucket to host 3ds Max 2025, V-Ray and tyFlow installers
- Your fleet role must have permissions to s3:GetObject both the installer files from your S3 bucket.
#>
# TODO: Replace the below value with your S3 URI from your bucket
# Guide on how to create the 3ds Max installer zip file: https://github.com/aws-deadline/deadline-cloud-samples/blob/mainline/host_configuration_scripts/3dsmax/README.md
$3DS_MAX_INSTALLER_ZIP_S3_URI="s3://your-bucket-name/path/to/3ds-max-2025.zip"
# TODO: Replace the below value with your S3 URI from your bucket
$VRAY_FOR_3DSMAX2025_INSTALLER_EXE_S3_URI="s3://your-bucket-name/path/to/vray_adv_71000_max2025_x64.exe"
# TODO: Replace the below value with your S3 URI from your bucket
$TYFLOW_PLUGIN_S3_URI="s3://your-bucket-name/path/to/tyFlow_2025_render.dlo"
# Optional: Replace this with your preferred V-Ray for 3dsMax 2025 installation root
$VRAY_FOR_3DSMAX2025_INSTALL_ROOT="C:\Program Files\Chaos\V-Ray\3ds Max 2025"
Write-Host ' --- Installing 3dsMax 2025 --- '
mkdir C:\3dsmax_setup -Force
aws s3 cp --no-progress "$3DS_MAX_INSTALLER_ZIP_S3_URI" C:\3dsmax_setup\3dsmax.zip
Expand-Archive C:\3dsmax_setup\3dsmax.zip C:\3dsmax_setup\
Start-Process "C:\3dsmax_setup\Setup.exe" -ArgumentList '-q' -Wait
Write-Host ' --- Installing V-Ray for 3dsMax 2025 --- '
$VRAY_INSTALLER = Split-Path "$VRAY_FOR_3DSMAX2025_INSTALLER_EXE_S3_URI" -Leaf
aws s3 cp --no-progress "$VRAY_FOR_3DSMAX2025_INSTALLER_EXE_S3_URI" "C:\3dsmax_setup\$VRAY_INSTALLER"
@"
<DefValues>
<Value Name="INSTALL_TYPE" DataType="value">1</Value>
<Value Name="ANONYMOUS_TELEMETRY" DataType="value">0</Value>
<Value Name="PERSONALIZED_TELEMETRY" DataType="value">0</Value>
<Value Name="PKGROOT_SELECT" DataType="value">0</Value>
<Value Name="INSTALLROOT" DataType="value">$VRAY_FOR_3DSMAX2025_INSTALL_ROOT</Value>
<Value Name="REMOTE_LICENSE" DataType="value">1</Value>
<Value Name="AUTO_INSTALL_UIMENUS" DataType="value">1</Value>
<Value Name="SHOULDUNINSTALL" DataType="value">0</Value>
<Value Name="VISIT_SPOT3D" DataType="value">0</Value>
</DefValues>
"@ | Out-File -FilePath "C:\3dsmax_setup\config.xml" -Encoding UTF8
Start-Process "C:\3dsmax_setup\$VRAY_INSTALLER" -ArgumentList '-gui=0','-configFile=C:\3dsmax_setup\config.xml','-quiet=1' -Wait
Write-Host ' --- Installing tyFlow Plugin --- '
$pluginsDir = "C:\Program Files\Autodesk\3ds Max 2025\plugins"
New-Item -ItemType Directory -Path $pluginsDir -Force
aws s3 cp --no-progress "$TYFLOW_PLUGIN_S3_URI" "$pluginsDir\"
Write-Host "tyFlow plugin installed to $pluginsDir"
Write-Host ' --- Configuring environment for 3dsMax 2025 --- '
[Environment]::SetEnvironmentVariable('Path', 'C:\Program Files\Autodesk\3ds Max 2025;' + [Environment]::GetEnvironmentVariable('Path', 'Machine'), 'Machine')
[Environment]::SetEnvironmentVariable('3DSMAX_EXECUTABLE', 'C:\Program Files\Autodesk\3ds Max 2025\3dsmaxbatch.exe', 'Machine')
[Environment]::SetEnvironmentVariable('PYTHONPATH', 'C:\Program Files\Autodesk\3ds Max 2025\Python;C:\Program Files\Autodesk\3ds Max 2025\Python\Scripts', 'Machine')
[Environment]::SetEnvironmentVariable('Path', 'C:\Program Files\Autodesk\3ds Max 2025\Python;C:\Program Files\Autodesk\3ds Max 2025\Python\Scripts;' + [Environment]::GetEnvironmentVariable('Path', 'Machine'), 'Machine')
Write-Host ' --- Configuring environment for V-Ray for 3dsMax 2025 --- '
[System.Environment]::SetEnvironmentVariable('VRAY_FOR_3DSMAX2025_MAIN', 'C:\ProgramData\Autodesk\ApplicationPlugins\VRay3dsMax2025\bin\', 'Machine')
[System.Environment]::SetEnvironmentVariable('VRAY_FOR_3DSMAX2025_PLUGINS', 'C:\ProgramData\Autodesk\ApplicationPlugins\VRay3dsMax2025\bin\plugins\', 'Machine')
[System.Environment]::SetEnvironmentVariable('VRAY_MDL_PATH_3DSMAX2025', "$VRAY_FOR_3DSMAX2025_INSTALL_ROOT\mdl", 'Machine')
# V-Ray introduced Cloud Licensing in 7.30.02 which must be disabled for UBL to work
Start-Process "C:\ProgramData\Autodesk\ApplicationPlugins\VRay3dsMax2025\utils\setvrlservice.exe" -ArgumentList '-cloud-server=0' -Wait -ErrorAction SilentlyContinue
Write-Host ' --- Installing Deadline Cloud for 3dsMax --- '
& "C:\Program Files\Autodesk\3ds Max 2025\Python\python.exe" -m ensurepip
& "C:\Program Files\Autodesk\3ds Max 2025\Python\python.exe" -m pip install deadline-cloud-for-3ds-max
Exit 0