JP3354293B2 - 3D graphics device - Google Patents

3D graphics device

Info

Publication number
JP3354293B2
JP3354293B2 JP16849094A JP16849094A JP3354293B2 JP 3354293 B2 JP3354293 B2 JP 3354293B2 JP 16849094 A JP16849094 A JP 16849094A JP 16849094 A JP16849094 A JP 16849094A JP 3354293 B2 JP3354293 B2 JP 3354293B2
Authority
JP
Japan
Prior art keywords
virtual
dimensional
mirror
image
virtual image
Prior art date
Legal status (The legal status 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 status listed.)
Expired - Fee Related
Application number
JP16849094A
Other languages
Japanese (ja)
Other versions
JPH0830805A (en
Inventor
宏明 高月
義章 鈴木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP16849094A priority Critical patent/JP3354293B2/en
Publication of JPH0830805A publication Critical patent/JPH0830805A/en
Application granted granted Critical
Publication of JP3354293B2 publication Critical patent/JP3354293B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、仮想的な3次元世界
を、3次元世界に配置した2次元平面に投影した2次元
画像を生成する3次元グラフィックス装置に関し、特
に、3次元グラフィックス装置において、鏡と鏡に写る
3次元の物体とを含んだ仮想的な3次元世界を投影した
2次元画像を、3次元世界上での3次元の物体の鏡への
写り込みをも反映して高速に生成する技術に関するもの
である。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a three-dimensional graphics device for generating a two-dimensional image by projecting a virtual three-dimensional world onto a two-dimensional plane arranged in the three-dimensional world. In the device, a two-dimensional image that projects a virtual three-dimensional world including a mirror and a three-dimensional object reflected on the mirror reflects the reflection of the three-dimensional object on the mirror in the three-dimensional world. And high-speed generation technology.

【0002】[0002]

【従来の技術】鏡と鏡に写る3次元の物体とを3次元形
状として含んだ仮想的な3次元世界を、3次元世界に配
置した2次元平面に投影した、リアルな2次元画像を生
成するためには、3次元世界における3次元の物体の鏡
への写り込みも2次元画像に反映しなければならない。
2. Description of the Related Art A real two-dimensional image is generated by projecting a virtual three-dimensional world including a mirror and a three-dimensional object reflected on the mirror as a three-dimensional shape onto a two-dimensional plane arranged in the three-dimensional world. To do so, the reflection of a three-dimensional object in a three-dimensional world on a mirror must also be reflected in the two-dimensional image.

【0003】このような3次元世界における3次元の物
体の鏡への写り込みも2次元画像に反映できる従来の技
術としては、レイトレ−シング法と呼ばれる技術が知ら
れている。この技術では、3次元世界を投影する2次元
平面上の各点より。その点への投影方向と逆方向に発し
た光線の軌跡を光の減衰や反射を考慮しながらトレ−ス
し、軌跡上にある、光線が当たる鏡や3次元形状上の点
の反射率や透過率や色(明度、彩度、明度)等に応じ
て、その2次元平面上の点に投影される色を決定する。
[0003] As a conventional technique capable of reflecting the reflection of a three-dimensional object on a mirror in a three-dimensional world in a two-dimensional image, a technique called a ray tracing method is known. In this technique, from each point on a two-dimensional plane that projects a three-dimensional world. The trajectory of a ray emitted in the direction opposite to the projection direction to that point is traced while taking into account the attenuation and reflection of light, and the reflectivity of a mirror on the trajectory and a point on a three-dimensional shape that the ray hits, The color projected on a point on the two-dimensional plane is determined according to the transmittance, the color (lightness, saturation, lightness) and the like.

【0004】しかし、このようなレイトレ−シング法
は、処理量が多く、2次元画像を高速に生成することは
困難である。このため、3次元世界を投影した2次元画
像を、3次元世界を投影する2次元平面の3次元世界中
の配置の変更や3次元形状の配置やテクスチャが変更に
対してリアルタイムに生成することはできないため、ユ
−ザの3次元世界の操作を受付け、その操作内容に応じ
た画像を即座に表示するようなインタラクティブなシス
テムを構成することはできない。
However, such a ray tracing method has a large processing amount, and it is difficult to generate a two-dimensional image at a high speed. For this reason, a two-dimensional image that projects the three-dimensional world is generated in real time in response to a change in the arrangement of the two-dimensional plane that projects the three-dimensional world in the three-dimensional world and the arrangement or texture of the three-dimensional shape. Therefore, it is impossible to configure an interactive system that accepts a user's operation in the three-dimensional world and immediately displays an image corresponding to the operation.

【0005】そこで、従来は、3次元物体の鏡による虚
像に対応する3次元物体を、3次元世界中の、鏡の、虚
像の元となる3次元形状の反対側に配置し、虚像の元と
なる3次元形状と共に、鏡による虚像に対応する3次元
形状を、2次元平面に投影した2次元画像をZバッファ
法を用いて生成することが行なわれていた。
Therefore, conventionally, a three-dimensional object corresponding to a virtual image of a mirror of a three-dimensional object is arranged on the other side of the mirror in the three-dimensional world, on the opposite side of the three-dimensional shape that is the source of the virtual image. In addition to the three-dimensional shape described above, a two-dimensional image in which a three-dimensional shape corresponding to a virtual image by a mirror is projected on a two-dimensional plane has been generated using a Z-buffer method.

【0006】ここで、Zバッファ法とは、3次元世界を
投影する2次元平面上の点から、その点への投影方向と
逆方向に延ばした線上にある3次元形状上の点のうち、
その2次元平面に最も近い位置にある3次元形状上の点
の色を、垂線を延ばした2次元平面上の点の色とするも
のである。
Here, the Z-buffer method refers to a point on a three-dimensional shape on a line extending from a point on a two-dimensional plane for projecting a three-dimensional world in a direction opposite to a projection direction to the point.
The color of the point on the three-dimensional shape closest to the two-dimensional plane is set as the color of the point on the two-dimensional plane that extends the perpendicular.

【0007】[0007]

【発明が解決しようとする課題】しかし、前述した3次
元物体の鏡による虚像に対応する3次元物体を、3次元
世界中の、鏡の、虚像の元となる3次元の物体の反対側
に配置する技術によれば、3次元世界を2次元平面へ投
影した2次元画像を、3次元世界を投影する2次元平面
の3次元世界中の配置の変更や3次元形状の配置やマテ
リアル(色、柄等)の変更に対してリアルタイムに生成
する場合には次のような問題がある。
However, a three-dimensional object corresponding to the above-described virtual image of the three-dimensional object by the mirror is placed on the opposite side of the mirror, the three-dimensional object that is the source of the virtual image, in the three-dimensional world. According to the placement technology, a two-dimensional image obtained by projecting a three-dimensional world onto a two-dimensional plane can be used to change the placement of the two-dimensional plane that projects the three-dimensional world in the three-dimensional world, and to place three-dimensional shapes and materials (colors). , Patterns, etc.) are generated in real time with the following problems.

【0008】まず、第1に、3次元世界を投影する2次
元平面を、鏡の裏側、すなわち、虚像に対応する3次元
物体を配置した側に設定した場合には、虚像に対応する
3次元の物体も2次元平面に投影されてしまうため、正
しい2次元画像を得ることができない。
First, when the two-dimensional plane for projecting the three-dimensional world is set on the back side of the mirror, that is, on the side on which the three-dimensional object corresponding to the virtual image is arranged, the three-dimensional plane corresponding to the virtual image is set. Is projected on a two-dimensional plane, and a correct two-dimensional image cannot be obtained.

【0009】また、虚像に対応する3次元の物体と、虚
像の元となる3次元の物体とは、独立した3次元物体と
して取り扱われるため、虚像の元となる3次元の物体に
配置やマテリアルの変更を施しても、虚像に対応する3
次元の物体にこれが反映されない。
Further, the three-dimensional object corresponding to the virtual image and the three-dimensional object serving as the virtual image are treated as independent three-dimensional objects. Even if a change is made, 3 corresponding to the virtual image
This is not reflected in dimensional objects.

【0010】また、この技術によれば、鏡面が曲面であ
る場合には、3次元世界における3次元の物体の鏡への
写り込みを正しく反映した、2次元画像を生成できない
という問題もあった。
Further, according to this technique, when the mirror surface is a curved surface, there is a problem that a two-dimensional image in which a reflection of a three-dimensional object in a three-dimensional object on a mirror is correctly reflected cannot be generated. .

【0011】そこで、本発明は、3次元世界を投影する
2次元平面の3次元世界中の配置の変更や3次元形状の
配置やテクスチャの変更に応じて、3次元世界を投影し
た2次元画像を、3次元世界上での3次元の物体の鏡へ
の写り込みを正しく反映しつつも、高速に生成するする
ことができる3次元グラフィックス装置を提供すること
を目的とする。
Accordingly, the present invention provides a two-dimensional image that projects a three-dimensional world in accordance with a change in the arrangement of a two-dimensional plane for projecting a three-dimensional world, a change in the arrangement of three-dimensional shapes, and a change in texture. It is an object of the present invention to provide a three-dimensional graphics device capable of generating the image at high speed while correctly reflecting the reflection of the three-dimensional object on the mirror in the three-dimensional world.

【0012】また、併せて、本発明は、鏡面が曲面であ
る場合にも、3次元世界を投影した2次元画像を、3次
元世界における3次元の物体の鏡への写り込みを正しく
反映して、より高速に生成することができる3次元グラ
フィックス装置を提供することを目的とする。
In addition, according to the present invention, even when the mirror surface is a curved surface, the two-dimensional image projected on the three-dimensional world correctly reflects the reflection of the three-dimensional object in the three-dimensional world on the mirror. It is another object of the present invention to provide a three-dimensional graphics device capable of generating images at a higher speed.

【0013】[0013]

