블로그 이미지
Every unexpected event is a path to learning for you.

카테고리

분류 전체보기 (2737)
Unity3D (817)
Programming (474)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (228)
협업 (58)
3DS Max (3)
Game (12)
Utility (136)
Etc (96)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (53)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday
04-23 18:01

Latest Update 5/01/09
New Shader, codenamed 'Bleach' (for reasons I'll explain in a moment):
- Improved Vertex Color and Alpha support
- Tweaked the glow system to reduce blown-out glowing
- Added Light Attenuation (not yet linked to the lights' actual attenuation settings, but very good for moody lighting)
- Added Fresnel Highlights
- Added some simple subsurface scattering (nice alliteration, eh?)
- Added 'glowthru' subsurface scattering
- Half-Lambert is now tied to the alpha channel of the SSS map for added control
- Added a "Bleach Bypass" filter. Hence the shaders name. This is by no
means the marquee feature, its just a nifty little addition.

This shader is still a bit raw I feel, so I wanted to get it into your hands and see if you folks can exploit it to the point of breaking. So test the heck out of this and give me some feedback. With DomWar going on, I'm sure you all have nearly-complete characters to use as guinea pigs. 

Shader_Donze_Bleach_Beta.fx
Shader_Donze_Bleach_NoShad.fx




Important Info Concerning All Shaders
Any of the reflective shaders require DDS format cube maps for the environment. Since alot of folks don't know what a cube map or DDS is (or how to make them), here are a few samples that you can use:
Desert Scene
City Scene
Blurred version of Desert Scene (Good for brushed metal look)

I would like to encourage any of you to post images of work you've created with these shaders. Particularly when I start posting some of my more advanced shaders, I'd be very interested to see how you can get the most out of them. Hope you enjoy them!

Each shader has a 'No-Shadows' counterpart. Versions of Max prior to 2008 don't support shadows, so you'll need the no shadow version if you have Max9 or something.




NEW! COMPLETE SHADER - (requires Pixel Shader 3.0)
LAST UPDATED 4/13/09 - Version 1.1 Improved glow and added Vertex Color support
Shader_Donze_Complete.fx
Shader_Donze_Comp_NoShadows.fx




STANDARD SHADER
LAST UPDATED 1/30/09 - 4 lights and proper opacity support.
Shader_Donze_Std.fx
Shader_Donze_Std_NoShadows.fx




GLOW SHADER - (requires Pixel Shader 3.0 support for now)
LAST UPDATED 1/30/09 - 4 lights and proper opacity support.
Shader_Donze_Glow.fx
Shader_Donze_Glow_NoShadows.fx
Note: Still has one odd little bug, but I've not been able to fix it yet. Most people will never notice it anyway.




ENVIRONMENT SHADER - (requires Pixel Shader 3.0)
LAST UPDATED 1/30/09 - 4 lights and proper opacity support plus Fresnel reflectivity.
Shader_Donze_Env.fx
Shader_Donze_Env_NoShadows.fx




SKIN SHADER - (requires Pixel Shader 3.0)
LAST UPDATED 12/5/08 - first pass at skin.
Shader_Donze_Skin.fx
Shader_Donze_Skin_NoShadows.fx
Note: The skin shader has a lot of advanced features. For an explanation of them go HERE.




GLASS SHADER - (requires Pixel Shader 3.0)
LAST UPDATED 12/14/08 - first pass at glass.
Shader_Donze_Glass.fx
Shader_Donze_Glass_NoShadows.fx




TOON SHADER - (requires Pixel Shader 3.0)
LAST UPDATED 11/30/08 - first pass at toon shading.
Shader_Donze_Toon.fx
Shader_Donze_Toon_NoShadows.fx
Note: The outline part of the code is a bit shaky right now so the 'Line Thickness' setting is currently inactive.[/url]

Here's a quick explanation of the basic features available in all of my shaders. First, for those of you that have no idea how to even get a shader onto a model, here's a quick tut:

Bring up your Material Editor. Choose a material that you would like to be a DX Shader. Now in the top right there is a button that probably says "Standard" (circled in red here). Click that and you'll be presented with the menu pictured on the left. Choose "DirectX Shader" from that menu.




Voila, your material is now a shader. Now, to make it a specific shader (like the one you just downloaded from this thread) click on the big button at the top, circled here in red.



This is a path to an .fx file. So, find the one you like and select it. There are actually a bunch that ship with Max, but they are mostly for demonstraion and not all that useful.


So, once you've loaded my shader, your Material Editor will turn into this:


Now, let me explain what all of this means (most of it is pretty self-explanatory)
First, lets actually start at the bottom. The Material slot can pretty much be ignored. But, if you have an insatiable thirst for knowledge, this is a separate material that Max will use to display your model if you disable DirectX or if you try to render the scene (DirectX shaders don't render, but they really don't need to)

More importantly, at the bottom is also an option for "Technique." You have 2 options here, SingleLight and DualLight. This will tell the shader how many lights to use to light your model.

Now, back at the top, you'll see there are slots where you can specify lights and shadow casters. These, obviously, are where you specify what lights to use. If you have the Technique set to Single Light, then only "Light Position 1" and "shadowCaster1" will matter. Generally you will want the Light Position to match its cooresponding shadowCaster.

Below the lights, there is a slew of map options. First are the Diffuse Map options. This will set the color of the model. There is a "Diffuse Map" and a "Diffuse Color." If you check the box that says "Enable Diff Map" then the shader will use the Map you have selected in the Diffuse Map slot. If you uncheck "Enable Diff Map" then the shader will just use the color that you've selected in the Diffuse Color slot.

The same applies for the Specular Map. The spec map however, also has a few extra options for Glossiness. This shader is set up so that the alpha channel of the Spec Map can be used to control glossiness. If you do not want that option, you can just uncheck the box and use the spinner to control glossiness.

Next is the Normal Map. The only tricky thing here is the "Invert Green Channel" option. Basically, Max uses a somewhat oddball coordinate system. Because of this, your normal map's Green Channel needs to be inverted depending on how you generated your normal maps. So, if you select a normal map and it looks a little weird, try using this option.

You can also turn on "Half-Lambert" lighting. This is a little trick developed by Valve a long time ago. It basically softens the lighting, giving a more appealing but less-accurate look.



[출처] MAX Shader - DirectX Buzzy's Shaders|작성자 온새미로

반응형
Posted by blueasa
, |

겜브리오 2.6을 설치한 뒤 2.6.0.3의 패치(UpdateArtistTools.bat)를 하고 나서 맥스실행시 에러가 나는 경우가 있다.



이런 경우 패치업데이트될 때 맥스환경변수가 제대로 설정되지 않아 GamebryoMaxPlugin.dlu가 복사되지 않은 경우이다. 

해결법은 두가지가 있는데, 첫번째 방법으로는 겜브리오의 패치내용디렉토리에 있는 맥스플러그인을 직접복사해주는 방법이다.

3dmax가 2008이라면 다음디렉토리에서 GamebryoMaxPlugin.dlu를 맥스디렉토리로 복사해주면 된다. 
겜브리오의 패치내용디렉토리\ToolLibs\ArtPlugins\MaxPlugin\Win32\VC80\Shipping_Max2008

두번째 방법으로는 제어판의 시스템에서 환경변수를 지정하는 것이다.



환경변수에서 시스템변수를 보면 3dmax 2009의 환경변수가 잘못되어 있다. UpdateArtistTools.bat의 내용을 보면 

3dmax 9은 MAXINSTALLPATH90
3dmax 2008은 MAXINSTALLPATH2008
3dmax 2009은 MAXINSTALLPATH2009
3dmax 2010은 MAXINSTALLPATH2010

로 되어 있다.



그러므로 인스톨되어 있는 맥스버전별로 환경변수를 새로만들기로 만들어넣거나 수정해야 한다.



출처 : http://stnzone.com/gboard/blog/?id=1437


반응형
Posted by blueasa
, |
게임엔진인 겜브리오는 데이타를 공유할 수 있도록 설계가 되어 있어서 자동적으로 텍스처메모리를 공유해서 사용하는 줄 아는 경우가 많다. 

물론 nif를 로딩한 뒤 그 것을 clone하여 사용하면 nif에 사용된 폴리곤과 텍스처메모리는 공유를 해서 사용하지만 다음과 같은 경우에는 텍스처메모리가 공유가 되지 않는다. 

1) a.nif 와 b.nif 가 t.dds 를 같이 사용하지만 텍스처를 내부에 넣어서 추출한 경우
 a.nif 로딩할 때랑 b.nif 를 로딩할 때는 각각 별도의 텍스처메모리로 생성되어서 사용된다.

2) a.nif 와 b.nif 가 t.dds 를 같이 사용하고 텍스처를 외부에 두고 추출한 경우
 a.nif 와 b.nif 로딩할 때 t.dds를 찾아 로딩하지만 역시나 별도의 텍스처메모리로 생성되어서 사용된다.

