KR19980035727A - How to create sprite animation - Google Patents

How to create sprite animation Download PDF

Info

Publication number
KR19980035727A
KR19980035727A KR1019960054144A KR19960054144A KR19980035727A KR 19980035727 A KR19980035727 A KR 19980035727A KR 1019960054144 A KR1019960054144 A KR 1019960054144A KR 19960054144 A KR19960054144 A KR 19960054144A KR 19980035727 A KR19980035727 A KR 19980035727A
Authority
KR
South Korea
Prior art keywords
sprite
index
previous
sprites
current
Prior art date
Application number
KR1019960054144A
Other languages
Korean (ko)
Other versions
KR100230845B1 (en
Inventor
신광성
Original Assignee
배순훈
대우전자 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 배순훈, 대우전자 주식회사 filed Critical 배순훈
Priority to KR1019960054144A priority Critical patent/KR100230845B1/en
Publication of KR19980035727A publication Critical patent/KR19980035727A/en
Application granted granted Critical
Publication of KR100230845B1 publication Critical patent/KR100230845B1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/802D [Two Dimensional] animation, e.g. using sprites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Processing Or Creating Images (AREA)

Abstract

본 발명은 그래픽 처리 장치에 관한 것으로, 특히 임의의 2차원 스프라이트의 움직임을 좀더 속도감있게 표현하기 위한 스프라이트 에니메이션 방법에 관한 것으로서, 남기고자 하는 잔상 스프라이트 갯수(N)를 초기화하는 1단계와; 이전 스프라이트 인덱스(j)를 초기화하는 2단계; 현재 스프라이트 인덱스로부터 이전 스프라이트 인덱스의 차(i-j)를 잔상 스프라이트 갯수(N)과 비교하는 3 단계; 상기 3단계의 비교결과, 인덱스 차값(i-j)이 잔상 스프라이트 갯수(N)보다 크면 해당되는 j번째 이전 스프라이트를 지우는 4단계; 이전 스프라이트의 인덱스(j)를 1증가시키는 5단계; 상기 5단계이후, 혹은 상기 2 단계의 비교결과 인덱스 차값(i-j)이 잔상 스프라이트 갯수(N)보다 작으면 현재 스프라이트를 그리는 6단계; 현재 스프라이트의 메모리 위치를 저장하는 7단계; 현재 스프라이트의 인덱스(i)를 1증가시키고, 상기 3단계부터 반복하여 수행하는 8단계로 구성된 본 발명은, 현재 스트라이프와 함께 이전 스트라이프까지 디스플레이 하여 움직임을 연속적으로 보여주므로써, 에니메이션 생성과정에서 속도감이 필요한 경우나 혹은 블러링 효과가 특히 필요한 경우에 효과적을 사용할 수 있다.The present invention relates to a graphics processing apparatus, and more particularly, to a sprite animation method for expressing a movement of an arbitrary two-dimensional sprite more quickly, comprising: a step of initializing the number of residual sprites N to be left; Initializing the previous sprite index j; Comparing the difference i-j of the previous sprite index from the current sprite index with the residual image sprite number N; A fourth step of deleting the corresponding j-th previous sprite if the index difference value (i-j) is greater than the number of residual sprites (N); 5 steps of increasing the index j of the previous sprite by one; A sixth step of drawing a current sprite after the fifth step or when the comparison result of the second step has an index difference value (i-j) smaller than the number of residual sprites (N); Storing seven memory locations of the current sprite; The present invention consists of 8 steps of increasing the index (i) of the current sprite by 1 and repeatedly performing the above steps. This can be used wherever necessary or when a blurring effect is especially needed.

Description

스프라이트 애니메이션 생성방법 ( Generating method of sprite animation )Generating method of sprite animation

본 발명은 그래픽 처리 장치에 관한 것으로, 특히 임의의 2차원 스프라이트의 움직임을 좀더 속도감있게 표현하기 위한 스프라이트 애니메이션 방법에 관한 것이다.The present invention relates to a graphics processing device, and more particularly, to a sprite animation method for expressing a movement of an arbitrary two-dimensional sprite more quickly.

최근 자동화가 진전되고 정보 사회로의 발전이 진행되면서 컴퓨터 그래픽의 응용분야가 급속히 확대되고 있는 가운데 2차원, 3차원 그래픽을 실시간으로 처리하는 애니메이션처리 기술의 개발이 활발히 전개되고 있다. 이러한 그래픽 처리기술을 이용하여 현실감과 생동감있는 영상을 만들기 위해서는 고해상도의 디스플레이(1280×1024)가 필요하며, 백만개 이상의 픽셀(pixel)에 대한 변환(transformation)과 컬러 계산을 직접 수행할 경우 방대한 양의 계산이 요구되어 진다.Recently, as the automation progresses and the information society progresses, the application fields of computer graphics are rapidly expanding, and the development of animation processing technology that processes two-dimensional and three-dimensional graphics in real time is being actively developed. This graphics processing technology requires a high resolution display (1280 × 1024) to create realistic and lively images. When performing transformations and color calculations for more than one million pixels, Calculation is required.

도 1은 일반적인 그래픽 시스템의 일예를 보인 구성도로서, 시스템 버스(1)에 연결되어있으면서 전반적인 프로그램을 수행하는 범용 중앙처리장치(CPU:2)와, 시스템 버스(1)에 연결되어 있으면서 중앙 처리 장치가 필요로 하는 데이터를 저장하고 있는 시스템 메모리(3), 시스템 버스에 연결되어 있으면서 그래픽을 처리를 담당하는 그래픽 보드(4), 그래픽 보드로부터 제공받은 비디오 신호를 디스플레이하는 모니터(5)로 구성되어 있다.1 is a configuration diagram showing an example of a general graphics system, which is connected to the system bus 1 and performs a general program (CPU) 2 that performs an overall program, and is connected to the system bus 1 while being centrally processed. It consists of a system memory (3) that stores the data needed by the device, a graphics board (4) connected to the system bus to handle graphics, and a monitor (5) to display video signals from the graphics board. It is.

그리고, 상기 그래픽 보드(4)는 그래픽 전용 프로세서(4-1)와, 그래픽 프로세서 메모리(4-2), 프레임 버퍼(4-3), 및 비디오 프로세서(4-4)로 구성되어 있다.The graphics board 4 is composed of a graphics dedicated processor 4-1, a graphics processor memory 4-2, a frame buffer 4-3, and a video processor 4-4.

상기 그래픽 전용 프로세서(4-1)는 그래픽 처리에 관련된 프로세서를 총괄하여 수행한다.The graphics only processor 4-1 collectively performs a processor related to graphics processing.

상기 그래픽 프로세서 메모리(4-2)는 상기 그래픽 프로세서에서 필요로하는 각종 데이터 및 프로그램을 저장한다.The graphic processor memory 4-2 stores various data and programs required by the graphic processor.

상기 프레임 버퍼(4-3)는 상기 그래픽 프로세서에의해 처리완료된 디스플레이용 데이터를 저장하고 있다.The frame buffer 4-3 stores data for display processed by the graphic processor.

상기 비디오 프로세서(4-4)는 상기 프레임 버퍼에 저장된 데이터를 상기 모니터(5) 상에 디스플레이하도록 신호처리한다.The video processor 4-4 signals the data stored in the frame buffer to be displayed on the monitor 5.

도 2는 상기 프레임 버퍼의 데이터를 모니터에 디스플레이하는 과정의 일례를 보인 도면으로서, 프레임 버퍼는 1픽셀당 8비트를 갖고 있는 있으며, 8비트가 실제 픽셀의 화소값을 저장하고 있는 팔레트(룩업 테이블)의 주소가 된다. 따라서 팔레트에는 256가지의 색상을 갖고 있으면서 빨강, 녹색, 파랑에 각각 4비트씩 할당되어 있고, 도 2에서 처럼 프레임 버퍼의 주소(67:01000011)에 따라 해당 픽셀의 화소값(100110100001)을 모니터에 디스플레이하게 된다.2 is a view showing an example of a process of displaying the data of the frame buffer on a monitor, wherein the frame buffer has 8 bits per pixel, and 8 bits store pixel values of actual pixels (look-up table). ) Will be the address. Therefore, the palette has 256 colors and 4 bits are allocated to red, green, and blue, respectively, and as shown in FIG. 2, the pixel value (100110100001) of the pixel is displayed on the monitor according to the address (67: 01000011) of the frame buffer. Will be displayed.