【課題を解決するための手段】前記目的達成のために、
本発明は、たとえば、仮想的な3次元空間を、当該3次
元空間に配置した仮想的なカメラで撮影した2次元画像
を生成する3次元グラフィックス装置であって、前記3
次元空間に配置された仮想的な物体と、仮想的な鏡と、
前記仮想的な物体の前記仮想的な鏡による虚像に相当す
る形状と配置を有する物体である虚像物体の形状と配置
とを定義するオブジェクトデータと、前記虚像物体と当
該虚像物体に対応する虚像を生んだ前記仮想的な鏡とを
関係づける関係情報とを記憶した記憶手段と、前記3次
空間を撮影する仮想的なカメラの、前記3次元空間上
の配置の設定を受付ける受付け手段と、前記受付け手段
が受付けたカメラの配置が、前記3次元空間上におい
て、前記前記仮想的な鏡に対して鏡面の表側にある場合
に、前記記憶手段に記憶された関係情報によって当該仮
想的な鏡に関係付けられている前記虚像物体を表示の
であると判定し、鏡に対して鏡面の裏側にある場合
に、前記記憶手段に記憶された関係情報によって当該仮
想的な鏡に関係付けられている前記虚像物体を表示の
でないと判定する判定手段と、前記受付け手段が受付
けた配置のカメラから前記虚像物体が当該虚像物体を生
んだ仮想的な鏡を介して透視できるものとして、前記仮
想的な物体と、前記仮想的な鏡と、前記判定手段によっ
て表示すると判定された虚像物体とを、前記カメラによ
って撮影した場合に得られる2次元画像を、前記記憶手
段に記憶されている前記オブジェクトデータに基づいて
生成する2次元画像生成手段と、生成した2次元画像を
表示する表示手段とを有することを特徴とする3次元グ
ラフィックス装置を提供する。
To achieve the above object,
The present invention is, for example, a three-dimensional graphics device that generates a two-dimensional image obtained by photographing a virtual three-dimensional space with a virtual camera arranged in the three-dimensional space.
Virtual objects and virtual mirrors arranged in a three-dimensional space,
Object data defining the shape and arrangement of a virtual image object, which is an object having a shape and arrangement corresponding to the virtual image of the virtual object by the virtual mirror, and a virtual image corresponding to the virtual image object and the virtual image object means accepting accepting and storing means for storing the relationship information that relates said virtual mirror gave birth, the virtual camera for capturing the three-dimensional space, the setting of the arrangement on the three-dimensional space, wherein When the arrangement of the camera received by the receiving means is on the front side of the mirror surface with respect to the virtual mirror in the three-dimensional space, the camera is assigned to the virtual mirror by the relation information stored in the storage means. A pair for displaying the associated virtual image object .
When the virtual image object is determined to be an elephant and is located behind the mirror surface with respect to the mirror, the virtual image object associated with the virtual mirror is displayed by the relation information stored in the storage means .
Determining means for determining that the virtual object is not an elephant ; and assuming that the virtual image object can be seen through a virtual mirror that created the virtual image object from a camera having the arrangement received by the receiving means, the virtual object; Generating a two-dimensional image obtained by capturing an image of a typical mirror and a virtual image object determined to be displayed by the determination unit by the camera based on the object data stored in the storage unit. There is provided a three-dimensional graphics device comprising: a three-dimensional image generating means; and a display means for displaying the generated two-dimensional image.

【0014】[0014]

【作用】先に例に挙げた本発明に係る3次元グラフィッ
クス装置によれば、前記3次元空間に配置された仮想的
な物体と、仮想的な鏡と、前記仮想的な物体の前記仮想
的な鏡による虚像に相当する形状と配置とを有する物体
である虚像物体の形状と配置とを定義するオブジェクト
データと、前記虚像物体と当該虚像物体に対応する虚像
を生んだ前記仮想的な鏡とを関係づける関係情報とを記
憶し、これに基づいて2次元画像を生成する。したが
い、レ−トレ−シング法によらずとも、Zバッファ法等
により高速に2次元画像を生成できる。また、前記受付
け手段が受付けたカメラの、仮想的な鏡に対する配置に
応じて、前記記憶手段に記憶された関係情報によって当
該仮想的な鏡に関係付けられている前記虚像物体を表示
するか否かを判定する。
According to the three-dimensional graphics device of the present invention described above, the virtual object, the virtual mirror, and the virtual object arranged in the three-dimensional space are arranged in the three-dimensional space. Data defining the shape and arrangement of a virtual image object, which is an object having a shape and an arrangement corresponding to a virtual image by a virtual mirror, and the virtual mirror that has produced the virtual image object and a virtual image corresponding to the virtual image object Is stored, and a two-dimensional image is generated based on the information. Accordingly, a two-dimensional image can be generated at high speed by the Z buffer method or the like without using the ray tracing method. In addition, according to the arrangement of the camera received by the receiving unit with respect to the virtual mirror, whether to display the virtual image object associated with the virtual mirror by the relation information stored in the storage unit Is determined.

【0015】したがい、カメラが仮想的な鏡の裏側に回
ってしまったような場合には、この仮想的な鏡が生んだ
虚像に対応する虚像物体を、2次元画像の生成の対象か
ら予め排除することができる。
Accordingly, if the camera turns behind the virtual mirror, the virtual image object corresponding to the virtual image generated by the virtual mirror is excluded from the two-dimensional image generation target in advance. can do.

【0016】[0016]

【実施例】以下、本発明に係る3次元グラフィックス装
置の実施例について説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of a three-dimensional graphics device according to the present invention will be described below.

【0017】まず、本実施例に係る3次元グラフィック
ス装置のハ−ドウェア構成について説明する。
First, the hardware configuration of the three-dimensional graphics device according to the present embodiment will be described.

【0018】本実施例に係る3次元グラフィックス装置
は、たとえば図1に示すような、一般的な構成を有する
電子計算機システムを用いて実現することができる。
The three-dimensional graphics device according to the present embodiment can be realized using an electronic computer system having a general configuration as shown in FIG. 1, for example.

【0019】図1において、100はCPUや主記憶装
置やフレ−ムメモリ等を備えた計算機本体、101は本
3次元グラフィックス装置において生成した2次元画像
等を表示するディスプレイ、102は各種データを記憶
する外部記憶装置、103はユ−ザよりの指示を受付け
るキ−ボ−ドやマウス等の入力装置である。
In FIG. 1, reference numeral 100 denotes a computer main body provided with a CPU, a main storage device, a frame memory, and the like; 101, a display for displaying a two-dimensional image or the like generated by the three-dimensional graphics device; An external storage device 103 for storing data is an input device such as a keyboard or a mouse for receiving an instruction from a user.

【0020】本第1実施例では、このような計算機シス
テム上に図2に示すような構成を構築する。
In the first embodiment, a configuration as shown in FIG. 2 is constructed on such a computer system.

【0021】図2において、201はユ−ザインタフェ
−スモジュ−ル、202はイベント管理モジュ−ル、2
03はファイルI/Oモジュ−ル、204はデータ管理
モジュ−ル、205は表示/非表示判定モジュ−ル、2
06は表示モジュ−ル、208は退避メモリ、209は
Zバッファ、210はフレ−ムメモリである。また、1
02は外部記憶装置、103は入力装置を示している。
In FIG. 2, reference numeral 201 denotes a user interface module; 202, an event management module;
03 is a file I / O module, 204 is a data management module, 205 is a display / non-display determination module, 2
06 is a display module, 208 is a save memory, 209 is a Z buffer, and 210 is a frame memory. Also, 1
02 denotes an external storage device, and 103 denotes an input device.

【0022】ユ−ザインタフェ−スモジュ−ル201、
イベント管理モジュ−ル202、ファイルI/Oモジュ
−ル203、データ管理モジュ−ル204、表示/非表
示判定モジュ−ル205、表示モジュ−ル206は、計
算機本体100上に、所定のCPU100のプログラム
の実行に応じて具現化されるプロセスとして実現され
る。
A user interface module 201,
An event management module 202, a file I / O module 203, a data management module 204, a display / non-display determination module 205, and a display module 206 are provided on a computer main body 100 by a predetermined CPU 100. It is realized as a process embodied according to the execution of the program.

【0023】また、208は退避メモリ、209はZバ
ッファは、計算機本体100上の主記憶装置上に構築さ
れる。フレ−ムメモリ210は、計算機本体100上の
主記憶装置上に構築される。ただし、計算機本体100
に、これら専用のメモリを設けて、これを用いるように
してもよい。
Reference numeral 208 denotes an evacuation memory, and reference numeral 209 denotes a Z buffer, which is constructed on a main storage device on the computer main body 100. The frame memory 210 is constructed on a main storage device on the computer main body 100. However, the computer body 100
Alternatively, these dedicated memories may be provided and used.

【0024】さて、ユ−ザインタフェ−スモジュ−ル2
01は、ディスプレイ101へのユ−ザインタフェ−ス
用の画像の表示と、これに対応して入力装置103を用
いて入力されるユ−ザの操作の受付けとを制御、管理す
る。すなわち、ユ−ザインタフェ−スモジュ−ル201
はGUIを提供する。イベント管理モジュ−ル202
は、ユ−ザインタフェ−スモジュ−ル203が受付けた
ユ−ザの操作内容等に応じて、ファイルI/Oモジュ−
ル203、データ管理モジュ−ル204、表示/非表示
判定モジュ−ル205、表示モジュ−ル206を起動し
処理を行なわれる。また、ファイルI/Oモジュ−ル
は、イベント管理モジュ−ル202の指示に応じて、外
部記憶装置102より各種データを読み出したり、外部
記憶装置102に各種データを書き込んだりする。
Now, the user interface module 2
Reference numeral 01 controls and manages display of an image for a user interface on the display 101 and reception of a user operation input using the input device 103 in response thereto. That is, the user interface module 201
Provides a GUI. Event management module 202
The file I / O module is used in accordance with the operation of the user received by the user interface module 203.
The module 203, the data management module 204, the display / non-display determination module 205, and the display module 206 are activated and processed. The file I / O module reads various data from the external storage device 102 or writes various data to the external storage device 102 in accordance with an instruction from the event management module 202.

【0025】さて、外部記憶装置102には、仮想的な
3次元空間を表す各種データが格納される。
The external storage device 102 stores various data representing a virtual three-dimensional space.

【0026】以下、これらのデータについて説明する。Hereinafter, these data will be described.

【0027】まず、本実施例において用いる座標系につ
いて説明する。
First, a coordinate system used in this embodiment will be described.

【0028】図3に示す、仮想的な3次元世界を処理す
る場合を例にとり説明する。
The case of processing a virtual three-dimensional world shown in FIG. 3 will be described as an example.

【0029】図3は、座標系allで定義される3次元
空間に、301、302、303、304の4つの3次
元形状が配置されているところを表している。ここで、
3次元形状304は鏡である。いま、この座標系all
で定義される3次元空間を実空間aと呼ぶこととし、こ
の実空間aに直接配置されている3次元形状を実像オブ
ジェクトと呼ぶことにする。
FIG. 3 shows that four three-dimensional shapes 301, 302, 303 and 304 are arranged in a three-dimensional space defined by a coordinate system all. here,
The three-dimensional shape 304 is a mirror. Now, this coordinate system all
Is referred to as a real space a, and a three-dimensional shape directly arranged in the real space a is referred to as a real image object.

【0030】さて、各実像オブジェクトの形状、色等
は、その実像オブジェクトに対して固有的に設定された
座標系上で定義されている。したがい、各実像オブジェ
クトの実空間a上での位置は、その実像オブジェクトに
固有的に設定された座標系の座標系all上の位置によ
って定義される。
The shape, color, and the like of each real image object are defined on a coordinate system uniquely set for the real image object. Accordingly, the position of each real image object in the real space a is defined by the position on the coordinate system all of the coordinate system uniquely set for the real image object.

【0031】さて、本実施例では、さらに、実像オブジ
ェクト鏡304に固有的に設定されている座標系mir
rorで定義される3次元空間上に、鏡を除く3つのオ
ブジェクト301、302、303の、鏡304による
虚像に対応する3次元形状301a、302a、303
aを配置する。いま、この、座標系mirrorで定義
される3次元空間を鏡空間mと呼ぶこととする。また、
3次元形状の鏡による虚像に対応する3次元形状を虚像
オブジェクトと呼ぶことにする。また、実像オブジェク
トと虚像オブジェクトを特に区別しないで3次元形状を
呼ぶ場合には、単にオブジェクトと呼ぶこととする。
In this embodiment, the coordinate system mir which is set uniquely for the real image object mirror 304 is further provided.
three-dimensional shapes 301a, 302a, and 303 corresponding to virtual images of the three objects 301, 302, and 303 excluding the mirrors on the three-dimensional space defined by the mirror 304
a is arranged. Now, the three-dimensional space defined by the coordinate system mirror is referred to as a mirror space m. Also,
The three-dimensional shape corresponding to the virtual image formed by the three-dimensional mirror is called a virtual image object. When a three-dimensional shape is called without particularly distinguishing a real image object and a virtual image object, they are simply called objects.

