KR100277546B1 - Computation Method Using Lookup Tables in Geometry for Surface Model Rendering - Google Patents

Computation Method Using Lookup Tables in Geometry for Surface Model Rendering Download PDF

Info

Publication number
KR100277546B1
KR100277546B1 KR1019980005627A KR19980005627A KR100277546B1 KR 100277546 B1 KR100277546 B1 KR 100277546B1 KR 1019980005627 A KR1019980005627 A KR 1019980005627A KR 19980005627 A KR19980005627 A KR 19980005627A KR 100277546 B1 KR100277546 B1 KR 100277546B1
Authority
KR
South Korea
Prior art keywords
vertex
edge
calculation
vertices
lookup table
Prior art date
Application number
KR1019980005627A
Other languages
Korean (ko)
Other versions
KR19990070658A (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 KR1019980005627A priority Critical patent/KR100277546B1/en
Publication of KR19990070658A publication Critical patent/KR19990070658A/en
Application granted granted Critical
Publication of KR100277546B1 publication Critical patent/KR100277546B1/en

Links

Abstract

본 발명은 서피스 모델(Surface Model)을 랜더링(Rendering)하기 위한 알고리즘을 하드웨어화하여 기하 연산(Geometry Operation)을 하는 경우에 발생되는 중복 연산을 방지하기 위한 서피스 모델 랜더링을 위한 기하 연산에서의 룩업 테이블을 이용한 연산량 절약 방법에 관한 것으로서, 첫 번째 버텍스 인덱스 데이터와, 두 번째 버텍스 인덱스 데이터와, 에지 계산 여부 데이터와, 에지 클립-아웃 여부 데이터와, 변환된 첫 번째 버텍스 인덱스 데이터와, 변환된 두 번째 버텍스 인덱스 데이터를 포함하는 에지 계산 결과를 나타내는 에지 정보와, 버텍스 클립-아웃 여부 데이터와, 버텍스 계산 여부 데이터를 포함하는 버텍스 정보를 포함하는 간단한 데이터 구조의 룩업 테이블(Lookup Table)을 캐쉬 메모리로 관리하면서 기하 연산시 캐쉬 메모리를 참조하여 이미 연산된 에지와 버텍스의 중복 연산을 피할수 있도록 함으로써, 기하 연산을 보다 신속하게 처리할 수 있는 것이다.In the present invention, a lookup table in a geometric operation for surface model rendering to prevent duplicate operations generated when performing a geometry operation by hardwareizing an algorithm for rendering a surface model. A method for saving computational complexity using the first vertex index data, the second vertex index data, the edge calculation data, the edge clip-out data, the converted first vertex index data, and the converted second Cache memory manages a lookup table with edge information indicating the edge calculation result including vertex index data, vertex clip-out data, and vertex information including vertex calculation data. While calculating the geometry, refer to the cache memory By so as to avoid overlapping operation of the edge and the vertex, which is the geometric operations can be processed more quickly.

Description

서피스 모델 랜더링을 위한 기하 연산에서의 룩업 테이블을 이용한 연산량 절약 방법(method for saving quantity of geometry operation using lookup table)Method for saving quantity of geometry operation using lookup table

본 발명은 3차원 그래픽 처리 시스템에 관한 것으로서, 특히 서피스 모델(Surface Model)을 랜더링(Rendering)하기 위한 알고리즘을 하드웨어화하여 기하 연산(Geometry Operation)을 하는 경우에 발생되는 중복 연산을 방지하기 위하여, 연산 정보 임시 저장을 위한 간단한 데이터 구조의 룩업 테이블(Lookup Table)를 구성하여 그 연산량을 줄일 수 있도록 한 서피스 모델 랜더링을 위한 기하 연산에서의 룩업 테이블을 이용한 연산량 절약 방법에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a three-dimensional graphics processing system. In particular, in order to prevent overlapping operations that occur when performing a geometry operation by hardwareizing an algorithm for rendering a surface model, The present invention relates to a method of saving a computation amount using a lookup table in a geometric operation for surface model rendering, which can reduce the amount of computation by constructing a lookup table of a simple data structure for temporarily storing operation information.

일반적으로, 컴퓨터 그래픽 분야에서 물체를 X, Y, Z축을 써서 정의한 표현 방법을 3차원 표현(Three-dimensional Representation)이라고 하는데, 그 종류로는 와이어 프레임 모델(Wire Frame Model), 서피스 모델(Surface Model), 솔리드 모델(Solid Model)등이 있다.In general, in the field of computer graphics, a representation method defined by an object using the X, Y, and Z axes is called a three-dimensional representation, and the types thereof include a wire frame model and a surface model. ), And solid models.

여기서, 와이어 프레임 모델은 캐드(CAD) 프로그램 등의 컴퓨터 그래픽 어플리케이션에 있어서 와이어를 연결한 것과 같은 독립한 선분에 의해 구성되어 모델을 구축하고 있는 것과 같은 3차원 물체의 표시를 나타내며, 솔리드 모델은 일명, 입체 모델이라고도 하며 길이,폭, 깊이가 끊임없이 연속하는 기하학 형상이나 구조를 가리킨다.Here, the wire frame model is composed of independent line segments such as a wire connected in a computer graphics application such as a CAD program, and represents a representation of a three-dimensional object such as building a model. Also called a three-dimensional model, it refers to a geometric shape or structure in which length, width, and depth are continuously continuous.

그리고, 서피스 모델은 보통 삼각형(Triangle)을 기본으로하여 입체를 구성하고 있으며, 서피스는 기하학과 컴퓨터 그래픽스에서는 입방체등 고정면의 한 면을 말하며, 은선 소거를 하여 3차원 물체를 나타내는 도형의 표현 방식을 나타낸다.The surface model is generally composed of a triangle based on a triangle, and the surface is a surface of a fixed surface such as a cube in geometry and computer graphics, and a representation method of a figure representing a three-dimensional object by hidden line elimination. Indicates.