한편, 애니메이션은 말그대로 생명을 불어 넣는 작업으로, 움직임 한 장면 한 장면을 찍어서 빠른 속도로 보여주면 눈의 착시 현상으로 인해 오브젝트가 실제로 움직이는 것으로 느끼는 효과를 이용한 것이다. 예를 들어, 만화 영화는 초당 24프레임, TV는 초당 30프레임씩 화면을 그려주고 있는데, 움직이는 물체의 속도에 따라 초당 그려주어야하는 프레임 수를 달리 처리하여 그 효과를 높이기도 한다.On the other hand, animation is a life-giving work that takes pictures of moving scenes and shows them at high speed, using the effect that the object is actually moving due to the optical illusion of the eyes. For example, a cartoon film is drawn at 24 frames per second and a TV is 30 frames per second. Depending on the speed of a moving object, the number of frames to be drawn per second is handled differently to enhance the effect.

컴퓨터를 이용한 애니메이션인 경우에는 컴퓨터의 처리속도가 문제가 되어 초당 많은 프레임 수를 처리하려면 보다 빠른 처리 속도가 요구된다. 특히 오브젝트를 움직이는 사용자의 입력 속도에 맞게 그때 그때의 애니메이션이 달라지므로 이에 대한 처리방법도 필요하게 된다.In the case of animation using a computer, the processing speed of the computer becomes a problem, and a faster processing speed is required to process a large number of frames per second. In particular, since the animation at that time is changed according to the input speed of the user moving the object, a processing method for this is needed.

