another link:
This plugin allows a panorama(360) 爱发电 · 连接创作者与粉丝的会员制平台
将创作的自由还给创作者!爱发电是让创作者简单地获得稳定收入的粉丝赞助平台。无论你在创作什么,都能在这里获得持续的资金支持,让创作从此更自由。
afdian.net
Example:
In the image ,the scene is based on a panorama(360) from https://polyhaven.com. You can see that the panorama is not as far away from the character as the skybox. It's realistic that the ground is right under the character's feet and can be lit by the lights in the scene, you can see the shadows cast by the character on the ground and the red lighted by the spotlight.
I've provided a zip package that includes a custom unity asset, a plugin, a example scene and a panorama for the demo from https://polyhaven.com/ .
Let me introduce how to use it , of course, you can also watch the video directly below. The video demonstrates two scenes from polyhaven and a street view from Google Maps.
1. You need to unzip the downloaded zip to the game directory, prepare a nice panorama and put it in the “Custom\Assets\Env” directory.
2. Add custom unity asset to scene, then load “Custom\Assets\envobject.assetbundle”,I provided cube and hemisphere shapes to match your panorama,choose the one of the shapes that is closest to the environment in your panorama.
3. Add plugin for the custom unity asset : “Custom\Scripts\EnvController\EnvController.cs”
4. Click "Load Env Texture" button to import a panorama.
5.Set the height value to make the ground in the panorama a good size,You can add a characters for reference.
This is the height of the ground from the perspective. The smaller the value, the closer to the ground. The environment will look bigger.
6..Rotation:If your panorama direction is inconsistent with envobject, you can rotate the panorama by setting the rotation value
7. Adjust the x z coordinates of the envobject and the "scalex scaley scalez" provided in the plugin to match the panorama.
8.Add a directional light to create shadows of objects on the ground, adjust the light and shade to make it close to the lighting in the panorama
Notice
1、On the 1.21.1 version client, if the "Load Env Texture " button does not work properly, please manually create the folder ("Custom\Assets\Env");
2、This plugin works well for panoramas with large areas of ground, if your panorama is indoors with a lot of upright objects close to the center point, they will be recognized as ground and squashed to the ground .
3、 You'd better keep Y coordinate of the envobject always at 0
4、If you want a soft shadow use a directional light .the first brightest directional light only illuminates other objects in the scene and provides soft shadows, its purpose is to balance the differences in lighting between other objects and the panorama. Other lighting works fine on the ground of the panorama
5、 This plugin has only been tested on version 1.20.77. Please contact me if you have problems with other versions