About the use of sky boxes in unity

Source: Internet
Author: User

Sky Box

It's a box, a square box. In fact itself is a kind of shader, need material ball to do carrier.

1: A scene is made up of 6 square textures, which appear to be in the real field of view;
2: Two Kinds of sky boxes:
Scene Sky Box window->lighting->scene->skybox, switch camera scene does not change;
Camera Sky Box: Add the Sky Box assembly on the camera, switch the camera, the Sky box is switched;
3:unity developing the actual Sky box:
(1) Create a material
(2) Use the shader of the Sky box;
(3) Configure the Sky box resources;
(4) Check the effect;
(5) Configure the Global Sky box, configure the camera's Sky box;

Sky Box Instance 1------Global Sky Box

1. Create a Unity Engineering catalog

2. Create a material ball myskybox, set its shader to skybox---->6 sided (common in six directions)

3. Create a Skybox folder under the Resources folder, and copy the pictures of the 6 sky boxes around the top and bottom of the picture.

4. Then drag the 6 sky boxes into the texture properties of the material ball Myskybox

5. Finally, the Myskybox is finished by dragging the material into the window->lighting->scene->skybox. The default Sky box material is Default-skybox

Sky Box Example 2------camera Sky Box

1. Add a Skybox component to the main camera main, and drag the Myskybox material in instance 1 into the Sky box attribute in the Skybox component.

The 2.Scene view does not show the appearance of the Sky box, but the game view shows

Tips:

If you want to let the Inspector panel is not because the mouse click on other directory files caused by the panel switch, you can click on the upper right corner of a small lock, until you want to stay in the panel, lock, and then go to other directories to select files to drag and drop. After the setup is over, you can unlock some locks.

About the use of sky boxes in unity

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.