그럼 clone할 때를 제외하고는 텍스처메모리는 공유를 안된다는 이야기냐?! 기본적으로는 그렇다. 

다만 수동적으로 공유하게 할 수는 있다. 

여기에는 3가지정도의 방법론이 있다.

1) 똑같은 NiStream용 인스턴스를 사용하는 방법

NiStream fp;
fp.Load("a.nif");
:
fp.RemoveAllObjects();
fp.Load("b.nif");

위와 같이 하면 a.nif 에 쓰인 t.dds용 텍스처메모리는 b.nif 에서 공유되어서 사용된다. 

2) NiTexturePalette 객체를 NiStream끼리 공유하는 방법

(NiTexturePalette는 gamebryo에서 텍스처를 공유해서 사용할 수 있도록 만들어 놓은 인터페이스이다. 실제로는 NiDefaultTexturePalette 객체를 쓰면 된다)

NiDefaultTexturePalettePtr spTexturePalette = NiNew NiDefaultTexturePalette;
:
NiStream fp1;
fp1.SetTexturePalette(spTexturePalette);
fp1.Load("a.nif");
:
NiStream fp2;
fp2.SetTexturePalette(spTexturePalette);
fp2.Load("b.nif");

3) 전역으로 텍스처검색을 하도록 NiStream의 설정값을 변경하는 방법