상술한 서피스 모델을 이용해 실제감을 나타내기 위해 하는 작업으로서 랜더링이 있는데, 랜더링은 컬러와 셰이딩(Shading)을 사용하여 화상에 현실감을 주는 그래픽 기법중 하나이며, 보통 캐드 프로그램등의 형상 모델링 패키지의 일부이며, 수학을 사용하여 표시하고자 하는 물체(Object)에 대한 광원의 위치를 나타내고, 빛에 의해서 하이라이트 부분, 셰이딩 및 색의 변화가 어떻게 생기는 가를 계산한다. 현실감을 주기 위한 랜더링은 불투명에서 그늘이 그려진 다각형, 그리고 복잡하기로는 거의 사진에 버금가는 화상에 이르기까지의 범위에 걸친다.Rendering is one of the tasks used to express realism using the surface model described above. Rendering is one of the graphic techniques that brings images to life by using color and shading, and is part of a shape modeling package such as a CAD program. It represents the position of the light source with respect to the object to be displayed using mathematics, and calculates how the highlight portion, the shading and the color change are caused by the light. Rendering to give realism ranges from opaque to shaded polygons and to images that are almost as comparable as photographs.

삼각형으로 구성된 서피스 모델을 랜더링 하기 위해서는 다음과 같은 두가지 과정을 거치게 된다. 첫째는 기하 연산(Geometry operation) 과정을 수행하고 둘째는 래스터 연산(Rasterization operation)을 수행하게 된다.To render a surface model consisting of triangles, there are two steps: The first performs the geometry operation process and the second performs the rasterization operation.

기하 연산은 삼각형의 두 에지(Edge)가 만나는 정점인 버텍스(Vertex)를 모델 축에서 카메라 축으로 좌표 변환을 시키고 표시 볼륨(Viewing volume)에 대해서 인-아웃(in-out)을 판정하는 프리버텍스 계산(Prevertex calculation), 카메라 축에서 스크린 축으로 좌표 변환을 시키는 버텍스 계산(Vertex calculation), 버텍스 두 개로 구성된 에지를 표시 볼륨에 대해서 클리핑(Clipping)시키는 에지 계산(Edge calculation), 래스터 연산을 위해서 각종 셋업(Setup)을 하는 삼각형 계산(Triangle calculation)등의 연산들로 구성되어 있다.Geometric operation converts vertex, which is the vertex where two edges of a triangle meet, from the model axis to the camera axis, and preverts to determine in-out of the viewing volume. Prevertex calculation, Vertex calculation that transforms the coordinates from the camera axis to the screen axis, Edge calculation that clips two edges to the display volume, and Edge calculation for raster calculation. It consists of calculations such as triangle calculation to setup.

래스터 연산은 기하 연산에서 주어진 셋업 데이터를 이용하여, 스크린에 투사된 삼각형의 내부를 셰이딩한다.The raster operation uses the setup data given in the geometry operation to shade the inside of the triangle projected on the screen.

이러한 기하 연산과 래스터 연산은 각각의 특성으로 말미암아, 각기 다른 형태로 하드웨어가 만들어진다. 즉, 기하 연산은 주로 부동 소숫점 연산을 많이 수행하게 되므로 부동 소수점 연산이 보강된 구조를 가지게 되고, 래스터 연산은 빈번한 메모리 접근을 요하게 되므로 높은 대역폭을 제공해 줄 수 있는 구조를 가지게 된다.These geometries and raster operations have their own characteristics, resulting in different forms of hardware. That is, since the geometric operations are mainly performed a lot of floating-point operations, a floating point operation is augmented structure, and the raster operation requires a frequent memory access has a structure that can provide a high bandwidth.

기하 연산과 래스터 연산을 행하도록 구성된 랜더링 하드웨어에 랜더링할 물체를 다운로드하는데 주로 사용되는 방식은 삼각형의 각 버텍스의 위치(position), 정규 속성(Normal)등을 주어서, 이 모든 삼각형들에 대한 기하 연산인 버텍스 계산, 에지 계산 및 삼각형 계산을 수행하게 된다.The main method used to download objects for rendering to rendering hardware configured to perform both geometry and raster operations is to give the position, normal properties, and so on of each vertex in the triangle, so that the geometry You will perform invertex calculations, edge calculations, and triangle calculations.

그러나, 이 경우에는 입력으로 들어오는 삼각형들간에는 버텍스와 에지를 공유하는 경우가 많다.In this case, however, the vertices and edges are often shared between the triangles coming into the input.

도 1에서 보는 바와 같이 삼각형 T0와 T1에 대해서, 버텍스 v1, v2에 대한 버텍스 계산을 중복해서 하게 되고, 에지 e0에 대해서도 에지 계산을 중복해서 하게되는 문제점이 있다.As shown in FIG. 1, the vertex calculations for vertices v1 and v2 are duplicated for the triangles T0 and T1, and the edge calculations are also duplicated for the edge e0.

이러한 중복 계산을 방지하고자, 랜더링 하드웨어내에 버텍스 배열(Vertex Array)을 저장할 비교적 큰 메모리를 구비하는 새로운 랜더링 하드웨어로의 랜더링할 새로운 물체 입력 방법을 제시하고 있는데, 이 방법은 먼저 랜더링할 물체의 버텍스들을 랜더링 하드웨어에 다운로드한다. 그리고 랜더링 하드웨어에서는 버텍스에 대한 프리버텍스 계산, 버텍스 계산을 행한다. 다음으로 삼각형에 대한 정의를 버텍스의 인덱스로서 버텍스 배열에서 다운로드하여, 에지 계산과 삼각형 계산을 행하게 된다.To avoid this duplication calculation, we propose a new method of inputting objects to render to new rendering hardware with relatively large memory to store vertex arrays in the rendering hardware. Download to rendering hardware. In the rendering hardware, the vertex calculation and the vertex calculation are performed on the vertices. Next, the definition of the triangle is downloaded from the vertex array as the index of the vertex, and edge calculation and triangle calculation are performed.

이 방법은 버텍스들에 대한 중복 계산을 방지할 수 있는 장점이 있지만, 에지 계산에 대한 중복 계산을 줄일 수 없고, 클립-아웃(Clip-out)되는 버텍스에 대해서도 버텍스 계산을 행하게 되므로 필요없는 연산을 하게 된다.This method has the advantage of avoiding duplicate calculations on vertices, but it does not reduce duplicate calculations on edge calculations and vertex calculations on vertices that are clipped out. Done.

