Procedural Death Star - Unreal 5.5 with PCG and HLSL

This project showcases a procedural Death Star built using PCG and HLSL. The construction areas are easily controllable by the placement of basic tagged actors.

This project consists of three general components - the Exterior, the Interior, and the Dish. Each component includes a Blueprint and at least one PCG graph. The project also includes a variety of static mesh and material assets.

For the interior, a sphere is created using a Points Grid and HLSL.  The HLSL culls interior points, points inside the dish, and points outside the sphere radius.  It also identifies boundary points.

For the interior, a sphere is created using a Points Grid and HLSL. The HLSL culls interior points, points inside the dish, and points outside the sphere radius. It also identifies boundary points.

A small percentage of boundary points are selected, scaled up, and used to subtract chunks out of the interior points.

A small percentage of boundary points are selected, scaled up, and used to subtract chunks out of the interior points.

Using basic tools available in Modeling Mode, I built  several meshes for use in the interior.

Using basic tools available in Modeling Mode, I built several meshes for use in the interior.

The final result.

The final result.

The exterior surface is created by sampling vertex positions on a dense poly sphere created in Zbrush.

The exterior surface is created by sampling vertex positions on a dense poly sphere created in Zbrush.

Using HLSL, I cull points within a certain distance of the Dish Blueprint.  I also generate UV coordinates from the latitude and longitude of each point.  This data is stored in the point metadata and ultimately passed into the material.

Using HLSL, I cull points within a certain distance of the Dish Blueprint. I also generate UV coordinates from the latitude and longitude of each point. This data is stored in the point metadata and ultimately passed into the material.

Additionally, the HLSL scales the points to match the relative change in size as the points approach the poles.

Additionally, the HLSL scales the points to match the relative change in size as the points approach the poles.

The parent BP passes in an array of Cull Mesh transform data.  Using a PCG loop and Volume Sampler the transforms are converted into Point Grids.

The parent BP passes in an array of Cull Mesh transform data. Using a PCG loop and Volume Sampler the transforms are converted into Point Grids.

The Volume Sampler automatically applies a lower density to boundary points, so its easy to independently scale interior and exterior points.  This makes it possible to completely occlude points in the interior while creating an irregular edge.

The Volume Sampler automatically applies a lower density to boundary points, so its easy to independently scale interior and exterior points. This makes it possible to completely occlude points in the interior while creating an irregular edge.

With the points oriented to world space, the intersections with the exterior generate odd shapes.   Using HLSL, the points are reoriented towards the origin.  This creates more accurate intersections.

With the points oriented to world space, the intersections with the exterior generate odd shapes. Using HLSL, the points are reoriented towards the origin. This creates more accurate intersections.

In order to add fine detail at the construction boundaries, points at the edges are randomly selected and scaled.

In order to add fine detail at the construction boundaries, points at the edges are randomly selected and scaled.

Fractional panels are spawned at these points with random transforms and offsets.

Fractional panels are spawned at these points with random transforms and offsets.

Random points are selected on the surface for lights.  The lights tend to appear in regular patterns in the reference footage - for example three in a row.  The simplest solution is to create meshes with the lights in the correct configuration.

Random points are selected on the surface for lights. The lights tend to appear in regular patterns in the reference footage - for example three in a row. The simplest solution is to create meshes with the lights in the correct configuration.

The dish is handled very similarly to the main exterior.  Points are culled, scaled, and UVs calculated with HLSL.

The dish is handled very similarly to the main exterior. Points are culled, scaled, and UVs calculated with HLSL.

The materials are fairly simple.  UV offsets are ingested from the PCG graph.  Other parameters control tiling and overall offsets.  I added some additional PCG data and material logic to drive the animation.

The materials are fairly simple. UV offsets are ingested from the PCG graph. Other parameters control tiling and overall offsets. I added some additional PCG data and material logic to drive the animation.

The textures were created in Photoshop.

The textures were created in Photoshop.