기본적으로 NiStream은 생성자에서 NiDefaultTexturePalette객체를 하나 생성한다. 이때 NiDefaultTexturePalette가 내부검색옵션으로 되어 있는데, 이것을 글로벌검색으로 변경해주면 생성된 NiTexture 리스트를 모두 돌면서 검색해 같은 이름의 텍스처가 있으면 공유해 사용한다.

NiStream fp1;
((NiDefaultTexturePalette*)fp1.GetTexturePalette())->SetSearchGlobalTextureList(true);
fp1.Load("a.nif");
:
NiStream fp2;
((NiDefaultTexturePalette*)fp2.GetTexturePalette())->SetSearchGlobalTextureList(true);
fp2.Load("b.nif");


ps : 편의를 위해서는 겜브리오에서 기본설정이 전역을 찾도록 되어 있고 이를 수동으로 끄게 하는 게 더 편하지 않았을 까 생각해 본다. 


출처 : 
http://stnzone.com/gboard/blog/?id=1689 
반응형

'Gamebryo > Learn' 카테고리의 다른 글

DirectX 디바이스 얻어오기  (0) 2010.11.04
충돌 박스 노드에 임시 생성  (0) 2010.07.02
여러창 동시 렌더링  (0) 2010.07.02
Gamebryo 템플릿 클래스  (0) 2010.04.08
렌더러를 만들어보자  (0) 2010.04.08
Posted by blueasa
, |

스텐실 버퍼

stencil buffer는 특수한 효과를 위한 off-screen buffer로, back buffer 및 depth buffer와 동일한 해상도를 가진다. 따라서, stencil buffer 내의 (i, j)번째 픽셀은 back/depth buffer의 (i, j)번째 픽셀과 대응된다.

이름이 의미하는 것 처럼 stencil buffer는 back buffer의 일정 부분이 렌더링되는 것을 막는 효과를 위해 사용된다. 예를 들어, 거울에 특정 물체를 반사하도록 할려고 한다면, 거울에 반사되는 부분에 대해서만 드로잉을 수행하면 된다. 이 때 거울에 비치지 않는 부분은 렌더링되는 것을 막을 수 있는 있도록 하는 것이 바로 stencil buffer다.

 

다음과 같은 곳에 활용할 수 있다.

- 거울에 비치는 물체를 그릴때

- Shadow volume 을 이용한 그림자 렌더링

- 기타 다양한 마스킹( FPS 저격 줌인? )

 

기초 지식

렌더링 테스트의 순서 : 스텐실 테스트 -> Z-Test

 

 

