PCG Gallery (WIP)

As an opportunity to hone in my Unreal Engine and Houdini skills, I started to work on a tool for world artists to build a gallery space using Unreal PCG Graph and Blueprint The end goal is to have a infinite real-time generated gallery that resembles a liminal space when walking inside.

Breakdown

Right now I have implemented a feature that allows paintings to generate automatically onto walls, saving a lot of unnecessary times for world artists to place paintings manually.

Different generation modes

The painting generator has three modes: Random, Grid, and Manual. Each affects painting layout in its unique way.

Random Mode The random mode scatters the painting onto the wall randomly using the Surface Sampler node

Grid Mode The grid mode produces a regular grid layout using the Create Points Grid node

Manual Mode The manual mode allows artists to provide a custom painting layout through reading a data table of points

Artist-friendly parameters

The painting generator offers various parameters for artists to control and refine the outlook of the painting layout.

Context aware generation

I added a couple checks to make sure the paintings spawned are in valid positions.

I used the Self pruning node to remove overlapping paintings.

Without Self Pruning Without self pruning

With Self Pruning With self pruning

To avoid spawning paintings partially outside the wall, I calculated the distance of each point to the closest wall boundary and compared it with the width and height of the painting mesh.

Without Edge Distance Check Without edge distance checks

With Edge Distance Check With edge distance checks

For grid mode, I added an option to respect the aspect ratio of the each cell. If each cell is stretched out horizontally, then it makes sense to spawn paintings with a landscape orientation.

No Respect Aspect Ratio Respect aspect ratio off

Respect Aspect Ratio Respect aspect ratio on

No Respect Aspect Ratio Line Underlying cell size, notice the middle two protraits dont fit the landscape dimension well

Respect Aspect Ratio Line Respecting cell size allows selected painting to fill the cell better

I organized and added comments on the PCG graph to make it clean and easy to understand.

PCG Graph Main Generation Logic PCG Graph of the main generation logic

Procedural painting frame

I also built a houdini data asset(HDA) in Houdini that generates a procedural painting frame for my PCG Painting generator tool.

Painting HDA Graph Procedural painting graph in Houdini

Future Direction

Right now, the manual mode reads a data table of points that represents a layout, but it has a strict format and can be hard to understand for general artists. In the future, I plan to add artist-friendly ways to create a custom layout that can be later converted into a data table.

In addition, I want to write a script that automatically exports various FBX meshes from Houdini into Unreal Engine with their metadatas to automate the procedural generation pipeline even further.