【0032】さて、これらの虚像オブジェクトに対して
も、固有的に座標系が設けられており、虚像オブジェク
トの形状、色等は、その虚像オブジェクトに対して固有
的に設定された座標系上で定義されている。
A coordinate system is uniquely provided for these virtual image objects, and the shape, color, and the like of the virtual image object are defined on the coordinate system uniquely set for the virtual image object. Is defined.

【0033】したがい、虚像オブジェクトの鏡空間m上
の位置は、その虚像オブジェクトに固有的に設定された
座標系の、実像オブジェクト鏡304に固有的に設定さ
れた座標系mirror上の位置によって定義される。
また、各虚像オブジェクトの実空間m上の位置は、その
虚像オブジェクトに固有的に設定された座標系の、鏡オ
ブジェクト304に固有的に設定された座標系mirr
or上の位置と、座標系mirrorの座標系all上
の位置によって定義される。
Accordingly, the position of the virtual image object in the mirror space m is defined by the position of the coordinate system uniquely set for the virtual image object on the coordinate system mirror set specifically for the real image object mirror 304. You.
The position of each virtual image object in the real space m is determined by the coordinate system mirr uniquely set to the mirror object 304 in the coordinate system uniquely set to the virtual image object.
or and a position on the coordinate system all of the coordinate system mirror.

【0034】そこで、本実施例では、このような座標系
の階層構造と、オブジェクトと当該オブジェクトの虚像
に対応する虚像オブジェクトとの対応関係を管理するた
めに、外部記憶装置102に図4に示すように、各オブ
ジェクトを定義するデータを関係付けて記憶する。
Therefore, in this embodiment, in order to manage the hierarchical structure of such a coordinate system and the correspondence between the objects and the virtual image objects corresponding to the virtual images of the objects, the external storage device 102 shown in FIG. In this way, data defining each object is stored in association with each other.

【0035】図4では、各オブジェクトを定義するデー
タを、各オブジェクト固有の座標系の階層構造と、虚像
に対応するオブジェクトと当該虚像の元となったオブジ
ェクトとの対応によって関係付けている。
In FIG. 4, the data defining each object is related by the hierarchical structure of the coordinate system unique to each object and the correspondence between the object corresponding to the virtual image and the object that is the source of the virtual image.

【0036】図中の実線は、図3の実空間aを定義する
座標系(all)の下層に、実像オブジェクト鏡30
4、ゆか301、板303、柱302の固有の座標系
(mirror、yuka、ita、hashira)
が存在し、鏡空間mを定義する座標系mirrorの下
層に、実像オブジェクトゆか301、板303、柱30
2に対応する虚像オブジェクト301a、303a、3
02a固有の座標系(yuka.rev、ita.re
v、hashira.rev)が存在することを表して
いる。また、図中の破線は、実像オブジェクトと、その
実像オブジェクトの虚像に対応する虚像オブジェクトの
対応づけを示している。
The solid line in the drawing indicates the real image object mirror 30 below the coordinate system (all) defining the real space a in FIG.
4. Unique coordinate system (mirror, yuka, ita, hashira) of the yuka 301, the plate 303, and the column 302
Exists below the coordinate system mirror defining the mirror space m, the real image object yuka 301, the plate 303, and the column 30
2 corresponding to virtual image objects 301a, 303a, and 3
02a-specific coordinate system (yuka.rev, ita.re
v, hashira. rev) is present. The broken line in the figure indicates the association between the real image object and the virtual image object corresponding to the virtual image of the real image object.

【0037】なお、本実施例では、一つの実像オブジェ
クトに対して一つの虚像オブジェクトが存在する場合に
ついて示しているが、一つの実像オブジェクトに対して
複数の鏡による複数の虚像に対応する複数の虚像オブジ
ェクトが存在する場合にも図4に示した構造によって、
座標系の階層構造と、オブジェクト間の対応を定義する
こともできる。
Although the present embodiment shows a case where one virtual image object exists for one real image object, a plurality of mirror images corresponding to a plurality of virtual images by a plurality of mirrors are provided for one real image object. Even when a virtual image object exists, the structure shown in FIG.
It is also possible to define the hierarchical structure of the coordinate system and the correspondence between objects.

【0038】また、このような関係を定義するデータ
は、実際には、たとえば、階層のリンクを表すポインタ
と、実像オブジェクトと当該実像オブジェクトの虚像に
対応する虚像オブジェクトとの対応を表す2種類のポイ
ンタを用いて、各オブジェクトを定義する各データをリ
ンクするデータ構造によって簡単に実現できる。
The data defining such a relationship is actually composed of, for example, a pointer indicating a hierarchical link, and two types of data indicating the correspondence between a real image object and a virtual image object corresponding to a virtual image of the real image object. It can be easily realized by a data structure that links each data defining each object using a pointer.

【0039】さて、オブジェクトを定義するデータ自身
は、オブジェクトの形状、色等を、そのオブジェクト固
有の座標系で表す部分と、そのオブジェクト固有の座標
系の図4に示した定義上上位の座標系における配置を表
す部分とよりなる。
The data defining the object itself includes a portion representing the shape, color, and the like of the object in a coordinate system unique to the object, and a coordinate system higher than the definition of the coordinate system unique to the object in the definition shown in FIG. And a portion representing the arrangement in.

【0040】ただし、あるオブジェクトと、その虚像に
対応するオブジェクトはオブジェクトの形状、色等と、
そのオブジェクト固有の座標系で表した部分は共通する
ので、実際には、この部分は同じデータを共用するよう
にしてもよい。なお、オブジェクトの形状、色等と、そ
のオブジェクト固有の座標系で表すデータは、通常ボク
セルデータ等が用いられるが、これ以外の形式、たとえ
ば、ベクトル表現によってその形状を表しているような
データを用いるようにしてもよい。
However, an object and an object corresponding to the virtual image are represented by the shape, color and the like of the object.
Since the portion expressed by the coordinate system unique to the object is common, this portion may actually share the same data. Note that voxel data and the like are usually used as data representing the shape, color, and the like of an object and a coordinate system specific to the object. However, data that represents the shape in other formats, for example, vector expression, is used. It may be used.

【0041】また、オブジェクト固有の座標系の図4に
示した定義上、上位の座標系における配置は、オブジェ
クト固有の座標系の原点の、上位の座標系における位置
と、両座標系の各単位ベクトルの傾き等により表すこと
ができる。なお、ある実像オブジェクトの虚像に対応す
る虚像オブジェクト固有の座標系の上位の座標系におけ
る配置は、その虚像を生成した鏡オブジェクトと、虚像
の元となった実像オブジェクトとの位置関係から求める
ことができる。すなわち、たとえば、図3の虚像オブジ
ェクト板303aに固有の座標系の鏡空間m上の配置
は、実空間aにおいて、その実像オブジェクト板303
座標系の鏡304に対して面対象な配置を求め、これに
対応する鏡実空間a上の配置を、虚像オブジェクト板3
03aに固有の座標系の鏡空間m上の配置とすればよ
い。また、虚像を生じさせる実像オブジエクトか否か
は、その実像オブジェクトが、実空間a上、鏡の鏡面側
にあるか否かより判定することができる。したがい、こ
のようにして、あらかじめ、各鏡オブジェクトについ
て、虚像オブジェクトを定義するデータを自動的に生成
すると共に、生成した虚像オブジェクトについての、図
4に示した階層づけや実像オブジェクトとの対応付けを
自動的に行なうようにしてもよい。
Also, in the definition of the coordinate system unique to the object shown in FIG. 4, the arrangement in the upper coordinate system is based on the position of the origin of the coordinate system unique to the object in the upper coordinate system and the unit of each coordinate system in both coordinate systems. It can be represented by the inclination of a vector or the like. Note that the arrangement in the higher coordinate system of the coordinate system unique to the virtual image object corresponding to the virtual image of a certain real image object can be obtained from the positional relationship between the mirror object that generated the virtual image and the real image object that was the source of the virtual image. it can. That is, for example, the arrangement in the mirror space m of the coordinate system unique to the virtual image object plate 303a in FIG.
An arrangement symmetrical with respect to the mirror 304 of the coordinate system is determined, and the corresponding arrangement in the mirror real space a is converted to the virtual image object
What is necessary is just to arrange on the mirror space m of the coordinate system specific to 03a. Whether or not the object is a real image object that generates a virtual image can be determined based on whether or not the real image object is on the mirror side of the mirror in the real space a. Accordingly, in this way, data defining the virtual image object is automatically generated for each mirror object in advance, and the generated virtual image object is associated with the hierarchy and the real image object shown in FIG. It may be performed automatically.

【0042】以下、本実施例に係る3次元グラフィック
ス装置の動作について説明する。
Hereinafter, the operation of the three-dimensional graphics device according to this embodiment will be described.

【0043】まず、ユ−ザより入力装置103を介して
実空間aを投影する2次元平面を規定するカメラの配置
が設定または変更された場合について説明する。
First, the case where the arrangement of the camera that defines the two-dimensional plane for projecting the real space a from the user via the input device 103 is set or changed will be described.

【0044】この場合は、ユ−ザインタフェ−スモジュ
−ル201、イベント管理モジュ−ル202を介して、
ファイルI/Oモジュ−ル203と表示/非表示判定モ
ジュ−ル205が起動される。ファイルI/Oモジュ−
ル203は、外部記憶装置102か、先に図4に示した
データを読み出し、表示/非表示判定モジュ−ル205
に与える。
In this case, via the user interface module 201 and the event management module 202,
The file I / O module 203 and the display / non-display determination module 205 are activated. File I / O module
The module 203 reads out the data shown in FIG. 4 from the external storage device 102, and displays / hides the display / non-display determination module 205.
Give to.

【0045】表示/非表示判定モジュ−ル205は、こ
れらのデータを用いて、図5に示す「各階層での表示/
非表示の判定処理」を実行する。
The display / non-display determination module 205 uses these data to display / display at each level as shown in FIG.
Non-display determination process "is executed.

【0046】「各階層での表示/非表示の判定処理」
は、先に図4を用いて説明したデータに基き処理を行な
う。
"Display / non-display determination processing at each level"
Performs a process based on the data described above with reference to FIG.

