A Textured Object is a subtype of Space Object that is visually represented with one or more textures.
The following are considered Textured Objects:
Definition Fields
- Fields from Space Object.
fade_out_handlerOPTIONAL - Defines how the object fades out when it's far away.fade_out_start_distanceREQUIRED - Distance at which the object will start to fade out.lyOPTIONAL - The distance in light years, adds up with kilometers if specified. 0 if left empty.kmOPTIONAL - The distance in kilometers, adds up with light years if specified. 0 if left empty.
fade_out_end_distanceREQUIRED - Distance at which the object will stop fading out and disappear entirely.lyOPTIONAL - The distance in light years, adds up with kilometers if specified. 0 if left empty.kmOPTIONAL - The distance in kilometers, adds up with light years if specified. 0 if left empty.
max_child_render_distanceREQUIRED - Maximum distance from which the object's children will be rendered.lyOPTIONAL - The distance in light years, adds up with kilometers if specified. 0 if left empty.kmOPTIONAL - The distance in kilometers, adds up with light years if specified. 0 if left empty.
texture_layersREQUIRED - List of textures used to represent the object, layer by layer. Layers are rendered from top to bottom, meaning the last defined layer covers all previously defined layers.textureREQUIRED - Defines the path to the texture file used for rendering the layer.rgbaREQUIRED - A set of 4 values, the first 3 (red, green, blue) define color adjustments and the last one (alpha) adjusts the transparency (255 = no transparency, 0 = full transparency).blendREQUIRED - Specifies whether or not the layer should blend with the background.sizeREQUIRED - Defines the visual size of the layer in meters. Do note that it's the "radius", so the actual size will be double of what you specify. And also note that most Stellar View planet textures only take up 1/4th of the width of the image file (8 pixel wide planets, 32 pixel wide images), so in their case, they are half as large as you would imagine (2 * 1/4 = 1/2).min_sizeOPTIONAL - When specified, defines the minimal visual size of the object. When the object is far enough away that its visual size would be smaller than min_size, the layer stops rendering.clamp_at_min_sizeOPTIONAL - When specified and min_size is present, it changes the behaviour of min_size and instead of the layer no longer rendering, it will remain at this minimum size no matter how far away the object moves.max_sizeOPTIONAL - When specified, defines the maximal visual size of the object. When the object is close enough that its visual size would be larger than max_size, the layer stops rendering.clamp_at_max_sizeOPTIONAL - When specified and max_size is present, it changes the behaviour of max_size and instead of the layer no longer rendering, it will remain at this maximum size no matter how close the object moves.rotationREQUIRED - Defines the amount by which the layer is rotated by along the axis facing the player (in degrees). This rotation is relative to the screen and won't be affected by inclination or axis rotation.uvOPTIONAL - Allows Resourcepacks to modify the UV coordinates of the provided texture.flip_uvOPTIONAL - Decides whether the texture should have its U coordinate flipped (which will mirror the texture, for example the Moon in Vanilla is mirrored compared to its actual texture file).phase_handlerOPTIONAL - Can modify which part of the texture is rendered based on current game time.ticks_per_phaseREQUIRED - Specifies how many ticks it takes before the phase switches to the next one.phase_tick_offsetOPTIONAL - Specifies the offset at which the phases start.columnsREQUIRED - defines the number of columns used for phases along the U-axis.rowsREQUIRED - defines the number of rows used for phases along the V-axis.
Examples of texture layer definition:
Here are the texture layers of Luna. Based on the order they are defined in, you can tell the moon_halo_phases.png file will be rendered first and thus be in the background, while moon_phases.png will be rendered second.
Here you can see that:
- Moon phases change each day, so we set it to 24000 ticks, which is exactly 1 day in Minecraft.
- If you set
phase_tick_offsetto 48000, it would make the Moon start at its 3rd phase. - There are 4 columns with phases (see Minecraft Wiki for reference)
- There are 2 rows with phases (see Minecraft Wiki for reference)
- The UV is flipped, just like with the Vanilla Moon.
"texture_layers":[{"texture": "stellarview:textures/environment/moon_halo_phases.png","rgba": {"red": 255, "green": 255, "blue": 255, "alpha": 255},"blend": true,"size": 7697847.735118539,"min_size": 0.15,"clamp_at_min_size": true,"rotation": 90,"uv":{"phase_handler":{"ticks_per_phase": 24000,"phase_tick_offset": 0,"columns": 4,"rows": 2},"flip_uv": true}},{"texture": "stellarview:textures/environment/moon_phases.png","rgba": {"red": 255, "green": 255, "blue": 255, "alpha": 255},"blend": false,"size": 7697847.735118539,"min_size": 0.15,"clamp_at_min_size": true,"rotation": 90,"uv":{"phase_handler":{"ticks_per_phase": 24000,"phase_tick_offset": 0,"columns": 4,"rows": 2},"flip_uv": true}}]
Here is the fade out handler of the Alpha Centauri barycenter, its children (Alpha Centauri A, Alpha Centuari B and Proxima Centauri) will stop rendering if you are further than 5 million light years away.
"fade_out_handler":{"fade_out_start_distance": { "ly": 3000000 },"fade_out_end_distance": { "ly": 5000000 },"max_child_render_distance": { "ly": 5000000 }}