12
This commit is contained in:
1 parent
9682ed0987
commit
eade0cd2ae
10 files changed
+1532033
-166651
No files matched your search
@@ -0,0 +1,107 @@
|
||||
-- Apply to the baked World1Map in Edit mode.
|
||||
-- Toolbox assets: DaveCam456 / 11751641277; FracturedSkies / 2128776869.
|
||||
local V,CF=Vector3.new,CFrame.new
|
||||
local terrain=workspace.Terrain
|
||||
local map=workspace.World1Map
|
||||
local lib=game.ServerStorage.LandscapeAssetLibrary
|
||||
local ms=game:GetService('MaterialService')
|
||||
for x=-288,287,48 do
|
||||
terrain:ReplaceMaterial(Region3.new(V(x,-24,1212),V(x+48,160,1788)):ExpandToGrid(4),4,Enum.Material.Rock,Enum.Material.Slate)
|
||||
task.wait()
|
||||
end
|
||||
local colors={Snow=Color3.fromRGB(127,163,63),Salt=Color3.fromRGB(191,155,105),Rock=Color3.fromRGB(132,139,155),Slate=Color3.fromRGB(132,139,155)}
|
||||
for name,color in colors do
|
||||
local material=Enum.Material[name]
|
||||
local variant=ms:FindFirstChild('LowPolyFlat'..name) or Instance.new('MaterialVariant')
|
||||
variant.Name='LowPolyFlat'..name;variant.BaseMaterial=material
|
||||
variant.ColorMap='rbxasset://textures/SelfView/whiteRect.png'
|
||||
variant.RoughnessMap='rbxasset://textures/SelfView/whiteRect.png'
|
||||
variant.NormalMap='';variant.MetalnessMap='';variant.StudsPerTile=32;variant.Parent=ms
|
||||
ms:SetBaseMaterialOverride(material,variant.Name);terrain:SetMaterialColor(material,color)
|
||||
end
|
||||
local old=map:FindFirstChild('LowPolyRockwork');if old then old:Destroy() end
|
||||
local folder=Instance.new('Folder');folder.Name='LowPolyRockwork';folder.Parent=map
|
||||
folder:SetAttribute('CliffCreator','DaveCam456')
|
||||
folder:SetAttribute('CliffAssetId','11751641277')
|
||||
folder:SetAttribute('RockCreator','FracturedSkies')
|
||||
folder:SetAttribute('RockAssetId','2128776869')
|
||||
local cliff=lib.LowPolyRockyCliff:FindFirstChildWhichIsA('MeshPart',true)
|
||||
local mountain=lib.MountainBorder:FindFirstChildWhichIsA('MeshPart',true)
|
||||
local stones={}
|
||||
for _,p in lib.LowPolyRockPack:GetDescendants() do if p:IsA('MeshPart') then table.insert(stones,p) end end
|
||||
table.sort(stones,function(a,b) return a.Name<b.Name end)
|
||||
local rng=Random.new(320)
|
||||
local function place(source,name,pos,size,angle,color)
|
||||
local p=source:Clone()
|
||||
for _,v in p:GetDescendants() do if v:IsA('LuaSourceContainer') or v:IsA('SurfaceAppearance') or v:IsA('Decal') or v:IsA('Texture') then v:Destroy() end end
|
||||
p.Name=name;p.Anchored=true;p.TextureID='';p.Material=Enum.Material.SmoothPlastic;p.MaterialVariant='';p.Reflectance=0
|
||||
p.Size=size;p.CFrame=CF(pos)*CFrame.Angles(0,angle or 0,0)
|
||||
p.Color=color or Color3.fromRGB(130+rng:NextInteger(-7,7),135+rng:NextInteger(-5,5),149+rng:NextInteger(-5,5))
|
||||
p.Parent=folder;return p
|
||||
end
|
||||
-- Broad vertical facets under the grassy lookout and beside the waterfall.
|
||||
local columns={
|
||||
{-75,18,1415,23,38,24},{-58,21,1417,26,44,25},{-38,22,1415,25,46,23},{-19,18,1408,24,38,23},
|
||||
{5,13,1410,22,28,24},
|
||||
{25,16,1427,23,36,27},{12,13,1423,22,29,26},
|
||||
{68,17,1425,25,39,29},{85,15,1420,25,34,30},{98,10,1410,24,25,27},
|
||||
}
|
||||
for i,p in columns do
|
||||
place(cliff,'CliffFace_'..i,V(p[1],p[2],p[3]+(i<=5 and 9 or 0)),V(p[4]*(i<=5 and 1.2 or 1),p[5],p[6]*(i<=5 and 1.15 or 1)),i*0.71)
|
||||
end
|
||||
-- Large irregular rock silhouettes replace the fine-grained mountain surface.
|
||||
for i=0,23 do
|
||||
local a=i*math.pi*2/24
|
||||
local r=239+17*math.sin(i*2.17)
|
||||
local radius=66+23*math.sin(i*3.1)^2
|
||||
local ht=76+43*math.sin(i*1.87)^2
|
||||
local pos=V(math.cos(a)*r,ht*0.43,1500+math.sin(a)*r)
|
||||
local mass=place(mountain,'MountainMass_'..i,V(pos.X-math.cos(a)*19,ht*0.51-4,pos.Z-math.sin(a)*19),V(radius*1.95,ht*1.344,radius*2.295),0,Color3.fromRGB(125+i%3*4,136+i%3*3,147+i%3*4))
|
||||
mass.CFrame=CFrame.lookAt(mass.Position,mass.Position+V(math.cos(a),0,math.sin(a)))
|
||||
task.wait()
|
||||
end
|
||||
local feet={{-64,12,1426,25,30,22},{-44,15,1428,29,35,24},{-25,10,1424,20,24,19},{27,12,1433,24,29,27},{70,15,1430,29,35,30},{92,9,1421,28,25,27}}
|
||||
for i,a in feet do
|
||||
place(stones[i],'CliffFootBoulder',V(a[1],a[2],a[3]),V(a[4],a[5],a[6]),i*0.6,Color3.fromRGB(128+i%3*3,132+i%3*3,146+i%3*3))
|
||||
end
|
||||
local rp=RaycastParams.new();rp.FilterType=Enum.RaycastFilterType.Include;rp.FilterDescendantsInstances={terrain};rp.IgnoreWater=true
|
||||
local lakes=require(game.ReplicatedStorage.FishConfig).Worlds[1].lakes
|
||||
local function gap(x,z)
|
||||
local g=math.huge
|
||||
for _,l in lakes do g=math.min(g,math.sqrt((x-l[1])^2+(z-1500-l[2])^2)-l[3]) end
|
||||
return g
|
||||
end
|
||||
-- Discrete clusters, with the dock, ramp, and trail kept open.
|
||||
for i=1,120 do
|
||||
local x,z=rng:NextNumber(-112,116),rng:NextNumber(1408,1557)
|
||||
local g=gap(x,z)
|
||||
local clear=not (math.abs(x)<27 and z>1530) and not (x< -58 and x> -95 and z>1430 and z<1494) and not (x> -24 and x<8 and z<1440)
|
||||
if g>-1 and g<7 and clear then
|
||||
local hit=workspace:Raycast(V(x,180,z),V(0,-230,0),rp)
|
||||
if hit then
|
||||
local s=rng:NextNumber(3,7)
|
||||
place(stones[i%#stones+1],'ShoreBoulder',hit.Position+V(0,s*0.18,0),V(s,s*0.8,s*0.9),rng:NextNumber(0,6.28))
|
||||
end
|
||||
end
|
||||
end
|
||||
-- Put trees on the new rock surfaces instead of leaving them inside the mountains.
|
||||
local rockRay=RaycastParams.new();rockRay.FilterType=Enum.RaycastFilterType.Include;rockRay.FilterDescendantsInstances={folder,terrain};rockRay.IgnoreWater=true
|
||||
local moved=0
|
||||
for _,tree in map.LandscapeDetails:GetChildren() do
|
||||
if tree:IsA('Model') and tree.Name=='Pine' then
|
||||
local c,s=tree:GetBoundingBox()
|
||||
local base=c.Y-s.Y/2
|
||||
local hit=workspace:Raycast(V(c.X,220,c.Z),V(0,-260,0),rockRay)
|
||||
if hit and math.abs(hit.Position.Y-base)>0.5 then tree:PivotTo(tree:GetPivot()+V(0,hit.Position.Y-base-0.3,0));moved+=1 end
|
||||
end
|
||||
end
|
||||
for _,n in {'AssetPreview','MountainPreview'} do local preview=workspace:FindFirstChild(n);if preview then preview:Destroy() end end
|
||||
map:SetAttribute('LandscapeStyle','LowPolyMatte')
|
||||
local small=map.SmallCabin
|
||||
local sc,ss=small:GetBoundingBox()
|
||||
local shore=workspace:Raycast(V(-8,180,1438),V(0,-220,0),rp)
|
||||
local sy=math.max(3.5,shore and shore.Position.Y or 3.5)
|
||||
small:PivotTo(small:GetPivot()+V(-8-sc.X,sy-(sc.Y-ss.Y/2),1438-sc.Z))
|
||||
return {rocks=#folder:GetChildren(),treesGrounded=moved}
|
||||
|
||||
|
||||
Reference in new issue
Block a user