2014년 12월 4일 목요일

포토샵,3ds max 관련.

[포토샵]

select-> color range 색영역 따기
 ctrl+shift+i   = 선택영역 반전.



[3ds max]
alt + middle mouse = 화면 회전

mesh 자동으로 줄이기
modify tab =>ProOptimizer = > mesh 줄이기

최초 작업전 포지션 위치 초기화 한 빽업본 만들어 놓기[기준 body 역활]

bone creation
1.create->helper->Dummy (pivot)
2.(menu bar)animation->bone tools->create bones
add skin
1.select object ->modify -> skin(modifier List) -> edit Envelopes
[선택영역이 빨갛게 변하지 않는다면 -skin 눌러서 하위 Envelope클릭]
2.사용할 Bones : [add] 눌러서 추가
3.아래쪽 Weight tool 버튼 or Weight Table 버튼을 눌러서 편집.

animation controll
1.하단에 있는 Auto Key 클릭
2.키프레임 조정을위한 단축키
(ctrl + alt + mouse middle = 키프레임 수평이동)
(ctrl + alt + mouse left = 오른쪽기준 키 프레임 늘리거나 줄이기)
(ctrl + alt + mouse left = 왼쪽기준 키 프레임 늘리거나 줄이기)
(ctrl + a = 모든 현재 키프레임 보이기)

2014년 10월 6일 월요일

유용한 스크립트 위치 및 개발소스 팁.

[Texture offset move]

T.B -> MoveBG.cs 참조.

[ChartBoost 사용법]

1. Plugins 폴더의 ChartBoost 하위폴더 모두복사.
2.

Deployment target = 5.1로변경

AdSupport.framework  = optional 
CoreData.framework
StoreKit.framework = optional 

 - Libraries 폴더에 libChartboost.a 를 넣은후 libiPhone-lib.a 보다 뒤로 넣음.

3.
using Chartboost;

//초기화 
void Awake() {
CBBinding.init("53f2e59489b0bb5d23de96bd""2f751b2cb83447dbfbb7039f0c41e608e2080d21");

//캐쉬에 미리 받아놓기.
StartCoroutine(InitADS());
}

IEnumerator InitADS () {
        yield return new WaitForSeconds(1f);
        CBBinding.cacheInterstitial("Init");
    }


//구현부

void ShowADS() {
CBBinding.showInterstitial("Result");
}

[Rate 작업]
GameObject 생성 -> UserFeedBackManager 컴포넌트 연결.

[스크린 좌표계에서 월드 좌표계로 변환]
Vector3  pos = cam.ScreenToViewportPoint(pos);
pos = cam.ViewportToWorldPoint(pos);

참조 = B.B.B SwipeChecker.cs [HitSign()]

[기본스크린 좌표계에서 다른 스크린 좌표계로 변환]
Vector3 pos = beforeCam.WorldToViewportPoint(this.transform.position);
pos = afterCam.ViewportToWorldPoint(pos);

2014년 10월 3일 금요일

Fade.cs 사용법

1. Fade 사용을 위한 GameObject 생성.
2. Add UISprite.
3. ShareInternalDataManager.instance.bInFade = true 로 사용.
4. 사용시 다음 부분 코루틴으로 추가.

IEnumerator Test() {
while(!ShareInternalDataManager.instance.bFadeEnd) {
             yield return new WaitForEndOfFrame();
      }
      ShareInternalDataManager.instance.bFadeEnd = false;
}

2014년 8월 28일 목요일

Unity3D

[fps]
Application.targetFrameRate = 60;
[iAD]
private ADBannerView banner = null;
banner = new ADBannerView(ADBannerView.Type.Banner, ADBannerView.Layout.Top);
banner.visible = true;
[유니티]
PlaySettings
*Use 32-bit display buffer <= 언 체크해라.
*Use 24-bit display buffer <= 언 체크해라.

Rendering Path <= forward [조명 연산 안할땐 이거]

api compatibility <= 가끔 에러날때 변경해보자.
*Optimize Mesh Data <= 메쉬 줄여줌 체크해라

delegate = 함수 포인터
sendmessage = 예전 방식.(이종의 스크립트 간의 통신 [느림])
Rigidbody 2d
  • Linear Drag     = 공기저항(클수록 천천히 떨어짐.)
  • Angular Drag  = 회전 저항(클수록 회전감도 떨어짐.) 
  • is Kinematic = 일시적으로 rigidbody 사용 안함.
  • Rigidbody.velocity = mass 영향 안받음.
  • Rigidbody.addfoces = mass 영향 받음.
  • Collision Detection [discrate = 사전계산 안함,contenues = 사전계산 함,]