즉, 도 2에서 보는 바와 같이 버텍스 v0, v1, v2는 클립핑 영역(Clipping Region)의 외부에 위치하게 되므로, 스크린에 나타나지 않게 되며, 스크린에 나타나지 않을 버텍스에 대해서 버텍스 연산을 행하는 경우가 발생하게 되는 문제점이 있다.That is, as shown in FIG. 2, since vertices v0, v1, and v2 are located outside the clipping region, the vertices v0, v1, and v2 do not appear on the screen, and a vertex operation is performed on vertices that do not appear on the screen. There is a problem.

본 발명의 목적은 서피스 모델링 알고리즘을 하드웨어화하는 경우 발생하는 기하 연산에서의 중복 계산을 간단한 데이터 구조를 이용하여 줄일 수 있도록 하여 동일한 하드웨어 자원과 소정의 캐쉬 메모리를 더 첨가함으로써, 동일한 개수의 삼각형을 좀더 신속하게 처리할 수 있도록 한 서피스 모델 랜더링을 위한 기하 연산에서의 룩업 테이블을 이용한 연산량 절약 방법을 제공하는데 있다.An object of the present invention is to reduce the redundancy calculation in the geometric operation that occurs when hardware surface modeling algorithm using a simple data structure to add the same hardware resources and a predetermined cache memory, thereby adding the same number of triangles This paper provides a method to reduce the amount of computation using the lookup table in the geometric operation for rendering the surface model for faster processing.

본 발명에 따른 서피스 모델 랜더링을 위한 기하 연산에서의 룩업 테이블을 이용한 연산량 절약 방법은, 서피스 모델 랜더링을 위한 물체를 3개의 버텍스와 3개의 에지를 갖는 삼각형을 기본 단위로 하여 표시 볼륨 영역에 대해서 버텍스의 인/아웃을 판단하고 스크린 좌표로 변환시키는 버텍스 계산과, 버텍스 두 개로 구성된 에지를 표시 볼륨 영역에 대해서 클리핑시키는 에지 계산과, 스크린에 투사된 삼각형의 내부를 셰이딩하는 래스터 연산을 위한 초기화를 수행하는 삼각형 계산을 포함하는 기하 연산을 수행하는 방법으로서, 기하 연산된 정보로 구성한 룩업 테이블을 참조하여 삼각형의 제 1 버텍스와 제 2 버텍스로 이루어진 선택된 에지가 에지 계산이 수행되었고 표시 볼륨 영역내에 위치하면 룩업 테이블을 참조하여 변환된 제 1,2 버텍스를 선택하는 제 1 과정과, 선택된 에지가 에지 계산이 수행되지 않았으면 에지 계산을 수행하여 에지 계산 결과를 상기 룩업 테이블에 저장하고 에지 계산에 의해 변환된 제 1,2 버텍스를 선택하는 제 2 과정과, 제 1 과정이나 제 2 과정에서 선택된 변환된 제 1,2 버텍스에 대하여 버텍스 계산을 수행하는 제 3 과정과, 제 1 과정이나 제 2 과정에서 선택된 변환된 제 1,2 버텍스와 삼각형의 나머지 에지들에 대해서 제 1,2,3 과정을 수행하여 선택된 버텍스들 중에서 상이한 버텍스 3개가 존재하면 그 3개의 버텍스로 삼각형 계산을 수행하고 다음 삼각형의 기하 연산을 위하여 리턴하는 제 4 과정을 포함하여 이루어짐을 특징으로 한다.According to an embodiment of the present invention, a computational saving method using a lookup table in a geometric operation for surface model rendering is based on a vertex for a display volume region based on a triangle having three vertices and three edges as an object for surface model rendering. Performs vertex calculation to determine the in / out of and convert to screen coordinates, edge calculation to clip the edges of two vertices to the display volume area, and raster operation to shade the inside of the triangle projected on the screen. A method of performing a geometric operation including a triangular calculation, wherein the selected edge consisting of a first vertex and a second vertex of a triangle is performed by reference to a lookup table composed of geometrically computed information and is located within a display volume area. The first and second vertices converted by referring to the lookup table And a second process of performing edge calculation by storing the edge calculation result in the lookup table and selecting the first and second vertices converted by the edge calculation. And a third process of performing vertex calculation on the transformed first and second vertices selected in the first or second process, and the remaining edges of the converted first and second vertices and the triangle selected in the first process or the second process. If the three vertices exist among the selected vertices by performing the first, second, and third processes on the two vertices, a triangular calculation is performed on the three vertices, and a fourth process of returning for the next triangular geometric operation is performed. It features.

한편, 기하 연산된 정보로 구성한 룩업 테이블은 첫 번째 버텍스 인덱스 데이터와, 두 번째 버텍스 인덱스 데이터와, 에지 계산 여부 데이터와, 에지 클립-아웃 여부 데이터와, 변환된 첫 번째 버텍스 인덱스 데이터와, 변환된 두 번째 버텍스 인덱스 데이터를 포함하는 에지 계산 결과를 나타내는 에지 정보를 포함하여 구성하는 것을 특징으로 한다.On the other hand, the lookup table composed of geometrically calculated information includes the first vertex index data, the second vertex index data, the edge calculation data, the edge clip-out data, the first vertex index data, and the converted vertex index data. And edge information indicating an edge calculation result including second vertex index data.

또한, 룩업 테이블은 소정 용량의 캐쉬 메모리를 이용하여 구성하는 것을 특징으로 하며, 캐쉬 메모리는 용량 초과시 한번 참조된 정보를 버리고 나서 저장하는 것을 특징으로 한다.The lookup table may be configured using a cache memory having a predetermined capacity, and the cache memory may be stored after discarding the information once referred to when the capacity is exceeded.