특히, 애니메이션 효과를 나타내는데 있어서, 하드웨어에 의해 오브젝트의 움직임을 표현할수 있는 애니메이션 기법을 '스프라이트 애니메이션'이라고 말하기도 하는데, 여기서, 스프라이트(sprite)는 비디오 레벨의 데이터를 저장하고 있는 프레임 버퍼에 상주해 있는 적은 크기의 메모리를 가르킨다. 이 스프라이트의 위치는 언제나 프레임 버퍼의 레지스터에 명시되어 있으면서, 이 레지스터의 값은 화면상의 스프라이트의 움직임에 의해서 변경되어 진다.In particular, to express animation effects, an animation technique that can express the movement of an object by hardware may be referred to as 'sprite animation', where a sprite resides in a frame buffer that stores video level data. Points to less memory. The position of this sprite is always specified in the register of the frame buffer, and the value of this register is changed by the movement of the sprite on the screen.

여기서, '스프라이트'라는 용어는 1970년대 애플사에 의해 처음 사용되었으며, 프레임 버퍼의 적은 메모리량이란 의미외에도 배경화면을 투과한 '움직이는 오브젝트'를 직접 가르키는 의미로도 널리 사용되고 있다.Here, the term 'sprite' was first used by Apple in the 1970s, and is widely used not only to mean a small amount of memory in the frame buffer but also to directly refer to a 'moving object' that penetrates a background screen.

여기서 사용된 스프라이트의 개념은 유리판 위에 그림을 그린 것과 같이, 다른 그림(배경)위에 겹쳐 놓아도 그림 그린 곳을 제외한 부분은 보이게되는 형태를 말하는 것으로 후자의 의미(움직이는 오브젝트)로 사용한다.The concept of sprites used here refers to a form in which a part except the drawing area is visible even if it is overlaid on another picture (background), such as a picture on a glass plate, and is used as the latter meaning (moving object).

스프라이트처리를 하드웨어에서 직접 제공해주는 스프라이트 엔진을 갖춘 컴퓨터가 제작되고 있는 반면, IBM PC 기종에서는 스프라이트를 제공하는 하드웨어를 갖추고 있지 않아 스프라이트를 소프트웨어적으로 지원하여야 한다.Computers with sprite engines that provide sprite processing directly from hardware are being manufactured. On the other hand, IBM PC models do not have hardware to provide sprites.

스프라이트를 소프트웨어를 통해 구현할때 스프라이트의 데이터 구조는 화면의 구조와 같은 가로길이 세로길이를 갖는 2차원 구조이나 메모리가 1차원 구조이기때문에 1차원 구조에 매핑해서 사용하며, 비트맵을 논리연산(AND, NOT, XOR)등을 통해 픽셀값을 변화시키게 된다.When the sprite is implemented through software, the data structure of the sprite is mapped to the one-dimensional structure because the data structure of the sprite has the same length and width as the screen structure, or because the memory is a one-dimensional structure. , NOT, XOR) to change the pixel value.

특히, 유용하게 이용되는 XOR 기법은 프레임 버퍼에 현재 픽셀값의 비트끼리 배타논리합 연산된 결과값을 새로운 값으로하여 임의 픽셀 혹은 블럭 픽셀(픽셀의 집합)의 이동을 배타논리합 연산의 반전성을 이용해 표현한다.In particular, the useful XOR technique uses the inversion of the random logic operation to convert the arbitrary pixel or the block pixel (set of pixels) to the new value by using the result of the exclusive logical sum of bits of the current pixel value in the frame buffer. Express.

즉, 비어있는 프레임 버퍼에 임의 픽셀값을 두번 XOR 연산하여 저장해 주면, 사물이 첫번째 XOR 연산에서 그려지고, 다시 두번째 XOR 연산에서 다시 지워지게 된다. 여기서 만약 다시 그려지는 사물의 위치를 약간만 이동시켜주게되면 오브젝트가 이동하는 것과 같이 느끼게 된다.That is, if an XOR operation of an arbitrary pixel value is stored twice in an empty frame buffer, the object is drawn in the first XOR operation, and then erased again in the second XOR operation. Here, if you move the position of the object to be redrawn a little, you feel like the object is moving.