Physics Material 2d
  • Friction =   마찰력 [0 - 무한대]
  • Bounciness = 바운스 [0-1]
Update 순서
1.FixUpdate
2.Update
3.LateUpdate

화면에 뭔가 그리는 작업을 할경우 Update로 처리보다는 코루틴을 사용하자(update = fps 1000 코루틴 waitForEndOfTrame() fps =  current fps) 

유니티 본 심는 툴 = spine
이펙트 사운드 = jungle audio

NGUI
  • UIAnchor = 좌표계의 0.0 시작위치를 변경 가능.
Blog.unity3d.com = 여기서 유니티 정보를 보자.

조명 
  • 라이트 푸르부 를 사용한다 point light대체용.
  • 조명에 그림자 넣는기술 Cookie(쿠키) = 배트맨부르는 조명 생각하자.
  • Ambient Light(자연광) RenderSetting 에서 조작
업데이트 함수
  • FixedUpdate = 고정된 시간(0.02)에 업데이트 받는다.(스마트 디바이스는 환경이 다르기에 프레임에 마추서 받아야함.) 충돌체 시간에 마춰서 업데이트.
  • Update = 모든 input은 여기서 사용.

OnEnable() = 켜질때 호출.
OnDisable() = 꺼질때호출.
Start() 최초 액티브됐을때 딱 한번.
Awake() 액티브 상관없이 무조건 한번.

프로파일러 사용
  • edit -> project setting -> Quality -> other ->VSync Count -> Don’t Sync

외곽이 빛나보이는 현상 = Z fighting 
  • z 축을 벌려서 해결하거나 뷰의 
  • camera -> Clipping Planes 수치를 변경.

애니메이션에 들어있는 동작에의한 이동거리 없애기.
[[GameObject선택해서 Apply Root Motion = enable]]

[Fog]
fog mode linear =  카메라 위치부터 시작.
linear fog start = linear 모드 일때만 동작
linear fog end = linear 모드 일때만 동작.

fog mode  exp1,exp2 =  사실적인 포그지만 비용이 비싸다 exp2가 젤비쌈.
fog density 만 동작.

particle system
예전방식 = .Emit();
지금 방식  [IsAlive = false]

캐릭터 컨트롤러 사용하는이유 충돌 방지(런게임 개발할때 사용하자)

[itween]
만들때 name변수를 집어넣으면 나중에 삭제가 가능하다.

[Mac]
command + option + p + r

[Asset Store]
Anti-Cheat Toolkit

[포토샵]
레트로 이미지 만들기.
이미지->이미지크기->리셈플링 명확한 가장자리.

연구해봐야할게임
  • 지오메트리 대쉬
[ios]
전면광고 chartboost.

[android]
>  adb connect localhost  [블루 스택 연결]
>  adb  install -r 1.apk        [강제인스톨]
>  adb logcat -s Unity        [유니로그만 찍음]

[C# , 기본 코딩]
foreach = [read only]
모든 클래스는 기본적으로 참조형이며 일반 형만 복사이다[int ,char 등등]
ex) foreach(Transform child in this.transform) {
모든 하위 트랜스폼 얻어옴.
단 child 는 read only
}
다차원 배열 길이 가져오기
int[,] a = new a[10,2];
a.GetLength(0) = 0번 인덱스 길이 가져옴.
a.GetLength(1) = 1번 인덱스 길이 가져옴.
string 는 stringbuilder class 를 사용하라.[메모리 최적화]

out , ref 의 차이 [ref = 포인터와 같음. out = 락걸린 포인터 호출된 함수내부에서   참조형태는사용불가 단 밸류 형태는 변경 가능  ] 

3항 연산자
(조건) ? 참 : 거짓;
ex) GUI.color = (simpleEditor.cameraObject != null) ? Color.green : Color.red;

if(List.Contains(transform) == false)   [같은것이 있는지 없는지 찾는 연산]

최대값찾기
for() {
   maxX = Mathf.Max(currentX,maxX);
}

layerMask는 비튼연산으로 사용.
Physics.Raycast(ray,out hit,100f,layerMask)

cullingmask 책에서 보자.
how to make mash??