한편, 룩업 테이블에 버텍스 계산 결과를 나타내는 버텍스 정보를 더 포함하여 구성하고, 제 2 과정에서 룩업 테이블을 참조하여 제 1,2 버텍스 모두가 표시 볼륨 영역내에 위치하면 에지 계산을 수행하여 변환된 제 1,2 버텍스를 선택하고 에지 계산 결과를 룩업 테이블에 저장하고, 제 3 과정에서 룩업 테이블을 참조하여 변환된 제 1,2 버텍스가 버텍스 계산이 수행되지 않았을 경우에 버텍스 계산을 수행하고 그 결과를 룩업 테이블에 저장하는 것을 특징으로 한다.Meanwhile, the lookup table further includes vertex information indicating a vertex calculation result, and when the first and second vertices are located in the display volume area by referring to the lookup table in the second process, edge transformation is performed by performing edge calculation. Select vertex 2 and store the edge calculation result in the lookup table, and if the first and second vertices converted by referring to the lookup table in the third step are not subjected to vertex calculation, perform vertex calculation and look up the result. It is characterized by storing in a table.

한편, 버텍스 정보는 버텍스 클립-아웃 여부 데이터와, 버텍스 계산 여부 데이터를 포함하는 것을 특징으로 한다.The vertex information may include vertex clip-out data and vertex calculation data.

도 1은 종래의 에지 중복 연산을 설명하기 위한 서피스 모델.1 is a surface model for explaining a conventional edge overlap operation.

도 2는 종래의 클립-아웃 영역의 버텍스 중복 연산을 설명하기 위한 서피스 모델.Figure 2 is a surface model for explaining the vertex redundancy operation of the conventional clip-out area.

도 3은 본 발명에 따른 절약 연산을 설명하기 위한 서피스 모델.3 is a surface model for explaining the saving operation according to the present invention.

도 4는 본 발명에 따른 서피스 모델 랜더링을 위한 기하 연산에서의 룩업 테이블을 이용한 연산 과정을 수행하기 위한 일반적인 컴퓨터에 대한 개략적인 블럭도.4 is a schematic block diagram of a general computer for performing a computational process using a lookup table in geometrical computation for surface model rendering in accordance with the present invention.

도 5는 본 발명에 따른 서피스 모델 랜더링을 위한 기하 연산에서의 룩업 테이블을 이용한 연산량 절약 과정을 도시한 흐름도.FIG. 5 is a flow chart illustrating a computational savings process using a lookup table in geometry computation for surface model rendering in accordance with the present invention. FIG.

<도면의 주요 부분에 대한 부호의 설명><Explanation of symbols for the main parts of the drawings>

10 : 입력 장치 20 : 주제어 장치10: input device 20: main controller

25 : 캐쉬 메모리 30 : 출력 장치25 cache memory 30 output device

본 발명의 상술한 목적과 여러 가지 장점은 이 기술 분야에 숙련된 사람들에 의해 첨부된 도면을 참조하여 후술되는 발명의 바람직한 실시예로부터 더욱 명확하게 될 것이다.The above objects and various advantages of the present invention will become more apparent from the preferred embodiments of the invention described below with reference to the accompanying drawings by those skilled in the art.

이하 첨부된 도면을 참조하여 본 발명의 바람직한 실시예에 대하여 상세하게 설명한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 3은 본 발명에 따른 절약 연산을 설명하기 위한 서피스 모델로서, 동 도면을 통해서 본 발명을 설명하면, 먼저 모든 버텍스에 대해서 좌표 변환과 표시 볼륨에 대한 인-아웃의 판정을 수행하는 프리버텍스 계산이 되었다고 가정한다.FIG. 3 is a surface model for explaining the saving operation according to the present invention. Referring to the present invention through the same drawing, first, prevertex calculation for performing coordinate transformation and determination of in-out for display volume is performed for all vertices. Assume that

삼각형 T0과 T1에 대해서 차례로 기하 연산을 수행할 때, 에지 e0, 즉 버텍스 v1, v2에 대한 에지 계산을 하는 경우에는 삼각형을 기준 단위로 하여 따로 에지 계산하므로, 삼각형 T0과 T1에 대해서 모두 2번에 걸쳐서 에지 계산이 이루어지게 된다. 더구나, 버텍스 v1과 버텍스 v2에 대해서도 버텍스 계산이 2번에 걸쳐서 행해지게 된다. 이에 대해서 모든 에지에 대해서 에지 계산이 행해졌는지와 행해진 경우에는 버텍스가 어떤 형태로 변환되었는지에 대한 정보를 저장하고 있다면, 에지에 대한 에지 계산의 중복을 방지할 수 있게 된다.When performing arithmetic operations on triangles T0 and T1 one after another, edge calculations for edge e0, namely vertices v1 and v2, are calculated separately on the basis of triangles. Therefore, twice for triangles T0 and T1. Edge calculations are made over. In addition, vertex calculation is performed twice in vertex v1 and vertex v2. On the other hand, if the edge calculation is performed for all the edges, and if the information on the form of the vertices is converted, the overlapping of the edge calculations for the edges can be prevented.

따라서, 삼각형 T0에 대해서 에지 계산을 행하게 되면, 버텍스 v1, v2가 버텍스 v1, v4로 변환이 된다. 여기서 에지 e0에 대해서 버텍스 v1과 v2를 에지(클리핑) 계산이 이루어지고, 버텍스 v1, v4로 변환되었다는 정보를 저장한다.Therefore, when edge calculation is performed on triangle T0, vertices v1 and v2 are converted into vertices v1 and v4. Here, edge (clipping) calculation is performed on vertices v1 and v2 with respect to the edge e0, and information about the vertex v1 and v4 is stored.

그리고, 다음번 삼각형 T1에 대한 에지 계산을 행하는 경우에는 버텍스 v1, v2를 탐색 키로 에지에 대한 정보를 저장한 곳을 조사하면, 버텍스 v1, v2로 이루어진 에지에 대한 클립핑이 행해졌다는 것을 알 수 있고 그 버텍스가 v1, v4로 변환되었다는 정보를 얻을 수 있으므로, 중복되는 클립핑(에지) 계산을 제거 할 수 있게 된다. 이 경우 버텍스로 구성되는 모든 에지에 대한 정보를 저장할 필요가 없다. 왜냐하면, 에지는 두 번 이상 삼각형 사이에 공유하는 경우가 극히 드물게 되므로, 캐쉬 형태로 에지에 대한 정보를 저장해서 캐쉬가 꽉차는 경우 에지가 두 번이상 참조된 에지를 버리고 저장할 수 있다.When the edge calculation is performed on the next triangle T1, when the information on the edge is stored using the search keys vertices v1 and v2 is examined, it can be seen that clipping has been performed on the edges composed of vertices v1 and v2. You can get information that vertices have been converted to v1 and v4, thus eliminating redundant clipping (edge) calculations. In this case, you do not need to store information about every edge that consists of vertices. Because the edges are rarely shared between triangles more than once, information about the edges in cache form can be stored so that when the cache is full, the edges referred to more than once can be discarded and stored.