또한, 이전 프레임의 사물에 XOR 연산(배타논리합 연산)을 하여 사물을 지운후에, 새로운 프레임에 OR 연산(논리합 연산)을 수행하여 다시 그리게 하여 움직이는 사물을 표현하기도 한다.Also, after an object is erased by performing an XOR operation (exclusive logical sum operation) on the object of the previous frame, the moving object may be expressed by performing an OR operation (logical sum operation) on the new frame to redraw the object.

이와 같은 종래의 기법은 화면에서 여러가지 스프라이트들이 움직이고 있을때 매번 이전 프레임의 위치에 있던 스프라이트는 지우고, 새로운 프레임에 스프라이트를 다시 그리게 하고 있기 때문에 빠른 속도감을 느끼는데 충분하지 않은 문제점이 있었다.This conventional technique is not enough to feel the fast speed because the sprites are moved to the previous frame every time the various sprites are moving on the screen, and the sprites are redrawn on the new frame.

이에, 본 발명은 상기와 같은 종래의 문제점을 해결하기 위하여 안출된 것으로서, 몇장의 이전 프래임에 대한 위치정보를 저장하여 필요에 따라 몇장의 이전 프레임을 빠르게 디스플레이하므로써 속도감을 주는 스프라이트 애니메이션 생성 방법을 제공하는 데 그 목적이 있다.Accordingly, the present invention has been made to solve the above-mentioned problems, and provides a method for generating a sprite animation by storing the position information on several previous frames and quickly displaying several previous frames as needed. Its purpose is to.

상기와 같은 목적을 달성하기 위하여 본 발명의 방법은, 남기고자 하는 잔상 스프라이트 갯수(N)를 초기화하는 1단계와; 이전 스프라이트 인덱스(j)를 초기화하는 2단계; 현재 스프라이트 인덱스로부터 이전 스프라이트 인덱스의 차(i-j)를 잔상 스프라이트 갯수(N)과 비교하는 3 단계; 상기 3단계의 비교결과, 인덱스 차값(i-j)이 잔상 스프라이트 갯수(N)보다 크면 해당되는 j번째 이전 스프라이트를 지우는 4단계; 이전 스프라이트의 인덱스(j)를 1증가시키는 5단계; 상기 5단계이후, 혹은 상기 2 단계의 비교결과 인덱스 차값(i-j)이 잔상 스프라이트 갯수(N)보다 작으면 현재 스프라이트를 그리는 6단계; 현재 스프라이트의 메모리 위치를 저장하는 7단계; 현재 스프라이트의 인덱스(i)를 1증가시키고, 상기 3단계부터 반복하여 수행하는 8단계로 구성되어 있다.In order to achieve the above object, the method of the present invention comprises the steps of: initializing the residual number of sprites (N) to be left; Initializing the previous sprite index j; Comparing the difference i-j of the previous sprite index from the current sprite index with the residual image sprite number N; A fourth step of deleting the corresponding j-th previous sprite if the index difference value (i-j) is greater than the number of residual sprites (N); 5 steps of increasing the index j of the previous sprite by one; A sixth step of drawing a current sprite after the fifth step or when the comparison result of the second step has an index difference value (i-j) smaller than the number of residual sprites (N); Storing seven memory locations of the current sprite; It consists of eight steps of increasing the index (i) of the current sprite by one and repeatedly performing the above three steps.

도 1은 일반적인 컴퓨터 그래픽 시스템의 일예를 도시한 구성도,1 is a block diagram showing an example of a general computer graphics system,

도 2는 상기 프레임 버퍼의 데이터를 디스플레이하는 과정을 보인 도면,2 is a view illustrating a process of displaying data of the frame buffer;

도 3은 본 발명에 따라 잔상 스프라이트를 디스플레이하는 방법을 도시한 흐름도이다.3 is a flowchart illustrating a method of displaying an afterimage sprite in accordance with the present invention.

이하, 본 발명의 작용 및 효과를 자세히 설명하고자 한다.Hereinafter, the operation and effects of the present invention will be described in detail.

상기와 같은 목적을 달성하기 위하여 본 발명의 방법을 도 3에 도시하였다.In order to achieve the above object, the method of the present invention is illustrated in FIG. 3.

도 3의 흐름도에 사용된 변수를 설명하면, N은 화면상에 잔상 효과를위해 원하는 스프라이트의 프레임 갯수를 나타내는 변수이고, i는 마지막 움직임을 보여주는 현재 스프라이트의 인덱스이고, j는 중간 움직임을 보여주는 이전 스프라이트의 인덱스이다.Referring to the variable used in the flowchart of FIG. 3, N is a variable representing the number of frames of the sprite desired for the afterimage effect on the screen, i is an index of the current sprite showing the last movement, and j is a previous movement showing the intermediate movement. The index of the sprite.

도 3 에서 보는 바와같이, 제 1단계(S1)에서는 남기고자하는 잔상 스프라이트의 프레임 갯수 N를 초기화 하고, 제 2단계(S2)에서는 최초에 그려지는 스프라이트의 인덱스 j를 1로 초기화한다.As shown in FIG. 3, in the first step S1, the frame number N of the afterimage sprites to be left is initialized, and in the second step S2, the index j of the first drawn sprite is initialized to 1.

제 3단계(S3)에서는 현재 스프라이트 인덱스(i)로부터 이전 스프라이트 인덱스(j)의 차(i-j)를 잔상 스프라이트 갯수(N)와 비교하고, 제 4단계(S4)에서 상기 제 3단계(S3)의 비교결과 인덱스의 차(i-j)값이 잔상 스프라이트 갯수(N)보다 크면 j번째 이전 스프라이트를 지운다.In the third step S3, the difference ij of the previous sprite index j from the current sprite index i is compared with the afterimage sprite number N, and in the fourth step S4, the third step S3. If the difference (ij) of the index is greater than the number of residual sprites (N), the jth previous sprite is deleted.

제 5단계(S5)에서는 이전 스프라이트의 인덱스 j를 1증가시키고, 제 6단계(S6)에서는 상기 5단계(S5)이후, 혹은 상기 2 단계(S2)의 비교결과 인덱스의 차(i-j)값이 잔상 스프라이트 갯수(N)보다 작으면 i번째 현재 스프라이트를 그린다.In the fifth step (S5), the index j of the previous sprite is increased by one, and in the sixth step (S6), the difference (ij) of the comparison result index after the fifth step (S5) or the second step (S2) is increased. If the number of afterimage sprites is less than N, the i-th current sprite is drawn.

제 7 단계(S7)에서는 i번째 현재 스프라이트의 메모리 위치를 저장하고, 제 8 단계(S8)에서는 현재 스프라이트의 인덱스 i를 1증가시키고, 상기 3단계(S3)부터 반복하여 수행한다.In the seventh step S7, the memory location of the i-th current sprite is stored. In the eighth step S8, the index i of the current sprite is increased by one, and the process is repeated from the third step S3.

예를 들어, 블러링 효과나 잔상 효과를 주기 위해 남기고자 하는 잔상 스프라이트를 3개로 가정하여 화면상에 디스플레이 되는 과정을 설명하고자 한다.For example, a process of displaying on the screen assuming three afterimage sprites to be left in order to give a blurring or afterimage effect will be described.

시간에 따라 움직임의 변화가 있는 스프라이트가 메모리에 각각 저장되어 있다.Sprites that change their movement over time are stored in memory.

여기서, 움직이는 스프라이트가 그려지는 순서는 스프라이트의 인덱스가 작은것부터 그려지고, 그 이후에 다음 인덱스의 스프라이트가 그려진다.Here, the order in which the moving sprites are drawn is drawn from the smallest index of the sprite, after which the sprites of the next index are drawn.

실시간 t에 대응하는 스프라이트 인덱스가 현재 스프라이트 프레임의 인덱스로서, 현재 스프라이트 인덱스 i는 레지스터 A에서 갱신되고, 이전 스프라이트 인덱스 j는 레지스터 B에서 갱신된다.The sprite index corresponding to real time t is the index of the current sprite frame, the current sprite index i is updated in register A, and the previous sprite index j is updated in register B.

최초 스프라이트를 디스플레이하는데 있어서, 시간 t가 1일때 상기 제 3단계의 (S3)판단이후, 제 6 단계(S6)를 수행하여 비디오 램의 목적 레지스터에 현재 1번 스프라이트의 비트맵을 OR 연산하므로써 화면상에 디스플레이한다. 그리고나서, 1번 스프라이트가 저장되어 있는 메모리의 위치를 선입 선출 버퍼(FIFO)에 저장한다(S7). 이제, 레지스터 A값을 1증가시켜 현재 스프라이트 인덱스가 2가 되어서, 제 3단계의 판단결과, 상기 1번 스프라이트를 디스플레이하는 과정과 동일하게 수행하여 2번 스프라이트를 화면에 디스플레이 한다. 또한, 2번 스프라이트가 저장되어 있는 메모리의 위치를 선입 선출 버퍼에 저장한다.In displaying the first sprite, when time t is 1, after determining the third step (S3), the sixth step (S6) is performed to perform OR operation on the bitmap of the current sprite to the destination register of the video RAM. Display on. Then, the location of the memory where the first sprite is stored is stored in the first-in first-out buffer (FIFO) (S7). Now, by increasing the register A value by 1, the current sprite index becomes 2, and as a result of the determination in the third step, the second sprite is displayed on the screen in the same manner as the display of the first sprite. It also stores the location of the memory where sprite 2 is stored in the first-in, first-out buffer.

계속해서, 레지스터 A값이 4가 될때 까지 상기 1번 스프라이트를 디스플레이하는 과정과 동일하게 진행된다.Subsequently, the same process as for displaying the first sprite is performed until the register A value becomes 4.

즉, t=1일때 1번 스프라이트가 디스플레이되고, t=2일때 1번, 2번 스프라이트가 디스플레이되고, t=3일때 1번, 2번, 3번 스프라이트가 디스플레이되고, t=4일때 1번 , 2번, 3번, 4번 스프라이트가 디스플레이 되어 진다. 그리고, 상기 선입선출버퍼(FIFO)에 저장된 프레임의 위치는 4번, 3번 ,2번, 1번 스프라이트의 메모리 위치이다.That is, the first sprite is displayed when t = 1, the first and second sprites are displayed when t = 2, and the first, second and third sprites are displayed when t = 3, and the first when t = 4. , Sprites 2, 3 and 4 are displayed. The positions of the frames stored in the first-in, first-out buffer (FIFO) are the memory locations of sprites 4, 3, 2, and 1.

이제, t=5 일때 레지스터 A값이 5이고, 레지스터 B값이 1인 경우에, 제 3단계(S3)의 판단결과, 현재 스프라이트 인덱스로부터 이전 스프라이트 인덱스의 차값(i-j=5-1=4)이 잔상 갯수 3(=N)보다 크므로, 제 4단계(S4)를 수행하여 비디오 램의 목적 레지스터에 1번 이전 스프라이트 비트맵을 XOR연산하여 1번 스프라이트를 지운다.Now, when the register A value is 5 and the register B value is 1 when t = 5, the difference value of the previous sprite index from the current sprite index (ij = 5-1 = 4) as a result of the determination in the third step S3. Since the number of afterimages is greater than 3 (= N), the fourth step S4 is performed to erase the first sprite by XORing the previous sprite bitmap one time in the destination register of the video RAM.

여기서, 1번 스프라이트의 위치는 상기 선입 선출 버퍼로부터 추출하여 위치를 찾아 지울수 있는 것이다. 그리고, 제 5 단계(S5)를 수행하여 이전 스프라이트 인덱스 j를 1증가시켜 레지스터 B값은 2가 된다. 그리고, 제 6 단계(S6)를 수행하여 비디오 램의 목적 레지스터에 현재 5번 스프라이트의 비트맵을 OR 연산하므로써 화면상에 디스플레이한 후, 현재 5번 스프라이트의 메모리 위치를 선입선출버퍼에 저장한다.Here, the location of the first sprite can be extracted from the first-in first-out buffer to find and erase the location. Then, the fifth step S5 is performed to increase the previous sprite index j by one, so that the register B value becomes two. After performing the sixth step S6, the bitmap of the current sprite 5 is ORed in the destination register of the video RAM and displayed on the screen, and the memory location of the current sprite 5 is stored in the first-in first-out buffer.

이때, 선입선출버퍼에 저장된 프레임 위치는 5번, 4번, 3번, 2번 스프라이트의 메모리 위치이다.At this time, the frame positions stored in the first-in, first-out buffer are the memory positions of the sprites 5, 4, 3, and 2.

그리고, 제 8단계(S8)를 수행하여 현재 스프라이트 인덱스 i를 1증가시켜 레지스터 A값은 6이되고, 상기 3단계(S3)를 반복한다.The eighth step S8 is performed to increase the current sprite index i by one, so that the register A value is six, and the third step S3 is repeated.

이제, t=6 일때 레지스터 A값이 6이고, 레지스터 B값이 2인 경우에, 제 3단계(S3)의 판단결과, 현재 스프라이트 인덱스로부터 이전 스프라이트 인덱스의 차값(i-j=6-2=4)이 잔상 갯수 3(=N)보다 크므로 제 4단계를 수행하여 비디오 램의 목적 레지스터에 2번 이전 스프라이트 비트맵을 XOR연산하여 2번 스프라이트를 지운다.Now, when the register A value is 6 and the register B value is 2 when t = 6, the difference value of the previous sprite index from the current sprite index (ij = 6-2 = 4) as a result of the determination in the third step S3. Since the number of afterimages is greater than 3 (= N), the fourth step is performed to delete the second sprite by XORing the previous two sprite bitmaps in the destination register of the video RAM.

