This commit is contained in:
listik committed 2026-11-29 15:49:17 +03:00
commit a85391509d
211 files changed
+28903

No files matched your search

@@ -0,0 +1,312 @@
--!strict
-- Creates the reusable map-piece pool in ServerStorage once per place.
local ServerStorage = game:GetService("ServerStorage")
local old = ServerStorage:FindFirstChild("GameZonePrefabs")
if old then old:Destroy() end
local pool = Instance.new("Folder")
pool.Name = "GameZonePrefabs"
pool:SetAttribute("Ready", false)
pool.Parent = ServerStorage
local function block(parent: Instance, name: string, size: Vector3, position: Vector3, color: Color3, material: Enum.Material): Part
local p = Instance.new("Part")
p.Name, p.Size, p.Position = name, size, position
p.Anchored, p.CanCollide, p.Color, p.Material = true, true, color, material
p.Parent = parent
return p
end
local function connector(parent: Model, name: string, position: Vector3, direction: Vector3)
local a = Instance.new("Attachment")
a.Name, a.Position, a.Axis = name, position, direction
a:SetAttribute("Connector", true)
a.Parent = parent.PrimaryPart
end
local function prefab(name: string, size: Vector3, build: (Model, Part) -> ())
local model = Instance.new("Model")
model.Name = name
model:SetAttribute("TileSize", size)
local root = block(model, "Root", Vector3.new(1, 1, 1), Vector3.zero, Color3.new(1, 1, 1), Enum.Material.SmoothPlastic)
root.Transparency, root.CanCollide = 1, false
root:SetAttribute("PrefabRoot", true)
model.PrimaryPart = root
build(model, root)
model.Parent = pool
end
local road = Color3.fromRGB(48, 52, 58)
local wall = Color3.fromRGB(178, 184, 220)
local roof = Color3.fromRGB(115, 119, 154)
local accent = Color3.fromRGB(255, 145, 91)
local sidewalk = Color3.fromRGB(226, 202, 190)
local function gridTexture(part: BasePart, tile: number, color: Color3)
local function face(normal: Vector3)
local texture = Instance.new("Texture")
texture.Name = "ConcreteGrid"
texture.Texture = "rbxasset://textures/Studs.png"
texture.Face = if normal == Vector3.yAxis then Enum.NormalId.Top
elseif normal == -Vector3.yAxis then Enum.NormalId.Bottom
elseif normal == Vector3.xAxis then Enum.NormalId.Right
elseif normal == -Vector3.xAxis then Enum.NormalId.Left
elseif normal == Vector3.zAxis then Enum.NormalId.Back else Enum.NormalId.Front
texture.StudsPerTileU, texture.StudsPerTileV = tile, tile
texture.Color3 = color
texture.Transparency = 0.68
texture.Parent = part
end
for _, axis in { Vector3.xAxis, -Vector3.xAxis, Vector3.yAxis, -Vector3.yAxis, Vector3.zAxis, -Vector3.zAxis } do face(axis) end
end
local function inkEdges(parent: Instance, source: BasePart)
local model = source:FindFirstAncestorOfClass("Model")
if model then
model:SetAttribute("PencilOutline", true)
end
end
local function wallPanel(parent: Instance, name: string, size: Vector3, position: Vector3)
local panel = block(parent, name, size, position, wall, Enum.Material.Concrete)
gridTexture(panel, 8, Color3.fromRGB(205, 209, 244))
inkEdges(parent, panel)
return panel
end
prefab("RoadStraight", Vector3.new(40, 1, 40), function(m, root)
local street = block(m, "Road", Vector3.new(40, 0.3, 20), Vector3.new(0, -0.35, 0), road, Enum.Material.Asphalt)
inkEdges(m, street)
block(m, "SidewalkA", Vector3.new(40, 0.2, 10), Vector3.new(0, -0.1, -15), sidewalk, Enum.Material.Concrete)
block(m, "SidewalkB", Vector3.new(40, 0.2, 10), Vector3.new(0, -0.1, 15), sidewalk, Enum.Material.Concrete)
block(m, "CurbA", Vector3.new(40, 0.2, 0.5), Vector3.new(0, -0.1, -10.25), Color3.fromRGB(173, 169, 184), Enum.Material.Concrete)
block(m, "CurbB", Vector3.new(40, 0.2, 0.5), Vector3.new(0, -0.1, 10.25), Color3.fromRGB(173, 169, 184), Enum.Material.Concrete)
for x = -15, 15, 10 do
block(m, "PencilLaneDash", Vector3.new(4, 0.04, 0.3), Vector3.new(x, -0.18, 0), Color3.fromRGB(191, 190, 184), Enum.Material.SmoothPlastic)
end
connector(m, "West", Vector3.new(-20, 0, 0), Vector3.xAxis)
connector(m, "East", Vector3.new(20, 0, 0), -Vector3.xAxis)
end)
prefab("RoadIntersection", Vector3.new(40, 1, 40), function(m, root)
local asphalt = block(m, "AsphaltBed", Vector3.new(39.8, 0.3, 39.8), Vector3.new(0, -0.35, 0), road, Enum.Material.Asphalt)
inkEdges(m, asphalt)
for _, x in {-14.5, 14.5} do
for _, z in {-14.5, 14.5} do
block(m, "CornerPavement", Vector3.new(11, 0.2, 11), Vector3.new(x, -0.1, z), sidewalk, Enum.Material.Concrete)
end
end
for _, offset in {-14, 14} do
for stripe = -2, 2 do
block(m, "CrosswalkStripe", Vector3.new(0.65, 0.04, 1.4), Vector3.new(offset, -0.18, stripe * 2.1), Color3.fromRGB(210, 204, 195), Enum.Material.SmoothPlastic)
end
end
end)
prefab("Plaza", Vector3.new(40, 1, 40), function(m, root)
block(m, "PlazaPaving", Vector3.new(39.8, 0.25, 39.8), Vector3.new(0, -0.15, 0), sidewalk, Enum.Material.Concrete)
for _, x in {-15, 15} do
for _, z in {-15, 15} do
block(m, "LavenderInset", Vector3.new(8, 0.08, 8), Vector3.new(x, 0.02, z), Color3.fromRGB(190, 190, 218), Enum.Material.CeramicTiles)
end
end
local basin = block(m, "FountainBasin", Vector3.new(11, 1.2, 11), Vector3.new(0, 0.55, 0), Color3.fromRGB(164, 177, 202), Enum.Material.Concrete)
basin.Shape = Enum.PartType.Cylinder
local water = block(m, "FountainWater", Vector3.new(8.5, 0.35, 8.5), Vector3.new(0, 1.28, 0), Color3.fromRGB(104, 205, 221), Enum.Material.Glass)
water.Shape, water.Transparency = Enum.PartType.Cylinder, 0.18
block(m, "FountainStem", Vector3.new(2, 5, 2), Vector3.new(0, 3.4, 0), Color3.fromRGB(190, 190, 218), Enum.Material.Concrete)
local crown = block(m, "FountainCap", Vector3.new(4, 0.7, 4), Vector3.new(0, 6.1, 0), accent, Enum.Material.Slate)
crown.Shape = Enum.PartType.Cylinder
for _, x in {-12, 12} do
for _, z in {-12, 12} do
local lamp = block(m, "PlazaLantern", Vector3.new(0.8, 7, 0.8), Vector3.new(x, 3.5, z), Color3.fromRGB(58, 60, 78), Enum.Material.Metal)
inkEdges(m, lamp)
block(m, "LanternGlow", Vector3.new(2, 1.5, 2), Vector3.new(x, 7.3, z), Color3.fromRGB(255, 218, 145), Enum.Material.Neon)
end
end
end)
prefab("RoadCorner", Vector3.new(40, 1, 40), function(m, root)
local roadX = block(m, "RoadX", Vector3.new(40, 0.3, 12), Vector3.new(0, -0.35, 0), road, Enum.Material.Asphalt)
local roadZ = block(m, "RoadZ", Vector3.new(12, 0.3, 40), Vector3.new(0, -0.35, 0), road, Enum.Material.Asphalt)
inkEdges(m, roadX)
inkEdges(m, roadZ)
connector(m, "North", Vector3.new(0, 0, -20), -Vector3.zAxis)
connector(m, "East", Vector3.new(20, 0, 0), -Vector3.xAxis)
end)
prefab("OpenLot", Vector3.new(40, 1, 40), function(m, root)
block(m, "Paving", Vector3.new(39.8, 0.25, 39.8), Vector3.new(0, -0.22, 0), Color3.fromRGB(222, 202, 190), Enum.Material.Concrete)
connector(m, "North", Vector3.new(0, 0, -20), -Vector3.zAxis)
connector(m, "East", Vector3.new(20, 0, 0), -Vector3.xAxis)
connector(m, "South", Vector3.new(0, 0, 20), Vector3.zAxis)
connector(m, "West", Vector3.new(-20, 0, 0), Vector3.xAxis)
end)
prefab("Courtyard", Vector3.new(40, 1, 40), function(m, root)
block(m, "Ground", Vector3.new(34, 0.5, 34), Vector3.new(0, 0.25, 0), Color3.fromRGB(216, 199, 183), Enum.Material.Concrete)
for _, p in {{-14, -14}, {14, -14}, {-14, 14}, {14, 14}} do
local pillar = wallPanel(m, "Pillar", Vector3.new(3, 8, 3), Vector3.new(p[1], 4, p[2]))
gridTexture(pillar, 5, Color3.fromRGB(205, 209, 244))
end
connector(m, "South", Vector3.new(0, 0, 20), Vector3.zAxis)
connector(m, "West", Vector3.new(-20, 0, 0), Vector3.xAxis)
end)
local function house(name: string, style: number)
prefab(name, Vector3.new(40, 1, 40), function(m, root)
local wallColor = if style == 1 then Color3.fromRGB(220, 207, 195) elseif style == 2 then Color3.fromRGB(199, 207, 229) else Color3.fromRGB(225, 190, 167)
wallPanel(m, "RearFacadeLeft", Vector3.new(10, 16, 2), Vector3.new(-10, 8, -14)).Color = wallColor
wallPanel(m, "RearFacadeRight", Vector3.new(10, 16, 2), Vector3.new(10, 8, -14)).Color = wallColor
local left = wallPanel(m, "LeftFacade", Vector3.new(2, 16, 28), Vector3.new(-14, 8, 0))
left.Color = wallColor
local right = wallPanel(m, "RightFacade", Vector3.new(2, 16, 28), Vector3.new(14, 8, 0))
right.Color = wallColor
wallPanel(m, "FrontLeft", Vector3.new(10, 16, 2), Vector3.new(-10, 8, 14)).Color = wallColor
wallPanel(m, "FrontRight", Vector3.new(10, 16, 2), Vector3.new(10, 8, 14)).Color = wallColor
block(m, "InteriorFloor", Vector3.new(25, 0.3, 25), Vector3.new(0, -0.08, 0), Color3.fromRGB(218, 197, 183), Enum.Material.Concrete)
local roofPart = block(m, "OverhangingRoof", Vector3.new(36, 1.2, 34), Vector3.new(0, 16.8, 0), roof, Enum.Material.Slate)
inkEdges(m, roofPart)
for _, panelData in {
{"UpperRear", Vector3.new(22, 7, 1.2), Vector3.new(0, 20.9, -11.4)},
{"UpperLeft", Vector3.new(1.2, 7, 18), Vector3.new(-10.4, 20.9, -2)},
{"UpperRight", Vector3.new(1.2, 7, 18), Vector3.new(10.4, 20.9, -2)},
{"UpperFrontLeft", Vector3.new(7, 7, 1.2), Vector3.new(-7.5, 20.9, 7.4)},
{"UpperFrontRight", Vector3.new(7, 7, 1.2), Vector3.new(7.5, 20.9, 7.4)},
} do
local upperWall = wallPanel(m, panelData[1], panelData[2], panelData[3])
upperWall.Color = wallColor
end
local topRoof = block(m, "UpperRoof", Vector3.new(26, 0.8, 24), Vector3.new(0, 24.8, -2), accent, Enum.Material.Slate)
inkEdges(m, topRoof)
for _, x in {-8, 8} do
local window = block(m, "Window", Vector3.new(5, 4, 0.18), Vector3.new(x, 9, 14.96), Color3.fromRGB(151, 205, 220), Enum.Material.Glass)
window.Transparency = 0.25
inkEdges(m, window)
block(m, "WindowSill", Vector3.new(6, 0.35, 0.5), Vector3.new(x, 6.8, 14.8), accent, Enum.Material.Wood)
end
local door = block(m, "Door", Vector3.new(5, 10, 0.3), Vector3.new(0, 5, 14.95), Color3.fromRGB(127, 78, 63), Enum.Material.Wood)
door.CanCollide = false
inkEdges(m, door)
local porch = block(m, "Porch", Vector3.new(12, 0.6, 5), Vector3.new(0, 0.2, 17), Color3.fromRGB(221, 195, 178), Enum.Material.Concrete)
inkEdges(m, porch)
-- Exterior steps lead to the broad first roof; a second stair continues to the rooftop.
for step = 0, 14 do
block(m, "RoofAccessStep", Vector3.new(5.2, 1.1, 2.25), Vector3.new(17.2, 0.55 + step * 1.1, 14 - step * 2.1), accent, Enum.Material.Metal)
end
for step = 0, 6 do
block(m, "UpperRoofStep", Vector3.new(2.2, 1.1, 2.25), Vector3.new(12.5, 17.95 + step * 1.1, 7 - step * 2.2), roof, Enum.Material.Metal)
end
connector(m, "North", Vector3.new(0, 0, -20), -Vector3.zAxis)
connector(m, "South", Vector3.new(0, 0, 20), Vector3.zAxis)
end)
end
house("HouseWarm", 1)
house("HouseBlue", 2)
house("HouseTerracotta", 3)
prefab("Skybridge", Vector3.new(40, 1, 40), function(m, root)
local deck = block(m, "BridgeDeck", Vector3.new(43, 0.8, 8), Vector3.new(0, 17.7, 0), Color3.fromRGB(178, 184, 220), Enum.Material.Concrete)
inkEdges(m, deck)
for _, z in {-4, 4} do
block(m, "BridgeRail", Vector3.new(43, 2.2, 0.45), Vector3.new(0, 19.2, z), Color3.fromRGB(93, 95, 126), Enum.Material.Metal)
end
for _, x in {-15, 15} do
block(m, "BridgeInkMark", Vector3.new(0.45, 0.04, 5.5), Vector3.new(x, 18.13, 0), accent, Enum.Material.SmoothPlastic)
end
end)
prefab("Tree", Vector3.new(40, 1, 40), function(m, root)
local foliageRng = Random.new(DateTime.now().UnixTimestampMillis % 2147483647)
local trunk = block(m, "Trunk", Vector3.new(2.5, 10, 2.5), Vector3.new(0, 5, 0), Color3.fromRGB(120, 83, 65), Enum.Material.Wood)
inkEdges(m, trunk)
for _, crown in {{0, 12, 0, 13}, {-4, 10, 2, 9}, {4, 11, -2, 10}, {1, 16, 1, 8}} do
local foliage = Instance.new("Part")
foliage.Name = "PaperLeafCanopy"
foliage.Shape = Enum.PartType.Ball
foliage.Size = Vector3.new(crown[4], crown[4] * 0.82, crown[4])
foliage.Position = Vector3.new(crown[1], crown[2], crown[3])
foliage.Anchored = true
foliage.CanCollide = true
foliage.Color = Color3.fromRGB(foliageRng:NextInteger(123, 158), 157, 137)
foliage.Material = Enum.Material.SmoothPlastic
foliage.Parent = m
inkEdges(m, foliage)
end
block(m, "Planter", Vector3.new(10, 1, 10), Vector3.new(0, 0.1, 0), Color3.fromRGB(186, 170, 160), Enum.Material.Concrete)
end)
prefab("StreetLamp", Vector3.new(40, 1, 40), function(m, root)
local post = block(m, "LampPost", Vector3.new(0.7, 12, 0.7), Vector3.new(0, 6, 0), Color3.fromRGB(58, 60, 78), Enum.Material.Metal)
inkEdges(m, post)
local arm = block(m, "LampArm", Vector3.new(4, 0.6, 0.6), Vector3.new(1.6, 11.7, 0), Color3.fromRGB(58, 60, 78), Enum.Material.Metal)
inkEdges(m, arm)
local lamp = block(m, "WarmLamp", Vector3.new(2, 0.5, 1.5), Vector3.new(2.8, 11.2, 0), Color3.fromRGB(255, 218, 145), Enum.Material.Neon)
inkEdges(m, lamp)
end)
prefab("RoofRamp", Vector3.new(40, 1, 40), function(m, root)
local slope = Instance.new("WedgePart")
slope.Name = "RoofAccessRamp"
slope.Size = Vector3.new(12, 18, 34)
slope.CFrame = CFrame.new(0, 9, 0) * CFrame.Angles(0, math.rad(90), 0)
slope.Anchored = true
slope.Color = accent
slope.Material = Enum.Material.Metal
slope.Parent = m
block(m, "LowerLanding", Vector3.new(14, 0.6, 8), Vector3.new(0, 0.3, 16), Color3.fromRGB(221, 195, 178), Enum.Material.Concrete)
block(m, "UpperLanding", Vector3.new(14, 0.6, 8), Vector3.new(0, 9.3, -16), roof, Enum.Material.Slate)
connector(m, "Lower", Vector3.new(0, 0, 20), Vector3.zAxis)
connector(m, "Upper", Vector3.new(0, 9, -20), -Vector3.zAxis)
end)
prefab("Barricade", Vector3.new(40, 1, 40), function(m, root)
local body = block(m, "ConcreteBlock", Vector3.new(13, 5, 4), Vector3.new(0, 2.5, 0), Color3.fromRGB(221, 139, 104), Enum.Material.Concrete)
gridTexture(body, 6, Color3.fromRGB(255, 204, 157))
inkEdges(m, body)
for x = -4, 4, 4 do
block(m, "PaintStripe", Vector3.new(1.2, 5.1, 4.1), Vector3.new(x, 2.5, 0), Color3.fromRGB(244, 211, 172), Enum.Material.SmoothPlastic)
end
connector(m, "West", Vector3.new(-20, 0, 0), Vector3.xAxis)
connector(m, "East", Vector3.new(20, 0, 0), -Vector3.xAxis)
end)
prefab("Building", Vector3.new(40, 1, 40), function(m, root)
wallPanel(m, "BuildingLeft", Vector3.new(14, 14, 28), Vector3.new(-13, 7, 0))
wallPanel(m, "BuildingRight", Vector3.new(14, 14, 28), Vector3.new(13, 7, 0))
wallPanel(m, "RearWall", Vector3.new(28, 14, 2), Vector3.new(0, 7, -14))
wallPanel(m, "FrontLeft", Vector3.new(9, 14, 2), Vector3.new(-9.5, 7, 14))
wallPanel(m, "FrontRight", Vector3.new(9, 14, 2), Vector3.new(9.5, 7, 14))
block(m, "Roof", Vector3.new(34, 1, 30), Vector3.new(0, 14.5, 0), roof, Enum.Material.Metal)
block(m, "PassageFloor", Vector3.new(10, 0.5, 28), Vector3.new(0, 0.25, 0), Color3.fromRGB(221, 195, 178), Enum.Material.Concrete)
block(m, "OrangeCover", Vector3.new(9, 12, 7), Vector3.new(0, 6, 3), accent, Enum.Material.SmoothPlastic)
connector(m, "North", Vector3.new(0, 0, -20), -Vector3.zAxis)
connector(m, "South", Vector3.new(0, 0, 20), Vector3.zAxis)
end)
prefab("Alley", Vector3.new(40, 1, 40), function(m, root)
block(m, "AlleyFloor", Vector3.new(14, 0.4, 40), Vector3.new(0, 0, 0), Color3.fromRGB(225, 199, 181), Enum.Material.Concrete)
wallPanel(m, "WestWall", Vector3.new(2, 16, 40), Vector3.new(-18, 8, 0))
wallPanel(m, "EastWall", Vector3.new(2, 16, 40), Vector3.new(18, 8, 0))
local orangeBlock = block(m, "OrangeBlock", Vector3.new(7, 10, 7), Vector3.new(-5, 5, -5), accent, Enum.Material.SmoothPlastic)
gridTexture(orangeBlock, 6, Color3.fromRGB(255, 204, 157))
inkEdges(m, orangeBlock)
block(m, "LowDetour", Vector3.new(4, 3, 10), Vector3.new(5, 1.5, 8), roof, Enum.Material.Metal)
connector(m, "North", Vector3.new(0, 0, -20), -Vector3.zAxis)
connector(m, "South", Vector3.new(0, 0, 20), Vector3.zAxis)
end)
prefab("Ramp", Vector3.new(40, 1, 40), function(m, root)
local ramp = Instance.new("WedgePart")
ramp.Name, ramp.Size, ramp.Position = "Ramp", Vector3.new(12, 10, 30), Vector3.new(0, 5, 0)
ramp.Anchored, ramp.Color, ramp.Material, ramp.Parent = true, accent, Enum.Material.Metal, m
block(m, "Landing", Vector3.new(18, 1, 10), Vector3.new(0, 10, -13), roof, Enum.Material.Metal)
connector(m, "South", Vector3.new(0, 0, 20), Vector3.zAxis)
connector(m, "North", Vector3.new(0, 10, -20), -Vector3.zAxis)
end)
pool:SetAttribute("PrefabCount", #pool:GetChildren())
pool:SetAttribute("Ready", true)
@@ -0,0 +1,32 @@
--!strict
-- Script in ServerScriptService.
-- Spawns players immediately in the Hunter lobby without equipping a weapon.
local Players = game:GetService("Players")
Players.CharacterAutoLoads = true
local lobby = workspace:WaitForChild("HunterLobby")
local lobbySpawn = lobby:WaitForChild("Arrival Spawn") :: SpawnLocation
local function onCharacterAdded(player: Player, character: Model)
task.defer(function()
task.wait(0.2)
if character.Parent then
character:PivotTo(lobbySpawn.CFrame + Vector3.new(0, 4, 0))
end
end)
end
local function onPlayerAdded(player: Player)
player.CharacterAdded:Connect(function(character)
onCharacterAdded(player, character)
end)
if player.Character then
onCharacterAdded(player, player.Character)
end
end
Players.PlayerAdded:Connect(onPlayerAdded)
for _, player in Players:GetPlayers() do
onPlayerAdded(player)
end
@@ -0,0 +1,54 @@
--!strict
-- Lobby gateways send a player into the current server's generated GameZone.
local Players = game:GetService("Players")
local Workspace = game:GetService("Workspace")
local lobby = Workspace:WaitForChild("HunterLobby")
local zone = Workspace:WaitForChild("GameZone")
while zone:GetAttribute("Ready") ~= true do
task.wait()
end
local destination = Vector3.new(0, 4, -180)
local cooldown: { [Player]: boolean } = {}
local function teleport(hit: BasePart)
local character = hit:FindFirstAncestorOfClass("Model")
local player = character and Players:GetPlayerFromCharacter(character)
local humanoid = character and character:FindFirstChildOfClass("Humanoid")
if not player or not character or not humanoid or cooldown[player] then
return
end
cooldown[player] = true
character:PivotTo(CFrame.new(destination))
local backpack = player:FindFirstChildOfClass("Backpack")
local tool = backpack and backpack:FindFirstChild("SniperRifle")
if tool and tool:IsA("Tool") then
humanoid:EquipTool(tool)
end
task.delay(1.5, function()
cooldown[player] = nil
end)
end
for _, name in { "Arena Gateway_001", "Training Gateway_001", "Duel Gateway_001" } do
local gateway = lobby:WaitForChild(name)
local cf, size = gateway:GetBoundingBox()
local trigger = Instance.new("Part")
trigger.Name = name .. " Teleport Trigger"
trigger.Size = Vector3.new(math.min(size.X - 4, 18), 5, math.min(size.Z - 4, 18))
trigger.CFrame = CFrame.new(cf.Position.X, 2.5, cf.Position.Z)
trigger.Transparency = 1
trigger.Anchored = true
trigger.CanCollide = false
trigger.CanTouch = true
trigger.Parent = gateway
trigger.Touched:Connect(teleport)
end
Players.PlayerRemoving:Connect(function(player)
cooldown[player] = nil
end)
@@ -0,0 +1,159 @@
--!strict
-- Builds a seeded 520x520 arena from connected 40-stud city modules.
local Workspace = game:GetService("Workspace")
local ServerStorage = game:GetService("ServerStorage")
local SIZE = 520
local GRID_RADIUS = 6
local STEP = 40
local CENTER = Vector3.new(0, 0, -420)
local rng = Random.new(DateTime.now().UnixTimestampMillis % 2147483647)
local pool = ServerStorage:WaitForChild("GameZonePrefabs")
while pool:GetAttribute("Ready") ~= true do
task.wait()
end
local old = Workspace:FindFirstChild("GameZone")
if old then old:Destroy() end
local zone = Instance.new("Folder")
zone.Name = "GameZone"
zone:SetAttribute("Size", SIZE)
zone:SetAttribute("GridCells", GRID_RADIUS * 2 + 1)
zone:SetAttribute("Seed", rng:NextInteger(1, 2147483646))
zone:SetAttribute("Ready", false)
zone.Parent = Workspace
local function block(name: string, size: Vector3, position: Vector3, color: Color3, material: Enum.Material): Part
local p = Instance.new("Part")
p.Name, p.Size, p.Position = name, size, position
p.Anchored, p.CanCollide, p.Color, p.Material = true, true, color, material
p.Parent = zone
return p
end
local function cloneAt(kind: string, name: string, position: Vector3, yaw: number?): Model?
local source = pool:FindFirstChild(kind)
if not source or not source:IsA("Model") then return nil end
local model = source:Clone()
model.Name = name
model:PivotTo(CFrame.new(position) * CFrame.Angles(0, yaw or 0, 0))
for _, item in model:GetDescendants() do
if item:IsA("BasePart") and item:GetAttribute("PrefabRoot") then item:Destroy() end
end
model.Parent = zone
return model
end
local function addInkOutline(model: Model)
for _, source in model:GetDescendants() do
if source:IsA("BasePart") and source.Name ~= "Root" and source.Size.Magnitude >= 12 then
local outline = Instance.new("Part")
outline.Name = "PencilEdge"
outline.Size = source.Size + Vector3.new(0.08, 0.08, 0.08)
outline.CFrame = source.CFrame
outline.Anchored, outline.CanCollide, outline.CanQuery, outline.CanTouch = true, false, false, false
outline.Transparency = 1
outline.Parent = model
local box = Instance.new("SelectionBox")
box.Name, box.Adornee = "PencilLine", outline
box.Color3, box.LineThickness, box.SurfaceTransparency = Color3.fromRGB(48, 47, 67), 0.012, 1
box.Parent = model
end
end
end
local edge = SIZE / 2
local boundary = Color3.fromRGB(86, 91, 99)
block("North Skyline Wall", Vector3.new(SIZE, 42, 4), CENTER + Vector3.new(0, 21, -edge), boundary, Enum.Material.Concrete)
block("West Skyline Wall", Vector3.new(4, 42, SIZE), CENTER + Vector3.new(-edge, 21, 0), boundary, Enum.Material.Concrete)
block("East Skyline Wall", Vector3.new(4, 42, SIZE), CENTER + Vector3.new(edge, 21, 0), boundary, Enum.Material.Concrete)
-- Keep the south boulevard open as the one clear portal entrance.
block("South Skyline West", Vector3.new(edge - 24, 42, 4), CENTER + Vector3.new(-edge / 2 - 12, 21, edge), boundary, Enum.Material.Concrete)
block("South Skyline East", Vector3.new(edge - 24, 42, 4), CENTER + Vector3.new(edge / 2 + 12, 21, edge), boundary, Enum.Material.Concrete)
local function onMainStreet(value: number): boolean
return value == -3 or value == 0 or value == 3
end
local houseKinds = { "HouseWarm", "HouseBlue", "HouseTerracotta" }
local lotKinds = { "House", "House", "House", "Courtyard", "Alley", "OpenLot" }
local roadCells = 0
local houseCount = 0
local bridgeCells: { [number]: { [number]: boolean } } = { [-3] = { [-1] = true }, [3] = { [1] = true } }
for row = -GRID_RADIUS, GRID_RADIUS do
for col = -GRID_RADIUS, GRID_RADIUS do
local isStreet = onMainStreet(row) or onMainStreet(col)
local position = CENTER + Vector3.new(col * STEP, 0, row * STEP)
if isStreet then
roadCells += 1
if row == 0 and col == 0 then
cloneAt("Plaza", "Central Fountain Plaza", position)
elseif onMainStreet(row) and onMainStreet(col) then
cloneAt("RoadIntersection", ("Intersection_%d_%d"):format(row, col), position)
else
local vertical = onMainStreet(col)
local yaw = if vertical then math.rad(90) else 0
local bridgeRow = bridgeCells[col]
if bridgeRow and bridgeRow[row] then
local bridge = cloneAt("Skybridge", ("RooftopBridge_%d_%d"):format(row, col), position)
if bridge then bridge:PivotTo(CFrame.new(position + Vector3.new(0, 17.7, 0))) end
end
cloneAt("RoadStraight", ("Street_%d_%d"):format(row, col), position, yaw)
end
else
-- A connected street grid surrounds compact blocks; controlled variation keeps every server's districts distinct.
block(("DistrictPaving_%d_%d"):format(row, col), Vector3.new(39.7, 0.2, 39.7), position + Vector3.new(0, -0.25, 0), Color3.fromRGB(222, 202, 190), Enum.Material.Concrete)
local pick = rng:NextInteger(1, #lotKinds)
local lotType = lotKinds[pick]
local kind = if lotType == "House" then houseKinds[rng:NextInteger(1, #houseKinds)] else lotType
if math.abs(row) == 5 or math.abs(col) == 5 then
kind = if rng:NextNumber() < 0.72 then houseKinds[rng:NextInteger(1, #houseKinds)] else "Courtyard"
end
local yaw = if kind == "Alley" and rng:NextNumber() < 0.5 then math.rad(90) else 0
local tile = cloneAt(kind, ("Block_%s_%d_%d"):format(kind, row, col), position, yaw)
if tile then
tile:SetAttribute("GridX", col)
tile:SetAttribute("GridZ", row)
tile:SetAttribute("TileKind", kind)
if kind:match("^House") then
houseCount += 1
addInkOutline(tile)
end
end
if kind == "Courtyard" or kind == "OpenLot" then
for _, offset in { {-14, -14}, {14, -14}, {-14, 14}, {14, 14} } do
if rng:NextNumber() < 0.72 then
local propName = if rng:NextNumber() < 0.72 then "Tree" else "StreetLamp"
cloneAt(propName, ("%s_%d_%d_%d"):format(propName, row, col, rng:NextInteger(1, 99)), position + Vector3.new(offset[1], 0, offset[2]))
end
end
end
end
end
task.wait()
end
-- Entry arch frames the south boulevard and stays clear of the portal's landing point.
local archBase = CENTER + Vector3.new(0, 0, edge - 24)
block("Entry Arch Left", Vector3.new(5, 24, 7), archBase + Vector3.new(-19, 12, 0), Color3.fromRGB(178, 184, 220), Enum.Material.Concrete)
block("Entry Arch Right", Vector3.new(5, 24, 7), archBase + Vector3.new(19, 12, 0), Color3.fromRGB(178, 184, 220), Enum.Material.Concrete)
block("Entry Arch Header", Vector3.new(43, 5, 8), archBase + Vector3.new(0, 25, 0), Color3.fromRGB(178, 184, 220), Enum.Material.Concrete)
block("Entry Arch Ink", Vector3.new(45, 0.25, 0.35), archBase + Vector3.new(0, 27.7, 4.1), Color3.fromRGB(48, 47, 67), Enum.Material.SmoothPlastic)
local botSpawns = Workspace:FindFirstChild("BotSpawns")
local spawnCells = { {0, -5}, {0, -2}, {0, 2}, {0, 5}, {-5, 0}, {5, 0}, {-3, 2}, {3, -2} }
if botSpawns and botSpawns:IsA("Folder") then
for index, marker in botSpawns:GetChildren() do
if marker:IsA("BasePart") then
local cell = spawnCells[((index - 1) % #spawnCells) + 1]
marker.CFrame = CFrame.new(CENTER + Vector3.new(cell[1] * STEP, 2, cell[2] * STEP))
marker:SetAttribute("Zone", "Game")
end
end
end
zone:SetAttribute("RoadCells", roadCells)
zone:SetAttribute("HouseCount", houseCount)
zone:SetAttribute("Ready", true)
@@ -0,0 +1,49 @@
--!strict
-- Script in ServerScriptService.
-- Target bots: a copy of ServerStorage.TargetBot stands on every part in Workspace.BotSpawns
-- (move / add / remove those parts to place them; each bot faces where its part faces).
-- They do nothing but stand and take bullets (SniperShots deals the damage to models tagged
-- "TargetBot"); a dead bot falls apart and a new one stands up on the same spot after RESPAWN_TIME.
local CollectionService = game:GetService("CollectionService")
local ServerStorage = game:GetService("ServerStorage")
local TAG = "TargetBot"
local RESPAWN_TIME = 4
local template = ServerStorage:WaitForChild("TargetBot") :: Model
local gameZone = workspace:WaitForChild("GameZone")
while gameZone:GetAttribute("Ready") ~= true do task.wait() end
local spawns = workspace:WaitForChild("BotSpawns")
local botsFolder = Instance.new("Folder")
botsFolder.Name = "TargetBots"
botsFolder.Parent = workspace
local function spawnBot(marker: BasePart)
local bot = template:Clone()
local root = bot:FindFirstChild("HumanoidRootPart") :: BasePart
local humanoid = bot:FindFirstChildOfClass("Humanoid") :: Humanoid
-- feet on the marker: the root sits half its height plus the hip height above the ground
local lift = root.Size.Y / 2 + humanoid.HipHeight
bot:PivotTo(marker.CFrame * CFrame.new(0, lift - marker.Size.Y / 2, 0))
root.Anchored = true -- stands still, cannot be pushed over
bot.Name = "Bot_" .. marker.Name
CollectionService:AddTag(bot, TAG)
bot.Parent = botsFolder
humanoid.Died:Once(function()
root.Anchored = false -- let the body fall
task.delay(RESPAWN_TIME, function()
bot:Destroy()
if marker.Parent then
spawnBot(marker)
end
end)
end)
end
for _, marker in spawns:GetChildren() do
if marker:IsA("BasePart") then
spawnBot(marker)
end
end
@@ -0,0 +1 @@
{"content":[{"type":"text","text":"{\"botChanges\":[{\"before\":[1740.495361328125,7.560688495635986,239.5489044189453,-0.880471408367157,-0.0002455839712638408,0.4740999937057495,-0.00013392482651397586,1.0000003576278687,0.00026928301667794585,-0.4740998446941376,0.00017360225319862366,-0.8804711103439331],\"name\":\"BotSpawn3\",\"after\":[1740.495361328125,8.060686111450196,239.5490264892578,-0.880471408367157,-0.0002455839712638408,0.4740999937057495,-0.00013392482651397586,1.0000003576278687,0.00026928301667794585,-0.4740998446941376,0.00017360225319862366,-0.8804711103439331]},{\"before\":[1730.495361328125,7.565176486968994,199.5489044189453,-0.9981689453125,-0.0002455839712638408,0.060495052486658099,-0.00023463212710339576,1.0000003576278687,0.0001881408243207261,-0.060495078563690189,0.00017360225319862366,-0.9981684684753418],\"name\":\"BotSpawn5\",\"after\":[1730.495361328125,8.065174102783204,199.5489959716797,-0.9981689453125,-0.0002455839712638408,0.060495052486658099,-0.00023463212710339576,1.0000003576278687,0.0001881408243207261,-0.060495078563690189,0.00017360225319862366,-0.9981684684753418]},{\"before\":[1705.495361328125,7.557301044464111,209.5489044189453,-0.9363296031951904,-0.00024558400036767125,-0.3511236011981964,-0.0002909032627940178,1.0000004768371583,0.00007631848711753264,0.3511234521865845,0.00017360226775053889,-0.9363292455673218],\"name\":\"BotSpawn4\",\"after\":[1705.495361328125,8.05729866027832,209.5489959716797,-0.9363296031951904,-0.00024558400036767125,-0.3511236011981964,-0.0002909032627940178,1.0000004768371583,0.00007631848711753264,0.3511234521865845,0.00017360226775053889,-0.9363292455673218]},{\"before\":[1750.495361328125,7.569220542907715,204.5489044189453,-0.9305663108825684,-0.0002455839712638408,0.36612439155578616,-0.00016497210890520364,1.0000003576278687,0.00025146250845864415,-0.36612430214881899,0.00017360225319862366,-0.9305659532546997],\"name\":\"BotSpawn6\",\"after\":[1750.495361328125,8.069217681884766,204.5489959716797,-0.9305663108825684,-0.0002455839712638408,0.36612439155578616,-0.00016497210890520364,1.0000003576278687,0.00025146250845864415,-0.36612430214881899,0.00017360225319862366,-0.9305659532546997]},{\"before\":[1715.495361328125,7.568437099456787,159.5489044189453,-0.9946590662002564,-0.00024558400036767125,-0.10321935266256333,-0.000262191315414384,1.0000004768371583,0.0001473258889745921,0.10321928560733795,0.00017360226775053889,-0.9946585893630981],\"name\":\"BotSpawn7\",\"after\":[1715.495361328125,8.068434715270996,159.54896545410157,-0.9946590662002564,-0.00024558400036767125,-0.10321935266256333,-0.000262191315414384,1.0000004768371583,0.0001473258889745921,0.10321928560733795,0.00017360226775053889,-0.9946585893630981]},{\"before\":[1726.495361328125,7.5581183433532719,234.5489044189453,-1,-0.0002455839712638408,0,-0.0002455839712638408,1,0.0001736021658871323,0,0.00017360225319862366,-1],\"name\":\"BotSpawn2\",\"after\":[1726.495361328125,8.05811595916748,234.5490264892578,-1,-0.0002455839712638408,0,-0.0002455839712638408,1,0.0001736021658871323,0,0.00017360225319862366,-1]},{\"before\":[1712.495361328125,7.553812026977539,239.5489044189453,-0.880471408367157,-0.0002455839712638408,-0.4741000533103943,-0.0002985343453474343,1.0000003576278687,0.00003642036608653143,0.4740998446941376,0.00017360225319862366,-0.8804711103439331],\"name\":\"BotSpawn1\",\"after\":[1712.495361328125,8.053810119628907,239.5490264892578,-0.880471408367157,-0.0002455839712638408,-0.4741000533103943,-0.0002985343453474343,1.0000003576278687,0.00003642036608653143,0.4740998446941376,0.00017360225319862366,-0.8804711103439331]},{\"before\":[25,0.10000000149011612,-120,-0.9868499636650086,0,0.16163921356201173,0,1.0000001192092896,-0,-0.16163921356201173,0,-0.9868499636650086],\"name\":\"BotSpawn8\",\"after\":[1712.0001220703126,8.075840950012207,-200.00009155273438,-0.9868499636650086,0,0.16163921356201173,0,1.0000001192092896,0,-0.16163921356201173,0,-0.9868499636650086]}],\"spawns\":12}"}],"isError":false}
@@ -0,0 +1,36 @@
--!strict
-- Initial spawn is in the lobby; players who entered a portal respawn in the arena.
local Players = game:GetService("Players")
local ArenaSpawns = require(script.Parent:WaitForChild("ArenaSpawns"))
local lobbySpawn = workspace:WaitForChild("HunterLobby"):WaitForChild("Arrival Spawn") :: SpawnLocation
local function onCharacterAdded(player: Player, character: Model)
local root = character:WaitForChild("HumanoidRootPart", 10)
local humanoid = character:WaitForChild("Humanoid", 10)
if not root or not humanoid or not humanoid:IsA("Humanoid") or player.Character ~= character then return end
local inArena = player:GetAttribute("InArena") == true
local destination = if inArena then ArenaSpawns.choose(player) else lobbySpawn
player.RespawnLocation = destination
ArenaSpawns.place(character, destination)
if inArena then
local backpack = player:WaitForChild("Backpack", 5)
local tool = backpack and backpack:WaitForChild("SniperRifle", 5)
if tool and tool:IsA("Tool") and player.Character == character and humanoid.Health > 0 then
humanoid:EquipTool(tool)
end
else
humanoid:UnequipTools()
end
end
local function onPlayerAdded(player: Player)
player:SetAttribute("InArena", false)
player.RespawnLocation = lobbySpawn
player.CharacterAdded:Connect(function(character)
onCharacterAdded(player, character)
end)
if player.Character then task.spawn(onCharacterAdded, player, player.Character) end
end
Players.PlayerAdded:Connect(onPlayerAdded)
for _, player in Players:GetPlayers() do onPlayerAdded(player) end
@@ -0,0 +1,40 @@
--!strict
-- All lobby gateways lead to validated spawn points on the imported static arena.
local Players = game:GetService("Players")
local ArenaSpawns = require(script.Parent:WaitForChild("ArenaSpawns"))
local lobby = workspace:WaitForChild("HunterLobby")
local cooldown: {[Player]: boolean} = {}
local function teleport(hit: BasePart)
local character = hit:FindFirstAncestorOfClass("Model")
local player = character and Players:GetPlayerFromCharacter(character)
local humanoid = character and character:FindFirstChildOfClass("Humanoid")
if not player or not character or not humanoid or humanoid.Health <= 0 or cooldown[player] then return end
local destination = ArenaSpawns.choose(player)
cooldown[player] = true
player:SetAttribute("InArena", true)
player.RespawnLocation = destination
ArenaSpawns.place(character, destination)
local backpack = player:FindFirstChildOfClass("Backpack")
local tool = backpack and backpack:FindFirstChild("SniperRifle")
if tool and tool:IsA("Tool") then humanoid:EquipTool(tool) end
task.delay(1.5, function() cooldown[player] = nil end)
end
for _, name in {"Arena Gateway_001", "Training Gateway_001", "Duel Gateway_001"} do
local gateway = lobby:WaitForChild(name) :: Model
local cf, size = gateway:GetBoundingBox()
local trigger = Instance.new("Part")
trigger.Name = name .. " Teleport Trigger"
trigger.Size = Vector3.new(math.min(size.X - 4, 18), 5, math.min(size.Z - 4, 18))
trigger.CFrame = CFrame.new(cf.Position.X, 2.5, cf.Position.Z)
trigger.Transparency = 1
trigger.Anchored = true
trigger.CanCollide = false
trigger.CanQuery = false
trigger.CanTouch = true
trigger.Parent = gateway
trigger.Touched:Connect(teleport)
end
Players.PlayerRemoving:Connect(function(player) cooldown[player] = nil end)
+6
View File
@@ -0,0 +1,6 @@
[mcp_servers.Roblox_Studio]
command = "cmd.exe"
args = [
"/c",
'cd /d %LOCALAPPDATA%\Roblox && .\mcp.bat',
]
+100
View File
@@ -0,0 +1,100 @@
# Hunter compact context
## Current shape
Roblox hunter/shooter project. Main place: `Hunter.rbxl`. Gameplay and presentation logic is primarily in `scripts/`; weapon and first-person work includes sniper/rifle viewmodels, reloads, shots, sights, damage numbers, crosshair, kill feed, goggles, bots, and lighting.
## Working rules
- Keep server authority in `*.server.luau`; keep input/camera/UI in `*.client.luau`.
- Treat Blender files, GLB exports, textures, renders, and `.rbxl` as binary assets; inspect through the relevant app or previews.
- Prefer targeted changes and preserve existing working behavior.
- For scene modeling, textures are visual only; use mesh/collision-proxy geometry and run `blender/check_collisions.py` before export.
- Luau quality baseline: `--!strict`, server-authoritative remotes, finite/range/state validation, and cleanup of long-lived frame connections.
## Active decisions
- `Hunter.rbxl` runs one arena per server, `workspace.ProceduralArena` at (6500, 8, 0). The retired `HunterMonolithImport` model and its bot spawn markers are preserved in ServerStorage. Its runes remain available as generation templates. `scripts/procedural/BuildProceduralKit.luau` derives 11 native box templates, two ramp meshes and a three-part flank gate from the source dimensions and textures. `ProceduralArena.luau` assembles a floor of 84×98 cells (about 455×531 studs) before each round from three independent citadel profiles, three tunnel networks and three ramp patterns. Each category changes between consecutive rounds, and the last five combinations cannot repeat. Ground routes link two sheltered bases, four flank galleries and 14 ramps, with ten spawns per team.
- `ArenaModes.luau` routes the active procedural arena. The lobby directory opens team rosters with selectable columns. For local Connect, the server checks balance and capacity on the chosen side, reserves a seat and shows the confirmation for 1.05 seconds before deployment. After a 300-second round with an empty roster, the server immediately picks a different ruleset and regenerates the layout. Populated rounds retain results, voting and the winner reveal.
- `HostedArenaHud.client.luau` renders the right-side public arena directory, team details and the Create Arena button. `HostedArenaService.server.luau` manages same-server private invitations (35 seconds), a paginated public directory with team snapshots and Roblox reserved sessions. A public join carries the chosen side across the transfer. The destination checks balance again and leaves the player in the hosted lobby with a notice if the chosen team is unavailable. When the owner departs, ownership passes to the earliest remaining admitted player and the directory reflects the change. The last departure retires the session and removes its public entry. Verified in local Studio and with multiplayer fixtures for platform calls. Saved to Hunter.rbxl.
- Unpublished `Hunter.rbxl` previews public hosting on the existing procedural arena within the Studio session. Creation sets the card's owner and opens the existing team picker. The published path uses the Roblox memory stores and reserved server. Session registration retries transient failures and logs a specific cause before reporting a service error.
- The arena creator selects one of eight initial rulesets and can disable mode changes for public or private sessions. Reserved servers load these options before the first round. With changes disabled, populated rounds show results and skip the ballot, and empty rounds regenerate without changing the mode. With changes enabled, voting and empty-round rotation follow the existing rules. The local public preview uses the same options.
- `MatchRules.luau` lists Team Deathmatch, Hot Point, Three Points, Capture the Flag, Trophy Hunt, Citadel Siege, One Life and Hunt the Leader. `ArenaObjectives.luau` owns mode-specific wins, objective scores, tokens and flags, and uses `ArenaObjectiveSites.luau` for verified arena sites. `MatchVoteHud.client.luau` displays the previous round's ballot. Votes lock for the final three seconds. Ties draw among the leaders and empty ballots retain the rule. The server sends the winner for a three-second reveal before starting the next round. Participants with an accepted vote return to the same arena through the normal deployment path, keeping prior teams when balance permits.
- `ModeCard.luau` renders the eight ruleset voting cards and the compact illustrated arena cards in the lobby directory. The sidebar uses the current ruleset from the local match or public directory snapshot, shows the arena identity and occupancy, and fits the list height until it reaches the viewport limit. The art map links each `MatchRules` ID to an image owned by Axion Games Studio (779665335). The matching 4:3 PNGs are in `assets/mode-cards/`, based on the approved concept `renders/hunter-mode-cards-v1.png`.
- `HunterMonolithImport.ArenaRunes` holds 14 animated direction markers, six running jump runes and 20 pink-to-gold ramp strips. Jumps rise 48 studs while preserving horizontal velocity and normal steering. The simulation owner applies lift immediately, and the server validates the replicated activation effect. Uphill boosters raise speed by 48% for two seconds. Their chevrons glide along the ramp surface at 12 studs per second, fading before they loop back. `scripts/studio/BuildArenaRunes.luau` fits the editable strips to the collidable ramp faces.
- Each procedural layout contains 14 fitted booster strips and six jump runes leading toward the four flank galleries and two citadel balconies. The generator validates each footprint and publishes runes only with a valid layout. `ArenaMobility.luau` registers and removes them as the layout changes. Each mode retains its own triggers and cooldown lifecycle.
- Procedural kit v6 keeps the floor, navy and amber MaterialVariants at 5.419642 studs per cell. Native box faces start the texture at each face edge, including odd-cell widths and heights. Structural volume faces snap to the floor grid before routes and cover are validated. All orange ramps use six cells of rise, eight of run and ten along the slope. The archived model retains its imported textures.
- Ally kill counters sit 3 px beside the portrait with scaled text. Holding RMB interrupts the F inspect and blends into aim. V is lobby-only and arena entry locks the camera to first person.
- Ramp boosters play `BLD_MACH_RUSH` for the activating player at 80% playback speed. Jump runes play `Dash Wind Burst` for the jumping player. Both cues use local SoundService playback at .30 base volume and stop on leaving the arena.
- `ArenaMobilityScreen.luau` draws outward speed streaks on boost and rising violet sigils and sparks on local jump activation. It dims the overlays when aiming. The rifle's camera adds a smoothed 6° hip-fire FOV increase during a boost and blends into the usual scope FOV.
- `SniperShots.server.luau` owns rifle damage and uses `ShotHistory.luau` to test up to 240 ms of server-recorded poses against solid geometry and current cover. A fresh peek across an occluded sightline has a short, bounded defender grace based on measured ping. The client confirms hit feedback only from the server.
- `RifleSpray.luau` defines four exact shots followed by a fixed upward, left and right sweep at one third of the configured angular amplitude. The default burst reset is 0.4 seconds. Shot tuning retains the existing spread attributes for spray growth, recovery and ADS scaling. The shared visual tracer travels at 800 studs/s.
- Author Hunter UI with the designed desktop composition and editable artwork from `ReplicatedStorage.HunterUI.Elements`. New buttons use Normal, Hover and Pressed, player rows highlight on hover, and progress lines animate. Dedicated phone layouts are deferred.
- The HUD puts timer, scores and ally portraits at upper left, a double animated streak arc near the crosshair, HP at lower left, and skin, wallet and ammo at lower right. Six HUD plates use animated contour lightning. Key 1 operates the rifle with the default backpack hidden.
- During active arena play, the upper-left HUD shows the current ruleset and its instructions from `MatchRules.luau` below the timer. Live objective status or a personal flag, token or leader notice appears beneath the instructions.
- Clients in an arena see a large red countdown at top center for the match's final five seconds. `ArenaRoundHud.client.luau` uses that mode's server deadline and plays one local Timer Tick cue (113416294133952) per digit through `SniperEffects.luau`.
- On the arena, `ArenaAtmosphere.client.luau` blends in the blue-hour profile. The place's 26 existing route lights use cyan, amber, violet and mint accents. Lobby values return on leaving the arena and the grade yields to goggles.
- In combat, E cycles six rifle skins and shows the selected name above the wallet. `ArenaRounds` validates requests and retains the choice through respawns and rounds within the session. The five extra skins are defined in `RifleSkinCatalog.luau` and `RifleSkinVariants.luau`.
- The arena rifle defaults to `Skin="BlueFlame"`. On equipped copies, `RifleSkin.luau` gives the rifle pearl-white panels, a shifting cobalt body, and cyan flames and glints flowing toward the stock. A shot briefly brightens the effect; aiming reduces the flames while the colors keep shifting.
- The arena wallet stays at the lower right above ammo. Its rotating 3D gold H coin also appears in pickup flights, with a glint on arrival. Each collected coin adds its own value when it lands. The lobby shows the server balance.
- Each PvP elimination also drops one randomly selected power sphere from `PowerUpCatalog.luau`. Client models have 15 distinct colors and icons, orbiting stars, a vertical beam, and a 60-second countdown. The server selects the nearest living arena player within 12 studs with clear sight, grants the effect on arrival, and sends a single pickup cue using `Level_up`. Spheres clear on expiration and round end. Coins and power spheres share `LootMagnet.luau`; the ammo sphere tops up the rifle's current magazine.
- Future non-coin drops will use the existing `magic sound 1` pickup sound (`rbxassetid://117243786893013`). Coins have their own pickup and 80% cues.
- Arena PvP kills refresh the gold arcs near the crosshair for 13 seconds and update the multiplier. The multiplier resets on death or lobby return. Every confirmed hit plays `hitmarker_2`. Criticals add `Magic Hit` at 0.2 base volume, and every increase in streak (including ×1) plays `Level_up`.
- «Трофеи» use gold H coins. PvP kills spawn 10–20 coins worth 10–15 each, with world labels. The killer can attract each coin within 12 studs with a clear path. Credits and `MoneyCollect1` occur per arrival; `CupidKnife` plays at `ceil(0.8 × coin count)` once per drop. Unclaimed coins expire after 16 seconds or at round end. `TrophyWallet.luau` persists collected amounts in the published experience; plain Studio sessions are in memory.
- Death disables weapon input and rendering immediately. The server rejects shots and reloads from dead characters. The local death screen covers the frozen camera until it follows the new living character; the original three-second respawn delay remains.
- Hunter's match HUD uses compact team score panels and a row of teammate portraits. The team picker keeps both actions visible while its rosters scroll on smaller screens. Buttons animate on hover, focus and press; the picker fades/scales in and score changes pulse.
- Lobby inventory is blocked on the server and the default hotbar is hidden there. HP and crosshair show only in the arena, while the lobby uses a visible free cursor and defaults to third person. Combat defaults to first person with its cursor hidden; the Studio P tuner can still show a cursor.
- The team picker shows Roblox headshots. The match HUD shows timer, both team scores and personal kill counts for the local team. Only confirmed PvP kills earn points; team scores remain visible until the next round starts. Verified with three clients in Studio.
- Holding Tab shows the Hunter scoreboard. Releasing it or switching window focus closes the live view. The scoreboard reuses the results layout to show live scores, avatars, kills and deaths for both teams in the player's match or selected lobby mode. The final results replace the live view at round end and use their own deadline.
- The lobby button opens a live team picker. `ArenaRounds.server.luau` runs 300-second Blue/Orange rounds and 15-second breaks, caps each side at 10, limits the count difference to one, and rebalances after departures. At round end it snapshots each team's score, players, kills and deaths before sending them back to the lobby without rifles. `ArenaRoundHud.client.luau` presents those results to the match participants until the server's next-round deadline. Rifle template lives in `ReplicatedStorage.ArenaEquipment`. The old lobby gateways are archived in `ServerStorage.RetiredLobbyGateways`.
- `PlayerOcclusionOutlines.client.luau` draws unfilled outlines behind cover and colored overhead health bars for visible players in the same arena match. Roblox Teams determine green allies and red rivals. `ArenaRounds.server.luau` supplies the authoritative health fraction on each character. Verified with two Studio clients and saved to local Hunter.rbxl.
- The Studio P panel's Movement tab now adjusts base player speed and world gravity live. `MovementTuning.server.luau` scales the configured jump height with gravity, and aiming uses the updated base speed. The selected speed 36.2 and gravity 155 were saved to the SniperViewmodel attributes in local Hunter.rbxl. Automatic transfer from Play to Edit via the existing ViewmodelTuneSaver plugin was not observed in this Studio session.
- The local `Hunter.rbxl` uses the imported static arena. `HunterMonolithImport.PlayerSpawns` contains eight courtyard and four gallery SpawnLocations. Initial spawn is unarmed in the lobby. Team members respawn in the arena during a round. Eight target bots spawn on the arena.
- Import completed in place 127514573501219: Workspace.HunterMonolithImport, source origin (1600,8,0), footprint896x896. Asset94623364447810 uploaded once to group779665335; automatic textures137719708984464/82420782531753/76473273465933. All176 meshes anchored/textured;74 gate colliders,26 SpotLights;12 gate passages and20 ramps passed targeted collision ray checks. Place not published. Package remains linked; repairs are local to this instance, rerun SetupImport on fresh import/update. Full result: `3D models/game_zone/Roblox_Import/studio_import_result.json`.
- Import package: `3D models/game_zone/Roblox_Import/Hunter_Monolith_Arena.glb` (13,576,976 bytes), 176 meshes, 3 embedded 2048 maps, 18,580 triangles; maximum 448 per mesh. Active-scene export fixed two foreign objects. GLB round-trip passed (250.88x250.88x33.6 m). SetupImport.luau restores 896-stud scale, anchoring, 74 gate collider boxes and 26 SpotLights. 203 intentional contacts classified in manifest.json.
- Arena lighting: `blender/add_arena_lighting.py`, called by the monolith builder, adds 42 substantial fixtures/markers and 26 local lights: cyan north/center, amber south, violet west/middle gallery, mint east. Uses scene lights in Blender material preview; screenshots only. Roblox light conversion/performance remains unverified.
- Central citadel now has three playable levels at 0/48/96 studs. Wide side decks preserve middle-gallery access beside two offset solid ramps to the top. Map now has 108 architecture meshes and 20 ramps; screenshot `renders/monolith_three_levels_screenshot.png`.
- User requires viewport screenshots only; do not generate renders. Geometry must look monolithic, with no thin surfaces; minimum 2-stud thickness. Modular block sizing uses an 8-stud step; ramps are solid right-triangular prisms.
- Current redesign: `blender/build_monolith_arena.py` creates `3D models/game_zone/Hunter_Monolith_Arena.blend`: 896x896, 105 solids, levels 0/24/40/48, central passages, outer galleries, four corner courts and 18 ramps. `blender/build_hd_grid_textures.py` supplies 2048x2048 maps with 8-stud cells (512px/cell) and face-space UVs including slopes. Previous pencil arena layout was rejected. Blender visual review only; Roblox import/playtest remains outstanding.
- Use this file plus `tasks.md` as the first-read context.
- Add durable discoveries here; do not turn this into a dump of implementation details.
## Entry points
- Weapons: `scripts/ThirdPersonRifle*`, `Sniper*`, `RifleSights.server.luau`, `EquipRifle.server.luau`.
- Combat feedback: `DamageNumbers.client.luau`, `KillFeed.client.luau`, `Crosshair.client.luau`.
- World/test: `TargetBots.server.luau`, `NightLighting.server.luau`.
- Asset automation: `blender/` scripts, especially build/export helpers.
- Collision validation: `blender/check_collisions.py`.
- Luau quality guidance: `C:\Users\Alex\.codex\skills\roblox-hunter-workflow\references\roblox-quality.md`.
- Spawn flow: `scripts/ArenaRounds.server.luau` handles lobby arrival, team selection and respawn via `scripts/ArenaSpawns.luau`. `scripts/ArenaRoundHud.client.luau` builds the team lists and timer. `scripts/studio/SetupStaticArenaSpawns.luau` places markers for a fresh import.
- Current Blender map: `blender/build_pencil_arena.py` builds `3D models/game_zone/Hunter_Pencil_Arena.blend` and overview/player renders in `renders/`. It is a separate 520x520 arena with imperfect hand-drawn grid textures, ground bypasses, connected elevated decks, bridges and four ramps. The user explicitly rejected the house approach; do not use `build_house_prototype.py` as the new map basis.
+136
View File
@@ -0,0 +1,136 @@
# Hunter task board
## Now
- [ ] [ui/runtime] Enlarge Hot Point, add a rising magic ring and shared capture HUD, and verify capture timing, damage, death, and scoring.
- [x] [ui/runtime] Configure the starting ruleset and mode changes when creating a public or private arena. Verified all eight creator cards, real Studio entry in the selected mode, private and public registry handoff with test doubles, a winning vote with switching enabled, and stable rules across populated and empty rounds with switching disabled. Saved locally.
- [x] [runtime/ui] Recover public arena creation in an unpublished Studio file. Real clicks opened team selection and deployed the creator. Two local clients verified the shared card and owner transfer. A simulated cloud registry verified a denied write and retry on a transient failure before teleport. Saved locally.
- [x] [ui] Show the active mode and objective below the arena timer. Verified normal arena entry, all eight HUD states and separate live status with replicated values in Studio. Hidden in the lobby and between rounds. Saved locally.
- [x] [ui/runtime] Make both team columns selectable with hover, press and selected feedback. Studio verified clicks and deployment to the chosen team. Three-client tests verified team balance, the public transfer payload and the destination's recheck with a mocked registry and teleport. Saved locally.
- [x] [ui/runtime] Reveal the server-assigned team in the arena details dialog before entering the match. Studio confirmed the animated column, opposite-side dimming, and deployment after 1.05 seconds. A three-client test verified balanced parallel bookings, correct assigned sides, duplicate suppression and a join at the round deadline. Saved locally.
- [x] [runtime] Run only the dynamic arena and archive the retired map intact in ServerStorage. Studio verified 1,918 archived descendants, 20 active spawns and 20 mobility runes, two empty round rotations, and voting after a populated round. Three-client tests for both hosted access types confirmed persistent owner transfer and empty-session cleanup, including a transient removal retry. The tests used a mock session registry.
- [x] [ui] Show public arenas as illustrated mode cards in the right lobby column. Studio verified both standard arenas updated their artwork on a ruleset change, plus scrolling, occupancy and opening team details for a hosted listing supplied by a temporary fixture. Saved to local Hunter.rbxl.
- [x] [runtime/ui] Create public and private arenas from the right-side lobby directory. Verified the team details dialog, close and standard arena entry in Studio, the creator's loaded avatar, invite acceptance and decline, public listings and team payloads in a four-client test, and reserved admission with two approved players and one denied player. Studio used test doubles for TeleportService and MemoryStore. Live platform travel still needs validation on the published place.
- [x] [runtime] Return prior participants with an accepted ballot to the same arena after the reveal. A three-client Studio test verified two teammates returned, split 1–1, and spawned equipped in a regenerated procedural arena in One Life. The abstaining player stayed in the lobby.
- [x] [ui] Lock voting for the last three seconds, mute the cards, and animate the server-selected winner into the center. Studio verified an accepted vote change, rejection of a late request, the reveal animation, and fallback to the existing rule when no vote was accepted.
- [x] [ui] Connect all eight mode illustrations uploaded by the user as Axion Games Studio (779665335). Matched the IDs to the asset names, confirmed all eight loaded in the ballot, and verified that the lobby switched to the correct illustration when the ruleset changed. Saved to local Hunter.rbxl.
- [x] [ui] Build a shared mode card for the four-column ballot and the lobby. Prepared eight separate 1448×1086 PNGs. A Studio client confirmed all eight slots, vote counts, selection, hover and press states, and the lobby card updating after the ballot closed. Saved to local Hunter.rbxl.
- [x] [runtime] Add all eight match rules and a post-results vote in both arenas. Verified each rule on both maps, objective sites across 80 generated layouts, independent elections with three clients, live flag and hot-point scoring, and early One Life results with two clients.
- [x] [world] Anchor procedural rectangular surface textures at their face edges. Verified the former half-cell shift in a face-on comparison, the corrected arena preview, 107 seeds across all 27 profiles, and live routes through the flank gate and to the roof from both bases.
- [x] [world] Align procedural arena volumes and textures to the floor cells and use amber on every ramp. Verified 80 seeds across all 27 profiles, all 14 ramp shapes and colors, both walkable roof routes, an uphill boost and a flank jump in Studio.
- [x] [world] Keep the original floor's 5.42-stud square grid on resized procedural walls, covers, decks and ramp faces. Verified face-on and scene screenshots, 80 seeds across all 27 combinations and correct materials on a live regenerated arena.
- [x] [world] Add 14 uphill boosters and six running jump runes to the procedural arena. Studio verified 106 seeds across all 27 combinations, uphill-only boosting, a live jump onto a flank roof, both arena modes and working runes after replacement.
- [x] [ui] Show the live scoreboard for both teams while Tab is held. Studio verified hold and release in the lobby and combat, including release after the automatic final results appeared. Three earlier clients verified live stats and mode isolation.
- [x] [ui] Show both final team rosters, scores, kills and deaths during the 15-second intermission. Three Studio clients confirmed fixed snapshots, death counts, separate mode results, automatic dismissal and lobby return. Verified the final layout in a Studio screenshot.
- [x] [ui] Add a red animated round-end countdown. Two Studio clients in separate modes each displayed 5–1, played exactly five audible cues and cleared the overlay on returning to the lobby.
- [x] [world] Assemble varying citadel sections, tunnel mouths and ramp layouts at every procedural round. Studio validated 156 seeds covering all 27 combinations, 18 successive generations without recent repeats, and five live rounds with walkable roof and tunnel routes and an independent classic timer.
- [x] [ui] Show red enemy and green ally health bars in both arena modes. Two-client Studio test verified damage, healing, max HP changes, cover, mode isolation, death and lobby visibility.
- [x] [world] Rebuild the random arena with the reference citadel and covered flanks. Verified 48 seeded layouts, paths to the roof from both bases in both layouts, and live round rollover that replaced the previous layout, returned the player to the lobby and preserved the classic timer. Saved to Hunter.rbxl.
- [x] [world] Add the separate procedural mode inside Hunter.rbxl. Verified 64 seeds, walks between both bases and up to the central gallery, team entry and respawn, loot isolation, and layout replacement at the next round while the classic match continues. The original arena's geometry signature matches.
- [x] [runtime] Make rifle shots 1–4 exact, add a learnable spray pattern and double tracer speed. Two 15-shot Studio bursts matched all server-confirmed impact positions and reset after the pause. Verified roughly 800 studs/s tracer playback and saved the place.
- [x] [world] Add distinct magic spheres for 15 kill-drop boosts, with icon, stars, beam, 60-second timer, coin-style attraction, and confirmed Level_up cue. Studio verified all visuals and expiration, one healed pickup with a single cue, and targeted movement, shield, reload, and coin effects.
- [x] [ui] Add screen-space speed trails to boosters and rising magic to jump runes. Studio verified both real activations, a 6° running FOV increase, stable scoped FOV, and clearing the overlay when leaving the arena. Saved to the local place.
- [ ] [runtime] Add a local hurt sound and eight-direction segmented damage display. Verify confirmed victim feedback, screen direction, and fade in Studio.
- [x] [world] Replace guided flights with running hops and add animated uphill chevrons to 20 ramps. Studio verified unchanged horizontal speed on launch from three directions, no hop at rest, and 48% acceleration uphill on four ramp types with no boost downhill. Saved to the local place.
- [x] [world] Add animated route runes, speed pads, and jump platforms. Studio playtest verified 14 direction markers, six 48% speed boosts for two seconds, and successful landings for all six jumps. Saved to the local place.
- [x] [runtime] Compact ally kill badges. Verified the 3 px portrait gap and fit with three digits. Real input in Studio confirmed F to RMB opens Scope without resuming the inspection, and V switches camera only in the lobby.
- [x] [runtime] Synchronize rifle hits with bounded server pose history, live cover checks, and short peek grace. Two-client tests passed on LAN and at about 133 ms measured RTT. Verified rewind, gear exclusion, protection, wall blocking, and a 52 ms LAN fresh-peek grace.
- [x] [scene] Add an arena-only dusk profile and tune 26 route lights. Verified the blue-hour profile, visibility, goggles compatibility, and restoration of daytime values on return to lobby state.
- [x] [ui] Show a rotating 3D trophy coin and a glint in the wallet and pickup flights. Verified live rotation, sparkle, and balance increment only when the coin arrives in desktop Studio.
- [x] [ui] Implement the approved desktop Hunter HUD with 15 editable components and matching proportions. Verified two animated streak arcs, angled counters, six moving lightning outlines, button states, roster hover, and weapon key 1 without the default backpack slot.
- [x] [runtime] Cycle six rifle skins with E. Verified all five new animations, names, aiming, and wraparound using real keys in Studio. Two-client test verified replicated effects, player isolation, respawn, and lobby rejection.
- [x] [runtime] Rework Blue Flame using the 01:01 video reference. Verified pearl-white armor, a shifting cobalt body, moving cyan fire and glints, a real shot pulse, and reduced effects while aiming. Checked both camera modes and captured the inspect pose in Studio.
- [x] [runtime] Replace dark rifle body materials on Blue Flame and animate blue-to-cyan heat across the visible panels. Verified live panel color changes and flame motion in both views, including inspect and reduced flames while aiming.
- [x] [runtime] Add the Blue Flame rifle skin. Verified moving flame tips and particles in both views, reduced effects while aiming, and cleanup on death and restoration on respawn. Checked the inspect pose in Studio.
- [x] [runtime] Keep the combat wallet visible above ammo and fly each collected coin into it. Verified 15 arrivals and 15 balance increments totaling 186, plus simulated late savings and lobby return during flight.
- [x] [runtime] Value-labeled gold coin drops of 10–20, each worth 10–15 Trophies. Verified labels, partial collection, exact animated total, MoneyCollect1 on each coin and CupidKnife once at the 80% threshold in a two-client playtest.
- [x] [runtime] Drop five gold trophies on PvP kills and collect by proximity. Two-client test verified owner-only drop, no pickup at distance or through walls, pickup sound and exactly +5. Checked the coin models in the arena viewport.
- [x] [runtime] Add gold streak meter and arcade cues. Verified all five sounds load and play, and two-client hit, critical, round kill, streak, reload, meter expiry and death behavior.
- [x] [runtime] Add gold Trophies currency in lobby, with +5 per confirmed PvP kill. Verified HUD and two-client rewards, bot exclusion, and idempotent save retry with an in-memory store. Live DataStore was not exercised.
- [x] [runtime] Block post-death weapon use and camera view — verified live shots, an opaque death screen, server rejection with a rifle still on the corpse, and restored camera/weapon after respawn.
- [x] [runtime] Restyle and animate the HUD and team picker. Verified desktop hover, press, menu and score feedback, plus readable picker in the portrait iPhone simulator.
- [x] [runtime] Hide HP and prevent weapon equip in the lobby, with a free cursor in lobby and hidden cursor in regular combat. Verified inventory guards, key 1, arena HUD, and round return in Studio.
- [x] [runtime] Add Roblox portraits to team selection and match HUD with ally kill counts — verified portraits in Studio, plus a three-client test of live rosters, PvP scoring, ally stats, bot exclusion and round reset.
- [x] [runtime] Replace lobby gateways with a balanced team picker and continuous 300-second rounds with 10-second breaks. Verified click-to-join, respawn and production settings, plus three-client roster updates, rejection, departure rebalance and full round transition using a shortened test timer.
- [x] [runtime] Show outlines only through cover — two-client Studio test passed neutral, allied and opposing colors, clear and partial visibility, invisible helpers, arena passage colliders, and eliminated players.
- [x] [runtime] Add speed and gravity to the P panel's Movement tab — verified inputs, server values, a higher jump at reduced gravity, and saved values after restarting Studio Play.
- [x] [runtime] Replace procedural generation with 12 static arena SpawnLocations — verified unarmed lobby entry, portal travel, arena respawn and eight target bots in Studio. Saved to local Hunter.rbxl.
- [x] [world] Import Monolith arena into Studio — 176 meshes/3 textures, correct896x896 footprint, anchoring,74 gate colliders and26 lights;12 gates/20 ramps passed ray checks.
- [ ] [world] Test full arena traversal and runtime lighting performance when requested.
## Done / durable notes
- Project context is centralized in `.codex/context.md`.
- Skill: `roblox-hunter-workflow`.
- Collision-safe modeling workflow and pre-export checker are integrated.
- Selected guidance from `roblox-dev-0.1.0-v1` is integrated: strict Luau, remote security, performance, testing/review.
## Task format
`- [ ] [area] goal — acceptance check`
- [x] [runtime] Remove startup menu and restore lobby spawn — playtest shows no menu and player appears at HunterLobby.Arrival Spawn.
- [x] [runtime] Keep lobby players unarmed — playtest shows third-person-capable default camera and SniperRifle remains in Backpack.
- [x] [runtime] Hide lobby crosshair and restore camera toggle — playtest hides Crosshair and V switches to Classic third-person camera.
- [x] [runtime] Add lobby portal travel — playtest moves a player from a gateway to GameZone and equips SniperRifle.
- [x] [world] Assemble GameZone from prepared connected prefabs — playtest reports 5 templates, 49 grid tiles, connector metadata, buildings, courtyards, roads and ramps.
- [x] [world] Create hand-drawn textured arena — Studio playtest shows the 300x300 map with paper palette, grid walls, pencil outlines, and 49 connected prefabs.
- [x] [world] Fix arena floor overlap and add visible architecture — Studio shows no shared floor slab, 22 houses, trees, lamps, and a roof access ramp.
- [x] [world] Build a detailed Blender house prototype — true door/window openings, furnished rooms, second floor, and a supported stair that reaches the roof terrace.
- [x] [world] Build an independent 520x520 pencil-textured Blender arena — ground bypasses, connected elevated bridges, four attached ramps, and overview/player renders.
- [x] [world] Separate lobby audio and generate unique 300x300 game zone — playtest confirms generated buildings/ramps/passages, synchronized bots, and 120-stud combat audio falloff.
- [ ] [runtime] Complete Citadel Assault — verify two 150-second attacks, swap, role spawns, capture reasons, results, disconnected-team handling and mobile effects in a multiplayer playtest.
- [ ] [runtime] End Citadel Assault on the final capture and show each participant their animated outcome.
+9
View File
@@ -0,0 +1,9 @@
# Compact workflow
1. Read `context.md` and the relevant task.
2. Locate symbols with `rg`.
3. Read only the smallest relevant files.
4. Edit and validate the focused path.
5. Update task status and durable context.
Use `C:\Users\Alex\.codex\skills\roblox-hunter-workflow\scripts\build_context.ps1` to print a bounded context packet for a task.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,27 @@
# Hunter Monolith — импорт в Roblox Studio
Основной файл: Hunter_Monolith_Arena.glb.
Размер готовой карты: 896 × 896 студов; уровни центра: 0 / 48 / 96.
Экспорт: 176 отдельных мешей, 18 580 треугольников суммарно, максимум 448 в одном меше.
Три PNG 2048×2048 встроены в GLB и дополнительно лежат в textures/.
1. Импортируйте GLB как один Model, сохраняя названия отдельных мешей и их взаимное положение.
2. Выделите импортированный Model. Выполните содержимое SetupImport.luau в Command Bar в режиме Edit.
3. Скрипт приводит модель к исходному размеру, закрепляет детали, создаёт 74 простых коллайдера для проёмов, восстанавливает Neon и 26 SpotLight.
4. Сохраните проект после проверки внешнего вида и проходов в Play. Скрипт не публикует проект и не заменяет лобби.
Масштаб и оси:
- Файл GLB записан в метрах: 1 студ = 0.28 м.
- Blender (x,y,z) соответствует Roblox (x,z,-y).
- SetupImport вычисляет фактический масштаб по четырём внешним стенам и сохраняет выбранное при импорте положение/поворот модели.
Проверки:
- Геометрия замкнута; модификаторы применены только на временных копиях.
- В GLB нет камер, Blender-света или объектов посторонних сцен.
- collision_check.txt содержит исходный отчёт пересечений. FAIL в нём означает найденные контакты, а не неразобранную ошибку: все 203 контакта классифицированы в manifest.json (стыки несущей геометрии, опоры трапов, крепления светильников).
- manifest.json: список мешей, треугольников, коллайдеров, цветов и источников света.
- Сквозные проёмы используют отдельные коллайдеры, чтобы выпуклая оболочка MeshPart не перекрывала дверные проёмы.
- Работоспособность в Studio проверяется после фактического импорта. Настройка глобального Lighting и замена действующей игровой зоны в этот пакет не входят.
Ограничение: Blender AreaLight переносится как Roblox SpotLight; распределение света может визуально отличаться.
@@ -0,0 +1,91 @@
-- Run in Studio Command Bar with the imported Model selected.
-- Does not publish, replace the lobby, or change global Lighting.
local Data = game:GetService("HttpService"):JSONDecode([==[{"meshes":[{"id":"A0001","source":"Central citadel | four ground entrances.003","shape":"gate","neon":false,"color":[0.373427,0.449204,0.537099],"colliders":[{"position":[-32,12,32],"size":[32,24,32]},{"position":[-32,36,32],"size":[32,24,32]},{"position":[-32,36,10.46154],"size":[32,24,11.076919555664062]},{"position":[-32,36,0],"size":[32,24,9.846159934997559]},{"position":[-32,36,-10.46154],"size":[32,24,11.076919555664062]},{"position":[-32,12,-32],"size":[32,24,32]},{"position":[-32,36,-32],"size":[32,24,32]},{"position":[0,36,32],"size":[32,24,32]},{"position":[0,36,10.46154],"size":[32,24,11.076919555664062]},{"position":[0,36,0],"size":[32,24,9.846159934997559]},{"position":[0,36,-10.46154],"size":[32,24,11.076919555664062]},{"position":[0,36,-32],"size":[32,24,32]},{"position":[32,12,32],"size":[32,24,32]},{"position":[32,36,32],"size":[32,24,32]},{"position":[32,36,10.46154],"size":[32,24,11.076919555664062]},{"position":[32,36,0],"size":[32,24,9.846159934997559]},{"position":[32,36,-10.46154],"size":[32,24,11.076919555664062]},{"position":[32,12,-32],"size":[32,24,32]},{"position":[32,36,-32],"size":[32,24,32]}]},{"id":"A0002","source":"Citadel | east ascent to third level","shape":"wedge","neon":false,"color":[1,0.779706,0.234795],"colliders":[]},{"id":"A0003","source":"Citadel | middle gallery and third floor","shape":"gate","neon":false,"color":[0.373427,0.449204,0.537099],"colliders":[{"position":[0,60,32],"size":[96,24,32]},{"position":[0,84,32],"size":[96,24,32]},{"position":[0,84,0],"size":[96,24,32]},{"position":[0,60,-32],"size":[96,24,32]},{"position":[0,84,-32],"size":[96,24,32]}]},{"id":"A0004","source":"Citadel | third level cover","shape":"box","neon":false,"color":[1,0.779706,0.234795],"colliders":[]},{"id":"A0005","source":"Citadel | third level parapet","shape":"box","neon":false,"color":[0.373427,0.449204,0.537099],"colliders":[]},{"id":"A0006","source":"Citadel | third level parapet.001","shape":"box","neon":false,"color":[0.373427,0.449204,0.537099],"colliders":[]},{"id":"A0007","source":"Citadel | west ascent to third level","shape":"wedge","neon":false,"color":[1,0.779706,0.234795],"colliders":[]},{"id":"A0008","source":"Corner fort inward access.008","shape":"wedge","neon":false,"color":[1,0.779706,0.234795],"colliders":[]},{"id":"A0009","source":"Corner fort inward access.009","shape":"wedge","neon":false,"color":[1,0.779706,0.234795],"colliders":[]},{"id":"A0010","source":"Corner fort inward access.010","shape":"wedge","neon":false,"color":[1,0.779706,0.234795],"colliders":[]},{"id":"A0011","source":"Corner fort inward access.011","shape":"wedge","neon":false,"color":[1,0.779706,0.234795],"colliders":[]},{"id":"A0012","source":"Corner fort top cover.008","shape":"box","neon":false,"color":[1,0.779706,0.234795],"colliders":[]},{"id":"A0013","source":"Corner fort top cover.009","shape":"box","neon":false,"color":[1,0.779706,0.234795],"colliders":[]},{"id":"A0014","source":"Corner fort top cover.010","shape":"box","neon":false,"color":[1,0.779706,0.234795],"colliders":[]},{"id":"A0015","source":"Corner fort top cover.011","shape":"box","neon":false,"color":[1,0.779706,0.234795],"colliders":[]},{"id":"A0016","source":"Corner fort.008","shape":"gate","neon":false,"color":[0.373427,0.449204,0.537099],"colliders":[{"position":[-336,12,304],"size":[32,24,96]},{"position":[-336,32,304],"size":[32,16,96]},{"position":[-304,32,304],"size":[32,16,96]},{"position":[-272,12,304],"size":[32,24,96]},{"position":[-272,32,304],"size":[32,16,96]}]},{"id":"A0017","source":"Corner fort.009","shape":"gate","neon":false,"color":[0.373427,0.449204,0.537099],"colliders":[{"position":[-336,12,-304],"size":[32,24,96]},{"position":[-336,32,-304],"size":[32,16,96]},{"position":[-304,32,-304],"size":[32,16,96]},{"position":[-272,12,-304],"size":[32,24,96]},{"position":[-272,32,-304],"size":[32,16,96]}]},{"id":"A0018","source":"Corner fort.010","shape":"gate","neon":false,"color":[0.373427,0.449204,0.537099],"colliders":[{"position":[272,12,304],"size":[32,24,96]},{"position":[272,32,304],"size":[32,16,96]},{"position":[304,32,304],"size":[32,16,96]},{"position":[336,12,304],"size":[32,24,96]},{"position":[336,32,304],"size":[32,16,96]}]},{"id":"A0019","source":"Corner fort.011","shape":"gate","neon":false,"color":[0.373427,0.449204,0.537099],"colliders":[{"position":[272,12,-304],"size":[32,24,96]},{"position":[272,32,-304],"size":[32,16,96]},{"position":[304,32,-304],"size":[32,16,96]},{"position":[336,12,-304],"size":[32,24,96]},{"position":[336,32,-304],"size":[32,16,96]}]},{"id":"A0020","source":"District corner screen.008","shape":"box","neon":false,"color":[0.373427,0.449204,0.537099],"colliders":[]},{"id":"A0021","source":"District corner screen.009","shape":"box","neon":false,"color":[0.373427,0.449204,0.537099],"colliders":[]},{"id":"A0022","source":"District corner screen.010","shape":"box","neon":false,"color":[0.373427,0.449204,0.Line truncated
local selection = game:GetService("Selection"):Get()
local model = workspace:FindFirstChild("HunterMonolithImport") or selection[1]
assert(model and model:IsA("Model"), "Select the imported Hunter Monolith Model first")
local parts = {}
for _, p in model:GetDescendants() do
if p:IsA("MeshPart") then
local id = string.match(p.Name, "([AL]%d%d%d%d)")
if id then assert(not parts[id], "Duplicate mesh ID "..id); parts[id] = p end
end
end
local function sourcePart(prefix)
for _, d in Data.meshes do
if string.sub(d.source, 1, #prefix)==prefix then return assert(parts[d.id], "Missing "..d.id) end
end
error("Missing source anchor "..prefix)
end
for _,d in Data.meshes do assert(parts[d.id], "Import is incomplete: "..d.id) end
local east,west = sourcePart("East enclosure"),sourcePart("West enclosure")
local north,south = sourcePart("North enclosure"),sourcePart("South enclosure")
local foundation=sourcePart("Foundation")
local scale=(east.Position-west.Position).Magnitude/880
assert(scale>0,"Invalid imported size")
model:ScaleTo(model:GetScale()/scale)
local right=(east.Position-west.Position).Unit
local back=(south.Position-north.Position).Unit
local up=back:Cross(right).Unit
assert(up:Dot(Vector3.yAxis)>.98,"Model is not upright: correct import axis before setup")
local frame=CFrame.fromMatrix(foundation.Position+up*4,right,up,back)
local function vec(t) return Vector3.new(t[1],t[2],t[3]) end
local function color(t) return Color3.new(t[1],t[2],t[3]) end
local previous=model:FindFirstChild("HunterImportSetup")
if previous then
assert(previous:GetAttribute("GeneratedByHunterImport"),"Unexpected existing setup container")
previous:Destroy()
end
local setup=Instance.new("Folder")
setup.Name="HunterImportSetup";setup:SetAttribute("GeneratedByHunterImport",true)
setup.Parent=model
local collisions=Instance.new("Folder");collisions.Name="PassageCollisions";collisions.Parent=setup
local lamps=Instance.new("Folder");lamps.Name="ColoredLights";lamps.Parent=setup
local missingTextures={}
local collisionCount=0
for index,d in Data.meshes do
local p=parts[d.id]
p.Anchored=true;p.CanTouch=false
p:SetAttribute("HunterSourceId",d.id)
p.CanCollide=d.shape=="box" or d.shape=="wedge"
p.CanQuery=p.CanCollide
if p.CanCollide then p.CollisionFidelity=Enum.CollisionFidelity.Hull end
local sa=p:FindFirstChildWhichIsA("SurfaceAppearance")
local textured=(p.TextureID~="") or (sa and sa.ColorMap~="")
if d.shape=="decor" then
p.Color=color(d.color)
if d.neon then p.Material=Enum.Material.Neon else p.Material=Enum.Material.SmoothPlastic end
elseif textured then
p.Color=Color3.new(1,1,1)
else
table.insert(missingTextures,d.id)
end
for _,b in d.colliders do
local c=Instance.new("Part");c.Name=d.id.."_Collision"
c.Size=vec(b.size);c.CFrame=frame*CFrame.new(vec(b.position))
c.Anchored=true;c.Transparency=1;c.CanCollide=true;c.CanQuery=true;c.CanTouch=false
c.Parent=collisions;collisionCount+=1
end
if index%40==0 then task.wait() end
end
for _,d in Data.lights do
local p=Instance.new("Part");p.Name=d.name
p.Size=Vector3.new(2,2,2);p.Transparency=1;p.Anchored=true
p.CanCollide=false;p.CanTouch=false;p.CanQuery=false
local pos=frame:PointToWorldSpace(vec(d.position))
local dir=frame:VectorToWorldSpace(vec(d.direction))
local stableUp=math.abs(dir:Dot(Vector3.yAxis))>.99 and Vector3.xAxis or Vector3.yAxis
p.CFrame=CFrame.lookAt(pos,pos+dir,stableUp)
local light=Instance.new("SpotLight")
light.Name="Halogen";light.Color=color(d.color);light.Brightness=d.brightness
light.Range=d.range;light.Angle=110;light.Face=Enum.NormalId.Front
light.Shadows=vec(d.position).Magnitude<96
light.Parent=p;p.Parent=lamps
end
model:SetAttribute("HunterMapSize",896)
model:SetAttribute("HunterCentralLevels","0,48,96")
model:SetAttribute("HunterImportPrepared",true)
game:GetService("ChangeHistoryService"):SetWaypoint("Configure Hunter Monolith import")
if #missingTextures>0 then warn("Missing textures on "..#missingTextures.." meshes; restore before playtest") end
return {meshes=#Data.meshes,colliders=collisionCount,lights=#Data.lights,missingTextures=missingTextures}
@@ -0,0 +1,204 @@
COLLISION_CHECK: FAIL
INTERSECTION: A0001_Central_citadel_four_ground_entrances_003 <-> A0003_Citadel_middle_gallery_and_third_floor
INTERSECTION: A0001_Central_citadel_four_ground_entrances_003 <-> A0039_East_upper_connection_003
INTERSECTION: A0001_Central_citadel_four_ground_entrances_003 <-> A0040_Foundation_003
INTERSECTION: A0001_Central_citadel_four_ground_entrances_003 <-> L0123_Recessed_amber_ceiling_housing_004
INTERSECTION: A0001_Central_citadel_four_ground_entrances_003 <-> L0124_Recessed_amber_ceiling_housing_005
INTERSECTION: A0001_Central_citadel_four_ground_entrances_003 <-> L0127_Recessed_cyan_ceiling_housing_005
INTERSECTION: A0001_Central_citadel_four_ground_entrances_003 <-> L0128_Recessed_cyan_ceiling_housing_006
INTERSECTION: A0001_Central_citadel_four_ground_entrances_003 <-> L0129_Recessed_cyan_ceiling_housing_007
INTERSECTION: A0001_Central_citadel_four_ground_entrances_003 <-> L0149_Wall_light_amber_housing_002
INTERSECTION: A0001_Central_citadel_four_ground_entrances_003 <-> L0150_Wall_light_amber_housing_003
INTERSECTION: A0001_Central_citadel_four_ground_entrances_003 <-> L0153_Wall_light_cyan_housing_002
INTERSECTION: A0001_Central_citadel_four_ground_entrances_003 <-> L0154_Wall_light_cyan_housing_003
INTERSECTION: A0001_Central_citadel_four_ground_entrances_003 <-> A0176_West_upper_connection_003
INTERSECTION: A0002_Citadel_east_ascent_to_third_level <-> A0003_Citadel_middle_gallery_and_third_floor
INTERSECTION: A0002_Citadel_east_ascent_to_third_level <-> A0028_East_bastion_through_passage_003
INTERSECTION: A0002_Citadel_east_ascent_to_third_level <-> A0035_East_roof_shoulder_013
INTERSECTION: A0002_Citadel_east_ascent_to_third_level <-> A0039_East_upper_connection_003
INTERSECTION: A0003_Citadel_middle_gallery_and_third_floor <-> A0004_Citadel_third_level_cover
INTERSECTION: A0003_Citadel_middle_gallery_and_third_floor <-> A0005_Citadel_third_level_parapet
INTERSECTION: A0003_Citadel_middle_gallery_and_third_floor <-> A0006_Citadel_third_level_parapet_001
INTERSECTION: A0003_Citadel_middle_gallery_and_third_floor <-> A0007_Citadel_west_ascent_to_third_level
INTERSECTION: A0003_Citadel_middle_gallery_and_third_floor <-> L0138_Recessed_violet_ceiling_housing_006
INTERSECTION: A0003_Citadel_middle_gallery_and_third_floor <-> L0139_Recessed_violet_ceiling_housing_007
INTERSECTION: A0003_Citadel_middle_gallery_and_third_floor <-> L0140_Recessed_violet_ceiling_housing_008
INTERSECTION: A0007_Citadel_west_ascent_to_third_level <-> A0165_West_bastion_through_passage_003
INTERSECTION: A0007_Citadel_west_ascent_to_third_level <-> A0173_West_roof_shoulder_014
INTERSECTION: A0007_Citadel_west_ascent_to_third_level <-> A0176_West_upper_connection_003
INTERSECTION: A0008_Corner_fort_inward_access_008 <-> A0016_Corner_fort_008
INTERSECTION: A0008_Corner_fort_inward_access_008 <-> A0040_Foundation_003
INTERSECTION: A0009_Corner_fort_inward_access_009 <-> A0017_Corner_fort_009
INTERSECTION: A0009_Corner_fort_inward_access_009 <-> A0040_Foundation_003
INTERSECTION: A0010_Corner_fort_inward_access_010 <-> A0018_Corner_fort_010
INTERSECTION: A0010_Corner_fort_inward_access_010 <-> A0040_Foundation_003
INTERSECTION: A0011_Corner_fort_inward_access_011 <-> A0019_Corner_fort_011
INTERSECTION: A0011_Corner_fort_inward_access_011 <-> A0040_Foundation_003
INTERSECTION: A0012_Corner_fort_top_cover_008 <-> A0016_Corner_fort_008
INTERSECTION: A0013_Corner_fort_top_cover_009 <-> A0017_Corner_fort_009
INTERSECTION: A0014_Corner_fort_top_cover_010 <-> A0018_Corner_fort_010
INTERSECTION: A0015_Corner_fort_top_cover_011 <-> A0019_Corner_fort_011
INTERSECTION: A0016_Corner_fort_008 <-> A0040_Foundation_003
INTERSECTION: A0016_Corner_fort_008 <-> L0137_Recessed_violet_ceiling_housing_005
INTERSECTION: A0016_Corner_fort_008 <-> L0161_Wall_light_violet_housing_002
INTERSECTION: A0017_Corner_fort_009 <-> A0040_Foundation_003
INTERSECTION: A0017_Corner_fort_009 <-> L0131_Recessed_cyan_ceiling_housing_009
INTERSECTION: A0017_Corner_fort_009 <-> L0162_Wall_light_violet_housing_003
INTERSECTION: A0018_Corner_fort_010 <-> A0040_Foundation_003
INTERSECTION: A0018_Corner_fort_010 <-> L0126_Recessed_amber_ceiling_housing_007
INTERSECTION: A0018_Corner_fort_010 <-> L0157_Wall_light_mint_housing_002
INTERSECTION: A0019_Corner_fort_011 <-> A0040_Foundation_003
INTERSECTION: A0019_Corner_fort_011 <-> L0134_Recessed_mint_ceiling_housing_005
INTERSECTION: A0019_Corner_fort_011 <-> L0158_Wall_light_mint_housing_003
INTERSECTION: A0020_District_corner_screen_008 <-> A0040_Foundation_003
INTERSECTION: A0021_District_corner_screen_009 <-> A0040_Foundation_003
INTERSECTION: A0022_District_corner_screen_010 <-> A0040_Foundation_003
INTERSECTION: A0023_District_corner_screen_011 <-> A0040_Foundation_003
INTERSECTION: A0024_District_staggered_cover_008 <-> A0040_Foundation_003
INTERSECTION: A0025_District_staggered_cover_009 <-> A0040_Foundation_003
INTERSECTION: A0026_District_staggered_cover_010 <-> A0040_Foundation_003
INTERSECTION: A0027_District_staggered_cover_011 <-> A0040_Foundation_003
INTERSECTION: A0028_East_bastion_through_passage_003 <-> A0033_East_north_ramp_003
INTERSECTION: A0028_East_bastion_through_passage_003 <-> A0034_East_roof_shoulder_012
INTERSECTION: A0028_East_bastion_through_passage_003 <-> A0035_East_roof_shoulder_013
INTERSECTION: A0028_East_bastion_through_passage_003 <-> A0036_East_roof_shoulder_014
INTERSECTION: A0028_East_bastion_through_passage_003 <-> A0037_East_roof_shoulder_015
INTERSECTION: A0028_East_bastion_through_passage_003 <-> A0038_East_south_ramp_003
INTERSECTION: A0028_East_bastion_through_passage_003 <-> A0039_East_upper_connection_003
INTERSECTION: A0028_East_bastion_through_passage_003 <-> A0040_Foundation_003
INTERSECTION: A0028_East_bastion_through_passage_003 <-> L0132_Recessed_mint_ceiling_housing_003
INTERSECTION: A0029_East_court_shield_003 <-> A0040_Foundation_003
INTERSECTION: A0030_East_enclosure_003 <-> A0040_Foundation_003
INTERSECTION: A0030_East_enclosure_003 <-> A0083_North_enclosure_003
INTERSECTION: A0030_East_enclosure_003 <-> A0145_South_enclosure_003
INTERSECTION: A0031_East_flank_north_003 <-> A0040_Foundation_003
INTERSECTION: A0032_East_flank_south_003 <-> A0040_Foundation_003
INTERSECTION: A0033_East_north_ramp_003 <-> A0040_Foundation_003
INTERSECTION: A0038_East_south_ramp_003 <-> A0040_Foundation_003
INTERSECTION: A0040_Foundation_003 <-> A0041_Gallery_east_access_004
INTERSECTION: A0040_Foundation_003 <-> A0042_Gallery_east_access_005
INTERSECTION: A0040_Foundation_003 <-> A0043_Gallery_north_access_004
INTERSECTION: A0040_Foundation_003 <-> A0044_Gallery_north_access_005
INTERSECTION: A0040_Foundation_003 <-> A0049_Gallery_south_access_004
INTERSECTION: A0040_Foundation_003 <-> A0050_Gallery_south_access_005
INTERSECTION: A0040_Foundation_003 <-> A0051_Gallery_west_access_004
INTERSECTION: A0040_Foundation_003 <-> A0052_Gallery_west_access_005
INTERSECTION: A0040_Foundation_003 <-> A0071_Inner_ring_cover_008
INTERSECTION: A0040_Foundation_003 <-> A0072_Inner_ring_cover_009
INTERSECTION: A0040_Foundation_003 <-> A0073_Inner_ring_cover_010
INTERSECTION: A0040_Foundation_003 <-> A0074_Inner_ring_cover_011
INTERSECTION: A0040_Foundation_003 <-> A0075_Inner_ring_tall_cover_008
INTERSECTION: A0040_Foundation_003 <-> A0076_Inner_ring_tall_cover_009
INTERSECTION: A0040_Foundation_003 <-> A0077_Inner_ring_tall_cover_010
INTERSECTION: A0040_Foundation_003 <-> A0078_Inner_ring_tall_cover_011
INTERSECTION: A0040_Foundation_003 <-> A0079_NE_inner_block_003
INTERSECTION: A0040_Foundation_003 <-> A0080_NW_inner_block_003
INTERSECTION: A0040_Foundation_003 <-> A0081_North_arrival_cover_003
INTERSECTION: A0040_Foundation_003 <-> A0082_North_courtyard_shield_003
INTERSECTION: A0040_Foundation_003 <-> A0083_North_enclosure_003
INTERSECTION: A0040_Foundation_003 <-> A0084_North_low_terrace_003
INTERSECTION: A0040_Foundation_003 <-> A0085_North_terrace_access_003
INTERSECTION: A0040_Foundation_003 <-> A0087_Outer_courtyard_cover_032
INTERSECTION: A0040_Foundation_003 <-> A0088_Outer_courtyard_cover_033
INTERSECTION: A0040_Foundation_003 <-> A0089_Outer_courtyard_cover_034
INTERSECTION: A0040_Foundation_003 <-> A0090_Outer_courtyard_cover_035
INTERSECTION: A0040_Foundation_003 <-> A0091_Outer_courtyard_cover_036
INTERSECTION: A0040_Foundation_003 <-> A0092_Outer_courtyard_cover_037
INTERSECTION: A0040_Foundation_003 <-> A0093_Outer_courtyard_cover_038
INTERSECTION: A0040_Foundation_003 <-> A0094_Outer_courtyard_cover_039
INTERSECTION: A0040_Foundation_003 <-> A0095_Outer_courtyard_cover_040
INTERSECTION: A0040_Foundation_003 <-> A0096_Outer_courtyard_cover_041
INTERSECTION: A0040_Foundation_003 <-> A0097_Outer_courtyard_cover_042
INTERSECTION: A0040_Foundation_003 <-> A0098_Outer_courtyard_cover_043
INTERSECTION: A0040_Foundation_003 <-> A0099_Outer_courtyard_cover_044
INTERSECTION: A0040_Foundation_003 <-> A0100_Outer_courtyard_cover_045
INTERSECTION: A0040_Foundation_003 <-> A0101_Outer_courtyard_cover_046
INTERSECTION: A0040_Foundation_003 <-> A0102_Outer_courtyard_cover_047
INTERSECTION: A0040_Foundation_003 <-> A0103_Outer_east_west_gallery_004
INTERSECTION: A0040_Foundation_003 <-> A0104_Outer_east_west_gallery_005
INTERSECTION: A0040_Foundation_003 <-> A0105_Outer_north_south_gallery_004
INTERSECTION: A0040_Foundation_003 <-> A0106_Outer_north_south_gallery_005
INTERSECTION: A0040_Foundation_003 <-> L0115_Ramp_marker_plinth_008
INTERSECTION: A0040_Foundation_003 <-> L0116_Ramp_marker_plinth_009
INTERSECTION: A0040_Foundation_003 <-> L0117_Ramp_marker_plinth_010
INTERSECTION: A0040_Foundation_003 <-> L0118_Ramp_marker_plinth_011
INTERSECTION: A0040_Foundation_003 <-> L0119_Ramp_marker_plinth_012
INTERSECTION: A0040_Foundation_003 <-> L0120_Ramp_marker_plinth_013
INTERSECTION: A0040_Foundation_003 <-> L0121_Ramp_marker_plinth_014
INTERSECTION: A0040_Foundation_003 <-> L0122_Ramp_marker_plinth_015
INTERSECTION: A0040_Foundation_003 <-> A0141_SE_inner_block_003
INTERSECTION: A0040_Foundation_003 <-> A0142_SW_inner_block_003
INTERSECTION: A0040_Foundation_003 <-> A0143_South_arrival_cover_003
INTERSECTION: A0040_Foundation_003 <-> A0144_South_courtyard_shield_003
INTERSECTION: A0040_Foundation_003 <-> A0145_South_enclosure_003
INTERSECTION: A0040_Foundation_003 <-> A0146_South_low_terrace_003
INTERSECTION: A0040_Foundation_003 <-> A0147_South_terrace_access_003
INTERSECTION: A0040_Foundation_003 <-> A0165_West_bastion_through_passage_003
INTERSECTION: A0040_Foundation_003 <-> A0166_West_court_shield_003
INTERSECTION: A0040_Foundation_003 <-> A0167_West_enclosure_003
INTERSECTION: A0040_Foundation_003 <-> A0168_West_flank_north_003
INTERSECTION: A0040_Foundation_003 <-> A0169_West_flank_south_003
INTERSECTION: A0040_Foundation_003 <-> A0170_West_north_ramp_003
INTERSECTION: A0040_Foundation_003 <-> A0175_West_south_ramp_003
INTERSECTION: A0041_Gallery_east_access_004 <-> A0105_Outer_north_south_gallery_004
INTERSECTION: A0042_Gallery_east_access_005 <-> A0106_Outer_north_south_gallery_005
INTERSECTION: A0043_Gallery_north_access_004 <-> A0103_Outer_east_west_gallery_004
INTERSECTION: A0044_Gallery_north_access_005 <-> A0104_Outer_east_west_gallery_005
INTERSECTION: A0045_Gallery_roof_cover_008 <-> A0105_Outer_north_south_gallery_004
INTERSECTION: A0046_Gallery_roof_cover_009 <-> A0106_Outer_north_south_gallery_005
INTERSECTION: A0047_Gallery_roof_cover_010 <-> A0103_Outer_east_west_gallery_004
INTERSECTION: A0048_Gallery_roof_cover_011 <-> A0104_Outer_east_west_gallery_005
INTERSECTION: A0049_Gallery_south_access_004 <-> A0103_Outer_east_west_gallery_004
INTERSECTION: A0050_Gallery_south_access_005 <-> A0104_Outer_east_west_gallery_005
INTERSECTION: A0051_Gallery_west_access_004 <-> A0105_Outer_north_south_gallery_004
INTERSECTION: A0052_Gallery_west_access_005 <-> A0106_Outer_north_south_gallery_005
INTERSECTION: L0053_Halogen_amber_diffuser_004 <-> L0123_Recessed_amber_ceiling_housing_004
INTERSECTION: L0054_Halogen_amber_diffuser_005 <-> L0124_Recessed_amber_ceiling_housing_005
INTERSECTION: L0055_Halogen_amber_diffuser_006 <-> L0125_Recessed_amber_ceiling_housing_006
INTERSECTION: L0056_Halogen_amber_diffuser_007 <-> L0126_Recessed_amber_ceiling_housing_007
INTERSECTION: L0057_Halogen_cyan_diffuser_005 <-> L0127_Recessed_cyan_ceiling_housing_005
INTERSECTION: L0058_Halogen_cyan_diffuser_006 <-> L0128_Recessed_cyan_ceiling_housing_006
INTERSECTION: L0059_Halogen_cyan_diffuser_007 <-> L0129_Recessed_cyan_ceiling_housing_007
INTERSECTION: L0060_Halogen_cyan_diffuser_008 <-> L0130_Recessed_cyan_ceiling_housing_008
INTERSECTION: L0061_Halogen_cyan_diffuser_009 <-> L0131_Recessed_cyan_ceiling_housing_009
INTERSECTION: L0062_Halogen_mint_diffuser_003 <-> L0132_Recessed_mint_ceiling_housing_003
INTERSECTION: L0063_Halogen_mint_diffuser_004 <-> L0133_Recessed_mint_ceiling_housing_004
INTERSECTION: L0064_Halogen_mint_diffuser_005 <-> L0134_Recessed_mint_ceiling_housing_005
INTERSECTION: L0065_Halogen_violet_diffuser_003 <-> L0135_Recessed_violet_ceiling_housing_003
INTERSECTION: L0066_Halogen_violet_diffuser_004 <-> L0136_Recessed_violet_ceiling_housing_004
INTERSECTION: L0067_Halogen_violet_diffuser_005 <-> L0137_Recessed_violet_ceiling_housing_005
INTERSECTION: L0068_Halogen_violet_diffuser_006 <-> L0138_Recessed_violet_ceiling_housing_006
INTERSECTION: L0069_Halogen_violet_diffuser_007 <-> L0139_Recessed_violet_ceiling_housing_007
INTERSECTION: L0070_Halogen_violet_diffuser_008 <-> L0140_Recessed_violet_ceiling_housing_008
INTERSECTION: A0083_North_enclosure_003 <-> A0167_West_enclosure_003
INTERSECTION: A0084_North_low_terrace_003 <-> A0086_North_terrace_cover_003
INTERSECTION: A0103_Outer_east_west_gallery_004 <-> L0136_Recessed_violet_ceiling_housing_004
INTERSECTION: A0104_Outer_east_west_gallery_005 <-> L0133_Recessed_mint_ceiling_housing_004
INTERSECTION: A0105_Outer_north_south_gallery_004 <-> L0125_Recessed_amber_ceiling_housing_006
INTERSECTION: A0106_Outer_north_south_gallery_005 <-> L0130_Recessed_cyan_ceiling_housing_008
INTERSECTION: L0107_Ramp_marker_lamp_008 <-> L0115_Ramp_marker_plinth_008
INTERSECTION: L0108_Ramp_marker_lamp_009 <-> L0116_Ramp_marker_plinth_009
INTERSECTION: L0109_Ramp_marker_lamp_010 <-> L0117_Ramp_marker_plinth_010
INTERSECTION: L0110_Ramp_marker_lamp_011 <-> L0118_Ramp_marker_plinth_011
INTERSECTION: L0111_Ramp_marker_lamp_012 <-> L0119_Ramp_marker_plinth_012
INTERSECTION: L0112_Ramp_marker_lamp_013 <-> L0120_Ramp_marker_plinth_013
INTERSECTION: L0113_Ramp_marker_lamp_014 <-> L0121_Ramp_marker_plinth_014
INTERSECTION: L0114_Ramp_marker_lamp_015 <-> L0122_Ramp_marker_plinth_015
INTERSECTION: L0135_Recessed_violet_ceiling_housing_003 <-> A0165_West_bastion_through_passage_003
INTERSECTION: A0145_South_enclosure_003 <-> A0167_West_enclosure_003
INTERSECTION: A0146_South_low_terrace_003 <-> A0148_South_terrace_cover_003
INTERSECTION: L0149_Wall_light_amber_housing_002 <-> L0151_Wall_light_amber_lens_002
INTERSECTION: L0150_Wall_light_amber_housing_003 <-> L0152_Wall_light_amber_lens_003
INTERSECTION: L0153_Wall_light_cyan_housing_002 <-> L0155_Wall_light_cyan_lens_002
INTERSECTION: L0154_Wall_light_cyan_housing_003 <-> L0156_Wall_light_cyan_lens_003
INTERSECTION: L0157_Wall_light_mint_housing_002 <-> L0159_Wall_light_mint_lens_002
INTERSECTION: L0158_Wall_light_mint_housing_003 <-> L0160_Wall_light_mint_lens_003
INTERSECTION: L0161_Wall_light_violet_housing_002 <-> L0163_Wall_light_violet_lens_002
INTERSECTION: L0162_Wall_light_violet_housing_003 <-> L0164_Wall_light_violet_lens_003
INTERSECTION: A0165_West_bastion_through_passage_003 <-> A0170_West_north_ramp_003
INTERSECTION: A0165_West_bastion_through_passage_003 <-> A0171_West_roof_shoulder_012
INTERSECTION: A0165_West_bastion_through_passage_003 <-> A0172_West_roof_shoulder_013
INTERSECTION: A0165_West_bastion_through_passage_003 <-> A0173_West_roof_shoulder_014
INTERSECTION: A0165_West_bastion_through_passage_003 <-> A0174_West_roof_shoulder_015
INTERSECTION: A0165_West_bastion_through_passage_003 <-> A0175_West_south_ramp_003
INTERSECTION: A0165_West_bastion_through_passage_003 <-> A0176_West_upper_connection_003
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,35 @@
{
"modelAssetId": "94623364447810",
"modelUploads": 1,
"automaticTextureIds": [
"137719708984464",
"82420782531753",
"76473273465933"
],
"groupId": "779665335",
"placeId": "127514573501219",
"path": "Workspace.HunterMonolithImport",
"sourceOrigin": [
1600,
8,
0
],
"size": [
896,
120,
896
],
"meshes": 176,
"gateColliders": 74,
"spotLights": 26,
"validation": {
"missingTextures": 0,
"unanchored": 0,
"gatePassagesChecked": 12,
"rampsChecked": 20,
"collisionRayFailures": 0
},
"packageLinked": true,
"caveat": "Scale, anchoring, placement, collider and light repairs are local to this instance. Re-insert/package update requires SetupImport again.",
"publishedPlace": false
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 MiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.
@@ -0,0 +1,62 @@
{
"Rifle_Rubber": {
"center": [
2.07535,
0.0,
1.04104
],
"size": [
7.96041,
1.075,
2.81608
]
},
"Rifle_CeramicGraphite": {
"center": [
2.80578,
0.0,
1.18294
],
"size": [
9.22178,
0.906,
2.79189
]
},
"Rifle_TitaniumPanels": {
"center": [
2.01331,
0.0,
0.98914
],
"size": [
5.45902,
1.11,
3.01227
]
},
"Rifle_AmberChannel": {
"center": [
1.32739,
0.0,
1.47764
],
"size": [
5.88053,
0.902,
2.21083
]
},
"Rifle_CyanChannel": {
"center": [
2.89861,
0.0,
1.19167
],
"size": [
6.175,
0.758,
2.36111
]
}
}
+30
View File
@@ -0,0 +1,30 @@
{
"Arms_Glove_glove_hardknuckle": {
"center": [
1.5409,
-0.2139,
0.5523
],
"size": [
4.9229,
1.4359,
1.9195
],
"triangles": 11292,
"material": "glove_hardknuckle"
},
"Arms_Sleeve": {
"center": [
-0.1109,
0.4095,
0.2794
],
"size": [
6.376,
4.7714,
2.8726
],
"triangles": 8442,
"material": "sleeve_st6_generalist"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 383 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 524 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 654 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 651 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 654 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 657 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 654 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 KiB

View File
Whitespace-only changes.
BIN
View File
Binary file not shown.
+5
View File
@@ -0,0 +1,5 @@
33076
RobloxStudioBeta
f0dfc0a8-5824-4251-8b68-2d5d3a7f031d
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
ok
+83
View File
@@ -0,0 +1,83 @@
import bpy, math
from mathutils import Vector
scene=bpy.context.scene
old=scene.collection.children.get("Atmosphere | colored halogen fixtures")
if old:
for ob in list(old.objects):bpy.data.objects.remove(ob,do_unlink=True)
bpy.data.collections.remove(old)
lights=bpy.data.collections.new("Atmosphere | colored halogen fixtures");scene.collection.children.link(lights)
def material(name,color,glow=0):
m=bpy.data.materials.new(name);m.diffuse_color=(*color,1);m.use_nodes=True
p=next(n for n in m.node_tree.nodes if n.type=="BSDF_PRINCIPLED")
p.inputs["Base Color"].default_value=(*color,1);p.inputs["Roughness"].default_value=.4
if glow:
p.inputs["Emission Color"].default_value=(*color,1);p.inputs["Emission Strength"].default_value=glow
return m
housing=material("Halogen | graphite housing",(.055,.075,.11))
colors={"cyan":(.04,.75,1),"amber":(1,.48,.09),"violet":(.48,.12,1),"mint":(.08,1,.52)}
lenses={k:material("Halogen | "+k,c,4) for k,c in colors.items()}
def solid(name,loc,size,mat):
assert min(size)>=2
bpy.ops.mesh.primitive_cube_add(size=1,location=loc)
ob=bpy.context.object;ob.name=name;ob.dimensions=size
bpy.ops.object.transform_apply(location=False,rotation=False,scale=True)
for c in list(ob.users_collection):c.objects.unlink(ob)
lights.objects.link(ob);ob.data.materials.append(mat)
b=ob.modifiers.new("Housing corner","BEVEL");b.width=.18;b.segments=2
return ob
def area(name,pos,target,color,energy=9000,size=7):
d=bpy.data.lights.new(name,"AREA");d.energy=energy;d.color=colors[color];d.shape="DISK";d.size=size
o=bpy.data.objects.new(name,d);lights.objects.link(o);o.location=pos
o.rotation_euler=(Vector(target)-o.location).to_track_quat("-Z","Y").to_euler()
return o
def ceiling(x,y,color,elevation=0):
solid("Recessed "+color+" ceiling housing",(x,y,24+elevation),(12,6,4),housing)
solid("Halogen "+color+" diffuser",(x,y,22+elevation),(8,4,2),lenses[color])
area("Underpass "+color+" wash",(x,y,20.8+elevation),(x,y,elevation),color,12000,8)
# Each district has a color identity; the central cross remains easy to read.
for x,y,c in [(0,0,"cyan"),(-32,0,"cyan"),(32,0,"cyan"),(0,-32,"amber"),(0,32,"amber"),
(-144,0,"violet"),(144,0,"mint"),
(0,320,"cyan"),(0,-320,"amber"),(-320,0,"violet"),(320,0,"mint"),
(-304,-304,"violet"),(-304,304,"cyan"),(304,-304,"amber"),(304,304,"mint")]:
ceiling(x,y,c)
for x in (-32,0,32):
ceiling(x,0,"violet",48)
def sconce(x,y,z,sign,color):
solid("Wall light "+color+" housing",(x,y+sign*2,z),(8,4,8),housing)
solid("Wall light "+color+" lens",(x,y+sign*4.8,z),(4,2,4),lenses[color])
area("Wall "+color+" pool",(x,y+sign*6,z),(x,y+sign*24,4),color,10000,5)
for x in (-32,32):
sconce(x,-48,18,-1,"amber")
sconce(x,48,18,1,"cyan")
for sx in (-1,1):
for sy in (-1,1):
sconce(304*sx+32,304*sy+48*sy,18,sy,"violet" if sx<0 else "mint")
# Substantial route markers stand outside the ramp footprint.
for x in (-144,144):
for y in (-160,160):
for side in (-1,1):
xx=x+side*24
solid("Ramp marker | plinth",(xx,y,4),(4,4,8),housing)
solid("Ramp marker | lamp",(xx,y,9),(4,4,2),lenses["violet" if x<0 else "mint"])
# Balanced dusk lighting keeps walking routes visible while colored pools read.
world=bpy.data.worlds.new("Arena | blue dusk");world.use_nodes=True
bg=next(n for n in world.node_tree.nodes if n.type=="BACKGROUND")
bg.inputs["Color"].default_value=(.24,.32,.46,1);bg.inputs["Strength"].default_value=.50
scene.world=world
d=bpy.data.lights.new("Dusk | soft key","SUN");d.energy=1.8;d.angle=math.radians(18);d.color=(.78,.85,1)
sun=bpy.data.objects.new("Dusk | soft key",d);lights.objects.link(sun)
sun.rotation_euler=(math.radians(28),math.radians(-22),math.radians(-25))
d=bpy.data.lights.new("Dusk | soft fill","SUN");d.energy=.65;d.angle=math.radians(30);d.color=(.74,.83,1)
fill=bpy.data.objects.new("Dusk | soft fill",d);lights.objects.link(fill)
fill.rotation_euler=(math.radians(55),math.radians(20),math.radians(155))
scene["lighting"]="Cyan north/center, amber south, violet west/middle gallery, mint east; 26 local area lights."
for a in bpy.context.window.screen.areas:
if a.type=="VIEW_3D":
a.spaces.active.shading.type="MATERIAL"
a.spaces.active.shading.use_scene_lights=True
a.spaces.active.shading.use_scene_world=True
a.spaces.active.overlay.show_overlays=False
bpy.ops.object.select_all(action="DESELECT")
bpy.ops.wm.save_as_mainfile(filepath=r"C:\roblox\hunter\3D models\game_zone\Hunter_Monolith_Arena.blend")
result={"fixtures":42,"colored_area_lights":26,"colors":list(colors),"rendered":False}
+58
View File
@@ -0,0 +1,58 @@
import bpy, math
from mathutils import Vector
s=bpy.context.scene
c=bpy.data.collections.new('Gloved Arms');s.collection.children.link(c)
def mat(name,col):
m=bpy.data.materials.new(name);m.diffuse_color=(*col,1);m.use_nodes=True
p=next(n for n in m.node_tree.nodes if n.type=='BSDF_PRINCIPLED');p.inputs['Base Color'].default_value=(*col,1);p.inputs['Roughness'].default_value=.8
return m
cloth=mat('Glove charcoal fabric',(.035,.045,.043));rubber=mat('Glove rubber armor',(.012,.017,.02));sleeve=mat('Tactical sleeve olive',(.075,.085,.055))
def link(o,name,material):
o.name=name
for col in list(o.users_collection):col.objects.unlink(o)
c.objects.link(o);o.data.materials.append(material)
for p in o.data.polygons:p.use_smooth=True
return o
def ell(name,loc,scale,material):
bpy.ops.mesh.primitive_uv_sphere_add(segments=20,ring_count=12,location=loc)
o=bpy.context.object;o.scale=scale;return link(o,name,material)
def segment(name,a,b,r1,r2,material):
a,b=Vector(a),Vector(b)
bpy.ops.mesh.primitive_cone_add(vertices=24,radius1=r1,radius2=r2,depth=(b-a).length,location=(a+b)/2)
o=bpy.context.object;o.rotation_euler=(b-a).to_track_quat('Z','Y').to_euler();link(o,name,material)
bevel=o.modifiers.new('Soft seam','BEVEL');bevel.width=.035;bevel.segments=3
return o
def finger(name,points,r=.06):
for i in range(len(points)-1):segment(name+' phalanx',points[i],points[i+1],r,r*.94,cloth)
for p in points:ell(name+' joint',p,(r,r,r),cloth)
# Weapon axis +X, right hand wraps the slanted rear grip.
ell('Right palm',(-2.88,.23,-.89),(.22,.15,.33),cloth)
for i in range(4):
z=-.65-i*.14;x=-2.72-i*.035
finger('Right finger '+str(i),[(x,.28,z),(x+.16,.13,z-.015),(x+.12,-.15,z-.035),(x-.02,-.25,z-.05)],.063)
finger('Right thumb',[(-3.03,.2,-.67),(-3.08,-.03,-.55),(-2.91,-.26,-.6)],.08)
for i in range(3):ell('Right knuckle armor',(-2.89,.365,-.7-i*.15),(.13,.035,.065),rubber)
segment('Right glove cuff',(-3,.28,-1.1),(-3.15,.4,-1.43),.19,.23,rubber)
segment('Right forearm sleeve',(-3.15,.4,-1.4),(-4.2,.85,-2.4),.23,.34,sleeve)
# Left palm under the front receiver; fingers curl around its far side.
ell('Left palm',(1.12,-.06,-.28),(.33,.27,.14),cloth)
for i in range(4):
x=.88+i*.16
finger('Left finger '+str(i),[(x,.12,-.28),(x,.33,-.18),(x,.39,.02),(x,.28,.12)],.066)
finger('Left thumb',[(.86,-.15,-.26),(.77,-.37,-.09),(.9,-.41,.1)],.084)
for i in range(3):ell('Left glove back armor',(.92+i*.16,-.13,-.405),(.07,.13,.035),rubber)
segment('Left glove wrist',(1,-.15,-.32),(.7,-.53,-.63),.19,.22,cloth)
segment('Left cuff',(.72,-.5,-.61),(.52,-.72,-.86),.22,.25,rubber)
segment('Left forearm sleeve',(.55,-.7,-.83),(-1.75,-1.7,-2.15),.25,.37,sleeve)
data=bpy.data.cameras.new('First Person Camera');cam=bpy.data.objects.new('First Person Camera',data);s.collection.objects.link(cam)
cam.location=(-5.7,-1.25,1.65)
cam.rotation_euler=(Vector((1.25,0,.25))-cam.location).to_track_quat('-Z','Y').to_euler();data.lens=25
s.camera=cam
s.render.resolution_x=1400;s.render.resolution_y=900;s.cycles.samples=24
s.render.filepath=r'C:\roblox\hunter\3D models\sniper_gloved_arms.png'
bpy.ops.wm.save_as_mainfile(filepath=r'C:\roblox\hunter\3D models\sniper_reference_v8_hands.blend')
bpy.ops.render.render(write_still=True)
print('Gloved hands saved',len(c.objects))
+416
View File
@@ -0,0 +1,416 @@
"""Fresh Blender build for the Hunter 520 x 520 city arena.
One Blender unit is one Roblox stud. Run this file in Blender's Python console.
"""
import bpy, math, os, random
from mathutils import Vector
ROOT = r"C:\roblox\hunter"
BLEND_OUT = os.path.join(ROOT, "3D models", "game_zone", "Hunter_CityArena.blend")
RENDER_OUT = os.path.join(ROOT, "renders", "hunter_city_arena.png")
os.makedirs(os.path.dirname(BLEND_OUT), exist_ok=True)
os.makedirs(os.path.dirname(RENDER_OUT), exist_ok=True)
SEED = random.randrange(1, 2**31)
RNG = random.Random(SEED)
SIZE, CELL, RADIUS = 520.0, 40.0, 6
for old_scene in list(bpy.data.scenes):
if old_scene.name.startswith("Hunter City Arena"):
bpy.data.scenes.remove(old_scene, do_unlink=True)
scene = bpy.data.scenes.new("Hunter City Arena | 520 studs")
if bpy.context.window:
bpy.context.window.scene = scene
def coll(name):
c = bpy.data.collections.new(name)
scene.collection.children.link(c)
return c
FOUNDATION = coll("01 Foundation")
ROADS = coll("02 Streets and route loops")
BUILDINGS = coll("03 Modular city buildings")
ROOFS = coll("04 Rooftop routes")
LANDMARKS = coll("05 Plaza and landmarks")
PROPS = coll("06 Trees, lanterns and cover")
WALLS = coll("07 Perimeter and gates")
SETUP = coll("08 Lighting and camera")
def mat(name, color, rough=0.85, metal=0.0, emission=0.0):
m = bpy.data.materials.new(name)
m.diffuse_color = (*color, 1)
m.use_nodes = True
bsdf = next((node for node in m.node_tree.nodes if node.type == "BSDF_PRINCIPLED"), None)
if bsdf:
bsdf.inputs["Base Color"].default_value = (*color, 1)
bsdf.inputs["Roughness"].default_value = rough
bsdf.inputs["Metallic"].default_value = metal
if emission:
bsdf.inputs["Emission Color"].default_value = (*color, 1)
bsdf.inputs["Emission Strength"].default_value = emission
return m
paper = mat("Warm paper stone", (.83,.75,.69))
walk = mat("Pale chalk paving", (.92,.86,.80))
plaza_pink = mat("Rose paper plaza", (.85,.70,.73))
road = mat("Graphite blue asphalt", (.19,.23,.31), .96)
lane = mat("Worn road pencil", (.51,.53,.58))
ink = mat("Indigo pencil line", (.16,.18,.29))
seam = mat("Soft violet pencil seam", (.30,.34,.48))
lav = mat("Lavender plaster", (.59,.64,.83))
blue = mat("Blue chalk plaster", (.48,.68,.83))
peach = mat("Peach plaster", (.87,.59,.46))
rose = mat("Rose plaster", (.80,.49,.60))
cream = mat("Cream plaster", (.92,.82,.69))
slate = mat("Violet slate roof", (.25,.28,.44), .72)
slate2 = mat("Blue slate roof", (.39,.44,.62), .74)
orange = mat("Painted orange tile", (.94,.37,.22), .78)
orange_light = mat("Warm orange pencil highlight", (1.0,.59,.34))
wood = mat("Cedar brown", (.32,.21,.18))
glass = mat("Turquoise glass", (.27,.72,.81), .22, .1)
water = mat("Fountain water", (.12,.66,.85), .2, .12, .12)
green = mat("Garden green", (.30,.56,.38))
leaf = mat("Sage foliage", (.31,.64,.48))
blossom = mat("Cherry blossom pink", (.92,.48,.72))
gold = mat("Lantern glow", (1.0,.68,.29), .4, 0, .2)
metal = mat("Blue charcoal metal", (.13,.18,.27), .55, .3)
walls_palette = [lav, blue, peach, rose, cream]
roofs_palette = [slate, slate2, orange]
class Mesh:
def __init__(self, name, material, collection, parent=None):
self.name, self.material, self.collection, self.parent = name, material, collection, parent
self.v, self.f = [], []
def box(self, center, size, angle=0.0):
x,y,z = center; sx,sy,sz = size
c,s = math.cos(angle), math.sin(angle); base = len(self.v)
for a,b,d in [(-sx/2,-sy/2,-sz/2),(sx/2,-sy/2,-sz/2),(sx/2,sy/2,-sz/2),(-sx/2,sy/2,-sz/2),(-sx/2,-sy/2,sz/2),(sx/2,-sy/2,sz/2),(sx/2,sy/2,sz/2),(-sx/2,sy/2,sz/2)]:
self.v.append((x+a*c-b*s,y+a*s+b*c,z+d))
self.f += [tuple(base+i for i in face) for face in ((0,3,2,1),(4,5,6,7),(0,1,5,4),(1,2,6,5),(2,3,7,6),(3,0,4,7))]
def mesh(self, verts, faces):
base=len(self.v); self.v.extend(verts); self.f.extend(tuple(base+i for i in face) for face in faces)
def gable(self,w,d,z,rise,cx=0,cy=0,over=.5):
w+=2*over; d+=2*over
v=[(cx-w/2,cy-d/2,z),(cx+w/2,cy-d/2,z),(cx+w/2,cy+d/2,z),(cx-w/2,cy+d/2,z),(cx,cy-d/2,z+rise),(cx,cy+d/2,z+rise)]
self.mesh(v,[(0,1,4),(3,5,2),(0,4,5,3),(1,2,5,4),(0,3,2,1)])
def finish(self, bevel=0):
if not self.f: return None
me=bpy.data.meshes.new(self.name+" mesh"); me.from_pydata(self.v,[],self.f); me.materials.append(self.material); me.update()
ob=bpy.data.objects.new(self.name,me); self.collection.objects.link(ob)
if self.parent: ob.parent=self.parent
if bevel:
b=ob.modifiers.new("Soft cut paper edges","BEVEL"); b.width=bevel; b.segments=1; b.limit_method="ANGLE"
ob.modifiers.new("Weighted corner normals","WEIGHTED_NORMAL")
return ob
def root_obj(name, x,y,angle, props=None):
o=bpy.data.objects.new(name,None); o.empty_display_type="PLAIN_AXES"; o.empty_display_size=2
o.location=(x,y,0); o.rotation_euler[2]=angle; BUILDINGS.objects.link(o)
if props:
for k,v in props.items(): o[k]=v
return o
def cylinder(batch, center, r, depth, sides=24, rt=None):
x,y,z=center; rt=r if rt is None else rt; v=[]
for zz,rr in ((z-depth/2,r),(z+depth/2,rt)):
for i in range(sides):
a=2*math.pi*i/sides; v.append((x+rr*math.cos(a),y+rr*math.sin(a),zz))
f=[tuple(reversed(range(sides))),tuple(range(sides,2*sides))]
for i in range(sides): j=(i+1)%sides; f.append((i,j,sides+j,sides+i))
batch.mesh(v,f)
def ico(batch, center, r, seed, stretch=(1,1,1)):
rng=random.Random(seed); p=(1+math.sqrt(5))/2
raw=[(-1,p,0),(1,p,0),(-1,-p,0),(1,-p,0),(0,-1,p),(0,1,p),(0,-1,-p),(0,1,-p),(p,0,-1),(p,0,1),(-p,0,-1),(-p,0,1)]
faces=[(0,11,5),(0,5,1),(0,1,7),(0,7,10),(0,10,11),(1,5,9),(5,11,4),(11,10,2),(10,7,6),(7,1,8),(3,9,4),(3,4,2),(3,2,6),(3,6,8),(3,8,9),(4,9,5),(2,4,11),(6,2,10),(8,6,7),(9,8,1)]
verts=[]
for x,y,z in raw:
n=math.sqrt(x*x+y*y+z*z); j=rng.uniform(.93,1.07)
verts.append((center[0]+r*x/n*j*stretch[0],center[1]+r*y/n*j*stretch[1],center[2]+r*z/n*j*stretch[2]))
batch.mesh(verts,faces)
# One foundation underlay; route tiles have raised, non-overlapping walkable surfaces.
ground=Mesh("520 x 520 paper foundation",paper,FOUNDATION); ground.box((0,0,-1.0),(SIZE,SIZE,1.8)); ground.finish(.15)
def is_route(i): return i in (-3,0,3)
def road_tile(x,y,horizontal=False,cross=False):
asphalt=Mesh("Crossroads" if cross else "Street module",road,ROADS); asphalt.box((x,y,.14),(39.85,39.85,.28)); asphalt.finish()
side=Mesh("Sidewalk module",walk,ROADS)
if cross:
for sx in (-1,1):
for sy in (-1,1): side.box((x+sx*14.5,y+sy*14.5,.34),(11,11,.16))
side.finish(.025)
stripes=Mesh("Painted crosswalk",lane,ROADS)
for sgn in (-1,1):
for i in range(-2,3):
stripes.box((x+sgn*13,y+i*2.3,.30),(1.25,.62,.04))
stripes.box((x+i*2.3,y+sgn*13,.30),(.62,1.25,.04))
stripes.finish(); return
marks=Mesh("Dashed centerline",lane,ROADS)
if horizontal:
side.box((x,y-15,.34),(39.9,10,.16)); side.box((x,y+15,.34),(39.9,10,.16))
for dx in (-15,-5,5,15): marks.box((x+dx,y,.30),(4.0,.28,.04))
else:
side.box((x-15,y,.34),(10,39.9,.16)); side.box((x+15,y,.34),(10,39.9,.16))
for dy in (-15,-5,5,15): marks.box((x,y+dy,.30),(.28,4.0,.04))
side.finish(.025); marks.finish()
for row in range(-RADIUS,RADIUS+1):
for col in range(-RADIUS,RADIUS+1):
if abs(row)<=1 and abs(col)<=1: continue
h,v=is_route(row),is_route(col)
if h or v: road_tile(col*CELL,row*CELL,horizontal=h and not v,cross=h and v)
# A generous central concourse replaces the cramped four-way tile intersection.
plinth=Mesh("Central rose-stone concourse",plaza_pink,LANDMARKS); plinth.box((0,0,.13),(120,120,.25)); plinth.finish(.08)
spokes=Mesh("Four broad plaza approaches",walk,LANDMARKS)
for yy in (-39,39): spokes.box((0,yy,.31),(16,42,.12))
for xx in (-39,39): spokes.box((xx,0,.31),(42,16,.12))
spokes.finish()
loop=Mesh("Square promenade loop",orange_light,LANDMARKS)
loop.box((0,42,.37),(78,9,.12)); loop.box((0,-42,.37),(78,9,.12))
loop.box((42,0,.37),(9,76,.12)); loop.box((-42,0,.37),(9,76,.12)); loop.finish()
insets=Mesh("Plaza pencil mosaics",seam,LANDMARKS)
for s in (-1,1):
for t in (-1,1):
insets.box((s*28,t*28,.43),(4,4,.06)); insets.box((t*28,s*28,.43),(4,4,.06))
insets.finish()
basin=Mesh("Fountain basin and column",lav,LANDMARKS)
cylinder(basin,(0,0,1.05),11,1.4,28); cylinder(basin,(0,0,1.92),8.5,.24,28)
basin.box((0,0,4.0),(2.3,2.3,4.0)); cylinder(basin,(0,0,6.35),4.0,.65,24,2.4); cylinder(basin,(0,0,6.85),2.0,.25,24); basin.finish(.08)
water_top=Mesh("Bright fountain water",water,LANDMARKS); cylinder(water_top,(0,0,1.8),8.15,.06,32); water_top.finish()
# Reusable house: open ground-floor arcade, two walkable roof levels, gabled crown and pencil grid.
tree_trunks=Mesh("Tree trunks",wood,PROPS); tree_leaves=Mesh("Sage crowns",leaf,PROPS); tree_blossoms=Mesh("Cherry crowns",blossom,PROPS)
lamp_metal=Mesh("Lantern posts",metal,PROPS); lamp_light=Mesh("Lantern warm glass",gold,PROPS)
orange_cover=Mesh("Orange cover blocks",orange,PROPS); cover_ink=Mesh("Orange block linework",orange_light,PROPS)
planters=Mesh("Tree planters",lav,PROPS)
def tree(x,y,pink=False,scale=1):
trunks=10*scale; tree_trunks.box((x,y,trunks/2+.22),(2*scale,2*scale,trunks))
b=tree_blossoms if pink else tree_leaves
ico(b,(x,y,12.4*scale),6.5*scale,int(x*19+y*27+1000))
ico(b,(x-3.2*scale,y+1.3*scale,11*scale),5*scale,int(x*11-y*17+2000))
ico(b,(x+3.3*scale,y-1.1*scale,11.5*scale),4.8*scale,int(x*23+y*9+3000))
planters.box((x,y,.42),(8*scale,8*scale,.5))
def lamp(x,y):
lamp_metal.box((x,y,4.8),(.5,.5,9.2)); lamp_metal.box((x+.8,y,8.9),(2,.45,.4))
lamp_light.box((x+1.5,y,8.2),(1.3,1.1,.9)); lamp_metal.box((x+1.5,y,9.0),(2.2,1.8,.24))
def crate(x,y,z=0.2,sx=7,sy=6,sz=7,a=0):
orange_cover.box((x,y,z+sz/2),(sx,sy,sz),a)
cover_ink.box((x,y-sy/2-.04,z+sz*.56),(sx*.75,.1,.16),a)
def build_house(col,row,index,landmark=None,forced=None):
x,y=col*CELL,row*CELL
rr=random.Random(SEED+(col+9)*1009+(row+9)*2027)
if abs(col)>abs(row): angle=math.pi/2 if col<0 else -math.pi/2
else: angle=0 if row>0 else math.pi
plaster=forced or rr.choice(walls_palette); roofmat=rr.choice(roofs_palette)
w=rr.uniform(25,29); d=rr.uniform(24,29); h=12.0; uh=rr.choice((7.5,8.5,9.5))
uw=w*rr.uniform(.59,.75); ud=d*rr.uniform(.59,.75); passage=7.2
name="Block %02d | %s"%(index,landmark or "paper-plaster walk-up")
root=root_obj(name,x,y,angle,{"GridX":col,"GridY":row,"Stories":2,"RoofAccess":True,"Landmark":landmark or ""})
wa=Mesh(name+" plaster",plaster,BUILDINGS,root); rf=Mesh(name+" roof",roofmat,BUILDINGS,root)
ln=Mesh(name+" ink seams",seam,BUILDINGS,root); dk=Mesh(name+" dark trim",ink,BUILDINGS,root)
gl=Mesh(name+" windows",glass,BUILDINGS,root); ac=Mesh(name+" orange accents",orange_light,BUILDINGS,root); wd=Mesh(name+" cedar",wood,BUILDINGS,root)
zc=h/2+.2
# Solid side walls, but facade panels leave a broad north-south route through the house.
wa.box((-w/2+.7,0,zc),(1.4,d-2,h-.4)); wa.box((w/2-.7,0,zc),(1.4,d-2,h-.4))
for fy in (-d/2,d/2):
panel=(w-passage)/2
wa.box((-(passage/2+panel/2),fy,zc),(panel,1.35,h-.4))
wa.box(((passage/2+panel/2),fy,zc),(panel,1.35,h-.4))
wa.box((0,fy,h-.8),(passage,1.35,1.6))
# Deep cedar arcade reveals make the through-route legible at street level.
dk.box((-passage/2-.22,fy*1.025,h/2),(0.32,.22,h))
dk.box((passage/2+.22,fy*1.025,h/2),(0.32,.22,h))
# Lower roof promenade and its raised orange rim.
rf.box((0,0,h+.22),(w+5,d+5,.55)); dk.box((0,0,h+.55),(w+5.7,d+5.7,.16))
upper_z=h+.7
wa.box((0,0,upper_z+uh/2),(uw,ud,uh))
rf.box((0,0,upper_z+uh+.25),(uw+3.8,ud+3.8,.55))
rf.gable(uw+3.8,ud+3.8,upper_z+uh+.52,rr.uniform(3.2,4.8),over=.65)
ac.box((0,0,upper_z+uh+4),(0.75,ud+5,.45))
# Big paired windows and sills face the road-facing side.
for s in (-1,1):
for level in range(2):
zz=h*(.34+.37*level); wx=s*w*.22
dk.box((wx,-d/2-.12,zz),(5.3,.16,4.6))
gl.box((wx,-d/2-.22,zz),(4.35,.13,3.65))
ac.box((wx,-d/2-.29,zz-2.1),(5.8,.34,.32))
wz=upper_z+uh*.53; wx=s*uw*.23
dk.box((wx,-ud/2-.11,wz),(4.7,.15,3.8)); gl.box((wx,-ud/2-.22,wz),(3.8,.13,2.95))
# Hand-drawn panel grid: offset pencil marks on facade and side elevations.
for gx in range(-int(w/2)+8,int(w/2),8):
if abs(gx)<passage/2+1.1: continue
ln.box((gx+rr.uniform(-.1,.1),-d/2-.30,zc),(0.11,.08,h-.7))
for gz in range(8,int(h),8):
ln.box((0,-d/2-.30,gz+.2),(w-passage-1,.08,.12))
for s in (-1,1):
fx=s*(w/2+.06)
for gy in range(-int(d/2)+8,int(d/2),8): ln.box((fx,gy,zc),(.08,.12,h-.7))
for gz in range(8,int(h),8): ln.box((fx,0,gz+.2),(.08,d-1,.12))
# Wide steps reach the first roof, then a narrower stair reaches the upper deck.
n=14; rise=h/n; run=d-6
for i in range(n):
yy=d/2-3-i*run/(n-1)
rf.box((w/2+3,yy,.2+(i+.5)*rise),(5.2,2.15,rise))
dk.box((w/2+3,yy,.2+(i+1)*rise),(5.35,.10,.12))
n2=11; rise2=uh/n2
for i in range(n2):
yy=ud/2-2-i*(ud-4)/(n2-1)
rf.box((uw/2+2.6,yy,upper_z+(i+.5)*rise2),(2.5,1.9,rise2))
for i in range(rr.randint(1,3)):
cx=rr.choice((-1,1))*rr.uniform(4,8); cy=rr.choice((-1,1))*rr.uniform(4,8)
ac.box((cx,cy,h+1.4),(rr.uniform(4,7),rr.uniform(3,5),2.8))
if landmark=="Clock tower":
rf.box((0,0,upper_z+uh+5),(11,11,9)); ac.box((0,0,upper_z+uh+9.8),(13,13,.65))
for a in range(4):
q=a*math.pi/2; gl.box((math.cos(q)*5.56,math.sin(q)*5.56,upper_z+uh+5),(2.3,.2,2.3),q)
elif landmark=="Pagoda lookout":
for k in range(3):
zz=upper_z+uh+k*4.6
rf.box((0,0,zz+1.7),(16-3*k,16-3*k,3.2)); ac.box((0,0,zz+3.5),(20-3*k,20-3*k,.55))
rf.box((0,0,upper_z+uh+14),(2.4,2.4,4.2))
elif landmark=="Market arcade":
for k in (-1,0,1):
ac.box((k*7,-d/2-1,h*.7),(5.6,1,3.8)); gl.box((k*7,-d/2-1.4,h*.31),(3.4,.16,3.0))
elif landmark=="Garden pavilion":
for xx in (-7,7):
for yy in (-7,7): wd.box((xx,yy,upper_z+uh+2.2),(1.2,1.2,4.5))
ac.box((0,0,upper_z+uh+4.8),(22,22,.7))
for b in (wa,rf,ln,dk,gl,ac,wd): b.finish(.045 if b in (wa,rf,ac) else 0)
return root
slots={(-4,4):("Clock tower",cream),(4,4):("Pagoda lookout",rose),(4,-4):("Market arcade",peach),(-4,-4):("Garden pavilion",blue)}
court_slots={(-5,-5),(-5,5),(5,-5),(5,5),(-2,-2),(-2,2),(2,-2),(2,2),
(-4,-2),(-4,2),(4,-2),(4,2),(-2,-4),(2,-4),(-2,4),(2,4),
(-6,-4),(-6,4),(6,-4),(6,4),(-4,-6),(4,-6),(-4,6),(4,6)}
def build_courtyard(col,row,index):
x,y=col*CELL,row*CELL
root=root_obj("Garden court %02d | open four-way passage"%index,x,y,0,
{"GridX":col,"GridY":row,"RouteAccess":True,"LotType":"Courtyard"})
stone=Mesh(root.name+" paving",walk,LANDMARKS,root)
grass=Mesh(root.name+" planted island",green,LANDMARKS,root)
border=Mesh(root.name+" chalk edging",lav,LANDMARKS,root)
woodwork=Mesh(root.name+" benches and gates",wood,LANDMARKS,root)
trim=Mesh(root.name+" orange wayfinding",orange_light,LANDMARKS,root)
stone.box((0,0,.2),(36,36,.25))
grass.box((-7,7,.37),(11,11,.12))
# Low walls protect the garden but leave all four sides open for a readable shortcut.
for sign in (-1,1):
for side in (-1,1):
border.box((sign*17,side*11,1.8),(2,12,3.2))
border.box((side*11,sign*17,1.8),(12,2,3.2))
border.box((sign*17,0,3.5),(2,9,.45))
border.box((0,sign*17,3.5),(9,2,.45))
woodwork.box((6,-7,.9),(8,1.1,1.4)); woodwork.box((6,-9,.52),(8,1.1,.24))
trim.box((0,0,.46),(2.4,2.4,.12))
for b in (stone,grass,border,woodwork,trim): b.finish(.035 if b in (stone,border) else 0)
tree(x-7,y+7,blossom=(index%3==0),scale=.62)
house_count=0; court_count=0
for row in range(-RADIUS,RADIUS+1):
for col in range(-RADIUS,RADIUS+1):
if abs(row)<=1 and abs(col)<=1: continue
if is_route(row) or is_route(col): continue
slot=slots.get((col,row))
if (col,row) in court_slots and not slot:
court_count+=1; build_courtyard(col,row,court_count)
else:
house_count+=1
build_house(col,row,house_count,slot[0] if slot else None,slot[1] if slot else None)
# Elevated links connect adjacent roof walks across the side boulevards.
bridge=Mesh("Four raised rooftop crossovers",slate2,ROOFS)
rails=Mesh("Bridge ink railings",ink,ROOFS)
bridge_marks=Mesh("Bridge orange route markers",orange_light,ROOFS)
for x in (-120,120):
for y in (-60,60):
bridge.box((x,y,12.95),(54,8.2,.7))
for s in (-1,1): rails.box((x,y+s*4.1,14.2),(54,.38,2.2))
for dx in (-18,18): bridge_marks.box((x+dx,y,13.34),(.65,6.3,.08))
bridge.finish(.07); rails.finish(.04); bridge_marks.finish()
# Outer ramparts stop at marked cardinal gates; the south arch frames portal entry.
rampart=Mesh("Low lavender arena ramparts",lav,WALLS)
rampart_caps=Mesh("Slate rampart caps",slate,WALLS)
rampart_lines=Mesh("Rampart pencil seams",seam,WALLS)
hwall=23.0
for edge in (-SIZE/2,SIZE/2):
for c in range(-RADIUS,RADIUS+1):
if c==0: continue
x=c*CELL; rampart.box((x,edge,hwall/2),(CELL-.4,2.8,hwall)); rampart_caps.box((x,edge,hwall+.24),(CELL-.2,4.4,.55))
rampart_lines.box((x-CELL/2+2,edge-1.5,hwall/2),(.14,.08,hwall-1))
# Gate pillars at each north/south opening.
for s in (-1,1):
xx=s*32; rampart.box((xx,edge,14),(10,8,28)); rampart_caps.box((xx,edge,28.4),(13,10,.8))
rampart.box((0,edge,29),(52,8,4)); rampart_caps.box((0,edge,31.5),(56,10,.9))
for edge in (-SIZE/2,SIZE/2):
for r in range(-RADIUS,RADIUS+1):
if r==0: continue
y=r*CELL; rampart.box((edge,y,hwall/2),(2.8,CELL-.4,hwall)); rampart_caps.box((edge,y,hwall+.24),(4.4,CELL-.2,.55))
rampart_lines.box((edge-1.5,y-CELL/2+2,hwall/2),(.08,.14,hwall-1))
rampart.finish(.10); rampart_caps.finish(.07); rampart_lines.finish()
gate=Mesh("South portal arch plaster",cream,WALLS); gate_roof=Mesh("South portal arch orange canopy",orange,WALLS); gate_ink=Mesh("South gate pencil trim",ink,WALLS)
for x in (-17,17):
gate.box((x,-238,13.5),(5.5,8,27)); gate_roof.box((x,-238,27.4),(7,10,1)); gate_ink.box((x,-233.8,13.5),(.15,.12,25))
gate.box((0,-238,29),(39,8,4.5)); gate_roof.box((0,-238,31.8),(43,10,1))
gate.finish(.1); gate_roof.finish(.08); gate_ink.finish()
# Avenues carry cover islands, garden corners and regular lamps; district corners get blossom trees.
cover=Mesh("Orange combat cover",orange,PROPS); cover_marks=Mesh("Cover pencil stripes",orange_light,PROPS)
for i,(x,y) in enumerate([(-205,-205),(-165,-195),(-65,-205),(70,-205),(205,-195),(200,-65),(205,55),(195,200),(70,205),(-65,205),(-205,190),(-205,60),(-195,-65),(-70,70),(70,-70),(185,170),(-170,165)]):
sx=RNG.uniform(5,9); sy=RNG.uniform(4,7); sz=RNG.uniform(5,10); a=RNG.choice((0,0,math.pi/4))
cover.box((x,y,.2+sz/2),(sx,sy,sz),a); cover_marks.box((x,y-sy/2-.05,.2+sz*.55),(sx*.72,.12,.16),a)
cover.finish(.06); cover_marks.finish()
for row in range(-RADIUS,RADIUS+1):
for col in range(-RADIUS,RADIUS+1):
if not (is_route(row) or is_route(col)) or (abs(row)<=1 and abs(col)<=1): continue
x,y=col*CELL,row*CELL
if row%2==0 and col in (-3,3): lamp_metal.box((x+12,y-11,4.8),(.5,.5,9.2)); lamp_metal.box((x+12.8,y-11,8.9),(2,.45,.4)); lamp_light.box((x+13.5,y-11,8.2),(1.3,1.1,.9)); lamp_metal.box((x+13.5,y-11,9),(2.2,1.8,.24))
if col%2==0 and row in (-3,3): lamp_metal.box((x-11,y+12,4.8),(.5,.5,9.2)); lamp_metal.box((x-10.2,y+12,8.9),(2,.45,.4)); lamp_light.box((x-9.5,y+12,8.2),(1.3,1.1,.9)); lamp_metal.box((x-9.5,y+12,9),(2.2,1.8,.24))
for cross_col in (-3,3):
for cross_row in (-3,3):
for sx in (-1,1):
for sy in (-1,1):
tree(cross_col*CELL+sx*14.5,cross_row*CELL+sy*14.5,
blossom=((cross_col+cross_row+sx+sy)%3==0),scale=.58)
for b in (tree_trunks,tree_leaves,tree_blossoms,lamp_metal,lamp_light,planters): b.finish(.045 if b in (tree_trunks,planters) else 0)
# The central hub connects to the nearby avenue modules with straight, readable approach paths.
approach=Mesh("Four plaza to boulevard connectors",walk,LANDMARKS)
for s in (-1,1):
approach.box((0,s*80,.31),(15,40,.13)); approach.box((s*80,0,.31),(40,15,.13))
approach.finish()
# Bright afternoon replaces the old night presentation; soft shadows reveal height changes.
world=bpy.data.worlds.new("Clear blue paper sky"); scene.world=world; world.use_nodes=True
world.node_tree.nodes.clear()
background=world.node_tree.nodes.new("ShaderNodeBackground")
output=world.node_tree.nodes.new("ShaderNodeOutputWorld")
world.node_tree.links.new(background.outputs["Background"],output.inputs["Surface"])
background.inputs["Color"].default_value=(.42,.72,.93,1)
background.inputs["Strength"].default_value=.65
sun_data=bpy.data.lights.new("Late morning sun","SUN"); sun_data.energy=2.1; sun_data.angle=math.radians(20)
sun=bpy.data.objects.new("Late morning sun",sun_data); SETUP.objects.link(sun); sun.rotation_euler=(math.radians(28),math.radians(-25),math.radians(-32))
area_data=bpy.data.lights.new("Broad sky fill","AREA"); area_data.energy=110000; area_data.shape="DISK"; area_data.size=420
area=bpy.data.objects.new("Broad sky fill",area_data); SETUP.objects.link(area); area.location=(-120,-230,470); area.rotation_euler=(Vector((0,0,0))-area.location).to_track_quat("-Z","Y").to_euler()
camdata=bpy.data.cameras.new("Three-quarter city overview"); cam=bpy.data.objects.new("Three-quarter city overview",camdata); SETUP.objects.link(cam)
cam.location=(610,-720,790); cam.rotation_euler=(Vector((0,0,2))-Vector(cam.location)).to_track_quat("-Z","Y").to_euler(); camdata.type="ORTHO"; camdata.ortho_scale=810; camdata.clip_end=4000; camdata.clip_start=.1; scene.camera=cam
scene.render.engine="CYCLES"; scene.cycles.samples=20; scene.cycles.use_denoising=True
scene.render.resolution_x=1800; scene.render.resolution_y=1400; scene.render.resolution_percentage=80
scene.render.image_settings.file_format="PNG"; scene.render.image_settings.color_mode="RGBA"; scene.render.film_transparent=False
scene.view_settings.view_transform="AgX"; scene.view_settings.look="AgX - Medium High Contrast"
scene.render.filepath=RENDER_OUT; scene.render.use_file_extension=True
scene["ArenaSize"]="520 x 520 studs"; scene["Seed"]=SEED
scene["RoutePlan"]="Six connected arterial lines; central square promenade loop; through-houses; four rooftop bridges; pocket-garden detours"
scene["HouseModules"]=house_count; scene["GardenCourts"]=court_count; scene["ArtDirection"]="Bright hand-drawn pastel city, ink-grid plaster, orange slate, graphite streets"
bpy.ops.wm.save_as_mainfile(filepath=BLEND_OUT)
bpy.ops.render.render(write_still=True)
result={"blend":BLEND_OUT,"render":RENDER_OUT,"seed":SEED,"arena_size":[520,520],"building_modules":house_count,"scene_objects":len(scene.objects)}
print(result)
+25
View File
@@ -0,0 +1,25 @@
import bpy, numpy as np, os
N=2048
rng=np.random.default_rng(183)
yy,xx=np.mgrid[0:N,0:N].astype(np.float32)
# Four 512px cells; one texture repeat = 32 studs, each cell = 8 studs.
x=xx+1.8*np.sin(yy*2*np.pi/512)+.55*np.sin(yy*2*np.pi/64)
y=yy+1.8*np.sin(xx*2*np.pi/512+1.2)+.55*np.sin(xx*2*np.pi/64)
qx=np.abs(x%512-256)-(256-11-2.4)
qy=np.abs(y%512-256)-(256-11-2.4)
dist=np.sqrt(np.maximum(qx,0)**2+np.maximum(qy,0)**2)+np.minimum(np.maximum(qx,qy),0)-11
fill=np.clip(.5-dist/1.4,0,1).astype(np.float32)
paper=rng.normal(0,.0015,(N,N)).astype(np.float32)
folder=r"C:\roblox\hunter\3D models\game_zone\textures"
os.makedirs(folder,exist_ok=True)
for filename,base,ink in [
("HD_navy.png",(.115,.17,.25),(.22,.25,.28)),
("HD_amber.png",(1,.57,.045),(.50,.25,.025)),
("HD_floor.png",(.25,.31,.40),(.13,.17,.23))]:
arr=np.ones((N,N,4),np.float32)
for i in range(3):
arr[:,:,i]=np.clip(ink[i]+fill*(base[i]-ink[i])+paper,0,1)
im=bpy.data.images.new(filename,width=N,height=N,alpha=True)
im.pixels.foreach_set(arr.ravel());im.filepath_raw=os.path.join(folder,filename);im.file_format="PNG";im.save();im.pack()
result={"textures":"2048x2048; 512 pixels per 8-stud tile"}
+376
View File
@@ -0,0 +1,376 @@
"""Detailed, connected two-storey house prototype; 1 Blender unit = 1 stud."""
import bpy, math, os
from mathutils import Vector
ROOT = r"C:\roblox\hunter"
BLEND_OUT = os.path.join(ROOT, "3D models", "game_zone", "Hunter_House_Prototype.blend")
RENDER_OUT = os.path.join(ROOT, "renders", "hunter_house_prototype.png")
os.makedirs(os.path.dirname(BLEND_OUT), exist_ok=True)
os.makedirs(os.path.dirname(RENDER_OUT), exist_ok=True)
for old in list(bpy.data.scenes):
if old.name.startswith("Hunter House Prototype"):
bpy.data.scenes.remove(old, do_unlink=True)
scene = bpy.data.scenes.new("Hunter House Prototype | connected rooms and stairs")
if bpy.context.window:
bpy.context.window.scene = scene
def collection(name):
c = bpy.data.collections.new(name)
scene.collection.children.link(c)
return c
ARCH = collection("01 Shell and plaster")
FLOORS = collection("02 Floors and roof decks")
DOORS = collection("03 Doors and hardware")
WINDOWS = collection("04 Windows and reveals")
INTERIOR = collection("05 Furnished interior")
STAIRS = collection("06 Connected roof stair")
TRIM = collection("07 Pencil trim")
SET = collection("08 Stage, lighting and camera")
def mat(name, color, rough=.82, metal=0, transmission=0, emission=0):
m = bpy.data.materials.new(name)
m.diffuse_color = (*color, 1)
m.use_nodes = True
p = next((n for n in m.node_tree.nodes if n.type == "BSDF_PRINCIPLED"), None)
if p:
p.inputs["Base Color"].default_value = (*color, 1)
p.inputs["Roughness"].default_value = rough
p.inputs["Metallic"].default_value = metal
if "Transmission Weight" in p.inputs:
p.inputs["Transmission Weight"].default_value = transmission
if emission:
p.inputs["Emission Color"].default_value = (*color, 1)
p.inputs["Emission Strength"].default_value = emission
return m
plaster = mat("Pale lavender plaster", (.58,.63,.82))
chalk = mat("Chalk edge", (.81,.83,.93))
interior = mat("Warm ivory interior", (.88,.78,.66))
ink = mat("Deep indigo outline", (.12,.15,.25))
pencil = mat("Slate pencil lines", (.29,.33,.47))
slate = mat("Blue violet slate", (.22,.25,.40), .74)
slate_light = mat("Sunlit slate edge", (.39,.44,.61), .76)
terra = mat("Terracotta tile", (.92,.38,.24))
orange = mat("Orange highlight", (1,.60,.37))
walnut = mat("Walnut door", (.30,.17,.12), .72)
cedar = mat("Raised cedar panel", (.48,.29,.19), .78)
brass = mat("Brushed brass hardware", (.78,.49,.18), .32,.62)
glass = mat("Turquoise glazing", (.42,.80,.86), .15,.04,.68)
# Mix a clear dielectric with a small tint so room geometry remains visible through the pane.
glass.node_tree.nodes.clear()
glass_out=glass.node_tree.nodes.new("ShaderNodeOutputMaterial")
glass_clear=glass.node_tree.nodes.new("ShaderNodeBsdfTransparent")
glass_tint=glass.node_tree.nodes.new("ShaderNodeBsdfPrincipled")
glass_tint.inputs["Base Color"].default_value=(.24,.64,.72,1)
glass_tint.inputs["Roughness"].default_value=.12
glass_mix=glass.node_tree.nodes.new("ShaderNodeMixShader")
glass_mix.inputs[0].default_value=.72
glass.node_tree.links.new(glass_tint.outputs["BSDF"],glass_mix.inputs[1])
glass.node_tree.links.new(glass_clear.outputs["BSDF"],glass_mix.inputs[2])
glass.node_tree.links.new(glass_mix.outputs[0],glass_out.inputs["Surface"])
linen = mat("Warm linen curtains", (.94,.84,.73), .95)
teal = mat("Teal sofa", (.24,.54,.58))
rose = mat("Rose wool rug", (.68,.40,.48))
oak = mat("Oak floor", (.46,.31,.23))
stone = mat("Paper stone", (.76,.71,.70), .92)
green = mat("Planter green", (.32,.55,.40))
amber = mat("Amber lantern glass", (1,.68,.3), .4,0,0,1.5)
metal_dark = mat("Blue charcoal metal", (.13,.18,.27), .55,.3)
def cube(name, loc, dims, material, coll, angle=0, bevel=0):
x,y,z = dims
v = [(-x/2,-y/2,-z/2),(x/2,-y/2,-z/2),(x/2,y/2,-z/2),(-x/2,y/2,-z/2),
(-x/2,-y/2,z/2),(x/2,-y/2,z/2),(x/2,y/2,z/2),(-x/2,y/2,z/2)]
f = [(0,3,2,1),(4,5,6,7),(0,1,5,4),(1,2,6,5),(2,3,7,6),(3,0,4,7)]
me = bpy.data.meshes.new(name+" mesh")
me.from_pydata(v, [], f)
me.materials.append(material)
me.update()
ob = bpy.data.objects.new(name, me)
coll.objects.link(ob)
ob.location = loc
ob.rotation_euler[2] = angle
if bevel:
b = ob.modifiers.new("Soft hand-cut edge", "BEVEL")
b.width, b.segments, b.limit_method = bevel, 2, "ANGLE"
ob.modifiers.new("Weighted normals", "WEIGHTED_NORMAL")
return ob
def beam(name, a, b, width, depth, material, coll):
a,b = Vector(a),Vector(b)
d=b-a
ob=cube(name,(a+b)/2,(width,depth,d.length),material,coll)
ob.rotation_euler=d.to_track_quat("Z","Y").to_euler()
return ob
def gable(name,w,d,z,rise,material,coll):
x,y=w/2,d/2
v=[(-x,-y,z),(x,-y,z),(x,y,z),(-x,y,z),(0,-y,z+rise),(0,y,z+rise)]
me=bpy.data.meshes.new(name+" mesh")
me.from_pydata(v,[],[(0,1,4),(3,5,2),(0,4,5,3),(1,2,5,4),(0,3,2,1)])
me.materials.append(material); me.update()
ob=bpy.data.objects.new(name,me); coll.objects.link(ob)
return ob
def facade(name, axis, plane, width, height, base, thickness, openings):
"""Construct wall panels around true empty apertures."""
edges={-width/2,width/2}
for u,w,lo,hi in openings:
edges.update((u-w/2,u+w/2))
e=sorted(edges)
for a,b in zip(e[:-1],e[1:]):
u=(a+b)/2
op=next((q for q in openings if q[0]-q[1]/2-1e-5<=u<=q[0]+q[1]/2+1e-5),None)
def panel(z,h):
if h<=.04:return
pos=(u,plane,z+h/2) if axis=="front" else (plane,u,z+h/2)
size=(b-a,thickness,h) if axis=="front" else (thickness,b-a,h)
cube(name+" | wall panel",pos,size,plaster,ARCH,0,.025)
if op is None:
panel(base,height)
else:
low,high=op[2],op[3]
panel(base,low)
panel(high,height-high)
def window(name,axis,plane,u,z,width,height,thickness,side=-1):
if axis=="front":
outer_y=plane+side*(thickness/2+.08)
pane_y=plane+side*.12
inner_y=plane-side*.34
def box(n,du,dv,dz,x,y,zz,ma):
cube(name+" | "+n,(x,y,zz),(du,dv,dz),ma,WINDOWS,0,.025)
box("left reveal",.30,.22,height+.4,u-width/2-.12,outer_y,z,ink)
box("right reveal",.30,.22,height+.4,u+width/2+.12,outer_y,z,ink)
box("head reveal",width+.55,.22,.32,u,outer_y,z+height/2+.12,ink)
box("stone sill",width+.72,.52,.40,u,outer_y+side*.14,z-height/2-.12,chalk)
cube(name+" | fitted glass",(u,pane_y,z),(width-.48,.12,height-.46),glass,WINDOWS,0,.02)
cube(name+" | central mullion",(u,pane_y+side*.10,z),(.16,.15,height-.42),ink,WINDOWS,0,.02)
for s in (-1,1):
cube(name+" | linen curtain",(u+s*(width/2-.55),inner_y,z),(.62,.12,height-.32),linen,WINDOWS,0,.025)
cube(name+" | brass curtain rod",(u,inner_y,z+height/2-.12),(width+.18,.15,.14),brass,WINDOWS,0,.02)
else:
outer_x=plane+side*(thickness/2+.08)
pane_x=plane+side*.12
inner_x=plane-side*.34
def box(n,du,dv,dz,x,y,zz,ma):
cube(name+" | "+n,(x,y,zz),(dv,du,dz),ma,WINDOWS,0,.025)
box("left reveal",.30,.22,height+.4,u-width/2-.12,outer_x,z,ink)
box("right reveal",.30,.22,height+.4,u+width/2+.12,outer_x,z,ink)
box("head reveal",width+.55,.22,.32,u,outer_x,z+height/2+.12,ink)
box("stone sill",width+.72,.52,.40,u,outer_x+side*.14,z-height/2-.12,chalk)
cube(name+" | fitted glass",(pane_x,u,z),(.12,width-.48,height-.46),glass,WINDOWS,0,.02)
cube(name+" | central mullion",(pane_x+side*.10,u,z),(.15,.16,height-.42),ink,WINDOWS,0,.02)
for s in (-1,1):
cube(name+" | linen curtain",(inner_x,u+s*(width/2-.55),z),(.12,.62,height-.32),linen,WINDOWS,0,.025)
cube(name+" | brass curtain rod",(inner_x,u,z+height/2-.12),(.15,width+.18,.14),brass,WINDOWS,0,.02)
def hinged_door(name,hinge_x,plane,zbase,width,height):
angle=math.radians(64)
def pos(u,v,z):
return (hinge_x+u*math.cos(angle)-v*math.sin(angle),
plane+.18+u*math.sin(angle)+v*math.cos(angle),zbase+z)
center=pos(width*.48,0,height/2)
cube(name+" | leaf",center,(width-.22,.34,height-.18),walnut,DOORS,angle,.055)
def piece(label,u,v,z,du,dv,dz,material):
cube(name+" | "+label,pos(u,v,z),(du,dv,dz),material,DOORS,angle,.025)
for z in (height*.27,height*.70):
piece("raised cedar panel",width*.48,-.20,z,width*.62,.12,height*.29,cedar)
piece("brass handle",width*.84,-.34,height*.48,.18,.14,.20,brass)
piece("key plate",width*.84,-.33,height*.39,.14,.12,.27,brass)
for z in (height*.18,height*.50,height*.82):
piece("hinge",.12,-.34,z,.36,.16,.18,brass)
# House shell: 34 x 30 footprint, cut openings, two complete levels.
W,D=34.0,30.0
BASE,H,TH=1.0,11.7,1.25
FRONT=-D/2
TOP=BASE+H
cube("Paper stone stage",(0,0,-.55),(108,96,.5),stone,SET,0,.14)
cube("Dark foundation footing",(0,0,.13),(36,32,.72),ink,ARCH,0,.10)
cube("Lavender foundation course",(0,0,.55),(35.5,31.5,.32),chalk,ARCH,0,.05)
cube("Oak ground floor",(0,0,.82),(34.4,30.4,.20),oak,FLOORS,0,.035)
cube("West exterior wall",(-W/2+.55,0,BASE+H/2),(1.1,D-1,H),plaster,ARCH,0,.04)
facade("East side window wall","side",W/2-.55,D-1,H,BASE,1.1,[(1.0,5.2,4.0,8.0)])
cube("Rear exterior wall",(0,D/2-.55,BASE+H/2),(W,1.1,H),plaster,ARCH,0,.04)
facade("Front ground facade","front",FRONT,W,H,BASE,TH,
[(-8.5,5.4,3.1,7.7),(0,4.8,0,8.5),(8.5,5.4,3.1,7.7)])
facade("Rear patio door aperture","front",D/2-.55,W,H,BASE,1.1,[(0,4.3,0,8.4)])
# Glazing is recessed into the true holes; curtains, furniture and shelves sit behind each pane.
window("Living room window","front",FRONT,-8.5,BASE+5.4,5.4,4.6,TH,-1)
window("Kitchen window","front",FRONT,8.5,BASE+5.4,5.4,4.6,TH,-1)
window("East living-room window","side",W/2-.55,1,BASE+6,5.2,4,1.1,1)
cube("Interior rear lining",(0,D/2-1.25,BASE+H/2),(W-2,.18,H-.5),interior,INTERIOR,0,.02)
cube("Ceiling underside",(0,0,TOP-.16),(33.5,29.5,.20),interior,INTERIOR,0,.025)
for x in (-12,0,12): cube("Exposed ceiling beam",(x,0,TOP-.34),(.42,29,.35),walnut,INTERIOR,0,.04)
cube("Rose living-room rug",(-7,-2,1.0),(11,8,.1),rose,INTERIOR,0,.06)
cube("Sofa seat",(-8,3,2),(9,3.1,1.4),teal,INTERIOR,0,.13)
cube("Sofa back",(-8,4.15,3),(9,.95,2.3),teal,INTERIOR,0,.12)
for x in (-11.1,-4.9): cube("Sofa arm",(x,3,2.8),(1,3.2,1.8),teal,INTERIOR,0,.12)
for x in (-10.3,-8,-5.7): cube("Sofa cushion",(x,2.45,2.7),(2.1,1.6,.34),chalk,INTERIOR,0,.07)
cube("Coffee table top",(-7,-2.3,2.2),(6,3.2,.26),walnut,INTERIOR,0,.08)
for x in (-9.2,-4.8):
for y in (-3.3,-1.3): cube("Coffee table leg",(x,y,1.65),(.2,.2,1.05),walnut,INTERIOR,0,.02)
cube("Kitchen lower cabinets",(9,7,2.3),(10,3,2.7),chalk,INTERIOR,0,.06)
cube("Kitchen countertop",(9,6.7,3.78),(10.8,3.6,.32),ink,INTERIOR,0,.06)
cube("Kitchen backsplash",(9,8.1,5.1),(9.8,.18,2.2),interior,INTERIOR,0,.02)
cube("Kitchen wall cabinet",(9,7.9,6.8),(8,1.1,2.1),plaster,INTERIOR,0,.05)
cube("Sink",(9,6.1,3.98),(2.5,1.6,.12),metal_dark,INTERIOR,0,.03)
cube("Bookshelf",(-13,7,4.5),(3,1,7),walnut,INTERIOR,0,.05)
for z in (2.5,4.4,6.3): cube("Bookshelf shelf",(-13,6.4,z),(3.1,.18,.18),cedar,INTERIOR,0,.02)
for x,z,m in [(-13.8,3.3,terra),(-13,3.3,slate),(-12.3,3.3,orange),(-13.6,5.3,green),(-12.7,5.3,terra)]:
cube("Book spine",(x,6.25,z),(.48,.26,1.5),m,INTERIOR,0,.02)
cube("Dining table",(2,7,2.25),(6,4,.28),walnut,INTERIOR,0,.06)
for x in (-.4,4.4):
for y in (5.7,8.3): cube("Dining chair",(x,y,1.75),(1.2,1.2,1.3),cedar,INTERIOR,0,.04)
# Real entrance door with casing and brass handle; open leaf reveals the living room.
for x in (-2.55,2.55): cube("Main door jamb",(x,FRONT-.16,BASE+4.25),(.42,.36,8.5),ink,DOORS,0,.035)
cube("Main door header",(0,FRONT-.16,BASE+8.55),(5.5,.36,.4),ink,DOORS,0,.035)
cube("Main door threshold",(0,FRONT-.4,1.05),(5.25,1,.28),chalk,DOORS,0,.035)
hinged_door("Walnut main entrance",-2.35,FRONT,BASE,4.5,8.35)
# Rear service door is closed, framed, and panelled.
cube("Rear patio door leaf",(0,D/2-1.24,BASE+4.1),(4.05,.24,8.05),walnut,DOORS,0,.045)
for x in (-2.34,2.34): cube("Rear patio door jamb",(x,D/2-1.4,BASE+4.1),(.34,.34,8.45),ink,DOORS,0,.035)
cube("Rear patio door header",(0,D/2-1.4,BASE+8.3),(5,.34,.34),ink,DOORS,0,.035)
for z in (BASE+2.6,BASE+5.7): cube("Rear door raised panel",(0,D/2-1.39,z),(2.7,.10,2.25),cedar,DOORS,0,.03)
cube("Rear door brass latch",(1.2,D/2-1.34,BASE+4.1),(.16,.13,.22),brass,DOORS,0,.035)
# Walkable first roof terrace and second furnished floor.
cube("First roof terrace deck",(0,0,TOP+.34),(40,36,.68),slate,FLOORS,0,.09)
cube("Terrace front terracotta fascia",(0,-18.2,TOP+.34),(40.3,.34,.62),terra,TRIM,0,.035)
cube("Terrace east terracotta fascia",(20,0,TOP+.34),(.34,36.3,.62),terra,TRIM,0,.035)
UW,UD=22.5,20.5
UB, UH = TOP+.70, 9.0
UT=UB+UH
cube("Upper west wall",(-UW/2+.5,0,UB+UH/2),(1,UD,UH),plaster,ARCH,0,.035)
cube("Upper east wall",(UW/2-.5,0,UB+UH/2),(1,UD,UH),plaster,ARCH,0,.035)
cube("Upper rear wall",(0,UD/2-.5,UB+UH/2),(UW,1,UH),plaster,ARCH,0,.035)
facade("Upper front facade","front",-UD/2,UW,UH,UB,1,
[(-6.6,4.6,2.1,6.1),(0,4,0,7.4),(6.6,4.6,2.1,6.1)])
cube("Upper oak floor",(0,0,UB+.12),(UW-1,UD-1,.20),oak,INTERIOR,0,.03)
cube("Upper room rear lining",(0,UD/2-1,UB+UH/2),(UW-1,.16,UH-.4),interior,INTERIOR,0,.02)
cube("Study desk",(0,5,UB+1.65),(8,3.4,.28),walnut,INTERIOR,0,.06)
for x in (-3.2,3.2): cube("Study desk leg",(x,5,UB+.85),(.2,.2,1.4),walnut,INTERIOR,0,.02)
cube("Study chair",(0,1.3,UB+1.45),(2,1.8,.4),teal,INTERIOR,0,.05)
cube("Study bookcase",(-8.5,5.5,UB+4.1),(2.4,.9,6.6),walnut,INTERIOR,0,.045)
for z in (UB+2.6,UB+4.4,UB+6.2): cube("Study shelf",(-8.5,4.95,z),(2.5,.18,.18),cedar,INTERIOR,0,.02)
for x,z,m in [(-9,UB+3.4,terra),(-8.4,UB+3.4,slate),(-7.8,UB+3.4,orange),(-8.7,UB+5.4,green)]:
cube("Study books",(x,4.8,z),(.38,.24,1.3),m,INTERIOR,0,.02)
window("Upper study left window","front",-UD/2,-6.6,UB+4.1,4.6,4.6,1,-1)
window("Upper study right window","front",-UD/2,6.6,UB+4.1,4.6,4.6,1,-1)
for x in (-2.2,2.2): cube("Upper terrace door jamb",(x,-UD/2-.14,UB+3.7),(.35,.3,7.4),ink,DOORS,0,.035)
cube("Upper terrace door header",(0,-UD/2-.14,UB+7.55),(4.5,.3,.36),ink,DOORS,0,.035)
hinged_door("Upper terrace door",-1.9,-UD/2,UB,3.8,7.4)
# Pitched slate crown has no stair leading to an unusable roof.
cube("Upper roof eaves slab",(0,0,UT+.25),(UW+4.4,UD+4,.62),slate,FLOORS,0,.07)
gable("Upper pitched roof",UW+4.8,UD+4.4,UT+.5,5.9,slate,ARCH)
beam("Terracotta ridge cap",(0,-UD/2-2.6,UT+6.25),(0,UD/2+2.6,UT+6.25),.8,.65,terra,TRIM)
for s in (-1,1):
beam("Front gable ink rake",(0,-UD/2-2.35,UT+6.1),(s*(UW/2+2.35),-UD/2-2.35,UT+.35),.18,.18,ink,TRIM)
beam("Rear gable ink rake",(0,UD/2+2.35,UT+6.1),(s*(UW/2+2.35),UD/2+2.35,UT+.35),.18,.18,ink,TRIM)
# Connected stair: ground landing -> 17 touching treads -> roof landing, with rails and support piers.
sx,y0,y1=20.1,13.0,-12.4
level,bottom=TOP+.68,.82
count=17
rise=(level-bottom)/count
run=(y0-y1)/(count-1)
cube("Stair ground landing",(sx,14.8,.56),(7.4,6.5,.48),chalk,STAIRS,0,.055)
cube("Stair roof landing",(sx,-13,level-.24),(8.4,5,.48),slate_light,STAIRS,0,.055)
for i in range(count):
y=y0-i*run
top=bottom+(i+1)*rise
cube("Roof stair tread %02d"%i,(sx,y,top-rise/2),(5.9,run+.18,rise),terra if i%2==0 else orange,STAIRS,0,.02)
cube("Dark tread nosing %02d"%i,(sx,y-run/2,top-.04),(5.85,.10,.08),ink,STAIRS,0,.012)
for side in (-1,1):
x=sx+side*3.15
beam("Continuous stair stringer",(x,y0+run/2,.88),(x,y1-run/2,level-.18),.42,.52,ink,STAIRS)
beam("Wood stair handrail",(x,y0+run/2,2.3),(x,y1-run/2,level+1.42),.32,.30,walnut,STAIRS)
for i in (0,4,8,12,16):
y=y0-i*run
z=bottom+(i+1)*rise
cube("Handrail upright",(x,y,z+.68),(.28,.28,1.4),ink,STAIRS,0,.03)
# Vertical piers physically meet the underside of the flight.
for yy in (8.4,1,-6.2):
zunder=bottom+(y0-yy)/(y0-y1)*(level-bottom)-.62
for side in (-1,1):
cube("Stair support pier",(sx+side*2.15,yy,max(.85,zunder/2)),(.42,.5,max(.45,zunder-.18)),chalk,STAIRS,0,.03)
# Terrace rails preserve a wide stair entrance and an open apron at the upper door.
gz=level+1.25
cube("West terrace guardrail",(-18.7,0,gz),(.34,30,1.1),ink,STAIRS,0,.03)
for y,l in ((-1,11),(11,7)): cube("East terrace guardrail",(18.7,y,gz),(.34,l,1.1),ink,STAIRS,0,.03)
for y in (-17.1,17.1):
for x,l in ((-14,8),(14,8)): cube("Terrace end guardrail",(x,y,gz),(l,.34,1.1),ink,STAIRS,0,.03)
for x in (-18.7,18.7):
for y in (-13,13): cube("Terrace rail post",(x,y,gz),(.46,.46,1.4),chalk,STAIRS,0,.045)
# Pencil grid seams stop at windows and the front door opening.
fy=FRONT-.72
for z in (BASE+2.0,BASE+9.6):
spans=[(-W/2,W/2)]
for cx,ow,lo,hi in [(-8.5,5.4,3.1,7.7),(0,4.8,0,8.5),(8.5,5.4,3.1,7.7)]:
if lo-.1<=z-BASE<=hi+.1:
spans=[p for a,b in spans for p in ((a,min(b,cx-ow/2)),(max(a,cx+ow/2),b)) if p[1]-p[0]>.3]
for a,b in spans: cube("Broken pencil course",((a+b)/2,fy,z),(b-a,.07,.12),pencil,TRIM,0,.008)
for x in (-16,-11.4,-5.6,5.6,11.4,16):
cube("Front pencilled joint",(x,fy,BASE+H/2),(.11,.07,H-.4),pencil,TRIM,0,.008)
for side in (-1,1):
x=side*(W/2+.035)
for y in (-10,-2,6): cube("Side pencil course",(x,y,BASE+5.8),(.07,14,.12),pencil,TRIM,0,.008)
for z in (BASE+4,BASE+8): cube("Side pencil course",(x,0,z),(.07,D-1,.12),pencil,TRIM,0,.008)
# Entry path ties the threshold to the paving; planter and lantern add scale.
cube("Stone entry path",(0,-22,.05),(12,8,.15),chalk,SET,0,.04)
cube("Front step lower",(0,-18.7,.25),(7.2,2.6,.35),stone,SET,0,.04)
cube("Front step upper",(0,-17.1,.48),(6.4,1.6,.32),chalk,SET,0,.04)
cube("Terracotta planter",(-12,-19.4,.78),(5.6,4,1.1),terra,SET,0,.07)
cube("Planter soil",(-12,-19.4,1.38),(4.7,3.1,.14),green,SET,0,.025)
for x in (-13.1,-12,-10.9): cube("Planter shrub",(x,-19.4,2.1),(.65,.65,1.4),green,SET,0,.16)
cube("Wall lantern frame",(11.6,FRONT-.95,7),(1.2,.65,1.8),ink,TRIM,0,.05)
cube("Wall lantern glass",(11.6,FRONT-1.31,7),(.78,.15,1.1),amber,TRIM,0,.04)
for name,loc,power,size in [("Living pendant",(-7,1,TOP-1),650,2.2),("Kitchen pendant",(9,5,TOP-1),500,1.8),("Study pendant",(0,2,UT-1),360,1.5)]:
ld=bpy.data.lights.new(name,"POINT")
ld.energy=power; ld.color=(1,.62,.35); ld.shadow_soft_size=size
obj=bpy.data.objects.new(name,ld); SET.objects.link(obj); obj.location=loc
# Bright render camera frames the door, occupied windows, stair support and both roof levels.
world=bpy.data.worlds.new("Pale blue studio sky")
scene.world=world; world.use_nodes=True; world.node_tree.nodes.clear()
bg=world.node_tree.nodes.new("ShaderNodeBackground")
out=world.node_tree.nodes.new("ShaderNodeOutputWorld")
world.node_tree.links.new(bg.outputs["Background"],out.inputs["Surface"])
bg.inputs["Color"].default_value=(.34,.59,.76,1); bg.inputs["Strength"].default_value=.52
sd=bpy.data.lights.new("Soft afternoon sun","SUN")
sd.energy=1.8; sd.angle=math.radians(18)
sun=bpy.data.objects.new("Soft afternoon sun",sd); SET.objects.link(sun)
sun.rotation_euler=(math.radians(28),math.radians(-24),math.radians(-32))
ad=bpy.data.lights.new("Large facade fill","AREA")
ad.energy=12000; ad.shape="DISK"; ad.size=72
area=bpy.data.objects.new("Large facade fill",ad); SET.objects.link(area)
area.location=(36,-52,58)
area.rotation_euler=(Vector((0,0,10))-Vector(area.location)).to_track_quat("-Z","Y").to_euler()
cd=bpy.data.cameras.new("House detail camera")
cam=bpy.data.objects.new("House detail camera",cd); SET.objects.link(cam)
cam.location=(63,-86,46)
cam.rotation_euler=(Vector((0,-.5,11))-Vector(cam.location)).to_track_quat("-Z","Y").to_euler()
cd.type="ORTHO"; cd.ortho_scale=66; cd.clip_end=500; scene.camera=cam
scene.render.engine="CYCLES"; scene.cycles.samples=40; scene.cycles.use_denoising=True
scene.render.resolution_x=1650; scene.render.resolution_y=1300; scene.render.resolution_percentage=85
scene.render.image_settings.file_format="PNG"; scene.render.image_settings.color_mode="RGBA"; scene.render.film_transparent=False
scene.view_settings.view_transform="AgX"; scene.view_settings.look="AgX - Medium High Contrast"
scene.render.filepath=RENDER_OUT
scene["Footprint"]="34 x 30 studs"
scene["Stories"]=2
scene["RoofAccess"]=True
scene["ConnectionPlan"]="Front door opens into a furnished room. Supported exterior stair runs from ground landing to roof deck; upper door opens into furnished second floor. No stair leads to the pitched roof."
bpy.ops.wm.save_as_mainfile(filepath=BLEND_OUT)
bpy.ops.render.render(write_still=True)
result={"blend":BLEND_OUT,"render":RENDER_OUT,"objects":len(scene.objects),"footprint":[34,30],"stories":2,"treads":count}
print(result)
Loaded 100 of 211 files, more files were not shown because too many files have changed in this diff. Show more