[Tutorial] How to render a skybox [World Renderer]

Started by sumeshi0216 on

Topic category: User side tutorials

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[Tutorial] How to render a skybox [World Renderer]
Tue, 08/20/2024 - 05:25 (edited)

First, you will need to use the event trigger "Graphics - Set up dimension" and set up your dimension.

Next, add a new procedure element and use the event trigger "Graphics - Render sky."

 

The following procedure allows you to render a skybox.

There is the procedure in the list "Graphics procedures - Sky."

  • Yaw/Pitch/Roll: They are the skybox angles.
  • Color: It's the skybox color.
  • Constant: If it's false, the skybox will be invisible when the dimension has special fog. If it's true, the skybox will always be visible.

 

Moreover, you will need to set a texture before rendering as follows. There is the procedure "Set texture" in the list "Graphics procedures - Render effects."

Here is the guide for textures

 

Since a skybox has 6 faces, you will need to use a texture with 6 faces mapped as follows. Also, make sure each face has the same aspect ratio.

 


 

Advanced Rendering

Rotate a skybox like stars

Set the pitch to "Day level * 360."

 

Render a skybox only at night

Set the alpha to the star level multiplied by 255. As it gets darker, the skybox appears smoothly.

 

To render that only during the day, set the alpha to 1 minus the star level, multiplied by 255.

Edited by sumeshi0216 on Tue, 08/20/2024 - 05:25