티스토리 뷰
Unity Version: 2020.3.14f1
Platform: PC, Mac & Linux Standalone
Template: Universal Render Pipeline
VR Plugin: Oculus Integration (v32.0)
참고: https://lefthanddeveloper.tistory.com/2
URP에서 VR + PC 두 화면 따로 출력하기
Unity Version: 2020.3.14f1 Platform: PC, Mac & Linux Standalone Template: Universal Render Pipeline VR Plugin: Oculus Integration (v32.0) VR 헤드셋을 착용하고 있는 사람의 화면과 PC에서 나오는 화면을..
lefthanddeveloper.tistory.com
출력 화면을 VR 카메라 화면이 아닌 일반 3인칭 뷰 camera를 나오게 하는 방법.
1. 씬에 VR camera와 일반 3인칭 뷰 camera를 두 개 배치
2. 일반 camera에 <camera depth>값을 VR Camera 보다 높여주기
3D 또는 <HDRP> template에서는 inspector 창에서 Camera Component를 보면 camera depth 값을 입력해줄수있다.
<URP>에서는 depth 값을 inspector에서 찾을 수 없었다. 그래서 CamDepth.cs 클래스를 하나 만들어서 일반 Camera의 Component로 추가하고 Start()에서 GetComponent<Camera>().depth 로 depth 값을 수정해 줄 수 있다.
[RequireComponent(typeof(Camera))]
public class CamDepth : MonoBehaviour
{
Camera cam;
public int depth;
void Start()
{
cam = GetComponent<Camera>();
cam.depth = depth;
}
}
그리고 한가지 더 확인해야 할것은 VR Camera에서는 Target Eye를 Both로 하고 일반 Camera에서는 Target Eye를 none으로 설정해주어야한다. (Target Display는 같아도 상관없다. 그냥 Game View에서 다른 화면을 확인해보고 싶다면 다르게 설정해주면 된다)
위와 같이 설정해주면 VR플레이어는 HMD에서 VR 화면이 보이고, PC에서는 일반 Camera의 화면을 보여주게 된다.
'Unity' 카테고리의 다른 글
unity_ 타임라인 영상 기록 추출 (0) | 2022.11.11 |
---|---|
unity_TD_udp통신 (0) | 2022.11.07 |
Unity 2020: 시네머신 ///// Timeline (0) | 2022.10.19 |
unity _ visual studio 연결 (0) | 2022.10.18 |
Unity Install Setting (0) | 2022.03.18 |
- Total
- Today
- Yesterday
- TouchDesigner
- three.js
- AI
- oculuspro
- RNN
- Arduino
- 후디니
- houdini
- imgtoimg
- 라즈베리파이
- node.js
- Express
- sequelize
- ai film
- runwayai
- 유니티
- Midjourney
- Java
- DeepLeaning
- opencv
- Python
- krea
- ai image generator
- Unity
- colab
- MQTT
- CNC
- google ai studio
- docker
- VR
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |