유니티
-
06/28 인공지능 펭귄만들기유니티/인공지능 2021. 6. 28. 15:41
1. 환경 변수 확인 파이썬 path가 잡혀있는지 확인 3.62 확인 cmd python -V where python 2. ml agent 다운로드 workspace/unity에 저장 https://github.com/Unity-Technologies/ml-agents Unity-Technologies/ml-agents Unity Machine Learning Agents Toolkit. Contribute to Unity-Technologies/ml-agents development by creating an account on GitHub. github.com ml agent 세팅 https://cafe.naver.com/gameprogramming7 종로 더조은 게임 개발자 과정 3기 : 네이버 카..
-
05/18 유니티 머신러닝유니티/인공지능 2021. 5. 18. 18:20
05/18 .yaml https://github.com/Unity-Technologies/ml-agents/blob/main/docs/Installation.md Unity-Technologies/ml-agents Unity Machine Learning Agents Toolkit. Contribute to Unity-Technologies/ml-agents development by creating an account on GitHub. github.com 1. 파이썬 3.62 설치 https://www.python.org/downloads/release/python-362/ Python Release Python 3.6.2 The official home of the Python Programming..
-
05/07 유니티 쉐이더 Diffuse Warping유니티/쉐이더 2021. 5. 7. 17:11
Diffuse Warping "Warped diffuse" 빛공식으로 쓰이는 노멀과 라이트 벡터의 내적을 UV로 사용한다 Ramp Texture 순서 Ramp Texture를 적용 하프램버트 커스텀라이트 작성, Lighting_Warp(SurfaceOutput s, float3 lightDir, float atten) float ndotl = dot(s.Normal, lightDir)*0.5 +0.5; 변수ramp 작성 float4 ramp = tex2D(_RampTex, float2(ndotl, 0.5)); s.Albedo * ramp.rgb; 추가로 specular 적용 빛 벡터와 뷰 벡터를 노멀라이즈, normalize(lightDir + viewDir); 노멀과 1. 의 내적을 구하고 satura..
-
05/06 유니티 쉐이더 라이트 Rim Light유니티/쉐이더 2021. 5. 6. 15:06
림 라이트(Rim Lighting) 역광 프레넬 공식 Shader "Custom/RimLight" { Properties { _MainTex ("Albedo (RGB)", 2D) = "white" {} _BumpMap ("NormalMap", 2D) = "bump" {} _RimColor ("RimColor", Color) = (1,1,1,1) _RimPower ("RimPower", Range(1, 10)) = 1 } SubShader { Tags { "RenderType"="Opaque" } LOD 200 CGPROGRAM #pragma surface surf Lambert noambient #pragma target 3.0 sampler2D _MainTex; sampler2D _BumpMap; fl..
-
05/06 유니티 쉐이더 라이트 lambert와 half-lambert 연습유니티/쉐이더 2021. 5. 6. 13:06
텍스쳐 한장을 받는 쉐이더 생성 라이트이름 설정 : Test Lighting + Test 이름으로 함수 선언 반환타입은 float4 매개변수 (surfaceOutput s, float3 lightDir, //단위벡터, 뒤집힌 방향 float atten) //빛의 감쇠 : Directional Light (x), Point Light (o) 램버트 공식 : 표면벡터와 조명벡터를 내적 옵션 : saturate(표면벡터와 조명벡터를 내적) 0 ~ 1까지를 표현하고 그 값을 반환 하프 램버트 공식 : 표면벡터와 조명벡터를 내적 * 0.5 + 0.5 라이트 함수 내에서 SurfaceOutput 구조체 값 사용가능 예) s.Albedo _LightColor0 내장변수 : 조명의 색상, 강도 저장된 내장변수 Shad..
-
05/04 유니티 쉐이더 노멀 맵(범프 매핑)유니티/쉐이더 2021. 5. 4. 18:20
Shader "Custom/Standard" { Properties { _Color ("Color", Color) = (1,1,1,1) _MainTex ("Albedo (RGB)", 2D) = "white" {} _MainTex2 ("Albedo (RGB)", 2D) = "white" {} _SpecColor("Specular Color", color) = (1,1,1,1) } SubShader { Tags { "RenderType"="Opaque" } LOD 200 CGPROGRAM // Physically based Standard lighting model, and enable shadows on all light types #pragma surface surf BlinnPhong sampler2D..
-
05/04 유니티 쉐이더 램버트, 블린퐁, 스탠다드유니티/쉐이더 2021. 5. 4. 16:37
Lambert #pragma 스탠다드를 Lambert로 inout 매개변수타입를 SurfaceOutput로 BlinnPhong #pragma 스탠다드를 BlinnPhong로 inout 매개변수타입를 SurfaceOutput로 스탠다드 Shader "Custom/Standard" { Properties { _MainTex ("Albedo (RGB)", 2D) = "white" {} } SubShader { Tags { "RenderType"="Opaque" } LOD 200 CGPROGRAM #pragma surface surf Standard sampler2D _MainTex; struct Input { float2 uv_MainTex; }; half _Glossiness; half _Metallic; ..