여기서, 2번 스프라이트의 위치는 상기 선입선출버퍼로부터 추출하여 위치를 찾아 지울수 있는 것이다. 그리고, 제 5 단계(S5)를 수행하여 이전 스프라이트 인덱스 j를 1증가시켜 레지스터 B값은 3이 된다. 그리고, 제 6 단계(S6)를 수행하여 비디오 램의 목적 레지스터에 현재 6번 스프라이트의 비트맵을 OR 연산하므로써 화면상에 디스플레이한 후, 현재 6번 스프라이트의 메모리 위치를 선입선출버퍼에 저장한다.Here, the position of the second sprite can be extracted from the first-in, first-out buffer to find and erase the position. Then, the fifth step S5 is performed to increase the previous sprite index j by one, so that the register B value becomes three. After performing the sixth step (S6) to display on the screen by OR-operating the bitmap of the current six sprites to the destination register of the video RAM, the memory location of the current sixth sprite is stored in the first-in first-out buffer.

이때, 선입선출버퍼에 저장된 프레임 위치는 6번, 5번, 4번, 3번 스프라이트의 메모리 위치이다.At this time, the frame positions stored in the first-in, first-out buffer are memory locations of sprites 6, 5, 4, and 3.

이상의 동작을 시간의 흐름에 따라 디스플레이 되는 스프라이트를 표로 나타내었다.The above operations are shown in a table with the sprites displayed over time.

tt i (현재 스프 라이트)i (current sprite) j (이전 스프 라이트)j (formerly sprite) FIFOFIFO 디스플레이된 스프라이트Displayed Sprite 1One 1One 1One #1#One 1One 22 22 1One #2,#1# 2, # 1 1,21,2 33 33 1One #3,#2,#1# 3, # 2, # 1 1,2,31,2,3 44 44 1One #4,#3,#2,#1# 4, # 3, # 2, # 1 1,2,3,41,2,3,4 55 55 22 #5,#4,#3,#2# 5, # 4, # 3, # 2 2,3,4,52,3,4,5 66 66 33 #6,#5,#4,#3# 6, # 5, # 4, # 3 3,4,5,63,4,5,6 77 77 44 #7,#6,#5,#4# 7, # 6, # 5, # 4 4,5,6,74,5,6,7

상기 표에서 보는 바와 같이, t=1에서 t=4까지는 현재 스프라이트를 계속해서 그려나가다가, t=5부터는 현재 프레임으로부터 3장의 이전 프레임을 제외한 나머지 프레임의 스프라이트를 지워나감으로써, 4장의 연속적인 스프라이트를 디스플레이 하는 것이다.As shown in the above table, t = 1 to t = 4 continues to draw the current sprite, and from t = 5 it erases the remaining sprites from the current frame except for the previous three frames, which results in four successive shots. To display the sprite.

여기서, 지워나갈 이전 프레임에 대한 위치 정보는 선입선출버퍼를 이용하게 되며, 본 실시예의 경우 4(=N+1)개의 시프트레지스터면 충분히 구현된다.Here, the position information on the previous frame to be erased uses a first-in, first-out buffer, and in this embodiment, four (= N + 1) shift registers are sufficiently implemented.

그리고, 움직이는 스프라이트의 남기고자하는 잔상의 갯수를 증가시켜 전체적인 움직임의 궤적을 추적해볼 수도 있다.You can also track the trajectory of the overall movement by increasing the number of residual images you want to leave in the moving sprite.

이상의 동작을 통해서 시계에서 초침이나 분침이 빠르게 돌아가게 하여 빠른 시간의 경과를 나타내고자 할 경우나, 혹은 자동차나 기차가 고속으로 스쳐지나가서 희미하게 사려져가는 효과가 필요한 경우에 스프라이트의 흔적을 남기게 하여 블러링(blurring)을 수행하면 속도감을 느끼게 되는 것이다.With the above operation, the second hand or minute hand rotates quickly on the watch, or when the car or train is passing by at high speed and needs to be faintly drawn, leaving a trace of the sprite. If you perform blurring, you will feel a sense of speed.

이상에서 살펴본 바와같이 본 발명은, 현재 스트라이프와 함께 이전 스트라이프까지 디스플레이 하여 움직임을 연속적으로 보여주므로써, 애니메이션 생성과정에서 속도감이 필요한 경우나 혹은 블러링 효과가 특히 필요한 경우에 효과적을 사용할 수 있다.As described above, according to the present invention, the current stripe is displayed along with the previous stripe to continuously display the movement, and thus, the present invention can be effectively used when the speed is required during the animation generation process or when the blurring effect is particularly needed.