In 게임브리오(StencilShadow.cpp)

 

NiStencilPropertyPtr spStencil = NiNew NiStencilProperty;
spStencil->SetStencilOn(true);

// 스텐실 테스트는 항상 통과하도록함
spStencil->SetStencilFunction(NiStencilProperty::TEST_ALWAYS);

// 스텐실 테스트에 실패해서 아무것도 그려지지 않게 생겼을 경우...
spStencil->SetStencilFailAction(NiStencilProperty::ACTION_KEEP);

// 스텐실 테스트와 Z-Test 모두 통과 했을 경우...
spStencil->SetStencilPassAction(NiStencilProperty::ACTION_INCREMENT);

// 스텐실 테스트는 통과했으나, Z-Test에서 통과하지 못했을 경우...
spStencil->SetStencilPassZFailAction(NiStencilProperty::ACTION_KEEP);

// 양면을 모두 그리도록..
spStencil->SetDrawMode(NiStencilProperty::DRAW_BOTH);
spShaft->AttachProperty(spStencil);

 

위에서 보면.. Stencil을 통과했다라는 말이.. Stencil + Z-Test 통과라는 것을 알 수 있다.

 

볼륨쉐도우

 

자세한 방법은 네이버씨에게 물어보거나, 아니면 책을 보면 쉽게 이해할 수 있다.

 

볼륨 쉐도우는

 

단순하고 정적인 Blocker가

 

복잡한 형태의 혹은 애니매이션 되는 대상에게 그림자를 드리울 때, 사용하면 가장 좋다!

 

왜? 볼륨쉐도우니까... 공부합시다!

[출처]
 Stencil buffer 사용하기|작성자 프라이드

반응형

'Gamebryo > Lecture' 카테고리의 다른 글

Mesh 만들기  (0) 2011.11.08
Mesh의 생성 ( Particle, 검궤적 등 )  (0) 2011.11.08
게임브리오 2D Line관련  (0) 2011.10.30
FrameRenderSystem에서.. 커스텀알파소터프로세스..  (0) 2011.09.18
무기잔상효과  (0) 2011.02.08
Posted by blueasa
, |

Mesh 만들기

Gamebryo/Lecture / 2011. 11. 8. 15:09

MeshData 제작

 

StencilShadow와 Eturnum 샘플을 보면 Mesh를 프로그램에서 만들어 내는 방법을 배울 수 있다.

 

( Eturnum의 Swoosh.cpp, StencilShadow의 StencilShadow.cpp )

 

아무래도 StencilShadow의 코드가 보기에 더 익숙하고 쉽게 보인다.

 

하지만, Eturnum 의 Mesh는 매 프레임 바뀌는 Mesh에 더 빠른 코드인것 같다.

 

자세한 내용은 두 개의 샘플을 열어보자.

 

Bound 설정

 

Gamebryo는 Camera culling을 기본적으로 행하고 있기때문에

 

Mesh를 만들면 반드시 WorldBound를 업데이트 시켜줘야 한다.

 

두 가지 함수를 통해서 할 수 있는데..

 

1 번 방식 ( Eturnum의 Swoosh.cpp )

----------------------------------------

NiBound kBound;
kBound.SetCenter(0.0f, 0.0f, 0.0f);
kBound.SetRadius(10000.0f);
m_pkMesh->SetModelBound(kBound);

 

2 번 방식 ( StencilShadow의 StencilShadow.cpp )

----------------------------------------

spSideWall->RecomputeBounds();

 

2 번 방식이 더 정확하고 편해보인다. 다만 계산이 조금 들어간다는게 단점이다. ( 요즘 CPU가 얼마나 빠른데... )

 

노말 설정

 

이 외에도 DirectX의 CalcNormal과 같은 Normal을 계산해주는 함수도 있다. ( StencilShadow의 StencilShadow.cpp )

 

NiMeshUtilities::CalculateNormals( spSideWall,
NiCommonSemantics::POSITION(), 0, NiCommonSemantics::NORMAL(), 0,
NiDataStream::ACCESS_CPU_READ | NiDataStream::ACCESS_GPU_READ |
NiDataStream::ACCESS_CPU_WRITE_STATIC );

[출처]
 Mesh 만들기|작성자 프라이드

반응형

'Gamebryo > Lecture' 카테고리의 다른 글

