KR100230845B1 - Generating method of sprite animation - Google Patents

Generating method of sprite animation Download PDF

Info

Publication number
KR100230845B1
KR100230845B1 KR1019960054144A KR19960054144A KR100230845B1 KR 100230845 B1 KR100230845 B1 KR 100230845B1 KR 1019960054144 A KR1019960054144 A KR 1019960054144A KR 19960054144 A KR19960054144 A KR 19960054144A KR 100230845 B1 KR100230845 B1 KR 100230845B1
Authority
KR
South Korea
Prior art keywords
sprite
index
previous
current
residual image
Prior art date
Application number
KR1019960054144A
Other languages
Korean (ko)
Other versions
KR19980035727A (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

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 motion of an arbitrary two-dimensional sprite more speedily, comprising: a first step of initializing the number (N) of residual image spots to be left; 2) initializing the previous sprite index (j); Comparing the difference (i-j) of the previous sprite index from the current sprite index to the number (N) of residual image spots; If the index difference value (i-j) is larger than the number (N) of residual image spots, the corresponding j-th previous sprite is erased; Incrementing the index j of the previous sprite by 1; If the index difference value (i-j) is smaller than the number of residual image spots (N) after the fifth step or the second step, the current sprite is drawn; Storing the memory location of the current sprite; The present invention composed of eight steps of incrementing the index (i) of the current sprite by 1 and repeating the steps from the third step, displays the current stripe and the previous stripe together to continuously display the motion, Or when blurring effects are particularly needed.

Description

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

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

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

도 1은 일반적인 그래픽 시스템의 일예를 보인 구성도로서, 시스템 버스(1)에 연결되어있으면서 전반적인 프로그램을 수행하는 범용 중앙처리장치(CPU:2)와, 시스템 버스(1)에 연결되어 있으면서 중앙 처리 장치가 필요로 하는 데이터를 저장하고 있는 시스템 메모리(3), 시스템 버스에 연결되어 있으면서 그래픽을 처리를 담당하는 그래픽 보드(4), 그래픽 보드로부터 제공받은 비디오 신호를 디스플레이하는 모니터(5)로 구성되어 있다.FIG. 1 is a block diagram showing an example of a general graphics system. FIG. 1 is a block diagram showing a general graphics system. The general-purpose central processing unit (CPU) 2 is connected to the system bus 1 and performs overall programs. A system memory 3 for storing data required by the apparatus, a graphic board 4 connected to the system bus for processing graphics, and a monitor 5 for displaying a video signal provided from the graphics board .

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

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

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

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

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

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

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

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

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

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

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

스프라이트처리를 하드웨어에서 직접 제공해주는 스프라이트 엔진을 갖춘 컴퓨터가 제작되고 있는 반면, IBM PC 기종에서는 스프라이트를 제공하는 하드웨어를 갖추고 있지 않아 스프라이트를 소프트웨어적으로 지원하여야 한다.Computers with a sprite engine that provides sprite processing directly in hardware are being built, while IBM PCs do not have the hardware to provide sprite, so the software must support sprite.

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

특히, 유용하게 이용되는 XOR 기법은 프레임 버퍼에 현재 픽셀값의 비트끼리 배타논리합 연산된 결과값을 새로운 값으로하여 임의 픽셀 혹은 블럭 픽셀(픽셀의 집합)의 이동을 배타논리합 연산의 반전성을 이용해 표현한다.Particularly, the XOR technique, which is useful, uses a result obtained by performing a bitwise OR operation on the bits of the current pixel value in the frame buffer as a new value, and uses the inverse of the exclusive OR operation to shift the movement of an arbitrary pixel or block pixel Express.

즉, 비어있는 프레임 버퍼에 임의 픽셀값을 두번 XOR 연산하여 저장해 주면, 사물이 첫번째 XOR 연산에서 그려지고, 다시 두번째 XOR 연산에서 다시 지워지게 된다. 여기서 만약 다시 그려지는 사물의 위치를 약간만 이동시켜주게되면 오브젝트가 이동하는 것과 같이 느끼게 된다.That is, if an arbitrary pixel value is XORed 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 moves.

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

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

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

상기와 같은 목적을 달성하기 위하여 본 발명의 방법은, 남기고자 하는 잔상 스프라이트 갯수(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단계로 구성되어 있다.According to an aspect of the present invention, there is provided a method for initializing a residual sprite number (N) 2) initializing the previous sprite index (j); Comparing the difference (i-j) of the previous sprite index from the current sprite index to the number (N) of residual image spots; If the index difference value (i-j) is larger than the number (N) of residual image spots, the corresponding j-th previous sprite is erased; Incrementing the index j of the previous sprite by 1; If the index difference value (i-j) is smaller than the number of residual image spots (N) after the fifth step or the second step, the current sprite is drawn; Storing the memory location of the current sprite; And incrementing the index (i) of the current sprite by 1, and repeating the above steps from the above step (3).

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

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

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

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

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

도 3의 흐름도에 사용된 변수를 설명하면, N은 화면상에 잔상 효과를위해 원하는 스프라이트의 프레임 갯수를 나타내는 변수이고, i는 마지막 움직임을 보여주는 현재 스프라이트의 인덱스이고, j는 중간 움직임을 보여주는 이전 스프라이트의 인덱스이다.3, N is a variable representing the number of frames of the desired sprite for the afterimage effect on the screen, i is the index of the current sprite showing the last movement, j is the previous 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 residual image sprite to be left is initialized, and in the second step S2, the index j of the sprite to be initially drawn is initialized to one.

제 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 number of residual sprite N. In the fourth step S4, (Ij) of the index is larger than the number (N) of residual image spots, the j-th previous sprite is erased.

제 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 incremented by 1. In the sixth step S6, the difference ij in the index of the comparison result after the step S5 or after the step S5 is equal to If the number of residual sprite is smaller than the number (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 incremented by one and the process is repeated from the third step S3.

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

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

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

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

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

계속해서, 레지스터 A값이 4가 될때 까지 상기 1번 스프라이트를 디스플레이하는 과정과 동일하게 진행된다.Subsequently, the same process as that for displaying the first sprite is performed until the value of the register A 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, when t = 1, one sprite is displayed. When t = 2, one sprite is displayed. When t = 3, one sprite is displayed. When t = 4, one sprite is displayed. , 2, 3, and 4 sprites are displayed. The position of the frame stored in the first-in-first-out buffer (FIFO) is the memory location of the fourth, third, second, and first sprites.

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

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

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

그리고, 제 8단계(S8)를 수행하여 현재 스프라이트 인덱스 i를 1증가시켜 레지스터 A값은 6이되고, 상기 3단계(S3)를 반복한다.Then, the eighth step S8 is performed to increase the current sprite index i by 1, and the value of the register A is set to 6, 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번 스프라이트를 지운다.(Ij = 6-2 = 4) of the previous sprite index from the current sprite index as a result of the third step (S3) when the register A value is 6 and the register B value is 2 at t = 6, Since the number of residual images is larger than 3 (= N), the fourth step is performed to erase the second sprite by performing an XOR operation on the second sprite bitmap 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 is extracted from the first-in-first-out buffer, and the position is searched for. Then, the fifth step S5 is performed to increase the previous sprite index j by 1, and the value of the register B becomes 3. [ Then, in a sixth step S6, the bit map of the current 6th sprite is OR-operated on the destination register of the video RAM to display on the screen, and the memory location of the current 6th sprite is stored in the first-in first-out buffer.

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

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

tt i (현재 스프 라이트)i (current sprite) j (이전 스프 라이트)j (old 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 can be seen from the above table, the current sprite is continuously drawn from t = 1 to t = 4, and the sprites of the remaining frames excluding the three previous frames from the current frame are erased from t = 5, To display the sprite.

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

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

이상의 동작을 통해서 시계에서 초침이나 분침이 빠르게 돌아가게 하여 빠른 시간의 경과를 나타내고자 할 경우나, 혹은 자동차나 기차가 고속으로 스쳐지나가서 희미하게 사려져가는 효과가 필요한 경우에 스프라이트의 흔적을 남기게 하여 블러링(blurring)을 수행하면 속도감을 느끼게 되는 것이다.If you want to show the elapsed time of the second hand or the minute hand by turning the clock fast through the above operation, or if it is necessary to have a car or a train slip at high speed to get a faint look, leave a trace of the sprite If you perform blurring, you will feel a sense of speed.

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

Claims (1)

스프라이트의 속도감 및 블러링 효과를 가져오는 애니메이션 생성 방법에 있어서,A method of creating animation for causing a velocity and a blurring effect of a sprite, 남기고자 하는 잔상 스프라이트 갯수(N)를 초기화하는 1단계(S1)와;(S1) of initializing the number (N) of residual image sprites to be left; 이전 스프라이트 인덱스(j)를 초기화하는 2단계(S2);(S2) initializing the previous sprite index (j); 현재 스프라이트 인덱스로부터 이전 스프라이트 인덱스의 차(i-j)를 잔상 스프라이트 갯수(N)과 비교하는 3 단계(S3);(S3) of comparing the difference (i-j) of the previous sprite index from the current sprite index to the number (N) of residual sprite numbers; 상기 3단계의 비교결과, 인덱스 차값(i-j)이 잔상 스프라이트 갯수(N)보다 크면 해당되는 j번째 이전 스프라이트를 지우는 4단계(S4);If the index difference value (i-j) is greater than the number of residual image spots (N), the corresponding j-th previous sprite is deleted (S4). 이전 스프라이트의 인덱스(j)를 1증가시키는 5단계(S5);Step S5 of incrementing the index j of the previous sprite by 1; 상기 5단계이후, 혹은 상기 2 단계의 비교결과 인덱스 차값(i-j)이 잔상 스프라이트 갯수(N)보다 작으면 현재 스프라이트를 그리는 6단계(S6);If the index difference value (i-j) is smaller than the residual image sprite count (N) after step 5 or step 2, the current sprite is drawn (step S6); 현재 스프라이트의 메모리 위치를 저장하는 7단계(S7);Step 7 (S7) of storing the memory location of the current sprite; 현재 스프라이트의 인덱스(i)를 1증가시키고, 상기 3단계부터 반복하여 수행하는 8단계(S8)를 포함하여 구성되는 것을 특징으로 하는 스프라이트 애니메이션 생성 방법.(S8) of incrementing the index (i) of the current sprite by 1 and repeating the step (3) from the step (3).
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 KR19980035727A (en) 1998-08-05
KR100230845B1 true 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
KR19980035727A (en) 1998-08-05

Similar Documents

Publication Publication Date Title
Neider et al. OpenGL programming guide
US6147695A (en) System and method for combining multiple video streams
US5805868A (en) Graphics subsystem with fast clear capability
US5388202A (en) Method and apparatus for generating window borders having pictorial frame elements
KR100482708B1 (en) List controlled video operations
JP2912419B2 (en) Dynamic control system for use with computer graphic devices
JPS5985573A (en) Method and apparatus for displaying graphic informaion
US6166743A (en) Method and system for improved z-test during image rendering
US5150312A (en) Animation processor method and apparatus
KR100328424B1 (en) Method and apparatus for constructing a frame buffer with a fast copy means
US20140125686A1 (en) Image rendering method and system
US7898549B1 (en) Faster clears for three-dimensional modeling applications
US6952217B1 (en) Graphics processing unit self-programming
US6567092B1 (en) Method for interfacing to ultra-high resolution output devices
Kelly et al. Basic introduction to pygame
US5128872A (en) Method and apparatus for determining line positions for display and manipulation by a computer system
EP2728551B1 (en) Image rendering method and system
KR100230845B1 (en) Generating method of sprite animation
Slater et al. Liberation from rectangles: a tiling method for dynamic modification of objects on raster displays
US6756978B1 (en) Apparatus and method for sharing antialiasing memory across multiple displays
US4945497A (en) Method and apparatus for translating rectilinear information into scan line information for display by a computer system
CN111143018A (en) Front-end image rendering method and device and electronic equipment
JPS642953B2 (en)
JP2600904B2 (en) Image synthesizing method and apparatus
JP2787487B2 (en) Circuit for determining the position of a line segment displayed and operated on a computer system

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