← Paracosm·Docs/OpenSimulator patches
Contents · terrain-script-pbr

Script-set terrain textures reach PBR viewers

What was wrong

osSetTerrainTexture (and any other caller of IEstateModule.setEstateTerrainBaseTexture with no client) set only RegionSettings.TerrainTexture1-4. A viewer that declares PBR terrain support (Firestorm 7.x) is sent TerrainPBR1-4 in the region handshake instead (LLClientView.SendRegionHandshake, SupportTerrainPBR), so a script could change the ground and a modern viewer would never see it. Found 2026-09-25 building the lying snow (tools/build_snowline.py): the region DB held the snowy textures, Firestorm drew the stock ground.

The fix (../terrain-script-pbr.diff, a unified diff of OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs against 0.9.3.0)

SetEstateTerrainBaseTexture: when remoteClient is null (a script or the console) set BOTH the legacy texture and the PBR slot for that level. A viewer's own estate-tools change keeps its old behaviour (PBR viewers set the PBR slot, legacy viewers the texture). Built as OpenSim.Region.CoreModules.dll.

Deploy

Build OpenSim/Region/CoreModules/OpenSim.Region.CoreModules.csproj -c Release (the copy into bin/ fails on the lock while the region runs; the DLL is in obj/Release/). With nobody on the region: console shutdown, copy the DLL into opensim-src/bin as soon as the old process exits (the supervisor relaunched within 3 s this time), then dotnet build-server shutdown to release the build nodes. A script-driven change only reaches the PBR slot the next time the script calls the function after the restart.