【0047】この処理は、まず、図4の階層構造の最上
位層(層0)の実空間aを対象として処理を始める。こ
の処理では、まず、対象の下層があるかをチェックし5
01、あれば、対象の一つ下層(層1)のオブジェクト
のひとつを対象とし、この対象についての、「各階層で
の表示/非表示の判定処理」を再帰的に行ない502、
これが終了したら、この下層(層1)のオブジェクトの
すべてについて「各階層での表示/非表示の判定処理」
503が終了したかを判定し、終了してなければ、この
下層(層1)の残りのオブジェクトのひとつを対象と
し、この対象についての、「各階層での表示/非表示の
判定処理」を再帰的に行なう502。もし、この下層
(層1)のオブジェクトのすべてについて「各階層での
表示/非表示の判定処理」503が終了していればステ
ップ504以降の処理に進む。
This process starts with the real space a of the uppermost layer (layer 0) of the hierarchical structure shown in FIG. In this processing, first, it is checked whether or not there is a target lower layer.
If it is 01, one of the objects in the lower layer (layer 1) of the object is targeted, and "display / non-display determination processing in each layer" is recursively performed on this object 502;
When this is completed, “display / non-display judgment processing at each layer” is performed for all objects in the lower layer (layer 1).
It is determined whether or not 503 has been completed. If not, one of the remaining objects in the lower layer (layer 1) is targeted, and the “display / non-display determination processing in each layer” for this target is performed. Perform 502 recursively. If the “display / non-display determination processing in each layer” 503 has been completed for all the lower layer (layer 1) objects, the process proceeds to step 504 and subsequent steps.

【0048】以上の処理の結果、図4に示すツリ−状の
階層構造における、枝毎に末端の枝よりステップ504
以降の処理が施される。図4に示した階層構造では、た
とえば、図3の{(ゆかの虚像301a、板の虚像30
3a、柱の虚像302a)、鏡304}、ゆか301、
板303、柱302の順に、ステップ504以降の処理
が施される。
As a result of the above processing, in the tree-like hierarchical structure shown in FIG.
The following processing is performed. In the hierarchical structure shown in FIG. 4, for example, the virtual image 301a shown in FIG.
3a, pillar virtual image 302a), mirror 304 °, yuka 301,
The processing after step 504 is performed in the order of the plate 303 and the pillar 302.

【0049】このステップ504以降の処理について説
明する。
The processing after step 504 will be described.

【0050】ステップ504では、対象となっているオ
ブジェクトが鏡か否かを判定し、鏡でなければ処理を終
了する。
In step 504, it is determined whether or not the target object is a mirror, and if not, the process ends.

【0051】一方、鏡であれば、まず、この鏡オブジェ
クトのデータより、実空間aにおける鏡の面の法線ベク
トルを求める505。法線を立てる鏡面上の位置は任意
でよい。そして、法線を立てた鏡面上の位置から、実空
間aに設定されたカメラに向かう方向ベクトルを求める
506。図6には、この鏡の面の法線ベクトルと求めた
方向ベクトルとの例を示す。なお、このカメラの撮影方
向と垂直な平面が実空間aが投影される2次元平面Pで
ある。
On the other hand, in the case of a mirror, first, a normal vector of the mirror surface in the real space a is obtained from the data of the mirror object 505. The position on the mirror surface where the normal line is set may be arbitrary. Then, a direction vector toward the camera set in the real space a is obtained 506 from the position on the mirror surface where the normal line is set. FIG. 6 shows an example of the normal vector of the mirror surface and the obtained direction vector. A plane perpendicular to the photographing direction of the camera is a two-dimensional plane P on which the real space a is projected.

【0052】そして、次に、求めた両ベクトルの成す角
を求め508、この成す角が90度未満であればこの鏡
の下層に存在する全てのオブジェクトに対して「表示」
を設定する。90度以上であれば、この鏡の下層に存在
する全てのオブジェクトに対して「非表示」を設定す
る。
Next, the angle formed by both the obtained vectors is obtained 508. If the formed angle is less than 90 degrees, "display" is performed on all the objects under the mirror.
Set. If the angle is 90 degrees or more, "non-display" is set for all objects existing under the mirror.

【0053】以上の処理により、図7に示すように、カ
メラが鏡の面を含む平面に対して鏡面の表側にあるとき
には、この鏡オブジェクトの座標系の下層にある全ての
座標系に対応するオブジェクトに「表示」が設定され、
カメラが鏡の面を含む平面に対して鏡面の裏側にあると
きには、この鏡オブジェクトの下層にある全てのオブジ
ェクトに「非表示」が設定される。
With the above processing, as shown in FIG. 7, when the camera is on the front side of the mirror surface with respect to the plane including the mirror surface, all the coordinate systems below the coordinate system of the mirror object are supported. "Display" is set for the object,
When the camera is behind the mirror surface with respect to the plane including the mirror surface, “non-display” is set for all objects below this mirror object.

【0054】以上の処理が終了したら、「非表示」が設
定されたオブジェクトを2次元平面Pに投影するオブジ
ェクトの対象からはずし、残りのオブジェクトのみを対
象として、2次元平面Pに投影した投影画像を生成す
る。
When the above processing is completed, the object set to “non-display” is removed from the objects to be projected on the two-dimensional plane P, and only the remaining objects are projected onto the two-dimensional plane P. Generate

【0055】結果、図7に示すように、図7に示すよう
に、カメラが鏡の面の表側にあるときには、この鏡オブ
ジェクトによる虚像に対応する虚像オブジェクトも表示
対象となり、カメラが鏡の面の裏側にあるとき、すな
わち、カメラが鏡の裏側に回り込んだときには、この鏡
オブジェクトによる虚像に対応する虚像オブジェクトは
表示されないことになる。
[0055] Consequently, as shown in FIG. 7, as shown in FIG. 7, the camera when in the front surface of the mirror, the object next to the displayed virtual image object corresponding to the virtual image by the mirror object, camera mirror When the camera is behind the surface, that is, when the camera goes behind the mirror, the virtual image object corresponding to the virtual image by the mirror object is not displayed.

【0056】この投影画像の生成処理については後に詳
述する。
The projection image generation processing will be described later in detail.

【0057】ところで、図8に示すように、鏡の裏側に
も実像オブジェクト801が存在する場合において、こ
の実像オブジェクト801が鏡オブジェクトの鏡面80
2もしくは、この平面の延長上にある壁オブジェクト等
によって隠れ、カメラが鏡の面の方向と逆方向に向いて
いるときには決して、2次元平面Pに投影されないこと
がわかっているときには、鏡面801と背中合せに鏡面
802を持つ鏡オブジェクトを仮想的に設置し、鏡の裏
側の実像オブジェクト801を、この仮想的な鏡オブジ
ェクトの下層のオブジェクトとすれば、すなわち、鏡の
裏側の実像オブジェクト801を仮想的な鏡オブジェク
トによる虚像オブジェクトとして取り扱えば、カメラが
鏡の面の方向と逆方向に向いているときには、このオブ
ジェクト801を「非表示」とし、2次元画像の生成の
対象から、あらかじめ除外することができる。
As shown in FIG. 8, when a real image object 801 also exists behind the mirror, the real image object 801 is placed on the mirror surface 80 of the mirror object.
2 or hidden by a wall object or the like which is an extension of this plane, and when it is known that the camera is never projected on the two-dimensional plane P when the camera is facing in the opposite direction to the mirror surface, the mirror surface 801 is used. If a mirror object having a mirror surface 802 is placed virtually back to back, and the real image object 801 on the back of the mirror is set as an object below this virtual mirror object, that is, the real image object 801 on the back of the mirror is virtual If the camera is facing in the direction opposite to the mirror surface, this object 801 can be “hidden” and excluded in advance from the two-dimensional image generation target if the camera is facing in the opposite direction to the mirror surface. it can.

【0058】次に、ユ−ザより入力装置103を介して
実像オブジェクトの動きやマテリアル(テクスチャや質
感等)の変更の指示が入力されると、ユ−ザインタフェ
−スモジュ−ル201、イベント管理モジュ−ル202
を介して、ファイルI/Oモジュ−ル203とデータ管
理モジュ−ル204が起動される。ファイルI/Oモジ
ュ−ル203は、外部記憶装置102か、先に説明した
各種データを読み出し、データ管理モジュ−ル204に
与える。
Next, when a user inputs an instruction to change the movement of the real image object or change the material (texture, texture, etc.) via the input device 103, the user interface module 201, the event management module -Rule 202
, The file I / O module 203 and the data management module 204 are activated. The file I / O module 203 reads the various data described above from the external storage device 102 and supplies the data to the data management module 204.

【0059】データ管理モジュ−ル204は、これらの
データを用いて、図9に示す「動きマテリアルの変更処
理」を行なう。
The data management module 204 performs the “motion material change processing” shown in FIG. 9 using these data.

【0060】この処理は、まず、初めに動きやマテリア
ルの変更の指示が行なわれたオブジェクトを対象として
処理を始める。この処理では、まず、対象としたオブジ
ェクトに図4中破線で示される関係で対応づけられたオ
ブジェクトがあるかをチェックし905、なければ、対
象としたオブジェクトに動きを与え、もしくは、対象と
したオブジェクトの変更を行ない908、処理を終了す
る。
In this processing, the processing is first started for an object for which movement or material change is instructed first. In this process, first, it is checked whether the target object has an object associated with the relationship indicated by the broken line in FIG. 905, and if not, a motion is given to the target object or the target object is moved. The object is changed 908, and the process ends.

【0061】一方、対象としたオブジェクトtに対応づ
けられたオブジェクトがあれば、対応付けられた一つの
オブジェクトt1を対象とし、この対象についての、
「動き/マテリアルの変更処理」を再帰的に行ない90
6、これが終了したら、他に、現在対象としているオブ
ジェクトt1と同様にオブジェクトtに対応付けられて
いるオブジェクトがあるか否かを判定し907、存在す
れば、これを対象とし、この対象についての、「動き/
マテリアルの変更処理」をを再帰的に行なう906。一
方、存在しなければ、オブジェクトtに動きを与え、も
しくは、マテリアルの変更を行ない908、処理を終了
する。
On the other hand, if there is an object associated with the target object t, one associated object t1 is targeted.
Recursively perform “movement / material change processing” 90
6. When this is completed, it is determined whether there is any other object associated with the object t in the same manner as the object t1 currently targeted, and 907 is determined. , "Motion /
The process of changing the material is recursively performed 906. On the other hand, if the object t does not exist, a motion is given to the object t, or the material is changed 908, and the process ends.

【0062】以上の処理により、動きやマテリアルの変
更が行なわれた実像オブジェクトと、これを元として発
生した全ての虚像オブジェクトに、実像オブジェクトに
施された動きやマテリアルの変更に応じた動きや変更を
施すことができる。
By the above processing, the real image object in which the motion or the material is changed and all the virtual image objects generated based on the motion or the material are moved or changed in accordance with the motion or the material change applied to the real image object. Can be applied.

【0063】ここで、虚像オブジェクトのマテリアルの
変更は、実像オブジェクトに施されたマテリアルの変更
と同じ変更を施すことにより行なう。
Here, the material of the virtual image object is changed by performing the same change as the material change of the real image object.

【0064】一方、虚像オブジェクトの動きは、実像オ
ブジェクトの動きに応じて次のように行なう。
On the other hand, the movement of the virtual image object is performed as follows according to the movement of the real image object.

