relopgrand.blogg.se

When was smooth terrain made in roblox
When was smooth terrain made in roblox





when was smooth terrain made in roblox

If not modules or modules thenįorcePlaneLock = toolName = 'Add ' or toolName = 'Subtract 'įorceDynamicMaterial = toolName = 'Subtract ' or toolName = 'Erode ' or toolName = 'Paint ' or toolName = 'Smooth ' or toolName = 'Smoother 'įorceDynamicMaterialTo = not (forceDynamicMaterial and toolName = 'Paint ') Terrain: WriteVoxels(region, resolution, materials, occupancies) If brushOccupancy > 0 and cellOccupancy > 0 then Local flippedBrushOccupancy = 1 - brushOccupancy If cellMaterial = materialAir or cellOccupancy 0 then If cellOccupancy > 0 or fullNeighbor then -problem if selection size is small.ĭesiredOccupancy = desiredOccupancy + neighborOccupancies * (strength +. Local neighborOccupancies, fullNeighbor ,emptyNeighbor = getNeighborOccupancies(occupancies, ix, iy, iz) Local desiredOccupancy = 1 - brushOccupancy 5 and (cellMaterial = materialAir or cellMaterial = materialWater) then

when was smooth terrain made in roblox

If cellMaterial = materialAir or cellMaterial = materialWater or cellOccupancy cellOccupancy then If cellMaterial ~= materialAir and cellMaterial ~= nearMaterial then 5)īrushOccupancy = xOutside * yOutside * zOutside Local zOutside = 1 - math.max( 0, math.abs(cellVectorZ / resolution) +. Local yOutside = 1 - math.max( 0, math.abs(cellVectorY / resolution) +. Local xOutside = 1 - math.max( 0, math.abs(cellVectorX / resolution) +. If not (snapToGrid or forceSnapToGrid) then 5 * resolution - distance) / resolution))

when was smooth terrain made in roblox

5)īrushOccupancy = math.max( 0, math.min( 1, (radius +. MagnitudePercent = s( math.min( 1, distance / (radius + resolution *. Local distance = math.sqrt(cellVectorX * cellVectorX + cellVectorY * cellVectorY + cellVectorZ * cellVectorZ) Modules(centerPoint, materials, occupancies, resolution, selectionSize, strength, desiredMaterial, brushShape, minBounds, maxBounds) Air then -dig ZĭesiredMaterial = isDynamic and nearMaterial or materialDictionary Local middle = materials -This little section of code sets nearMaterial to middle of matrix Local materials, occupancies = terrain: ReadVoxels(region, resolution) y + radius) / resolution), math.ceil((centerPoint. x + radius) / resolution), math.ceil((centerPoint. y - radius) / resolution), math.floor((centerPoint. x - radius) / resolution), math.floor((centerPoint. Local desiredMaterial = isDynamic and nearMaterial or materialDictionary Return linePoint + lineDirection * distance Local distance = ((planePoint - linePoint): Dot(planeNormal)) / denominator Local denominator = lineDirection: Dot(planeNormal) unit -this code is for 45 degree plane lockingįunction lineToPlaneIntersection( linePoint, lineDirection, planePoint, planeNormal) Return Vector3.new(0, 0, cameraLookVector.z / absz) ]] Return Vector3.new(cameraLookVector.x / absx, 0, 0) Return Vector3.new(0, cameraLookVector.y / absy, 0)

when was smooth terrain made in roblox

If neighbor = absx and absy >= absz then -preference towards y axis planes







When was smooth terrain made in roblox