목록Unity (205)
스토리지

1. 개발자 등록 초기비용 25달러를 지불하고 등록할 수 있다. 2. 소스 다운로드 https://github.com/playgameservices/play-games-plugin-for-unity playgameservices/play-games-plugin-for-unity Google Play Games plugin for Unity. Contribute to playgameservices/play-games-plugin-for-unity development by creating an account on GitHub. github.com 3. 유니티에서 파일 Import JAVA_HOME 에러나면 여기를 참고 https://drehzr.tistory.com/711 Unity) Android Res..

using UnityEngine; using Unity.MLAgents; using Unity.MLAgents.Sensors; using Unity.MLAgents.Actuators; public class RollerAgent : Agent { private Rigidbody rBody; public Transform target; void Start() { this.rBody = GetComponent(); } //새로운 환경을 설정. //Agent가 다양한 조건에서 작업을 해결하는 방법을 배울 수 있도록 무작위로 초기화. public override void OnEpisodeBegin() { if (this.transform.localPosition.y < 0) { this.rBody.angular..
강화학습 : 제어 이론에 기초한 것으로 환경에 대한 초기 상태나 모델없이 학습하는 기법을 제공, Agent는 환경 속에서 모델링되고 그들의 행동을 기준으로 보상을 받음. Agent : 대상 | 환경 : 어디서? ============================================================================ Unity ML Agent 다운로드 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 ..

Blending - 투명 색상을 만드는데 사용된다. 다음과 같은 그림이 있을 때, 보통 앞 쪽에 있는 것을 먼저 그린다고 생각할 것이다. 하지만 뒤 쪽의 그림을 먼저 그려야 하는 경우도 있다. 이와 같이 렌더링되는 순서를 Z-Buffer(카메라의 깊이 텍스쳐, Depth Texture)이라고 하며, 뒤의 것이 먼저 그려지는 것을 Overdraw라고 한다. docs.unity3d.com/kr/530/Manual/SL-CameraDepthTexture.html 유니티 - 매뉴얼: 카메라의 깊이 텍스처 플랫폼 별 렌더링 차이 카메라의 깊이 텍스처 Unity에서 카메라는 깊이 또는 깊이+법선 텍스처를 생성할 수 있습니다. 이것은 최소한의 G-buffer(그래픽 버퍼) 텍스처에서 포스트 프로세싱 효과 또 docs..

씬의 Skybox 설정 Cube Property 받기 SamplerCUBE로 큐브 받기 Reflection 적용 (Input 구조체에 float3 worldRefl) => surf에서 적용 및 Input 구조체에 INTERNAL_DATA 작성 float4 ref = texCUBE(SamplerCube, WorldReflectionVector(struct Input, float3)) Emission 쪽에서 출력 값을 변경하며 적정값 찾기 Bump Map은 WorldReflectionVector에 사용되어질꺼기 때문에 먼저 선언해주어야됨. Shader "Custom/Skybox" { Properties { _MainTex ("Albedo (RGB)", 2D) = "white" {} _BumpTex ("Alb..

1. 불 Shader Fire.shader Shader "Custom/Fire" { Properties { _MainTex ("Albedo (RGB)", 2D) = "white" {} _SubTex ("Albedo (RGB)", 2D) = "white" {} } SubShader { Tags { "RenderType"="Transparent" "Queue"="Transparent" } CGPROGRAM #pragma surface surf Standard alpha:fade sampler2D _MainTex; sampler2D _SubTex; struct Input { float2 uv_MainTex; float2 uv_SubTex; }; void surf (Input IN, inout SurfaceOu..

큐브맵(Cubemap) 은 환경에 대한 반사를 나타내는 여섯 개의 사각형 텍스처 컬렉션입니다. 여섯 개의 사각형은 오브젝트를 둘러싸는 가상 큐브면을 형성합니다. 각각의 면은 월드 축의 방향을 따른 뷰를 나타냅니다 (위, 아래, 좌, 우, 앞, 뒤). 큐브맵은 오브젝트의 반사나 “주변 환경”을 캡처하는 데 사용됩니다. docs.unity3d.com/kr/2018.4/Manual/class-Cubemap.html 큐브맵 - Unity 매뉴얼 큐브맵(Cubemap) 은 환경에 대한 반사를 나타내는 여섯 개의 사각형 텍스처 컬렉션입니다. 여섯 개의 사각형은 오브젝트를 둘러싸는 가상 큐브면을 형성합니다. 각각의 면은 월드 축의 방향을 따 docs.unity3d.com Shader "Custom/Test" { Pr..

빛 공식으로 쓰이는 Normal과 Light Vector의 내적을 UV 사용한다. Ramp라는 텍스쳐의 UV를 ndotl의 값으로 사용한다. Shader "Custom/Test" { Properties { _MainTex ("Albedo (RGB)", 2D) = "white" {} _RampTex ("Ramp Texture", 2D) = "white" {} _BumpTex ("Bump Texture", 2D) = "bump" {} } SubShader { Tags { "RenderType"="Opaque" } CGPROGRAM #pragma surface surf _Diff noambient sampler2D _MainTex; sampler2D _RampTex; sampler2D _BumpTex; str..

Shader "Custom/Test" { Properties { _MainTex ("Albedo (RGB)", 2D) = "white" {} _BumpTex ("Albedo (RGB)", 2D) = "bump" {} } SubShader { Tags { "RenderType"="Opaque" } CGPROGRAM #pragma surface surf _Toon noambient sampler2D _MainTex; sampler2D _BumpTex; struct Input { float2 uv_MainTex; float2 uv_BumpTex; }; void surf (Input IN, inout SurfaceOutput o) { fixed4 c = tex2D (_MainTex, IN.uv_MainTex);..

1. 두께와 색깔을 조절할 수 있는 Property 만들기 Shader "Custom/Test" { Properties { _Color ("Color", Color) = (1,1,1,1) _StrokePower ("Stroke Power", Float) = 1 _MainTex ("Albedo (RGB)", 2D) = "white" {} } SubShader { Tags { "RenderType"="Opaque" } Cull Front CGPROGRAM #pragma surface surf NoLight noshadow noambient vertex:vert float _StrokePower; fixed4 _Color; void vert(inout appdata_full v) { v.vertex.xyz +..