Stencil buffer 사용하기  (0) 2011.11.08
Mesh의 생성 ( Particle, 검궤적 등 )  (0) 2011.11.08
게임브리오 2D Line관련  (0) 2011.10.30
FrameRenderSystem에서.. 커스텀알파소터프로세스..  (0) 2011.09.18
무기잔상효과  (0) 2011.02.08
Posted by blueasa
, |

매 프레임마다 메쉬를 업데이트 해야하는 경우가 있을 경우...

 

void Update()

{

spMesh = NiNew NiMesh();

}

라는 식으로 코딩을 해서는 안된다.

 

NiNew 가 많이 느리고, 새롭게 만든 Mesh에 새로운 DataStream을 생성 해야하므로, 속도가 많이 느려지게 된다.

 

그것을 피하는 방법은 다음과 같다.

 

1. 최초 한번만 불리는 부분에서 Mesh를 생성

2. DataStream을 적당한 사이즈로 준비한다. 100개의 폴리곤 정도라면, Vertex = 3 * Poly, Index = 3 * Poly 정도로 만들면 충분함.

   ( 사용할 PrimitiveType 별로, 적당히 넣어주면 될 듯 )

3. 매 프레임 DataStream 을 Lock하여 데이터를 넣어주고,

4. DataStream의 SetRegion함수를 이용하여, 사용할 양을 지정해준다.

   ex >  kPositionLock.GetDataStream()->SetRegion( NiDataStream::Region(0,(NiUInt32)vecVertices.size()*iCount), 0 );

 

샘플에도 있는 코드지만, 의외로 아무 생각없이 만드는 경우가 있어서 ^_^;;

[출처]
 Mesh의 생성 ( Particle, 검궤적 등 )|작성자 프라이드

반응형

'Gamebryo > Lecture' 카테고리의 다른 글

Stencil buffer 사용하기  (0) 2011.11.08
Mesh 만들기  (0) 2011.11.08
게임브리오 2D Line관련  (0) 2011.10.30
FrameRenderSystem에서.. 커스텀알파소터프로세스..  (0) 2011.09.18
무기잔상효과  (0) 2011.02.08
Posted by blueasa
, |
[GB2.6]

직접 만든 mesh(Trail/GroundDecal 등)가 계속 보여야 되는데도 일정 각도에서 컬링 되는 문제..

이런저런 엄한짓 끝에..

바운딩박스를 직접 만든 mesh 오브젝트에 맞게 업데이트를 계속 해줘야 된다는 결론..

조심하자..
반응형

'Gamebryo > Shoveling' 카테고리의 다른 글

NiNew 사용 시기  (0) 2010.04.29
[삽질] 스마트 포인터 해제  (0) 2010.04.13
Posted by blueasa
, |

출처 : http://cafe.naver.com/dxgameprogramming/1752


NiLine 클래스는 2.6부터 사라져서 저도 라인 만들 때 NiMesh를 써서 만들었습니다. path에서 waypoint들 나올테니 나온 좌표들 가지고 벡터에 넣어서 그리시면 될겁니다.

 

TestMakeLine(const NiPoint3 & kStartPos, const NiPoint3 & kEndPos)