Claims (1)

스프라이트의 속도감 및 블러링 효과를 가져오는 애니메이션 생성 방법에 있어서,In the animation generating method that brings the speed and blurring effect of the sprite, 남기고자 하는 잔상 스프라이트 갯수(N)를 초기화하는 1단계(S1)와;A first step S1 of initializing the residual number of sprites N to be left; 이전 스프라이트 인덱스(j)를 초기화하는 2단계(S2);Step S2 of initializing the previous sprite index j; 현재 스프라이트 인덱스로부터 이전 스프라이트 인덱스의 차(i-j)를 잔상 스프라이트 갯수(N)과 비교하는 3 단계(S3);Step S3 of comparing the difference i-j of the previous sprite index from the current sprite index with the afterimage sprite number N; 상기 3단계의 비교결과, 인덱스 차값(i-j)이 잔상 스프라이트 갯수(N)보다 크면 해당되는 j번째 이전 스프라이트를 지우는 4단계(S4);A fourth step (S4) of deleting the corresponding j-th previous sprite when the index difference value (i-j) is larger than the number of residual sprites (N); 이전 스프라이트의 인덱스(j)를 1증가시키는 5단계(S5);Step S5 of increasing the index j of the previous sprite by one; 상기 5단계이후, 혹은 상기 2 단계의 비교결과 인덱스 차값(i-j)이 잔상 스프라이트 갯수(N)보다 작으면 현재 스프라이트를 그리는 6단계(S6);A sixth step (S6) of drawing the current sprite after the fifth step or when the comparison result index difference value (i-j) of the second step is smaller than the number of residual sprites (N); 현재 스프라이트의 메모리 위치를 저장하는 7단계(S7);Step 7 (S7) of storing the memory location of the current sprite; 현재 스프라이트의 인덱스(i)를 1증가시키고, 상기 3단계부터 반복하여 수행하는 8단계(S8)를 포함하여 구성되는 것을 특징으로 하는 스프라이트 애니메이션 생성 방법.And increasing the index (i) of the current sprite by one and performing eight steps (S8) which are repeatedly performed from the three steps.
KR1019960054144A 1996-11-14 1996-11-14 Generating method of sprite animation KR100230845B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019960054144A KR100230845B1 (en) 1996-11-14 1996-11-14 Generating method of sprite animation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019960054144A KR100230845B1 (en) 1996-11-14 1996-11-14 Generating method of sprite animation

Publications (2)

Publication Number Publication Date
KR19980035727A true KR19980035727A (en) 1998-08-05
KR100230845B1 KR100230845B1 (en) 1999-11-15

Family

ID=19481891

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019960054144A KR100230845B1 (en) 1996-11-14 1996-11-14 Generating method of sprite animation

Country Status (1)

Country Link
KR (1) KR100230845B1 (en)

Also Published As

Publication number Publication date
KR100230845B1 (en) 1999-11-15

Similar Documents

Publication Publication Date Title
KR100482708B1 (en) List controlled video operations
Neider et al. OpenGL programming guide
US8063903B2 (en) Edge evaluation techniques for graphics hardware
US6587112B1 (en) Window copy-swap using multi-buffer hardware support
US4679041A (en) High speed Z-buffer with dynamic random access memory
JPS5985573A (en) Method and apparatus for displaying graphic informaion
US5920687A (en) Z-buffer storage based on opacity and depth using pointers
US5150312A (en) Animation processor method and apparatus
US5512918A (en) High speed method and apparatus for generating animation by means of a three-region frame buffer and associated region pointers
US20140125686A1 (en) Image rendering method and system
US7898549B1 (en) Faster clears for three-dimensional modeling applications
KR19990029709A (en) Video drawing device
KR100829637B1 (en) Method and apparatus for producing animation
US5128872A (en) Method and apparatus for determining line positions for display and manipulation by a computer system
EP2728551B1 (en) Image rendering method and system
Slater et al. Liberation from rectangles: a tiling method for dynamic modification of objects on raster displays
KR100230845B1 (en) Generating method of sprite animation
JPH0646378B2 (en) Computer display
US6518969B2 (en) Three dimensional graphics drawing apparatus for drawing polygons by adding an offset value to vertex data and method thereof
JPS642953B2 (en)
US9128519B1 (en) Method and system for state-based control of objects
JP2897441B2 (en) Image processing method and apparatus
JP3074912B2 (en) 3D image generation device
JP2787487B2 (en) Circuit for determining the position of a line segment displayed and operated on a computer system
JPH04172497A (en) Image display method

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
LAPS Lapse due to unpaid annual fee