top of page
PCG_City_edited_edited.jpg

City Generator

This is a city generator I created with a previously made building generator.

To see the building generator breakdown:

Final Tool Showcase:

The tool provides flexible customizability for individual buildings and set-dressing layouts. 

What we are trying to create:

A city block generator consisting of buildings with different shapes and set dressing on the sidewalks

Technique used:

Generate buildings by creating multiple volumes using construction script

image.png
Building Volume Creator:

To create more interesting building shapes using the same building generation PCG, I decided to create collision volumes through construction script in a new blueprint with for loop node. 

image.png
2025-02-16 12-23-29.gif
Switching Materials for Individual Buildings:

In the wall material graph, I used a actor position node to retrieve the building locations in the world, and I took the modified output values as the switch value for three different color options to switch back and forth depending on the building locations. 

image_edited.jpg
2025-02-16 12-59-12.gif
Lay Out Foundation: Sidewalk and Road

Sidewalk:

I used create points grid to generate the sidewalk meshes with public variables from the blueprint for the sidewalk to spawn at the blueprint location in the world.

 

Road:

By using another create point grid and the same variables, I was able to spawn and scale the road meshes in the middle of the sidewalk plane. Then, I created named reroute nodes for the road point data and a mask for the other meshes to not spawn on the road.

image.png
image.png
image_edited.png

I spawned the building volume creator blueprints using spawn actor node on the point masks that we created before that excluded the area where the road meshes were.   

Spawning Buildings:
image.png
image_edited.jpg
Decorating the Street:

To spawn set-dressing props on the street, I used distance, difference, density noise, and density filter nodes to get different variations of point locations and density for the props to spawn. 

image.png
image.png
image.png
Overall PCG Graph:
image_edited.png
Electric Pole Generator:

I created this electric pole generator in a construction script by using points on a spline. By using the information on a spline, I was able to set the start and end points and adjust the cable length by calculating the distance between spline points. Then, I simply added the electric pole static meshes on spline points. 

image_edited.png
image.png
2025-02-16 14-11-09.gif
Asset Used:
image.png
Resource:
  • Email
  • LinkedIn

© 2025 by RANRAN JIANG.

bottom of page