Original address: http://www.cnblogs.com/xiuj/p/5869808.html
1. Convert a panorama picture to a 6-side cube
- Initial original picture
- Decomposition of images into 6 parts via PTgui software
2. Work with Unity
- Create 3D Project Engineering
- Import the previous 6 images into assets
- Create a metrial and set it to the shader as follows, and the 6 images corresponding to the left and right up and down respectively
- After the setup is complete, view the effect below:
- Open the windows/lighting, use the material ball of the previous step to set scene, this time the right side of the Panorama information is replaced (ignore the 2 reflective objects, will speak later)
- However, there are still some gaps in the current map, which is due to the self-looping of the map, which is resolved as follows:
In assets, select the most original 6 poster, set to not loop after click Apply App
3. How to show the reflection effect
- Create a sphere sphere and a new material ball metrial, and set the shader of the material ball as follows:
- Create a cubemap, which is mainly used to show the effect of reflection,
- Set the CubeMap to drag and drop the previous 6 stickers in
- Select the material ball created in the previous step, drag and drop the cubemap to the corresponding position
- When you drag the material ball directly onto the sphere, the sphere appears to reflect the effect
ZT: Making Sky boxes through Unity3d