Data Driven Starfield

Installation and Use

Add the asset package to your project and drop one of the Generators in your level. Stars are generated at Runtime or at Construction time by pressing the SpawnNow button in the Details tab.

BPStarGenerator

This places stars at PlanetariumScale distance (if stars show up in front of other distant objects, raise this parameter). The Amount controls how much of the table is generated, 1 is all of them (30k stars, takes about 1 second).

SmallestStar, LargestStar and StarScale are multipliers to control star size, while Exponent will control the difference between smaller and bigger stars

BP3DStarGenerator 

This blueprint will place spherical stars in XYZ position in light years multiplied by StarfieldScale

Please do not scale the blueprint object. Set scale to 1 and instead, change the multiplier parameters in the properties:

star-scale

Starfield Scale is the multiplier for the entire field.

Smallest Star and Largest Star are controlling the range of star sizes. A bigger difference between these values creates a larger difference between star sizes.

Star Scale is the multiplier of the scale for each star. This value is multiplying the size of each star model (at value 1.0, the stars are 4x4x4 cm). If you change the blueprint to point to another model, 1.0 will be whatever size the original mesh is.

The FindStar¬†event finds a star from an Hipparcos number and PointStarAtIndex function draws a debug line to it from the origin. These might be useful if you want to expand the blueprint’s functionality.

Each of the blueprints have Material Instances where you can change the color of each Spectral Class.

The Skysphere has a material instance applied that renders a Sun at the angle specified by a level directional light which you may want to use in conjunction with the normal Star Generator, but it’s completely optional and the other assets do not depend on this one.