【0065】図10に示すように、鏡オブジェクト固有
の座標系mirror1100を、実空間の座標系al
l 1000上に配置した場合を考える。この例では、
座標系mirror1100と座標系all 1000
は、Y軸、Z軸の方向が一致しあい、X軸が逆方向を向
いている。このような場合に、実像オブジェクト120
0が動いた場合、実像オブジェクトの虚像である虚像オ
ブジェクト1200aは面対称の関係で動かさなければ
ならない。図10に示した例では、実像オブジェクト1
200の座標系all 1000の各軸の座標の変化と
同じ変化を、虚像オブジェクト1200a固有の座標系
の配置の、座標系mirror1100の対応する軸に
ついての座標の変化とすれば、この面対称の関係は満た
される。そこで、この変化を、虚像オブジェクト120
0a固有の座標系の、座標系mirror1100の座
標の変化とするようにする。
As shown in FIG. 10, the coordinate system mirror1100 unique to the mirror object is changed to the coordinate system al in the real space.
Let us consider a case where they are arranged on l1000. In this example,
Coordinate system mirror1100 and coordinate system all 1000
Indicates that the directions of the Y axis and the Z axis coincide with each other, and the X axis faces in the opposite direction. In such a case, the real image object 120
When 0 moves, the virtual image object 1200a, which is a virtual image of the real image object, must be moved in a plane-symmetric relationship. In the example shown in FIG.
Assuming that the same change as the change in the coordinates of each axis of the coordinate system all 1000 of 200 is the change of the coordinate of the arrangement of the coordinate system unique to the virtual image object 1200a on the corresponding axis of the coordinate system mirror 1100, this plane symmetry relationship is obtained. Is satisfied. Therefore, this change is represented by the virtual image object 120.
A change in the coordinates of the coordinate system mirror 1100 of the coordinate system specific to the 0a.

【0066】なお、この例では、説明を簡単にするため
に座標系mirror1100について、座標系all
1000と同じ座標変化をほどこせば、面対称の関係
を満たすことができる場合について説明したが、座標系
mirror1100と座標系all 1000が任意
の配置関係にある場合でも、実空間a上で、鏡面と平行
な方向について、実像オブジェクトの動きと同じ動きを
求め、鏡面と垂直な方向について、実像オブジェクトの
動きと逆の動きを求め、これら動きを鏡空間mに移し、
移した動きを虚像オブジェクト固有の座標系に鏡空間m
内で施せばよい。
In this example, for simplicity of explanation, the coordinate system mirror1100 is used for the coordinate system all
A case has been described in which the same coordinate change as that of 1000 can satisfy the plane-symmetric relationship. However, even when the coordinate system mirror 1100 and the coordinate system all 1000 have an arbitrary arrangement relationship, a mirror surface can be obtained on the real space a. In the direction parallel to the real image object, the same motion as the motion of the real image object is obtained, and in the direction perpendicular to the mirror surface, the motion reverse to the motion of the real image object is obtained.
The moved motion is mirrored in the coordinate system unique to the virtual image object.
It should be applied within.

【0067】ところで、オブジェクトが、たとえば、テ
−ブルというオブジェクトの下層に天板、足等の要素オ
ブジェクトを定義するといったように、構造上の関係等
より階層的に定義される場合がある。このような場合に
は、図9に示した処理に、図10に示すステップ901
〜904を追加し、テ−ブルというオブジェクトのマテ
リアルの変更が指示された場合に、順次、下層のものよ
り各要素オブジェクトのそれぞれについて、図9に示す
処理を行なうようにしてもよい。
In some cases, objects are defined hierarchically based on structural relationships and the like, for example, defining element objects such as a tabletop and feet below a table object. In such a case, the processing shown in FIG.
904 may be added, and when an instruction to change the material of an object called a table is given, the processing shown in FIG. 9 may be sequentially performed for each element object from the lower layer.

【0068】なお、鏡オブジェクト自体が移動された場
合には、その鏡オブジェクトの下位のオブジェクトの配
置を全て求め直すようにする。
When the mirror object itself has been moved, the arrangement of all objects below the mirror object is determined again.

【0069】以上の処理が終了したら、実空間aを2次
元平面Pに投影した投影画像を生成する。この投影画像
の生成処理については後に詳述する。
When the above processing is completed, a projection image is generated by projecting the real space a onto the two-dimensional plane P. This projection image generation processing will be described later in detail.

【0070】ここで、鏡に鏡が写り込むような場合の写
り込みを考慮する場合、すなわち実像オブジェクトの1
次の虚像に対応する虚像オブジェクトだけではなく、虚
像オブジェクトの虚像、すなわち、実像オブジェクトの
2次以上の虚像に対応する虚像オブジェクトについても
考慮する場合について考える。
Here, when the reflection in the case where the mirror is reflected on the mirror is considered, that is, when one of the real image objects
Consider a case where not only a virtual image object corresponding to the next virtual image but also a virtual image of a virtual image object, that is, a virtual image object corresponding to a virtual image of a second order or higher of a real image object is considered.

【0071】このような場合をも考慮する場合には、虚
像オブジェクトは、常に、その虚像の元となったオブジ
ェクトの下位構造(下位の虚像オブジェクトを定義する
データ、下位のオブジェクト間の座標系の階層構造)を
引き継ぐものとするようにしてもよい。このようにする
と、実像オブジェクトのn−1次虚像を生成させている
第1の鏡の、第2の鏡による虚像に対応する虚像オブジ
ェクトが存在する場合にも、第1の鏡によるn−1次虚
像に対応する虚像オブジェクトの第2の鏡によるn次虚
像に対応する虚像オブジェクトの座標系は、第1の鏡の
第2の鏡による虚像に対応する虚像オブジェクトの座標
系の下位に定義される。ただし、この場合も、n次の虚
像に対応する虚像オブジェクトはn−1次の虚像オブジ
ェクトに、図4に示す破線の関係で対応付けるようにす
る。
When such a case is taken into consideration, the virtual image object is always represented by the lower-level structure (the data defining the lower-level virtual image object, the coordinate system between the lower-level objects) of the object from which the virtual image is based. (Hierarchical structure). In this way, even if there is a virtual image object corresponding to the virtual image by the second mirror of the first mirror that generates the (n-1) -th virtual image of the real image object, the n-1 by the first mirror The coordinate system of the virtual image object corresponding to the n-th virtual image of the virtual image object corresponding to the second virtual image by the second mirror is defined below the coordinate system of the virtual image object corresponding to the virtual image of the first mirror of the second mirror. You. However, also in this case, the virtual image object corresponding to the n-th virtual image is associated with the (n-1) -th virtual image object in a relationship indicated by a broken line in FIG.

【0072】このようにすると、図5に示した「各層毎
での表示/非表示の判定処理」によって、実像オブジェ
クトのn次の虚像に対応する虚像オブジェクト虚像オブ
ジェクトについても、正しく投影映像を得ることができ
る。
In this manner, by the “display / non-display determination processing for each layer” shown in FIG. 5, a projection image is correctly obtained even for the virtual image object corresponding to the n-th virtual image of the real image object. be able to.

【0073】また、図9に示した「動き/マテリアルの
変更処理」において、1次の虚像に対応する虚像オブジ
ェクトの、その虚像オブジェクトの座標系の上位の座標
系上の位置の変化を、1次の虚像に対応する虚像オブジ
ェクト1200aに直接的または間接的に対応付けられ
ているすべての虚像オブジェクトの、その虚像オブジェ
クトの上位のオブジェクトの座標系上の位置の変化とす
るようにすれば、実像オブジェクトのn次の虚像に対応
する虚像オブジェクトについても、正しく動きを与える
ことができる。マテリアルの変更については、図9に示
した処理によって、実像オブジェクトのn次の虚像に対
応する虚像オブジェクトにも、実像オブジェクトと同じ
変更を施すことができる。
Further, in the “movement / material change processing” shown in FIG. 9, the change in the position of the virtual image object corresponding to the primary virtual image on the higher coordinate system of the coordinate system of the virtual image object is determined by 1 If the position of all virtual image objects directly or indirectly associated with the virtual image object 1200a corresponding to the next virtual image is changed in the coordinate system of the object higher than the virtual image object, the real image can be obtained. The virtual image object corresponding to the n-th virtual image of the object can also be correctly moved. As for the change of the material, the same change as the real image object can be applied to the virtual image object corresponding to the n-th virtual image of the real image object by the processing shown in FIG.

【0074】以下、前述したように、表示/非表示判定
モジュ−ル205の「各階層での表示/非常時判定処
理」、データ管理モジュ−ル204による「動き/マテ
リアルの変更処理」が終了した後に行なわれる投影画像
の生成処理について説明する。
As described above, the “display / emergency determination process at each level” of the display / non-display determination module 205 and the “motion / material change process” by the data management module 204 are completed. A description will be given of a projection image generation process performed after the above.

【0075】表示/非表示判定モジュ−ル205、デー
タ管理モジュ−ル204による、これらの処理が終了が
終了すると、これらのモジュ−ルは、処理の終了をイベ
ント管理モジュ−ル202に通知する。イベント管理モ
ジュ−ル202は、通知を受けると表示モジュ−ル20
6に投影画像の生成を指示する。
When the processing by the display / non-display determination module 205 and the data management module 204 ends, the modules notify the event management module 202 of the end of the processing. . When the event management module 202 receives the notification, the event management module 202 displays the display module 20.
6 is instructed to generate a projection image.

【0076】生成の指示を受けた表示モジュ−ル206
は、図12に示す「表示処理」を実行する。
Display module 206 receiving the instruction to generate
Executes the "display process" shown in FIG.

【0077】この表示処理の内容について説明する。The contents of the display processing will be described.

【0078】図4に示す階層構造においては、実空間a
の1つ下層にあるオブジェクトが順次、この処理の対象
となる。
In the hierarchical structure shown in FIG.
The objects one layer below are sequentially subjected to this processing.

【0079】この処理は、基本的にZバッファ法に従っ
た隠面消去を行なう処理である。
This process is basically a process of erasing a hidden surface according to the Z-buffer method.

【0080】Zバッファ209は、実空間を投影する2
次元平面P上の各点毎に色データと、奥行データを記憶
する。2次元平面P上の点は、2次元平面Pに投影され
た2次元画像の画素に対応するので、以下では、2次元
平面P上の点を画素と呼ぶこととする。
The Z buffer 209 is used to project a real space.
Color data and depth data are stored for each point on the dimensional plane P. Since points on the two-dimensional plane P correspond to pixels of the two-dimensional image projected on the two-dimensional plane P, the points on the two-dimensional plane P will be referred to as pixels hereinafter.

【0081】まず、鏡ではない実像オブジェクトが処理
の対象となった場合について説明する。この場合、ステ
ップ1211において、順次、対象となったオブジェク
トの表面上の点の、当該点が投影される2次元平面上の
画素までの距離を求める、そして、この画素に対応して
Zバッファ209に記憶されている奥行データを参照
し、求めた距離が奥行データの示す距離より小さけれ
ば、この画素の奥行データを求めた距離に書き換え、こ
の画素の色データを対象となったオブジェクトの表面上
の点の色に書き換える。そして、対象となったオブジェ
クトの表面上の点のうち、2次元平面の画素に投影され
る位置にある全ての点について以上の処理を行なったら
処理を終了する。
First, a case where a real image object that is not a mirror is processed will be described. In this case, in step 1211, the distance between a point on the surface of the target object and a pixel on the two-dimensional plane on which the point is projected is determined in order, and the Z buffer 209 corresponding to the pixel is determined. If the calculated distance is smaller than the distance indicated by the depth data, the depth data of this pixel is rewritten to the calculated distance, and the color data of this pixel is displayed on the surface of the target object. Rewrite with the color of the dot. Then, when the above processing is performed on all the points on the surface of the target object at positions projected onto the pixels on the two-dimensional plane, the processing is terminated.

