Hello developers! It’s been awhile since I’ve created a topic here but I’ll be brief with my questions.
Context: I’ve begun working on a procedural generation script system that allows me to create terrain based on Perlin Noise and Fractal Brownian Motion; however, if you don’t know what any of that terminology means, you should still be able to help. I managed to complete a chunk-based part generator that loads in terrain based on however I configure it; however, while trying to add in a terrain generation function, I have come across some questions.
Questions:
-
What is
Resolution
in terms of the function:Region3:ExpandToGrid(< int > Resolution)
and why is it used twice (once in theRegion3:ExpandToGrid
function and once in theworkspace.Terrain:FillRegion
function)? -
Will Region3’s of sizes smaller than
< Vector3 > (4, 4, 4)
be expanded to a 4x4x4 voxel grid? If so, am I able to change this usingworkspace.Terrain:WriteVoxels
and how? (My current theory is to calculate the occurrences of specific materials in a chunk and then generate 4 voxel spaces based on that array) -
Is it more or less performance intensive to use
workspace.Terrain:WriteVoxels
in comparison to looping through an array ofRegion3s
and usingworkspace.Terrain:FillRegion
?
Comments:
Chunk sizes are 8x8 (X & Z) meaning 4 voxel grids would be needed to fill one chunk on the X & Z axes. The Y axis is theoretically infinite for now. I have yet to complete the Unity tutorial on procedural generation so I haven’t got to height adjustments yet; however, any function I come up with should still work regardless of height modifications.
Thanks again for reading!