{

NiMesh * pkWaypointLine = NiNew NiMesh; 
 pkWaypointLine->SetPrimitiveType(NiPrimitiveType::PRIMITIVE_LINES);

 NiUInt8 uiAccessMask = NiDataStream::ACCESS_CPU_READ | 
  NiDataStream::ACCESS_CPU_WRITE_MUTABLE | NiDataStream::ACCESS_GPU_READ;

 NiDataStreamRef* pkPositionRef = pkWaypointLine->AddStream(
  NiCommonSemantics::POSITION(), 0, NiDataStreamElement::F_FLOAT32_3, 
  4, uiAccessMask, NiDataStream::USAGE_VERTEX);
 NIASSERT(pkPositionRef);

 NiDataStreamRef* pkIndexRef = pkWaypointLine->AddStream(
  NiCommonSemantics::INDEX(), 0, NiDataStreamElement::F_UINT16_1, 
  4, uiAccessMask, NiDataStream::USAGE_VERTEX_INDEX);
 NIASSERT(pkIndexRef);

 NiDataStream * pkPositionStream = pkPositionRef->GetDataStream();
 NiDataStream * pkIndexStream = pkIndexRef->GetDataStream();

 pkPositionStream->GetRegion(0).SetRange(0);
 pkIndexStream->GetRegion(0).SetRange(0);

 NiDataStreamElementLock kPositionsLock = NiDataStreamElementLock(
  pkWaypointLine, NiCommonSemantics::POSITION(), 0,
  NiDataStreamElement::F_FLOAT32_3);
 NIASSERT(kPositionsLock.IsLocked());

 NiDataStreamElementLock kIndicesLock = NiDataStreamElementLock(
  pkWaypointLine, NiCommonSemantics::INDEX(), 0,
  NiDataStreamElement::F_UINT16_1);
 NIASSERT(kIndicesLock.IsLocked());

 NiTStridedRandomAccessIterator<NiPoint3> kPositionsIter = 
  kPositionsLock.begin<NiPoint3>();

 NiTStridedRandomAccessIterator<NiUInt16> kIndicesIter = 
  kIndicesLock.begin<NiUInt16>();

 kPositionsIter[0] = kStartPos;
 kIndicesIter[0] = 0;

 kPositionsIter[1] = kEndPos;
 kIndicesIter[1] = 1;

 pkPositionStream->GetRegion(0).SetRange(2);
 pkIndexStream->GetRegion(0).SetRange(2);

 NiVertexColorProperty* pkVC = NiNew NiVertexColorProperty;
 pkVC->SetSourceMode(NiVertexColorProperty::SOURCE_IGNORE);
 pkVC->SetLightingMode(NiVertexColorProperty::LIGHTING_E);
 pkWaypointLine->AttachProperty(pkVC);

 NiMaterialProperty* pkMat = NiNew NiMaterialProperty;
 pkMat->SetEmittance(NiColor(0.0f, 0.0f, 1.0f));
 pkMat->SetAlpha(1.0f);
 pkWaypointLine->AttachProperty(pkMat);

 pkWaypointLine->RecomputeBounds();
 pkWaypointLine->UpdateProperties(); 
 pkWaypointLine->Update(0);

 g_vWaypointLine.push_back(pkWaypointLine);

}

 

저는 2.6에서 위와 같은 방법으로 검출된 path 연결해서 쓰고 있습니다.

반응형

'Gamebryo > Lecture' 카테고리의 다른 글

Mesh 만들기  (0) 2011.11.08
Mesh의 생성 ( Particle, 검궤적 등 )  (0) 2011.11.08
FrameRenderSystem에서.. 커스텀알파소터프로세스..  (0) 2011.09.18
무기잔상효과  (0) 2011.02.08
캐릭터 기울기 연산  (0) 2011.02.08
Posted by blueasa
, |

NiImageConverter::SetPlatformSpecificSubdirectory 란 함수를 이용해보세요.
반응형

'Gamebryo > Effect' 카테고리의 다른 글

Effect 애니메이션 초기화 방법  (0) 2011.09.21
[펌] 체인라이트닝 이펙트 만들기  (1) 2011.06.11
[펌] 이펙트 에니메이션 방법  (1) 2011.05.20
강의자료 - 파티클 예제  (0) 2011.03.22
Setup about Effect Dumy…  (0) 2011.03.21
Posted by blueasa
, |
저 같은 경우 예전에 이벤트 발생 했을 때 특정 노드만 애니메이션 해야 하는 기능이 있었는데요 도움이 될지 모르겠네요.
NiTimeController* pkControl = spStrongBoxDoor->GetControllers();
pkControl->SetAnimType(NiTimeController::APP_INIT);
float fAccTime = TimeMgr::GetInst()->GetAccumTime();
NiTimeController::StartAnimations(spStrongBoxDoor, fAccTime);
spStrongBoxDoor->Update(fAccTime);
NiTimeController::StopAnimations(spStrongBoxDoor);

애니메이션 시킬 노드를 초기화 하고 전체 애니 시간을 설정해 준 후 업데이트 한 다음에 멈춰 버립니다.
그 다음에 이벤트 발생 했을때 NiTimeController::StartAnimations(spStrongBoxDoor);
이렇게 호출 해서 사용 했습니다. 위와 같이 사용 하면 딱 한 루푸만 작동하고 멈췄습니다.


출처 : http://cafe.naver.com/dxgameprogramming/1661 의 리플 중 [딸기하나]님 리플..
반응형
Posted by blueasa
, |