【0082】このような処理を、鏡ではない複数の実像
オブジェクトを、順次、処理の対象としながら行なう
と、結果、Zバッファ209には、今まで処理の対象と
なったオブジェクトの表面上の点のうち、今まで処理の
対象となったオブジェクトの他の表面によって隠されて
いない部分の点の色と、その点の当該点が投影される画
素までの距離とが、その部分が投影される画素に対応し
てZバッファ209に残る。
When such processing is performed while sequentially processing a plurality of real image objects that are not mirrors, the Z buffer 209 stores points on the surface of the object that has been processed so far. Of these, the color of a point of a portion that is not hidden by the other surface of the object that has been processed so far, and the distance of that point to the pixel on which the point is projected are projected for that portion. It remains in the Z buffer 209 corresponding to the pixel.

【0083】次に、鏡オブジェクトが処理の対象となっ
た場合について説明する。
Next, a case where a mirror object is processed will be described.

【0084】この場合も同様に鏡の各表面について上述
した処理が行なわれるが、鏡面についてのみは、異なる
処理が行なわれる。すなわち、処理を行なおうとする表
面が鏡面であると判定されると1201、まず、Zバッ
ファ209の奥行データ、色データを全て退避メモリ2
08に退避する1202。そして、Zバッファ209の
奥行データを全て無限大に、色データの内容を、何も写
りこんでいないときの鏡面の色として用いる色に初期化
する。そして、鏡オブジェクトの下層にオブジェクトが
あることを先にステップ4に示したデータより判定する
と1204、順次、鏡オブジェクトの一つ下層のオブジ
ェクトの全てについて、「表示処理」を再帰的に施す1
205、1206。ただし、先に説明した表示/非表示
判定モジュ−ル205によって「非表示」が設定された
オブジェクトは対象としない。
In this case as well, the above-described processing is performed on each surface of the mirror, but a different processing is performed only on the mirror surface. That is, if it is determined that the surface to be processed is a mirror surface 1201, first, all the depth data and color data of the Z buffer 209 are saved in the save memory 2.
1202 is evacuated to 08. Then, the depth data in the Z buffer 209 is all set to infinity, and the content of the color data is initialized to the color used as the color of the mirror surface when nothing is reflected. Then, if it is determined from the data shown in step 4 that the object exists below the mirror object, the display processing is sequentially performed recursively on all the objects one layer below the mirror object.
205, 1206. However, an object for which “non-display” is set by the display / non-display determination module 205 described above is not a target.

【0085】いま、この鏡オブジェクトの下層には1層
の虚像オブジェクトのみが存在するとすると、鏡オブジ
ェクトの一つ下層のオブジェクトの全てについて、「表
示処理」を再帰的に施した結果、鏡オブジェクトの一つ
下層の全ての虚像オブジェクトの表面上の点のうち、鏡
オブジェクトの一つ下層の虚像オブジェクトの他の表面
によって隠されていない部分の点の色と、その点の当該
点が投影される画素までの距離とが、その部分が投影さ
れる画素に対応してZバッファ209に残ることにな
る。なお、下層のオブジェクトの2次元平面への投影
は、下層のオブジェクトを、その上位のオブジェクトの
座標系を介し実空間aに移し行なう。
Assuming that only one virtual image object exists below this mirror object, "display processing" is recursively performed on all objects one layer below the mirror object. Of the points on the surface of all the virtual image objects one layer below, the color of the point of the part not hidden by the other surface of the virtual image object one layer below the mirror object and the point of that point are projected The distance to the pixel will remain in the Z buffer 209 corresponding to the pixel on which that portion is projected. Note that the lower layer object is projected onto the two-dimensional plane by moving the lower layer object to the real space a via the coordinate system of the upper object.

【0086】さて、次に、再度鏡の面であることを判定
し1207、以下の処理を行なう。まず、クリッピング
処理1208を行なう。すなわち、2次元平面P上の画
素のうち、鏡面が投影される範囲内にある画素を求め
る。そして、ステップ1208において、求めた画素以
外の画素に対応してZバッファ209に記憶されている
奥行データを無限大に、色を黒色に設定する。また、鏡
面が投影される範囲内にある画素の奥行データのみを、
当該画素に投影される鏡面上の点の、当該画素までの距
離に更新する。結果、図13に示すように、虚像オブジ
ェクトを2次元平面Pに投影して得られる二次元画像の
うち、鏡を通って投影される部分の2次元画像のみを鏡
面に貼つけたものを、2次元平面Pに投影した場合に得
られるものと同じものがZバッファ20に残る。
Next, it is determined again that the surface is a mirror surface 1207, and the following processing is performed. First, clipping processing 1208 is performed. That is, of the pixels on the two-dimensional plane P, the pixels within the range where the mirror surface is projected are obtained. Then, in step 1208, the depth data stored in the Z buffer 209 is set to infinity and the color is set to black corresponding to pixels other than the obtained pixels. Also, only the depth data of the pixels within the range where the mirror surface is projected,
Update the distance of the point on the mirror surface projected on the pixel to the pixel. As a result, as shown in FIG. 13, a two-dimensional image obtained by projecting the virtual image object on the two-dimensional plane P is obtained by attaching only a two-dimensional image of a part projected through a mirror to a mirror surface, The same thing as obtained when projecting on the two-dimensional plane P remains in the Z buffer 20.

【0087】そして最後に、退避メモリ208に退避し
ておいたZバッファ209の過去の内容をZバッファ2
09に復帰する。ただし、この場合には、2次元平面P
の各画素毎に、退避しておいた奥行データと現在のZバ
ッファ209の奥行データとを比較し、退避しておいた
奥行データの方が小さければ退避しておいた奥行データ
と色データをZバッファ209に書き込み、退避してお
いた奥行データの方が大きければ退避しておいた奥行デ
ータと色データをZバッファ209に書き込まず、現在
のZバッファ209の内容を維持するようにする。
Finally, the past contents of the Z buffer 209 saved in the save memory 208 are stored in the Z buffer 2.
Return to 09. However, in this case, the two-dimensional plane P
For each pixel, the saved depth data is compared with the current depth data of the Z buffer 209. If the saved depth data is smaller, the saved depth data and color data are compared. If the saved depth data is larger in the Z buffer 209 and the saved depth data and color data are not written in the Z buffer 209, the current contents of the Z buffer 209 are maintained.

【0088】以上の「表示処理」を、実空間aの1つ下
層にあるオブジェクトの全てについて施したならば、Z
バッファ209に残された色データをフレ−ムメモリ2
10に転送する。
If the above “display processing” has been performed for all objects one layer below the real space a, Z
The color data left in the buffer 209 is stored in the frame memory 2
Transfer to 10.

【0089】フレ−ムメモリに転送された内容はディス
プレイ101に表示される。
The contents transferred to the frame memory are displayed on the display 101.

【0090】このような「表示処理」の結果得られる二
次元画像は、実像オブジェクトのうちの鏡面に写り込む
部分だけが正しく写り込んだものとなる。なお、図12
における鏡面の処理は、鏡面毎に行なうので、図14に
示すように近接して鏡が配置されているような場合で
も、正しく写り込みを反映した2次元画像を得ることが
できる。
In the two-dimensional image obtained as a result of the "display processing", only the portion of the real image object which is reflected on the mirror surface is correctly reflected. FIG.
Is performed for each mirror surface, so that a two-dimensional image in which reflection is correctly reflected can be obtained even when mirrors are arranged close to each other as shown in FIG.

【0091】なお、前述したように、オブジェクトが、
たとえば、テ−ブルというオブジェクトの下層に天板、
足等の要素オブジェクトを定義するといったように、構
造上の関係等より階層的に定義されている場合でも、図
12に示した処理では、そのステップ1204から12
07の処理によって、順次、下層のものより各要素オブ
ジェクトのそれぞれについて、ステップ1211の示す
処理が行われることになるので問題は生じない。
As described above, the object is
For example, under the object named table,
Even in the case where elements such as feet are defined hierarchically based on structural relationships and the like, in the processing shown in FIG.
In the process of 07, the process shown in step 1211 is sequentially performed for each of the element objects from the lower layer, so that no problem occurs.

【0092】また、鏡に鏡が写り込むような場合の写り
込みを考慮する場合、すなわち実像オブジェクトの1次
の虚像に対応する虚像オブジェクトだけではなく、虚像
オブジェクトの虚像、すなわち、実像オブジェクトの2
次以上の虚像に対応する虚像オブジェクトについても考
慮する場合についても、ステップ1204から1207
の処理によって、下層の鏡オブジェクトの鏡面から処理
され正しく写り込みを反映した2次元画像を得ることが
できる。
Further, when the reflection in the case where the mirror is reflected on the mirror is considered, that is, not only the virtual image object corresponding to the primary virtual image of the real image object, but also the virtual image of the virtual image object, that is, the real image object 2
Steps 1204 to 1207 are also applied to a case where a virtual image object corresponding to the next or higher virtual image is also considered.
By the above processing, it is possible to obtain a two-dimensional image processed from the mirror surface of the lower mirror object and correctly reflecting the reflection.

【0093】以上、本実施例に係る3次元グラフィック
ス装置の実施例について説明した。
The embodiment of the three-dimensional graphics device according to this embodiment has been described above.

【0094】しかし、以上の実施例では、鏡面が曲面で
ある場合には対応することができない場合がある。
However, in the above embodiment, it may not be possible to cope with a case where the mirror surface is a curved surface.

【0095】そこで、鏡面が曲面である場合には表示モ
ジュ−ル206は、図15に示すような「表示処理」を
行なうようにする。
Therefore, when the mirror surface is a curved surface, the display module 206 performs "display processing" as shown in FIG.

【0096】この処理では、鏡でないオブジェクトにつ
いては、図12に示した処理と同じように処理が行なわ
れる。しかし、鏡のオブジェクトの鏡面については、次
のように初めに虚像オブジェクトを生成する処理が行な
われる。
In this processing, the processing which is not a mirror object is performed in the same manner as the processing shown in FIG. However, for the mirror surface of the mirror object, a process of first generating a virtual image object is performed as follows.

