gamedev, programmer, artist
Character Controller Test
I made a small procedural stylized terrain generator that uses geometric shapes with a point smoothing algorithm and mesh extrusion. It uses polyextrude by nicoversity. This was an experiment and my first try at procedural generation.
This function generates a set of Vector3 positions and returns them. These positions are then used to place the shapes.
This function randomly chooses shapes from the list provided and returns them.
This function takes a list of positions and a prefab shapes to generate the stylized terrain. Each shape is instantiated in one of the Vector3 positions from the positions list and then extruded with the ShapeGenerator class. The length of the extrusion always takes into account the previous extrusion length to generate different height levels. Finally, the Palette Generator is used to colour the generated mesh's materials.
The ObjectSpawner class spawns objects using random raycasting and also checks if any other object is close to the ray hit point to avoid object overlapping.
The PaletteGenerator samples colours from a small 2x2 px image. This allowed me to use the Colorwheel app to get AI powered color replacement feeding it the 2x2 image.
This function samples the colors and returns an array of them.