또한, 버텍스 계산을 행하게 될 때, 각 버텍스 계산이 행해졌는지를 나타내는 정보를 저장해 놓는다면 버텍스에 대해서도 중복 계산을 피할 수 있게 된다.When vertex calculations are performed, duplicate calculations can be avoided for vertices if information indicating whether or not each vertex calculation is performed is stored.

도 4는 본 발명에 따른 서피스 모델 랜더링을 위한 기하 연산에서의 룩업 테이블을 이용한 연산 과정을 수행하기 위한 일반적인 컴퓨터에 대한 개략적인 블록도로서, 키보드나 플로피 또는 하드 디스크등의 입력 장치(10)와, 입력 장치(10)로부터 인가되는 서피스 모델로부터 에지 정보와 버텍스 정보를 포함하는 룩업 테이블이 저장되는 캐쉬 메모리(25)를 참조하면서 후술하는 본 발명에 따른 알고리즘에 따라 기하 연산을 수행 제어하는 주제어 장치(20)와, 주제어 장치(20)로부터의 기하 연산 결과 처리를 위한 플로피 또는 하드 디스크나 모니터등으로 이루어진 출력 장치(20)를 포함한다.FIG. 4 is a schematic block diagram of a general computer for performing a calculation process using a look-up table in a geometric calculation for surface model rendering according to the present invention, and includes an input device 10 such as a keyboard, a floppy, or a hard disk. The main control unit performs a geometric operation according to an algorithm according to the present invention described below while referring to a cache memory 25 storing a lookup table including edge information and vertex information from a surface model applied from the input device 10. And an output device 20 made of a floppy or a hard disk, a monitor, or the like for processing the geometric arithmetic result from the main controller 20.

다음에, 도 5의 본 발명에 따른 서피스 모델 랜더링을 위한 기하 연산에서의 룩업 테이블을 이용한 연산량 절약 과정을 도시한 흐름도를 참조하여 본 발명을 상세히 설명한다.Next, the present invention will be described in detail with reference to a flowchart showing a calculation amount saving process using a lookup table in the geometric operation for surface model rendering according to the present invention of FIG. 5.

먼저, 본 발명에 사용되는 룩업 테이블의 데이터 구조는 다음과 같다.First, the data structure of the lookup table used in the present invention is as follows.

룩업 테이블에 포함된 에지 정보는 에지가 어떤 버텍스들로 구성되고, 이전에 이 에지에 대해서 에지 계산이 행해졌는지와, 에지 계산이 이루어진 경우에는 어떤 버텍스로 변환되었는지에 관한 정보로 구성되어 있으며, 구체적으로는 첫 번째 버텍스 인덱스 데이터와, 두 번째 버텍스 인덱스 데이터와, 에지 계산 여부 데이터와, 에지 클립-아웃 여부 데이터와, 변환된 첫 번째 버텍스 인덱스 데이터와, 변환된 두 번째 버텍스 인덱스 데이터를 포함한다.The edge information included in the lookup table consists of information about which vertices an edge is composed of, which edge calculations were previously performed on this edge, and which vertices were converted to the edge calculations. The first vertex index data, the second vertex index data, edge calculation data, edge clip-out data, converted first vertex index data, and converted second vertex index data are included.

또한, 에지 정보의 주요 역할은 에지에 대해서 에지 계산이 이루어졌는지를 검사하는 것이다. 서피스 모델내의 대부분의 에지를 두 개의 삼각형이 서로 공유하고 있으므로, 에지 계산은 한번만 행해지고 다음 번에 공유하는 삼각형에 대한 그 에지에 대한 에지 계산은 이러한 에지 정보를 참조하는 것으로 대체 생략하여 바로 클립핑 여부를 판가름 할 수 있는 것이다.In addition, the main role of the edge information is to check whether the edge calculation has been performed for the edge. Since the two triangles share most of the edges in the surface model with each other, the edge calculation is done only once and the edge calculation for that edge for the next shared triangle is replaced by referencing this edge information. It can be determined.

한편, 룩업 테이블에 포함된 버텍스 정보는 버텍스 계산이 행해졌는지, 이 꼭지점이 표시 볼륨 영역내에 들어와 있는지에 관계되는 정보로 구성하며, 구체적으로는 버텍스 클립-아웃 여부 데이터와, 버텍스 계산 여부 데이터를 포함한다.On the other hand, the vertex information included in the lookup table is composed of information related to whether vertex calculation is performed or whether this vertex is in the display volume area, and specifically includes vertex clip-out data and vertex calculation data. do.

또한, 버텍스 정보의 주요 역할은 버텍스에 대한 표시 볼륨내에 있는가 없는가에 대한 정보를 가지고 있으면, 에지에 대해서 에지 계산을 처음 행하게 되는 경우 만일 에지를 구성하는 두 개의 버텍스가 표시 볼륨 영역의 외부에 있으면 에지에 대한 에지 계산을 거치지 않고 바로 에지를 클립-아웃 시킬 수 있는 것이며, 버텍스가 미리 계산된 버텍스일 경우에 중복되는 버텍스 계산을 방지할 수 있는 것이다.Also, if the main role of vertex information is whether or not it is in the display volume for the vertex, the first time edge calculation is performed for the edge, if the two vertices that constitute the edge are outside the display volume area, the edge It is possible to clip-out an edge without going through the edge calculation for. If the vertex is a pre-calculated vertex, it is possible to prevent duplicate vertex calculation.

다음에, 상술한 룩업 테이블을 참조해 가면서 기하 연산량을 절약하는 과정을 상세하게 설명한다.Next, a process of saving the geometric computation amount while referring to the above-described lookup table will be described in detail.