【0097】すなわち、まず、図1505で鏡面に写り
込むオブジェクトを決定する。これは、カメラからカメ
ラの撮影方向に延ばした線分が交わる鏡の面上の点に立
てた法線の方向と、カメラの配置と撮影方向より近似的
に求めることができる。すなわち、図16に示すよう
に、鏡面上の点のうち、2次元平面Pに投影される範囲
に投影される実空間aの範囲は、カメラの配置と撮影方
向とカメラからカメラの撮影方向に延ばした線分が交わ
る鏡の面上の点に立てた法線の方向によって近似的に定
まるので、この実空間aの範囲にあるオブジェクトを鏡
面に写り込むオブジェクトとする。
That is, first, the object to be reflected on the mirror surface is determined in FIG. This can be approximately determined from the direction of the normal line set at a point on the mirror surface where the line segment extending from the camera to the shooting direction of the camera intersects, the arrangement of the camera, and the shooting direction. That is, as shown in FIG. 16, among the points on the mirror surface, the range of the real space a projected on the range projected on the two-dimensional plane P depends on the arrangement of the camera, the shooting direction, and the shooting direction of the camera from the camera. The object in the range of the real space a is defined as an object to be reflected on the mirror surface because it is approximately determined by the direction of the normal line drawn at a point on the mirror surface where the extended line segment intersects.

【0098】次に、鏡面に写り込むオブジェクトの、鏡
面による虚像に対応する虚像オブジェクトをステップ1
506で求める。これは、鏡面に写り込むオブジェクト
の表面を構成する各面の頂点の虚像が結ばれる点160
1を求め、各点1601間を結んで得られる形状、配置
を虚像オブジェクトの形状、配置とする。また、各点1
601間を結んで得られる各面の色は、実像オブジェク
トの対応する面の色を割り当てる。
Next, the virtual image object corresponding to the virtual image by the mirror surface of the object reflected on the mirror surface is stored in step 1
Determined at 506. This is the point 160 where the virtual images of the vertices of each surface constituting the surface of the object reflected on the mirror surface are connected
1 is obtained, and the shape and arrangement obtained by connecting the points 1601 are defined as the shape and arrangement of the virtual image object. In addition, each point 1
The color of each surface obtained by connecting the 601 is assigned the color of the corresponding surface of the real image object.

【0099】このようにして、虚像オブジェクトが得ら
れたら、ステップ1507〜1512で、図12に示し
た鏡面の処理と同じく処理する。
When a virtual image object is obtained in this manner, the same processing as that of the mirror surface shown in FIG. 12 is performed in steps 1507 to 1512.

【0100】このように、オブジェクトの頂点座標に基
づいて、局面の鏡面による虚像に対応する虚像オブジェ
クトの形状を生成するので鏡面が曲面であっても高速に
虚像オブジェクトを生成することができる。
As described above, since the shape of the virtual image object corresponding to the virtual image formed by the mirror surface of the surface is generated based on the vertex coordinates of the object, the virtual image object can be generated at high speed even if the mirror surface is a curved surface.

【0101】[0101]

【発明の効果】以上のように、本発明によれば、3次元
世界を投影する2次元平面の3次元世界中の配置の変更
や3次元形状の配置やテクスチャの変更に応じて、3次
元世界上での3次元の物体の鏡への写り込みを正しく反
映しながら2次元画像を、高速に生成するすることがで
きる3次元グラフィックス装置を提供することができ
る。
As described above, according to the present invention, in accordance with the change of the arrangement of the two-dimensional plane for projecting the three-dimensional world in the three-dimensional world, the arrangement of the three-dimensional shape, and the change of the texture, the three-dimensional plane is projected. A three-dimensional graphics device capable of generating a two-dimensional image at a high speed while correctly reflecting the reflection of a three-dimensional object on a mirror in the world can be provided.

【0102】また、鏡面が曲面である場合にも、3次元
世界を投影した2次元画像を、3次元世界における3次
元の物体の鏡への写り込みを正しく反映しながら、より
高速に生成することができる3次元グラフィックス装置
を提供することができる。
Further, even when the mirror surface is a curved surface, a two-dimensional image obtained by projecting the three-dimensional world is generated at a higher speed while correctly reflecting the reflection of the three-dimensional object in the three-dimensional world on the mirror. And a three-dimensional graphics device capable of performing such operations.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の実施例に係る3次元グラフィックス装
置のハ−ドウェア構成を示すブロック図である。
FIG. 1 is a block diagram showing a hardware configuration of a three-dimensional graphics device according to an embodiment of the present invention.

【図2】本発明の実施例に係る3次元グラフィックス装
置の機能構成を示すブロック図である。
FIG. 2 is a block diagram showing a functional configuration of the three-dimensional graphics device according to the embodiment of the present invention.

【図3】本発明の実施例において投影映像を生成する3
次元空間の例を示す図である。
FIG. 3 is a diagram for generating a projection image according to the embodiment of the present invention;
FIG. 3 is a diagram illustrating an example of a dimensional space.

【図4】本発明の実施例に係る、オブジェクトを定義す
るデータのデータ構造を示す図である。
FIG. 4 is a diagram showing a data structure of data defining an object according to the embodiment of the present invention.

【図5】本発明の実施例において行なう各階層での表示
/非表示の判定処理の処理手順を示すフロ−チャ−トで
ある。
FIG. 5 is a flowchart showing a processing procedure of display / non-display determination processing at each layer performed in the embodiment of the present invention.

【図6】本発明の実施例において行なう各階層での表示
/非表示の判定処理の仕組を示す図である。
FIG. 6 is a diagram showing a mechanism of display / non-display determination processing at each layer performed in the embodiment of the present invention.

【図7】本発明の実施例において行なう各階層での表示
/非表示の判定処理の処理結果の例を示す図である。
FIG. 7 is a diagram illustrating an example of a processing result of a display / non-display determination process in each layer performed in the embodiment of the present invention.

【図8】本発明の各階層での表示/非表示の判定処理の
応用例を示す図である。
FIG. 8 is a diagram showing an application example of a display / non-display determination process at each layer according to the present invention.

【図9】本発明の実施例において行なう動き/マテリア
ルの変更処理の処理手順例を示すフロ−チャ−トであ
る。
FIG. 9 is a flowchart showing an example of a processing procedure of a movement / material change processing performed in the embodiment of the present invention.

【図10】本発明の実施例において行なう動き/マテリ
アルの変更処理の仕組を示す図である。
FIG. 10 is a diagram showing a mechanism of a motion / material change process performed in the embodiment of the present invention.

【図11】本発明の実施例において行なう動き/マテリ
アルの変更処理の処理手順例を示すフロ−チャ−トであ
る。
FIG. 11 is a flowchart showing an example of a processing procedure of a motion / material change process performed in the embodiment of the present invention.

【図12】本発明の実施例において行なう表示処理の処
理手順を示すフロ−チャ−トである。
FIG. 12 is a flowchart showing a processing procedure of display processing performed in the embodiment of the present invention.

【図13】本発明の実施例において行なう表示処理の仕
組を示す図である。
FIG. 13 is a diagram showing a mechanism of a display process performed in the embodiment of the present invention.

【図14】本発明の実施例において行なう表示処理の処
理結果の例を示す図である。
FIG. 14 is a diagram illustrating an example of a processing result of a display processing performed in the embodiment of the present invention.

【図15】本発明の実施例において行なう鏡面が曲面で
ある場合の表示処理の仕組を示す図である。
FIG. 15 is a diagram showing a mechanism of display processing performed when a mirror surface is a curved surface according to the embodiment of the present invention.

【図16】本発明の実施例において行なう鏡面が曲面で
ある場合の表示処理の処理結果の例を示す図である。
FIG. 16 is a diagram illustrating an example of a processing result of a display processing performed when a mirror surface is a curved surface according to the embodiment of the present invention.

【符号の説明】[Explanation of symbols]

201 ユ−ザインタフェ−スモジュ−ル 202 イベント管理モジュ−ル 203 ファイルI/Oモジュ−ル 204 データ管理モジュ−ル 205 表示/非表示判定モジュ−ル 206 表示モジュ−ル 208 退避メモリ 209 Zバッファ 210 フレ−ムメモリである。また 102 外部記憶装置 103 入力装置 Reference Signs List 201 User interface module 202 Event management module 203 File I / O module 204 Data management module 205 Display / non-display determination module 206 Display module 208 Evacuation memory 209 Z buffer 210 frame Memory memory. 102 external storage device 103 input device

フロントページの続き (56)参考文献 特開 平5−189582(JP,A) 特開 平5−46782(JP,A) 特開 平4−25974(JP,A) 特開 平2−59983(JP,A) 川端敦,渡辺範人,坂井俊雄,マル チ・パス・レンダリング法を用いた高速 画像生成手法,情報処理学会研究報告, 日本,情報処理学会,1992年7月24日, Vol.92,No.62(CG−57),39 −46 (58)調査した分野(Int.Cl.7,DB名) G06T 15/00 JICSTファイル(JOIS)Continuation of front page (56) References JP-A-5-189582 (JP, A) JP-A-5-46782 (JP, A) JP-A-4-25974 (JP, A) JP-A-2-59983 (JP) , A) Atsushi Kawabata, Norihito Watanabe, Toshio Sakai, High-speed image generation method using multi-pass rendering method, Information Processing Society of Japan research report, Japan, Information Processing Society of Japan, July 24, 1992, Vol. 92, No. 62 (CG-57), 39-46 (58) Fields studied (Int. Cl. 7 , DB name) G06T 15/00 JICST file (JOIS)

