A Star Field is a type of Space Object that defines the shape and size of a collection of stars and dust clouds, which means it can be used to represent star clusters and galaxies.
To make Stellar View recognize your json file as a Star Field, put it inside the assets/<namespace>/stellarview/celestials/star_field folder in your Resourcepack.
Definition Fields
-
Fields from Space Object.
-
dust_cloudsOPTIONAL - Specifies the number of dust clouds that generate in the Star Field. [Min = 0 | Max = 4000] -
dust_cloud_infoOPTIONAL - Defines the path to the Dust Cloud Info file reference. -
dust_cloud_textureOPTIONAL - Defines the path to the texture file used for rendering the dust cloud texture. -
clump_dust_clouds_in_centerOPTIONAL - Decides whether dust clouds should be evenly distributed around the Star Field or if they should clump around the center, true by default. -
dust_cloud_stretchOPTIONAL - Specifies the dust cloud stretch along each of the Star Field's relative axes. -
starsREQUIRED - Specifies the number of stars that generate in the Star Field. [Min = 0 | Max = 30000] -
star_infoOPTIONAL - Defines the path to the Star Info file reference. -
star_textureOPTIONAL - Defines the path to the texture file used for rendering the star texture. -
clump_stars_in_centerOPTIONAL - Decides whether dust clouds should be evenly distributed around the Star Field or if they should clump around the center, true by default. -
star_stretchOPTIONAL - Specifies the star stretch along each of the Star Field's relative axes. -
seedREQUIRED - Specifies the seed used for randomizing the Star Field's generation. -
diameter_lyREQUIRED - Specifies the Star Field's diameter in Light Years. -
spiral_armsOPTIONAL - Defines the Star Field's individual Spiral Arms.
Star Stretch and Dust Cloud Stretch
Stretch, as the name implies, stretches the coordinates along which a star or a dust cloud generates.
This means that if a Star Field's is stretch defined as { "x": 1.0, "y": 0.25, "z": 1.0 },
a star that would have otherwise generated at coordinates (4, 4, 4) will instead generate at coordinates (4, 1, 4).
Note that these stretched coordinates are relative to the Star Field's Axis Rotation.
Spiral Arm
Spiral Arms emulate the arms of a Spiral Galaxy. Each Spiral Arm holds its own Dust Cloud Info, meaning one galaxy may have multiple Spiral Arms, each of which has different dust cloud colors.
Definition Fields
dust_cloudsOPTIONAL - Specifies the number of dust clouds that generate in the Spiral Arm. [Min = 0 | Max = 4000]dust_cloud_infoOPTIONAL - Defines the path to the Dust Cloud Info file reference.starsREQUIRED - Specifies the number of stars that generate in the Spiral Arm. [Min = 0 | Max = 30000]arm_rotationREQUIRED - Specifies the relative rotation of the Star Field's Spiral Arm around its relative Y-axis.arm_lengthREQUIRED - Specifies the relative length of the Spiral Arm compared to the Star Field's diameter.arm_thicknessREQUIRED - Specifies the relative thickness of the Spiral Arm, which decides the maximum spread of stars around the arm's central spiral.clump_stars_in_centerOPTIONAL - Decides whether stars should be evenly distributed around the Spiral Arm or if they should clump around the center, true by default.
Examples
Star Field definition example for the Milky Way galaxy:
{"coords": { "right_ascension": {"hours": 17, "minutes": 45, "seconds": 40.0409}, "declination": {"degrees": -29, "minutes": 0, "seconds": 28.118}, "distance": {"ly": 26996} },"axis_rotation": { "x_axis": 0, "y_axis": 0, "z_axis": 0 },"seed": 10842,"diameter_ly": 90000,"stars": 2000,"dust_clouds": 5,"star_stretch": { "x": 1.0, "y": 0.25, "z": 1.0 },"dust_cloud_stretch": { "x": 0.25, "y": 0.25, "z": 0.25 },"spiral_arms":[{ "dust_clouds": 25, "stars": 1500, "arm_rotation": 0, "arm_length": 1.6298770314100501, "arm_thickness": 2.0, "dust_cloud_info": "stellarview:milky_way/milky_way_arm_distribution" },{ "dust_clouds": 25, "stars": 1500, "arm_rotation": 90, "arm_length": 1.6941251689586823, "arm_thickness": 2.0, "dust_cloud_info": "stellarview:milky_way/milky_way_arm_distribution" },{ "dust_clouds": 25, "stars": 1500, "arm_rotation": 180, "arm_length": 1.9660513834462778, "arm_thickness": 2.0, "dust_cloud_info": "stellarview:milky_way/milky_way_arm_distribution" },{ "dust_clouds": 25, "stars": 1500, "arm_rotation": 270, "arm_length": 1.8086568638593041, "arm_thickness": 2.0, "dust_cloud_info": "stellarview:milky_way/milky_way_arm_distribution" }],"dust_cloud_info": "stellarview:milky_way/milky_way_core_distribution","star_info": "stellarview:main_sequence_distribution"}