먼저, 기하 연산할 삼각형의 첫 번째 에지를 선택하여(단계 500), 선택된 에지의 선택된 에지의 첫 번째 버텍스 인덱스와 두 번째 버텍스 인덱스를 이용하여 룩업 데이블을 참조하여 선택된 에지에 대한 에지 정보를 검색한다(단계 502).First, by selecting the first edge of the triangle to be geometrically computed (step 500), the edge information of the selected edge is retrieved by referring to the lookup table using the first vertex index and the second vertex index of the selected edge of the selected edge. (Step 502).

다음에, 검색된 에지 정보의 에지 계산 여부 데이터를 이용하여 선택된 에지가 에지 계산을 미리 수행했는지를 판단하여(단계 504), 에지 계산이 미리 수행되었으면 에지 정보의 에지 클립-아웃 여부 데이터를 이용하여 선택된 에지가 표시 볼륨 영역내에 위치하는 지를 판단한다(단계 506).Next, it is determined whether the selected edge has previously performed edge calculation by using the edge calculation data of the retrieved edge information (step 504). If the edge calculation has been performed in advance, the selected edge is selected using the edge clip-out data of the edge information. It is determined whether the edge is located in the display volume area (step 506).

이때, 선택된 에지가 표시 볼륨 영역 외부에 위치하면 선택된 에지가 삼각형의 마지막 에지인지를 판단하고(단계 508), 마지막 에지가 아니면 다음 에지를 선택하여(단계 510), 상술한 단계 (502)로 귀환 진행한다.At this time, if the selected edge is located outside the display volume area, it is determined whether the selected edge is the last edge of the triangle (step 508), and if it is not the last edge, the next edge is selected (step 510), and the process returns to step 502 described above. Proceed.

한편, 상술한 단계 (506)에서 선택된 에지가 표시 볼륨 영역내에 위치하면 룩업 테이블의 에지 정보를 참조하여 변환된 첫 번째 버텍스 인텍스 데이터와, 변환된 두 번째 버텍스 인덱스 데이터를 선택하고(단계 512), 후술하는 단계 (522)로 진행한다.On the other hand, if the edge selected in the above-described step 506 is located within the display volume area, the converted first vertex index data and the converted second vertex index data are selected with reference to the edge information of the lookup table (step 512). Proceed to step 522, which will be described later.

다른 한편, 상술한 단계 (504)에서 선택된 에지가 에지 계산이 수행되어 있지 않으면 먼저, 룩업 테이블의 에지 정보중 에지 계산 여부 데이터를 에지 계산을 한 것으로 예를 들면, '참'으로 저장하고(단계 514), 현재 선택된 에지의 두 버텍스 모두가 표시 볼륨 영역 외부에 위치하는지를 룩업 테이블의 버텍스 정보중 버텍스 클립-아웃 여부 데이터를 참조하여 판단한다(단계 516).On the other hand, if the edge selected in the above-described step 504 is not performing edge calculation, first, the edge calculation data of the edge information of the lookup table is calculated as an edge calculation and stored as 'true', for example (step In operation 516, it is determined whether both vertices of the currently selected edge are located outside the display volume area by referring to vertex clip-out data among vertex information of the lookup table.

이때, 두 버텍스 모두가 표시 볼륨 영역 외부에 위치하면 에지 계산이 불필요하기 때문에 에지 정보중 해당 에지 클립-아웃 여부 데이터를 '참'으로 저장하고(단계 518), 다음 에지를 계산하기 위하여 상술한 단계 (508)로 귀환 진행한다.In this case, since both vertices are located outside the display volume area, edge calculation is unnecessary, so the corresponding edge clip-out data of the edge information is stored as 'true' (step 518), and the above-described step is performed to calculate the next edge. Proceed back to (508).

반대로, 두 버텍스중 표시 볼륨 영역 내부에 위치한 버텍스가 있으면 에지 정보중 해당 에지 클립-아웃 여부 데이터를 '거짓'으로 저장하고 에지 계산을 수행하며, 에지 계산의 결과(변환된 첫 번째 버텍스 인텍스와 변환된 두 번째 버텍스 인덱스)를 룩업 테이블의 에지 정보에 저장하고(단계 520), 단계 (522)로 진행한다.Conversely, if any of the two vertices are located inside the display volume area, the corresponding edge clip-out data of the edge information is stored as 'false' and the edge calculation is performed, and the result of the edge calculation (the first vertex index and the converted The second vertex index) is stored in the edge information of the lookup table (step 520), and the flow proceeds to step 522.

다음에, 단계 (522)에서는 상술한 단계 (512)에서 룩업 테이블의 에지 정보에서 참조하여 선택된 버텍스나 상술한 단계 (520)에서 에지 계산 결과에 따라 변환되어 선택된 버텍스중 첫 번째 버텍스가 버텍스 계산이 수행되었는지를 룩업 테이블의 버텍스 정보중 버텍스 계산 여부 데이터를 참조하여 판단한다.Next, in step 522, the first vertex of the selected vertex is converted according to the vertex selected by referring to the edge information of the lookup table in step 512 or the edge calculation result in step 520 described above. It is determined by referring to the vertex calculation data of the vertex information of the lookup table.

이때, 첫 번째 버텍스가 버텍스 계산이 수행되지 않았으면 버텍스 계산을 수행하고 그 결과를 룩업 테이블의 버텍스 정보에 저장한다(단계 524).In this case, if the first vertex has not been vertex calculated, vertex calculation is performed and the result is stored in vertex information of the lookup table (step 524).

다음에, 두 번째 버텍스가 버텍스 계산이 수행되었는지를 룩업 테이블의 버텍스 정보중 버텍스 계산 여부 데이터를 참조하여 판단한다(단계 526).Next, the second vertex determines whether vertex calculation is performed by referring to vertex calculation data among vertex information of the lookup table (step 526).

이때, 두 번째 버텍스가 버텍스 계산이 수행되지 않았으면 버텍스 계산을 수행하고 그 결과를 룩업 테이블의 버텍스 정보에 저장한다(단계 528).In this case, if the second vertex has not been vertex calculated, vertex calculation is performed and the result is stored in vertex information of the lookup table (step 528).

다음에, 버텍스 계산 여부를 확인한 버텍스들 즉, 첫 번째 버텍스와 두 번째 버텍스를 소정의 에지 버퍼에 어드레스를 증가시키면서 순차적으로 저장하고(단계 530), 삼각형의 다음 에지 기하 연산을 위하여 상술한 단계 (508)로 귀환 진행한다.Next, vertices having been checked for vertex calculation, that is, the first vertex and the second vertex are sequentially stored in the predetermined edge buffer while increasing the address (step 530), and the above-described step for the next edge geometry of the triangle ( Return to step 508).

한편, 상술한 단계 (508)에서 현재 선택되어 기하 연산되거나 중복 연산을 피하기 위하여 기하 연산 생략된 에지가 삼각형의 마지막 에지이면 상술한 단계 (530)에서 에지 버퍼에 순차적으로 저장된 하나의 삼각형의 에지에 대응하는 모든 버텍스들중에서 상이한 버텍스 3개를 선택한다(단계 532).On the other hand, if the edge that is currently selected in operation 508 described above or omitted from the geometric operation in order to avoid duplicate operations is the last edge of the triangle, the edge of one triangle sequentially stored in the edge buffer in operation 530 described above. Three different vertices are selected from all of the corresponding vertices (step 532).

다음에, 선택한 3개의 버텍스를 이용하여 삼각형 계산을 수행하고(단계 534), 기하 연산을 위한 마지막 삼각형인지를 판단하여(단계 536), 마지막 삼각형이면 본 루틴을 종료하고, 마지막 삼각형이 아니고 기하 연산할 삼각형이 더 있으면 다음 삼각형을 선택하고(단계 538), 리턴되어 계속 본 루틴에 따른 기하 연산을 수행한다.Next, a triangle calculation is performed using the three selected vertices (step 534), it is determined whether it is the last triangle for the geometric operation (step 536), and if this is the last triangle, the routine ends, and the geometric operation is not the last triangle. If there are more triangles to do, the next triangle is selected (step 538) and returned to continue performing the geometric operation according to this routine.

이상 설명한 내용을 통해 당업자라면 본 발명의 기술 사상을 일탈하지 않는 범위에서 다양한 변경 및 수정 실시가 가능함을 알 수 있을 것이다.Those skilled in the art will appreciate that various changes and modifications can be made without departing from the spirit of the present invention.

이상 설명한 바와 같이 본 발명에 따르면, 그래픽 분야에서 물체에 대한 서피스 모델을 랜더링하는 알고리즘을 수행하거나 그 알고리즘을 하드웨어화하여 수행시 기하 연산에서 발생되던 중복 계산을 피하기 위하여, 기하 연산된 정보를 임시 저장하는 간단한 구조의 룩업 테이블을 캐쉬 메모리로 관리하면서 참조하여 기하 연산을 수행함으로써, 기하 연산을 보다 신속하게 처리할 수 있는 효과가 있다.As described above, according to the present invention, in order to perform an algorithm for rendering a surface model of an object in the graphics field or to hardwareize the algorithm, temporarily storing the geometrically calculated information in order to avoid duplicate calculations generated in the geometric operation. By managing the lookup table of simple structure in cache memory while referring to the geometric operation, the geometric operation can be processed more quickly.

Claims (6)

서피스 모델 랜더링을 위한 물체를 3개의 버텍스와 3개의 에지를 갖는 삼각형을 기본 단위로 하여 표시 볼륨 영역에 대해서 버텍스의 인/아웃을 판단하고 스크린 좌표로 변환시키는 버텍스 계산과, 버텍스 두 개로 구성된 에지를 표시 볼륨 영역에 대해서 클리핑시키는 에지 계산과, 스크린에 투사된 삼각형의 내부를 셰이딩하는 래스터 연산을 위한 초기화를 수행하는 삼각형 계산을 포함하는 기하 연산을 수행하는 방법으로서,The object for surface model rendering is based on a triangle with three vertices and three edges, and vertex calculations to determine vertex in / out of the display volume area and convert it to screen coordinates, and an edge composed of two vertices. A method of performing a geometric operation including an edge calculation for clipping a display volume region and a triangle calculation for performing initialization for raster operations shading the inside of a triangle projected on the screen. 기하 연산된 정보로 구성한 룩업 테이블을 참조하여 삼각형의 제 1 버텍스와 제 2 버텍스로 이루어진 선택된 에지가 에지 계산이 수행되었고 표시 볼륨 영역내에 위치하면 룩업 테이블을 참조하여 변환된 제 1,2 버텍스를 선택하는 제 1 과정과;When the selected edge consisting of the first vertex and the second vertex of the triangle is performed in the display volume area with the selected edge composed of the first and second vertices of the triangle by referring to the lookup table configured with the geometric information, the first and second vertices converted by referring to the lookup table are selected. A first process of doing; 상기 선택된 에지가 에지 계산이 수행되지 않았으면 에지 계산을 수행하여 에지 계산 결과를 상기 룩업 테이블에 저장하고 에지 계산에 의해 변환된 제 1,2 버텍스를 선택하는 제 2 과정과;A second step of performing edge calculation to store edge calculation results in the lookup table and selecting first and second vertices converted by edge calculation if the selected edge has not been edge calculated; 제 1 과정이나 제 2 과정에서 선택된 상기 변환된 제 1,2 버텍스에 대하여 버텍스 계산을 수행하는 제 3 과정과;A third process of performing vertex calculation on the converted first and second vertices selected in the first process or the second process; 제 1 과정이나 제 2 과정에서 선택된 상기 변환된 제 1,2 버텍스와 삼각형의 나머지 에지들에 대해서 제 1,2,3 과정을 수행하여 선택된 버텍스들 중에서 상이한 버텍스 3개가 존재하면 그 3개의 버텍스로 삼각형 계산을 수행하고 다음 삼각형의 기하 연산을 위하여 리턴하는 제 4 과정을 포함하는 서피스 모델 랜더링을 위한 기하 연산에서의 룩업 테이블을 이용한 연산량 절약 방법.The first and second vertices selected in the first or second process and the remaining edges of the triangle are performed by the first and second vertices, and if three different vertices exist among the selected vertices, the three vertices are selected. 4. A method for saving computational volume using a lookup table in a geometric operation for surface model rendering, comprising a fourth step of performing a triangular calculation and returning for a geometric operation of the next triangle. 제 1 항에 있어서, 상기 룩업 테이블은 첫 번째 버텍스 인덱스 데이터와, 두 번째 버텍스 인덱스 데이터와, 에지 계산 여부 데이터와, 에지 클립-아웃 여부 데이터와, 변환된 첫 번째 버텍스 인덱스 데이터와, 변환된 두 번째 버텍스 인덱스 데이터를 포함하는 에지 계산 결과를 나타내는 에지 정보를 포함하여 구성하는 것을 특징으로 하는 서피스 모델 랜더링을 위한 기하 연산에서의 룩업 테이블을 이용한 연산량 절약 방법.The method of claim 1, wherein the lookup table includes first vertex index data, second vertex index data, edge calculation data, edge clip-out data, converted first vertex index data, and two transformed data. Comprising edge information indicating the result of the edge calculation including the first vertex index data comprising a lookup table in the geometric calculation for surface model rendering. 제 1 항에 있어서, 상기 룩업 테이블은 소정 용량의 캐쉬 메모리를 이용하여 구성하는 것을 특징으로 하는 서피스 모델 랜더링을 위한 기하 연산에서의 룩업 테이블을 이용한 연산량 절약 방법.10. The method of claim 1, wherein the lookup table is configured using a cache memory having a predetermined capacity. 제 3 항에 있어서, 상기 캐쉬 메모리는 용량 초과시 한번 참조된 정보를 버리고 나서 저장하는 것을 특징으로 하는 서피스 모델 랜더링을 위한 기하 연산에서의 룩업 테이블을 이용한 연산량 절약 방법.4. The method of claim 3, wherein the cache memory discards and stores the information once referred to when the capacity is exceeded. 제 1 항에 있어서, 상기 룩업 테이블에 버텍스 계산 결과를 나타내는 버텍스 정보를 더 포함하여 구성하고, 상기 제 2 과정에서 룩업 테이블을 참조하여 제 1,2 버텍스 모두가 표시 볼륨 영역내에 위치하면 에지 계산을 수행하여 변환된 제 1,2 버텍스를 선택하고 에지 계산 결과를 상기 룩업 테이블에 저장하고, 상기 제 3 과정에서 상기 룩업 테이블을 참조하여 변환된 제 1,2 버텍스가 버텍스 계산이 수행되지 않았을 경우에 버텍스 계산을 수행하고 그 결과를 룩업 테이블에 저장하는 것을 특징으로 하는 서피스 모델 랜더링을 위한 기하 연산에서의 룩업 테이블을 이용한 연산량 절약 방법.The method of claim 1, further comprising vertex information indicating a vertex calculation result in the lookup table, and performing edge calculation when both the first and second vertices are located in the display volume area by referring to the lookup table in the second process. Selects the converted first and second vertices and stores the edge calculation result in the lookup table, and when the first and second vertices converted by referring to the lookup table in the third process are not subjected to vertex calculation Computation method using a lookup table in a geometric operation for surface model rendering, which performs vertex calculation and stores the result in a lookup table. 제 5 항에 있어서, 상기 버텍스 정보는 버텍스 클립-아웃 여부 데이터와, 버텍스 계산 여부 데이터를 포함하는 것을 특징으로 하는 서피스 모델 랜더링을 위한 기하 연산에서의 룩업 테이블을 이용한 연산량 절약 방법.6. The method of claim 5, wherein the vertex information includes vertex clip-out data and vertex calculation data.
KR1019980005627A 1998-02-23 1998-02-23 Computation Method Using Lookup Tables in Geometry for Surface Model Rendering KR100277546B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019980005627A KR100277546B1 (en) 1998-02-23 1998-02-23 Computation Method Using Lookup Tables in Geometry for Surface Model Rendering

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019980005627A KR100277546B1 (en) 1998-02-23 1998-02-23 Computation Method Using Lookup Tables in Geometry for Surface Model Rendering

Publications (2)

Publication Number Publication Date
KR19990070658A KR19990070658A (en) 1999-09-15
KR100277546B1 true KR100277546B1 (en) 2001-01-15

Family

ID=65893987

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019980005627A KR100277546B1 (en) 1998-02-23 1998-02-23 Computation Method Using Lookup Tables in Geometry for Surface Model Rendering

Country Status (1)

Country Link
KR (1) KR100277546B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20000050239A (en) * 2000-05-30 2000-08-05 김호광 Method for editing resultant value of action of object in game program

Also Published As

Publication number Publication date
KR19990070658A (en) 1999-09-15

Similar Documents

Publication Publication Date Title
US11182952B2 (en) Hidden culling in tile-based computer generated images
US6034691A (en) Rendering method and apparatus
JP4861403B2 (en) Tiled prefetch and cached depth buffer
US10032308B2 (en) Culling objects from a 3-D graphics pipeline using hierarchical Z buffers
JP4355697B2 (en) Graphic model generation method and graphic model generation apparatus
US5570460A (en) System and method for volume rendering of finite element models
US5734806A (en) Method and apparatus for determining graphical object visibility
US20020163515A1 (en) Using ancillary geometry for visibility determination
US20060262128A1 (en) Three dimensional rendering including motion sorting
US9530241B2 (en) Clipping of graphics primitives
JP2002529871A (en) Shading of 3D computer generated images
WO2008013605A1 (en) Real-time gpu rendering of piecewise algebraic surfaces
KR100277803B1 (en) 3D graphic display
US9811944B2 (en) Method for visualizing freeform surfaces by means of ray tracing
JPH08249491A (en) 3-d graphic device using texture image containing depth information
JP2002183228A (en) System and method for simplifying surface description and wire-frame description of geometric model
US20030095137A1 (en) Apparatus and method for clipping primitives in a computer graphics system
KR100277546B1 (en) Computation Method Using Lookup Tables in Geometry for Surface Model Rendering
KR100256472B1 (en) Efficient rendering utilizing user defined rooms and windows
EP0600204A2 (en) Method and apparatus for rendering primitives with multiple processors
US20220414986A1 (en) Segmenting three-dimensional meshes in graphical applications based on detection of elongated shapes
US7256796B1 (en) Per-fragment control for writing an output buffer
Guennebaud et al. Dynamic surfel set refinement for high-quality rendering
JP2655056B2 (en) Texture data generator
US20100141649A1 (en) Drawing device

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20060922

Year of fee payment: 7

LAPS Lapse due to unpaid annual fee