Claims (5)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】仮想的な3次元空間を、当該3次元空間に
配置した仮想的なカメラで撮影した2次元画像を生成す
る3次元グラフィックス装置であって、 前記3次元空間に配置された仮想的な物体と、仮想的な
鏡と、前記仮想的な物体の前記仮想的な鏡による虚像に
相当する形状と配置を有する物体である虚像物体の形状
と配置とを定義するオブジェクトデータと、前記虚像物
体と当該虚像物体に対応する虚像を生んだ前記仮想的な
鏡とを関係づける関係情報とを記憶した記憶手段と、 前記3次元空間を撮影する仮想的なカメラの、前記3次
元空間上の配置の設定を受付ける受付け手段と、 前記受付け手段が受付けたカメラの配置が、前記3次元
空間上において、前記仮想的な鏡に対して鏡面の表側に
ある場合に、前記記憶手段に記憶された関係情報によっ
て当該仮想的な鏡に関係付けられている前記虚像物体を
表示の対象であると判定し、鏡に対して鏡面の裏側にあ
る場合に、前記記憶手段に記憶された関係情報によって
当該仮想的な鏡に関係付けられている前記虚像物体を表
示の対象でないと判定する判定手段と、 前記受付け手段が受付けた配置のカメラから前記虚像物
体が当該虚像物体を生んだ仮想的な鏡を介して透視でき
るものとして、前記仮想的な物体と、前記仮想的な鏡
と、前記判定手段によって表示すると判定された虚像物
体とを、前記カメラによって撮影した場合に得られる2
次元画像を、前記記憶手段に記憶されている前記オブジ
ェクトデータに基づいて生成する2次元画像生成手段
と、 生成した2次元画像を表示する表示手段とを有すること
を特徴とする3次元グラフィックス装置。
1. A three-dimensional graphics device for generating a two-dimensional image obtained by photographing a virtual three-dimensional space with a virtual camera arranged in the three-dimensional space, wherein the three-dimensional graphics device is arranged in the three-dimensional space. A virtual object, a virtual mirror, and object data defining the shape and arrangement of a virtual image object that is an object having a shape and arrangement corresponding to the virtual image of the virtual object by the virtual mirror, Storage means for storing relationship information for associating the virtual image object with the virtual mirror that has produced a virtual image corresponding to the virtual image object; and the three-dimensional space of a virtual camera that captures the three-dimensional space means accepting accepts the setting of the arrangement above, the receiving unit is arranged in the camera accepted, on the three-dimensional space, when said relative virtual mirror in front of the mirror, stored in the storage means Was done The virtual image object associated with the virtual mirror is determined to be an object to be displayed by the link information, and when the virtual image object is behind the mirror surface with respect to the mirror, the virtual image object is determined by the relationship information stored in the storage unit. A determination unit that determines that the virtual image object associated with the virtual mirror is not a display target; and a virtual mirror in which the virtual image object has generated the virtual image object from a camera having the arrangement received by the reception unit. The virtual object, the virtual mirror, and the virtual image object determined to be displayed by the determination means are obtained by photographing with the camera as objects that can be seen through the camera.
A three-dimensional graphics device, comprising: a two-dimensional image generation unit that generates a two-dimensional image based on the object data stored in the storage unit; and a display unit that displays the generated two-dimensional image. .
【請求項2】請求項1記載の3次元グラフィックス装置
であって、 前記二次元画像生成手段は、前記受付け手段が受付けた
配置のカメラから前記虚像物体が当該虚像物体を生んだ
仮想的な鏡を介して透視できるものとして、前記仮想的
な物体と、前記仮想的な鏡と、前記判定手段によって表
示の対象であると判定された虚像物体の当該虚像物体を
生んだ仮想的な鏡を介して透視できる範囲に含まれる部
分とを、前記カメラによって撮影した場合に得られる2
次元画像を、前記記憶手段に記憶されている前記オブジ
ェクトデータに基づいて生成することを特徴とする3次
元グラフィックス装置。
2. The three-dimensional graphics device according to claim 1, wherein said two-dimensional image generating means includes: a virtual camera in which said virtual image object generates said virtual image object from a camera arranged in said receiving means. As a thing that can be seen through a mirror, the virtual object, the virtual mirror, and the virtual mirror that produced the virtual image object of the virtual image object determined to be a display target by the determination unit. A part included in a range that can be seen through the camera, and 2
A three-dimensional graphics device, wherein a three-dimensional image is generated based on the object data stored in the storage means.
【請求項3】請求項1記に記載の3次元グラフィックス
装置において、 前記オブジェクトデータは、前記仮想的な物体および前
記虚像物体について、色または柄を定義するデータを含
み、 前記記憶手段は、前記虚像物体と、当該虚像物体に対応
する虚像に対して実像の関係にある前記仮想的な物体と
を関係づける第2の関係情報を記憶し、 前記仮想的な物体の色または柄の変更の設定を受付ける
受付け手段と、 前記受付け手段が色または柄の変更の設定を受付けた前
記仮想的な物体と前記第2の関連情報によって関係付け
られている前記虚像物体について、前記オブジェクトデ
ータが定義する前記色または柄を、前記受付け手段が設
定を受付けた変更の内容に応じて変更する手段とを有す
ることを特徴とする3次元グラフィックス装置。
3. The three-dimensional graphics device according to claim 1, wherein the object data includes data defining a color or a pattern with respect to the virtual object and the virtual image object. The second virtual machine stores second relationship information that associates the virtual image object with the virtual object that is in a real image relationship with the virtual image corresponding to the virtual image object, and changes the color or pattern of the virtual object. The object data defines a receiving unit for receiving a setting, and the virtual image object associated with the virtual object, for which the receiving unit has received a setting for changing a color or a pattern, by the second related information. Means for changing the color or pattern in accordance with the content of the change whose setting has been received by the receiving means.
【請求項4】請求項1に記載の3次元グラフィックス装
置において、 前記記憶手段は、前記虚像物体と、当該虚像物体に対応
する虚像に対して実像の関係にある前記仮想的な物体と
を関係づける第2の関係情報とを記憶し、 前記仮想的な物体の配置の変更の設定を受付ける受付け
手段と、 前記受付け手段が配置の変更の設定を受付けた前記仮想
的な物体と前記第2の関連情報によって関係付けられて
いる前記虚像物体に対して、前記仮想的な鏡の鏡面を挟
んで前記受付け手段が受付けた前記配置の変更と面対称
な配置の変更が加えられるように、前記オブジェクトデ
ータが定義する前記虚像物体の前記配置を変更する手段
とを有することを特徴とする3次元グラフィックス装
置。
4. The three-dimensional graphics device according to claim 1, wherein the storage means stores the virtual image object and the virtual object having a real image relationship with a virtual image corresponding to the virtual image object. Receiving means for storing the second relation information to be related, receiving the setting of the change of the arrangement of the virtual object, and the virtual object receiving the setting of the change of the arrangement by the receiving means; For the virtual image object that is related by the related information, so that a change in the arrangement and a change in the plane symmetrical arrangement of the arrangement received by the accepting unit with the mirror surface of the virtual mirror interposed therebetween are added. Means for changing the arrangement of the virtual image object defined by object data.
【請求項5】請求項1に記載の3次元グラフィックス装
置において、 前記2次元画像生成手段は、 前記仮想的な物体と、前記仮想的な鏡と、前記虚像物体
とを前記3次元空間に配置する第1の手段と、 前記仮想的な物体と、前記仮想的な鏡と、前記虚像物体
とを、前記2次元平面へ投影した2次元画像を生成する
第2の手段とを含み、 前記第2の手段は、 前記虚像物体のみを前記2次元平面に投影した2次元画
像を生成し、当該2次元画像のうち、前記仮想的な鏡の
鏡面の範囲を通過して投影された部分のみを有効とした
第1の2次元画像を生成し、かつ、当該有効とした部分
は、前記仮想的な鏡の鏡面の位置の点から投影されたも
のとし、 前記仮想的な物体を前記2次元平面に投影した第2の2
次元画像を生成し、 順次、前記2次元平面上の各座標点について、当該座標
点に対応する前記第1の2次元画像の画素が前記有効と
した部分に含まれない画素である場合には、当該座標点
に対応する前記第1の2次元画像の画素と第2の2次元
画像の画素の値のうち、第2の2次元画像の画素の値
を、最終的な2次元画像の、当該座標点に対応する画素
の値とし、当該座標点に対応する前記第1の2次元画像
の画素が前記有効とした部分に含まれる画素である場合
には、当該座標点に対応する前記第1の2次元画像の画
素と第2の2次元画像の画素の値のうち、当該画素に投
影された点の位置が、当該画素に対応する前記2次元平
面上の座標点により近い方を、最終的な2次元画像の、
当該座標点に対応する画素の値とすることにより、前記
第1の2次元画像と第2の2次元画像を合成した最終的
な2次元画像を生成することを特徴とする3次元グラフ
ィックス装置。
5. The three-dimensional graphics device according to claim 1,
In location, the two-dimensional image generation means, wherein the virtual object, and the virtual mirror, the virtual image object
First means for arranging in the three-dimensional space, the virtual object, the virtual mirror, and the virtual image object
To a two-dimensional image projected onto the two-dimensional plane
And a second means, said second means, two-dimensional images obtained by projecting only the virtual object to the two-dimensional plane
An image of the virtual mirror of the two-dimensional image.
Only the part projected through the range of the mirror surface is valid
The first two-dimensional image is generated, and the valid portion is generated.
Is projected from a point at the position of the mirror surface of the virtual mirror.
And a second 2 which projects the virtual object onto the two-dimensional plane.
A two-dimensional image is generated and, for each coordinate point on the two-dimensional plane, the coordinates
A pixel of the first two-dimensional image corresponding to a point is said to be valid.
If the pixel is not included in the part,
Pixel of the first two-dimensional image corresponding to
Of the pixel values of the image, the pixel values of the second two-dimensional image
Is the pixel corresponding to the coordinate point in the final two-dimensional image.
And the first two-dimensional image corresponding to the coordinate point
Is a pixel included in the valid part
Shows an image of the first two-dimensional image corresponding to the coordinate point.
Among the pixel values of the pixel and the second two-dimensional image,
The position of the shadowed point is the two-dimensional plane corresponding to the pixel.
The closer to the coordinate point on the surface, the final two-dimensional image
By setting the value of the pixel corresponding to the coordinate point,
Final composite of the first two-dimensional image and the second two-dimensional image
-Dimensional graph characterized in that it generates a simple two-dimensional image
Equipment.
JP16849094A 1994-07-20 1994-07-20 3D graphics device Expired - Fee Related JP3354293B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP16849094A JP3354293B2 (en) 1994-07-20 1994-07-20 3D graphics device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP16849094A JP3354293B2 (en) 1994-07-20 1994-07-20 3D graphics device

Publications (2)

Publication Number Publication Date
JPH0830805A JPH0830805A (en) 1996-02-02
JP3354293B2 true JP3354293B2 (en) 2002-12-09

Family

ID=15869061

Family Applications (1)

Application Number Title Priority Date Filing Date
JP16849094A Expired - Fee Related JP3354293B2 (en) 1994-07-20 1994-07-20 3D graphics device

Country Status (1)

Country Link
JP (1) JP3354293B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE60038128T2 (en) 1999-12-17 2009-02-12 Saigo, Tsuyoshi, Hamura PHOTOGRAPHING METHOD FOR SHINING OBJECTS, GLASSES PHOTOGRAPHING METHOD AND METHOD FOR PRODUCING AN ELECTRONIC CATALOG FOR GLASSES

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
川端敦,渡辺範人,坂井俊雄,マルチ・パス・レンダリング法を用いた高速画像生成手法,情報処理学会研究報告,日本,情報処理学会,1992年7月24日,Vol.92,No.62(CG−57),39−46

Also Published As

Publication number Publication date
JPH0830805A (en) 1996-02-02

Similar Documents

Publication Publication Date Title
US7990374B2 (en) Apparatus and methods for haptic rendering using data in a graphics pipeline
US5825363A (en) Method and apparatus for determining visible surfaces
US5249264A (en) Image display method and apparatus
US20040075654A1 (en) 3-D digital image processor and method for visibility processing for use in the same
JP4230456B2 (en) 3D image processing
US20060161572A1 (en) Method and system for visualization of dynamic three-dimensional virtual objects
EP0740272A2 (en) Method and apparatus for fast rendering of three-dimensional objects
JPH10283158A (en) Stereoscopic display device for window and method therefor
JP2000251094A (en) Device and method for processing image
JP2006503355A5 (en)
JP2750318B2 (en) Method and apparatus for interlocking graphical objects
JPH11328441A (en) Graphics display control method and computer graphics
JP3354293B2 (en) 3D graphics device
US20030184546A1 (en) Image processing method
JP3035571B2 (en) Image processing device
JPH03211686A (en) Computer control display method and apparatus
JPH11296696A (en) Three-dimensional image processor
JPH07271998A (en) Method and device for three-dimensional display
JPH05342368A (en) Method and device for generating three-dimensional picture
JP5875327B2 (en) Image display device
JP3559336B2 (en) CG data creation device and CG animation editing device
JPH07296188A (en) Pseudo three-dimensional character plotting device
JPH06186948A (en) Image display method
JP2007299080A (en) Image generation method and image generation device
JP2784842B2 (en) Form factor calculation device for 3D objects

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees