JPH0830805A - Three-dimensional graphics device - Google Patents

Three-dimensional graphics device

Info

Publication number
JPH0830805A
JPH0830805A JP16849094A JP16849094A JPH0830805A JP H0830805 A JPH0830805 A JP H0830805A JP 16849094 A JP16849094 A JP 16849094A JP 16849094 A JP16849094 A JP 16849094A JP H0830805 A JPH0830805 A JP H0830805A
Authority
JP
Japan
Prior art keywords
virtual
dimensional
image
mirror
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.)
Granted
Application number
JP16849094A
Other languages
Japanese (ja)
Other versions
JP3354293B2 (en
Inventor
Hiroaki Takatsuki
宏明 高月
Yoshiaki Suzuki
義章 鈴木
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)

Abstract

PURPOSE:To fast generate a two-dimensional projection image whose projection is correctly reflected on a mirror surface included in a three-dimensional space. CONSTITUTION:An object 302a is previously put in a three-dimensional space against the virtual image of an object 302 put on the mirror surface of a mirror object 304. The data on the object 302a corresponding to the virtual image is set at a class lower than the data on the object 304. When the location of a camera is designated, it is decided whether the object 302a corresponding to the virtual image and set at the class lower than the data on the object 304 should be displayed or not based on a fact whether the camera is put on the upper side of the mirror surface. Then a two-dimensional image where the three-dimensional space is projected is generated on a two-dimensional plane decided by the location and direction of the camera by a Z buffer method. Under such conditions, a transparent mirror is used to the object 302a.

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, and more particularly to a three-dimensional graphics. In the device, a two-dimensional image that is a projection of a virtual three-dimensional world including a mirror and a three-dimensional object reflected in the mirror is reflected in the reflection of the three-dimensional object on the mirror in the three-dimensional world. The present invention relates to a technology for high-speed generation.

【0002】[0002]

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

【0003】このような3次元世界における3次元の物
体の鏡への写り込みも2次元画像に反映できる従来の技
術としては、レイトレ−シング法と呼ばれる技術が知ら
れている。この技術では、3次元世界を投影する2次元
平面上の各点より。その点への投影方向と逆方向に発し
た光線の軌跡を光の減衰や反射を考慮しながらトレ−ス
し、軌跡上にある、光線が当たる鏡や3次元形状上の点
の反射率や透過率や色(明度、彩度、明度)等に応じ
て、その2次元平面上の点に投影される色を決定する。
As a conventional technique capable of reflecting the reflection of a three-dimensional object on a mirror in such a three-dimensional world in a two-dimensional image, a technique called ray tracing method is known. In this technology, from each point on a two-dimensional plane that projects a three-dimensional world. Trace the trajectory of a ray emitted in the direction opposite to the projection direction to that point while considering attenuation and reflection of the light, and reflect the reflectance of the point on the trajectory where the ray hits the mirror or the point on the three-dimensional shape. The color projected on the 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 requires a large amount of processing, and it is difficult to generate a two-dimensional image at high speed. Therefore, it is necessary to generate a two-dimensional image projecting a three-dimensional world in real time in response to a change in the three-dimensional world's arrangement of the two-dimensional plane projecting the three-dimensional world or the arrangement or texture of the three-dimensional shape. Therefore, it is not possible to construct an interactive system that accepts a user's operation in the three-dimensional world and immediately displays an image corresponding to the operation content.

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

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

【0007】[0007]

【発明が解決しようとする課題】しかし、前述した3次
元物体の鏡による虚像に対応する3次元物体を、3次元
世界中の、鏡の、虚像の元となる3次元の物体の反対側
に配置する技術によれば、3次元世界を2次元平面へ投
影した2次元画像を、3次元世界を投影する2次元平面
の3次元世界中の配置の変更や3次元形状の配置やマテ
リアル(色、柄等)の変更に対してリアルタイムに生成
する場合には次のような問題がある。
However, the 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 three-dimensional object, which is the source of the virtual image, of the mirror in the three-dimensional world. According to the arranging technology, a 2D image obtained by projecting a 3D world onto a 2D plane is changed to a 3D arrangement of a 2D plane projecting the 3D world around the world, or an arrangement of 3D shapes or materials (colors). However, there is the following problem when it is generated in real time with respect to the change of (pattern, etc.).

【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, the side on which the three-dimensional object corresponding to the virtual image is arranged, the three-dimensional image corresponding to the virtual image. Since the object is also projected on the two-dimensional plane, a correct two-dimensional image cannot be obtained.

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

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

【0011】そこで、本発明は、3次元世界を投影する
2次元平面の3次元世界中の配置の変更や3次元形状の
配置やテクスチャの変更に応じて、3次元世界を投影し
た2次元画像を、3次元世界上での3次元の物体の鏡へ
の写り込みを正しく反映しつつも、高速に生成するする
ことができる3次元グラフィックス装置を提供すること
を目的とする。
Therefore, according to the present invention, a two-dimensional image projected from the three-dimensional world is changed according to the change of the three-dimensional world arrangement of the two-dimensional plane projecting the three-dimensional world, the arrangement of the three-dimensional shape and the texture. It is an object of the present invention to provide a three-dimensional graphics device that can generate a high-speed image while accurately reflecting the reflection of a three-dimensional object on a mirror in a 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, a two-dimensional image obtained by projecting the three-dimensional world is correctly reflected on the reflection of the three-dimensional object in the mirror in the three-dimensional world. Therefore, it is an object of the present invention to provide a three-dimensional graphics device that can be generated at higher speed.

【0013】[0013]

【課題を解決するための手段】前記目的達成のために、
本発明は、たとえば、仮想的な3次元空間を、当該3次
元空間に配置した仮想的なカメラで撮影した2次元画像
を生成する3次元グラフィックス装置であって、前記3
次元空間に配置された仮想的な物体と、仮想的な鏡と、
前記仮想的な物体の前記仮想的な鏡による虚像に相当す
る形状と配置を有する物体である虚像物体の形状と配置
とを定義するオブジェクトデータと、前記虚像物体と当
該虚像物体に対応する虚像を生んだ前記仮想的な鏡とを
関係づける関係情報とを記憶した記憶手段と、前記3次
元世界を撮影する仮想的なカメラの、前記3次元空間上
の配置の設定を受付ける受付け手段と、前記受付け手段
が受付けたカメラの配置が、前記3次元空間上におい
て、前記前記仮想的な鏡に対して鏡面の表側にある場合
に、前記記憶手段に記憶された関係情報によって当該仮
想的な鏡に関係付けられている前記虚像物体を表示の対
称であると判定し、鏡に対して鏡面の表側にある場合
に、前記記憶手段に記憶された関係情報によって当該仮
想的な鏡に関係付けられている前記虚像物体を表示の対
称でないと判定する判定手段と、前記受付け手段が受付
けた配置のカメラから前記虚像物体が当該虚像物体を生
んだ仮想的な鏡を介して透視できるものとして、前記仮
想的な物体と、前記仮想的な鏡と、前記判定手段によっ
て表示すると判定された虚像物体とを、前記カメラによ
って撮影した場合に得られる2次元画像を、前記記憶手
段に記憶されている前記オブジェクトデータに基づいて
生成する2次元画像生成手段と、生成した2次元画像を
表示する表示手段とを有することを特徴とする3次元グ
ラフィックス装置を提供する。
[Means for Solving the Problems] To achieve the above object,
The present invention relates to, for example, a three-dimensional graphics device that generates a two-dimensional image obtained by shooting a virtual three-dimensional space with a virtual camera arranged in the three-dimensional space.
A virtual object placed in a three-dimensional space, a virtual mirror,
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 the virtual image object and a virtual image corresponding to the virtual image object. Storage means for storing relationship information relating to the generated virtual mirror; reception means for receiving setting settings of the virtual camera for photographing the three-dimensional world in the three-dimensional space; When the arrangement of the cameras 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 relationship is stored in the virtual mirror by the relation information stored in the storage means. When it is determined that the associated virtual image object is symmetrical in display, and the virtual object is on the front side of the mirror surface with respect to the mirror, it is associated with the virtual mirror by the relationship information stored in the storage means. As the determination means that determines that the virtual image object is not symmetrical to display, and the virtual image object that can be seen through the virtual mirror that produced the virtual image object from the camera having the arrangement received by the reception means, A two-dimensional image obtained when the virtual object, the virtual mirror, and the virtual image object determined to be displayed by the determination unit are captured by the camera is stored in the storage unit. There is provided a three-dimensional graphics device having a two-dimensional image generation means for generating based on object data 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 as an example, a virtual object arranged in the three-dimensional space, a virtual mirror, and the virtual object of the virtual object. Data defining the shape and arrangement of a virtual image object, which is an object having a shape and arrangement corresponding to a virtual image formed by a virtual mirror, and the virtual mirror that produces the virtual image object and a virtual image corresponding to the virtual image object. And the relational information that relates to and is stored, and a two-dimensional image is generated based on the relational information. Therefore, it is possible to generate a two-dimensional image at high speed by the Z-buffer method or the like without using the tracing method. Whether or not to display the virtual image object associated with the virtual mirror according to the arrangement of the camera received by the receiving means with respect to the virtual mirror, based on the relationship information stored in the storage means. To determine.

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

【0016】[0016]

【実施例】以下、本発明に係る3次元グラフィックス装
置の実施例について説明する。
Embodiments of the 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 this embodiment will be described.

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

【0019】図1において、100はCPUや主記憶装
置やフレ−ムメモリ等を備えた計算機本体、101は本
3次元グラフィックス装置において生成した2次元画像
等を表示するディスプレイ、102は各種データを記憶
する外部記憶装置、103はユ−ザよりの指示を受付け
るキ−ボ−ドやマウス等の入力装置である。
In FIG. 1, 100 is a computer main body equipped with a CPU, a main storage device, a frame memory, etc., 101 is a display for displaying a two-dimensional image or the like generated in the present three-dimensional graphics device, and 102 is various data. An external storage device 103 for storing 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, the configuration 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, 201 is a user interface module, 202 is an event management module, and 2 is an event management module.
Reference numeral 03 is a file I / O module, 204 is a data management module, 205 is a display / non-display determination module, 2
Reference numeral 06 is a display module, 208 is a save memory, 209 is a Z buffer, and 210 is a frame memory. Also, 1
Reference numeral 02 denotes an external storage device, and 103 denotes an input device.

【0022】ユ−ザインタフェ−スモジュ−ル201、
イベント管理モジュ−ル202、ファイルI/Oモジュ
−ル203、データ管理モジュ−ル204、表示/非表
示判定モジュ−ル205、表示モジュ−ル206は、計
算機本体100上に、所定のCPU100のプログラム
の実行に応じて具現化されるプロセスとして実現され
る。
User interface module 201,
The event management module 202, the file I / O module 203, the data management module 204, the display / non-display determination module 205, and the display module 206 are provided on the computer main body 100 in 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
に、これら専用のメモリを設けて、これを用いるように
してもよい。
A save memory 208 and a Z buffer 209 are built in the main storage unit of the computer main body 100. The frame memory 210 is built on the 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 the display of the user interface image on the display 101 and the acceptance of the user's operation correspondingly input using the input device 103. That is, the user interface module 201
Provides a GUI. Event management module 202
Is a file I / O module according to the operation contents of the user accepted 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 processing is performed. Further, the file I / O module reads various data from the external storage device 102 or writes various data to the external storage device 102 according to 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】以下、これらのデータについて説明する。These data will be described below.

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

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

【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, 304 are arranged in a three-dimensional space defined by the coordinate system all. here,
The three-dimensional shape 304 is a mirror. Now this coordinate system all
The three-dimensional space defined by is called a real space a, and the three-dimensional shape directly arranged in this real space a is called a real image object.

【0030】さて、各実像オブジェクトの形状、色等
は、その実像オブジェクトに対して固有的に設定された
座標系上で定義されている。したがい、各実像オブジェ
クトの実空間a上での位置は、その実像オブジェクトに
固有的に設定された座標系の座標系all上の位置によ
って定義される。
The shape, color, etc. of each real image object are defined on a coordinate system that is set uniquely to that real image object. Therefore, 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 the present embodiment, the coordinate system mir set uniquely to the real image object mirror 304 is also used.
Three-dimensional shapes 301a, 302a, 303 corresponding to virtual images of three objects 301, 302, 303 excluding mirrors by a mirror 304 in a three-dimensional space defined by ror
Place a. Now, this three-dimensional space defined by the coordinate system mirror will be referred to as a mirror space m. Also,
A three-dimensional shape corresponding to a virtual image formed by a three-dimensional mirror will be referred to as a virtual image object. Further, 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 each of these virtual image objects, and the shape, color, etc. of the virtual image object are determined on the coordinate system uniquely set for the virtual image object. It is defined.

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

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

【0035】図4では、各オブジェクトを定義するデー
タを、各オブジェクト固有の座標系の階層構造と、虚像
に対応するオブジェクトと当該虚像の元となったオブジ
ェクトとの対応によって関係付けている。
In FIG. 4, the data defining each object are related by the hierarchical structure of the coordinate system unique to each object, 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 figure indicates the real image object mirror 30 in the lower layer of the coordinate system (all) that defines the real space a in FIG.
4, unique coordinate system of yuka 301, plate 303, pillar 302 (mirror, yuka, ita, hashira)
Exists, and in the lower layer of the coordinate system mirror that defines the mirror space m, the real image object yuka 301, the plate 303, and the pillar 30.
Virtual image objects 301a, 303a, 3 corresponding to 2
02a-specific coordinate system (yuka.rev, ita.re
v, hashira. rev) is present. In addition, the broken line in the drawing indicates the correspondence between the real image object and the virtual image object corresponding to the virtual image of the real image object.

【0037】なお、本実施例では、一つの実像オブジェ
クトに対して一つの虚像オブジェクトが存在する場合に
ついて示しているが、一つの実像オブジェクトに対して
複数の鏡による複数の虚像に対応する複数の虚像オブジ
ェクトが存在する場合にも図4に示した構造によって、
座標系の階層構造と、オブジェクト間の対応を定義する
こともできる。
In this embodiment, one virtual image object exists for one real image object, but a plurality of virtual images corresponding to a plurality of mirrors for one real image object are shown. Even when there is a virtual image object, 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 two types of data, for example, a pointer representing a hierarchical link, a real image object, and a virtual image object corresponding to the virtual image of the real image object. It can be easily realized by a data structure that links each data defining each object by using a pointer.

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

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

【0041】また、オブジェクト固有の座標系の図4に
示した定義上、上位の座標系における配置は、オブジェ
クト固有の座標系の原点の、上位の座標系における位置
と、両座標系の各単位ベクトルの傾き等により表すこと
ができる。なお、ある実像オブジェクトの虚像に対応す
る虚像オブジェクト固有の座標系の上位の座標系におけ
る配置は、その虚像を生成した鏡オブジェクトと、虚像
の元となった実像オブジェクトとの位置関係から求める
ことができる。すなわち、たとえば、図3の虚像オブジ
ェクト板303aに固有の座標系の鏡空間m上の配置
は、実空間aにおいて、その実像オブジェクト板303
座標系の鏡304に対して面対象な配置を求め、これに
対応する鏡実空間a上の配置を、虚像オブジェクト板3
03aに固有の座標系の鏡空間m上の配置とすればよ
い。また、虚像を生じさせる実像オブジエクトか否か
は、その実像オブジェクトが、実空間a上、鏡の鏡面側
にあるか否かより判定することができる。したがい、こ
のようにして、あらかじめ、各鏡オブジェクトについ
て、虚像オブジェクトを定義するデータを自動的に生成
すると共に、生成した虚像オブジェクトについての、図
4に示した階層づけや実像オブジェクトとの対応付けを
自動的に行なうようにしてもよい。
According to the definition of the coordinate system specific to the object shown in FIG. 4, the arrangement in the higher coordinate system is the position of the origin of the coordinate system specific to the object in the higher coordinate system and each unit of both coordinate systems. It can be represented by the slope of the vector. The arrangement in the higher coordinate system of the coordinate system specific 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 is the source of the virtual image. it can. That is, for example, the arrangement in the mirror space m of the coordinate system peculiar to the virtual image object plate 303a in FIG.
A plane-symmetrical arrangement is obtained for the mirror 304 of the coordinate system, and the corresponding arrangement in the mirror real space a is calculated as the virtual image object plate 3
The coordinate system peculiar to 03a may be arranged on the mirror space m. Further, whether or not the real image object that produces a virtual image can be determined by whether or not the real image object is on the mirror surface side of the mirror in the real space a. Therefore, in this way, in advance, for each mirror object, the data defining the virtual image object is automatically generated, and the generated virtual image object is associated with the hierarchy shown in FIG. 4 and the real image object. It may be performed automatically.

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

【0043】まず、ユ−ザより入力装置103を介して
実空間aを投影する2次元平面を規定するカメラの配置
が設定または変更された場合について説明する。
First, the case where the user sets or changes the arrangement of the cameras defining the two-dimensional plane for projecting the real space a via the input device 103 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 the display / non-display module 205.
Give to.

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

【0046】「各階層での表示/非表示の判定処理」
は、先に図4を用いて説明したデータに基き処理を行な
う。
"Display / non-display determination processing in each layer"
Performs processing 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 processing starts with the real space a of the uppermost layer (layer 0) of the hierarchical structure of FIG. 4 as a target. In this process, first check whether there is a target lower layer.
01, if any, one of the objects in the lower layer (layer 1) of the target is targeted, and “display / non-display determination processing in each layer” is recursively performed for this target 502,
When this is completed, "display / non-display determination processing in each layer" for all objects in this lower layer (layer 1)
It is determined whether or not 503 is finished. If it is not finished, one of the remaining objects in this lower layer (layer 1) is targeted, and "display / non-display determination processing in each layer" is performed for this target. 502 recursively. If the “display / non-display determination processing in each layer” 503 has been completed for all objects in the lower layer (layer 1), 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 subsequent processing is performed. In the hierarchical structure shown in FIG. 4, for example, {(Yukano virtual image 301a, plate virtual image 30 in FIG.
3a, virtual image 302a of the pillar, mirror 304}, yuka 301,
The process from step 504 onward 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 it is not a mirror, the process ends.

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

【0052】そして、次に、求めた両ベクトルの成す角
を求め508、この成す角が90度未満であればこの鏡
の下層に存在する全てのオブジェクトに対して「表示」
を設定する。90度以上であれば、この鏡の下層に存在
する全てのオブジェクトに対して「非表示」を設定す
る。
Then, the angle formed by both the obtained vectors is calculated 508, and if the angle formed is less than 90 degrees, "display" is performed for all objects existing under the mirror.
Set. If it 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, it corresponds to all the coordinate systems in the lower layer of the coordinate system of this mirror object. "Display" is set to the object,
When the camera is on the back side of the mirror surface with respect to the plane including the mirror surface, "invisible" is set for all objects below this mirror object.

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

【0055】結果、図7に示すように、図7に示すよう
に、カメラが鏡の面の表側にあるときには、この鏡オブ
ジェクトによる虚像に対応する虚像オブジェクトも表示
の対称となり、カメラが鏡の面の裏側にあるとき、すな
わち、カメラが鏡の裏側に回り込んだときには、この鏡
オブジェクトによる虚像に対応する虚像オブジェクトは
表示されないことになる。
As a result, as shown in FIG. 7, when the camera is on the front side of the mirror surface as shown in FIG. 7, the virtual image object corresponding to the virtual image by this mirror object also becomes symmetrical with respect to the display, and the camera shows the mirror image. When it is on the back side of the surface, that is, when the camera wraps around the back side of the mirror, the virtual image object corresponding to the virtual image by this mirror object is not displayed.

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

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

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

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

【0060】この処理は、まず、初めに動きやマテリア
ルの変更の指示が行なわれたオブジェクトを対象として
処理を始める。この処理では、まず、対象としたオブジ
ェクトに図4中破線で示される関係で対応づけられたオ
ブジェクトがあるかをチェックし905、なければ、対
象としたオブジェクトに動きを与え、もしくは、対象と
したオブジェクトの変更を行ない908、処理を終了す
る。
In this process, first, the process is started for an object for which a movement or a material change instruction has been made. In this process, first, it is checked whether or not the target object has an object associated with the relationship indicated by the broken line in FIG. 905, and if there is not, a motion is given to the target object or the target object is set. 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, and
Perform "movement / material change processing" recursively 90
6. When this is completed, it is determined whether or not there is an object associated with the object t similarly to the currently targeted object t1 907, and if it exists, this is targeted and the target t , "Movement /
906. The material modification process "is performed recursively. On the other hand, if it does not exist, the object t is moved or the material is changed 908, and the processing is ended.

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

【0063】ここで、虚像オブジェクトのマテリアルの
変更は、実像オブジェクトに施されたマテリアルの変更
と同じ変更を施すことにより行なう。
Here, the material of the virtual image object is changed by making the same change as the material 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 peculiar to the mirror object is set to the coordinate system al in the real space.
Consider the case where it is placed on 1000. In this example,
Coordinate system mirror1100 and coordinate system all 1000
Has the directions of the Y axis and the Z axis aligned with each other, and the X axis faces 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-symmetrical relationship. In the example shown in FIG. 10, the real image object 1
If the same change as the change of the coordinate of each axis of the coordinate system all 1000 of 200 is the change of the coordinate about the corresponding axis of the coordinate system mirror 1100 in the arrangement of the coordinate system specific to the virtual image object 1200a, this plane-symmetric relationship Is satisfied. Therefore, this change is represented by the virtual image object 120.
The coordinate of the coordinate system mirror 1100 of the coordinate system specific to 0a is changed.

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

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

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

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

【0070】ここで、鏡に鏡が写り込むような場合の写
り込みを考慮する場合、すなわち実像オブジェクトの1
次の虚像に対応する虚像オブジェクトだけではなく、虚
像オブジェクトの虚像、すなわち、実像オブジェクトの
2次以上の虚像に対応する虚像オブジェクトについても
考慮する場合について考える。
Here, when the reflection in the case where the mirror is reflected in the mirror is considered, that is, 1 of the real image object is considered.
Consider a case where not only the virtual image object corresponding to the next virtual image but also the virtual image of the virtual image object, that is, the virtual image object corresponding to the virtual image of the second or higher order of the 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 also taken into consideration, the virtual image object is always a substructure of the object that is the source of the virtual image (data defining the subordinate virtual image object, coordinate system between subordinate objects). (Hierarchical structure) may be inherited. By doing so, even when there is a virtual image object corresponding to the virtual image of the second mirror of the first mirror that is generating the n−1th-order virtual image of the real image object, n−1 by the first mirror is present. The coordinate system of the virtual image object corresponding to the nth virtual image of the second mirror of the virtual image object corresponding to the next virtual image is defined below the coordinate system of the virtual image object corresponding to the virtual image of the second mirror of the first mirror. It However, also in this case, the virtual image object corresponding to the nth-order virtual image is associated with the n−1th-order virtual image object in the relationship of the broken line shown in FIG.

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

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

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

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

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

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

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

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

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

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

【0083】次に、鏡オブジェクトが処理の対象となっ
た場合について説明する。
Next, the case where the mirror object is the object of processing 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 similarly performed on each surface of the mirror, but different processing is performed only on the mirror surface. That is, when 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 to save to 08. Then, the depth data of the Z buffer 209 are all set to infinity, and the content of the color data is initialized to the color used as the mirror surface color when nothing is reflected. Then, when it is determined from the data shown in step 4 that there is an object in the lower layer of the mirror object 1204, sequentially, "display processing" is recursively performed on all objects one layer below the mirror object 1
205, 1206. However, the object for which "non-display" is set by the display / non-display determination module 205 described above is not targeted.

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

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

【0088】以上の「表示処理」を、実空間aの1つ下
層にあるオブジェクトの全てについて施したならば、Z
バッファ209に残された色データをフレ−ムメモリ2
10に転送する。
If the above "display processing" is applied to all the objects located 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 such "display processing", only the portion of the real image object which is reflected in the mirror surface is correctly reflected. FIG.
Since the mirror surface processing is performed for each mirror surface, a two-dimensional image that accurately reflects the reflection can be obtained even when the 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, the top plate under the table object,
Even when the object objects such as feet are defined in a hierarchical manner based on the structural relationship, steps 1204 to 12 in the process shown in FIG.
By 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 considering reflection in the case where a mirror is reflected in a mirror, 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
Also in the case of considering virtual image objects corresponding to virtual images of the following or higher, steps 1204 to 1207
By the processing of (2), it is possible to obtain a two-dimensional image which is processed from the mirror surface of the lower layer mirror object and correctly reflects the reflection.

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

【0094】しかし、以上の実施例では、鏡面が曲面で
ある場合には対応することができない場合がある。
However, the above embodiment may not be able to deal with the 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 the "display processing" as shown in FIG.

【0096】この処理では、鏡でないオブジェクトにつ
いては、図12に示した処理と同じように処理が行なわ
れる。しかし、鏡のオブジェクトの鏡面については、次
のように初めに虚像オブジェクトを生成する処理が行な
われる。
In this processing, for objects that are not mirrors, the same processing as that shown in FIG. 12 is performed. However, with respect to the mirror surface of the mirror object, a process of generating a virtual image object is first 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. 1505. This can be approximately calculated from the direction of the normal line to the point on the surface of the mirror where the line segment extending from the camera to the shooting direction of the camera intersects, and the arrangement and shooting direction of the camera. That is, as shown in FIG. 16, of the points on the mirror surface, the range of the real space a projected in the range projected on the two-dimensional plane P is the arrangement of the camera, the shooting direction, and the shooting direction of the camera. Since it is approximately determined by the direction of the normal line to the point on the surface of the mirror where the extended line segments intersect, the object in the range of the real space a is an object to be reflected on the mirror surface.

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

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

【0100】このように、オブジェクトの頂点座標に基
づいて、局面の鏡面による虚像に対応する虚像オブジェ
クトの形状を生成するので鏡面が曲面であっても高速に
虚像オブジェクトを生成することができる。
As described above, since the shape of the virtual image object corresponding to the virtual image of the mirror surface of the stage 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, the three-dimensional arrangement of the two-dimensional plane projecting the three-dimensional world, the three-dimensional arrangement of the three-dimensional shape and the three-dimensional arrangement of the texture are changed. It is possible to provide a three-dimensional graphics device capable of generating a two-dimensional image at high speed while correctly reflecting the reflection of a three-dimensional object on a mirror in the world.

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

【図面の簡単な説明】[Brief description of 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 a three-dimensional graphics device according to an embodiment of the present invention.

【図3】本発明の実施例において投影映像を生成する3
次元空間の例を示す図である。
FIG. 3 is a diagram illustrating a method of generating a projected image according to an embodiment of the present invention.
It is a figure which shows the 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 in 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 in each layer performed in the embodiment of the present invention.

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

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

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

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

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

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

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

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

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

201 ユ−ザインタフェ−スモジュ−ル 202 イベント管理モジュ−ル 203 ファイルI/Oモジュ−ル 204 データ管理モジュ−ル 205 表示/非表示判定モジュ−ル 206 表示モジュ−ル 208 退避メモリ 209 Zバッファ 210 フレ−ムメモリである。また 102 外部記憶装置 103 入力装置 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 save memory 209 Z buffer 210 frame -It is a memory. Also, 102 external storage device 103 input device

Claims (7)

【特許請求の範囲】[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 capturing a virtual three-dimensional space with a virtual camera arranged in the three-dimensional space, the three-dimensional graphics device being 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 a virtual image of the virtual object by the virtual mirror, A storage unit that stores relationship information that associates the virtual image object with the virtual mirror that has generated a virtual image corresponding to the virtual image object; and the three-dimensional space of a virtual camera that captures the three-dimensional world. When the receiving means for receiving the setting of the above arrangement and the camera arrangement received by the receiving means are on the front side of the mirror surface with respect to the virtual mirror in the three-dimensional space, the storage means stores the same. Remembered The relationship information stored in the storage means determines that the virtual image object related to the virtual mirror is displayed symmetrically based on the relationship information, and is on the front side of the mirror surface with respect to the mirror. Determination means for determining that the virtual image object associated with the virtual mirror is not symmetrical in display, and a virtual mirror in which the virtual image object produced the virtual image object from the camera arranged at the receiving means. 2 is obtained when the virtual object, the virtual mirror, and the virtual image object determined to be displayed by the determination unit are photographed by the camera as a thing that can be seen through the camera.
A three-dimensional graphics device comprising: a two-dimensional image generation unit that generates a three-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 the two-dimensional image generation means is a virtual device in which the virtual image object produces the virtual image object from a camera arranged at the reception means. As a thing that can be seen through a mirror, a virtual mirror that produces the virtual object, the virtual mirror, and a virtual image object of the virtual image object determined to be symmetrical by the determination means. 2 obtained when the portion included in the range that can be seen through is taken by the camera.
A three-dimensional graphics device, wherein a three-dimensional image is generated based on the object data stored in the storage means.
【請求項3】仮想的な3次元空間を、当該3次元空間に
配置した仮想的なカメラで撮影した2次元画像を表示す
る3次元グラフィックス装置であって、 前記3次元空間に配置された仮想的な物体と、仮想的な
鏡と、前記仮想的な物体の前記仮想的な鏡による虚像に
相当する形状と配置と色または柄とを有する物体である
虚像物体との形状と配置と色または柄とを定義するオブ
ジェクトデータと、前記虚像物体と当該虚像物体に対応
する虚像に対して実像の関係にある前記仮想的な物体と
を関係づける関係情報とを記憶した記憶手段と、 前記仮想的な物体の色または柄の変更の設定を受付ける
受付け手段と、 前記記憶手段に記憶された前記オブジェクトデータの定
義する、前記受付け手段が色または柄の変更の設定を受
付けた前記仮想的な物体と、前記記憶手段に記憶された
関係情報によって当該仮想的な物体と関係付けられてい
る前記虚像物体の色または柄とを、前記受付け手段が設
定を受付けた変更の内容に応じて変更する手段と、 前記カメラから前記虚像物体が当該虚像物体を生んだ仮
想的な鏡を介して透視できるものとして、前記仮想的な
物体と、前記仮想的な鏡と、前記虚像物体とを、前記カ
メラによって撮影した場合に得られる2次元画像を、前
記記憶手段に記憶されている前記オブジェクトデータに
基づいて生成する2次元画像生成手段と、 生成した2次元画像を表示する表示手段とを有すること
を特徴とする3次元グラフィックス装置。
3. A three-dimensional graphics device for displaying a two-dimensional image captured by a virtual camera arranged in the three-dimensional space, the three-dimensional graphics device being arranged in the three-dimensional space. Shape, arrangement, and color of a virtual object, a virtual mirror, and a virtual image object that is an object having a shape and an arrangement and a color or a pattern corresponding to a virtual image of the virtual object by the virtual mirror. Alternatively, a storage unit that stores object data that defines a pattern and relationship information that associates the virtual image object and the virtual object that is in a real image relationship with a virtual image corresponding to the virtual image object; Accepting means for accepting a setting for changing the color or pattern of a physical object, and the virtual object defined by the object data stored in the storing means, the accepting means accepting a setting for changing the color or pattern And means for changing the color or pattern of the virtual image object associated with the virtual object by the relationship information stored in the storage means, according to the contents of the change accepted by the acceptance means. The virtual object, the virtual mirror, and the virtual image object can be viewed from the camera through the virtual mirror that produced the virtual image object. It has a two-dimensional image generating means for generating a two-dimensional image obtained when a photograph is taken based on the object data stored in the storage means, and a display means for displaying the generated two-dimensional image. 3D graphics device.
【請求項4】仮想的な3次元空間を、当該3次元空間に
配置した仮想的なカメラで撮影した2次元画像を表示す
る3次元グラフィックス装置であって、 前記3次元空間に配置された仮想的な物体と、仮想的な
鏡と、前記仮想的な物体の前記仮想的な鏡による虚像に
相当する形状と配置とを有する物体である虚像物体の形
状と配置を定義するオブジェクトデータと、前記虚像物
体と当該虚像物体に対応する虚像に対して実像の関係に
ある前記仮想的な物体とを関係づける関係情報とを記憶
した記憶手段と、 前記仮想的な物体の配置の変更の設定を受付ける受付け
手段と、 前記受付け手段が受付けた配置の変更に従って前記仮想
的な物体の配置に変更が加えられ、前記記憶手段に記憶
された関係情報によって当該仮想的な物体と関係付けら
れている前記虚像物体に、前記設定された配置の変更
と、当該虚像物体に対応する虚像を生んだ前記仮想的な
鏡の鏡面について面対象な配置の変更が加えられるよう
に前記記憶手段に記憶された前記オブジェクトデータの
定義する、前記仮想的な物体の配置と当該仮想的な物体
と関係付けられている前記虚像物の配置とを変更する手
段と、 前記カメラから前記虚像物体が当該虚像物体を生んだ仮
想的な鏡を介して透視できるものとして、前記仮想的な
物体と、前記仮想的な鏡と、前記虚像物体とを、前記カ
メラによって撮影した場合に得られる2次元画像を、前
記記憶手段に記憶されている前記オブジェクトデータに
基づいて生成する2次元画像生成手段と、 生成した2次元画像を表示する表示手段とを有すること
を特徴とする3次元グラフィックス装置。
4. A three-dimensional graphics device for displaying a two-dimensional image captured by a virtual camera arranged in the three-dimensional space, the three-dimensional graphics device being 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, which is an object having a shape and arrangement corresponding to a virtual image of the virtual object by the virtual mirror, A storage unit that stores relationship information that associates the virtual image object and the virtual object that is in a real image relationship with a virtual image corresponding to the virtual image object, and a setting for changing the arrangement of the virtual object. The receiving means for receiving, and the arrangement of the virtual object is changed according to the change of the arrangement received by the receiving means, and the virtual object is associated with the virtual object by the relation information stored in the storage means. The virtual image object is stored in the storage means so that the set arrangement is changed and the arrangement of the mirror-symmetrical surface of the virtual mirror that produces a virtual image corresponding to the virtual image object is changed. Means for changing the placement of the virtual object and the placement of the virtual image object associated with the virtual object, defined by the object data, and the virtual image object from the camera The two-dimensional image obtained when the virtual object, the virtual mirror, and the virtual image object are photographed by the camera is stored as the object that can be seen through the created virtual mirror. A two-dimensional image generating means for generating the generated two-dimensional image based on the object data stored in the means, and a display means for displaying the generated two-dimensional image. Equipment.
【請求項5】仮想的な3次元空間を、当該3次元空間に
配置した仮想的なカメラで撮影した2次元画像を生成す
る3次元グラフィックス装置であって、 前記3次元空間に配置された仮想的な物体と、仮想的な
鏡との形状と配置とを定義するオブジェクトデータとを
記憶した記憶手段と、 前記3次元世界を撮影する仮想的なカメラの、前記3次
元空間上の配置の設定を受付ける受付け手段と、 前記受付け手段が受付けたカメラの配置によって定まる
当該カメラの配置と、前記仮想的な鏡の鏡面の方向とに
応じて、当該鏡によって、その虚像が生じる前記仮想的
な物体を求め、前記カメラの配置と、前記仮想的な鏡の
鏡面の方向とに応じて、求めた前記仮想的な物体の前記
仮想的な鏡による虚像に相当する物体である虚像物体の
形状と配置を求める虚像物体生成手段と、 求めた前記虚像物体の形状と配置の定義を、前記記憶手
段の前記オブジェクトデータに加える手段と、 前記受付け手段が受付けた配置のカメラから前記虚像物
体が当該虚像物体を生んだ仮想的な鏡を介して透視でき
るものとして、前記仮想的な物体と、前記仮想的な鏡
と、前記判定手段によって表示すると判定された虚像物
体とを、前記カメラによって撮影した場合に得られる2
次元画像を、前記記憶手段に記憶されている前記オブジ
ェクトデータに基づいて生成する2次元画像生成手段
と、 生成した2次元画像を表示する表示手段とを有すること
を特徴とする3次元グラフィックス装置。
5. A three-dimensional graphics device for generating a two-dimensional image captured by a virtual camera arranged in the three-dimensional space, the three-dimensional graphics device being arranged in the three-dimensional space. A storage unit that stores a virtual object and object data that defines the shape and arrangement of the virtual mirror, and the arrangement of the virtual camera that captures the three-dimensional world in the three-dimensional space. The virtual means that the virtual image is generated by the mirror according to the arrangement of the camera determined by the arrangement of the camera received by the reception means and the orientation of the virtual mirror surface of the virtual mirror. An object is obtained, and the shape of the virtual image object, which is an object corresponding to the virtual image of the virtual object obtained by the virtual mirror, according to the arrangement of the camera and the direction of the mirror surface of the virtual mirror. Request placement A virtual image object generating means, means for adding the obtained definition of the shape and arrangement of the virtual image object to the object data of the storage means, and the virtual image object from the camera of the arrangement received by the receiving means. It is obtained when the camera captures the virtual object, the virtual mirror, and a virtual image object determined to be displayed by the determination means, as a thing that can be seen through the generated virtual mirror. 2
A three-dimensional graphics device comprising: a two-dimensional image generation unit that generates a three-dimensional image based on the object data stored in the storage unit; and a display unit that displays the generated two-dimensional image. .
【請求項6】請求項5記載の3次元グラフィックス装置
であって、 前記虚像物体生成手段は、前記カメラの配置と、前記仮
想的な鏡の鏡面の方向とに応じて、虚像が生じる前記仮
想的な物体の各頂点の前記仮想的な鏡による虚像に相当
する点を求め、求めた虚像に相当する点を結んで得られ
る形状と、その配置を、前記虚像物体の形状と配置とす
ることを特徴とする3次元グラフィックス装置。
6. The three-dimensional graphics device according to claim 5, wherein the virtual image object generating means generates a virtual image according to the arrangement of the cameras and the direction of the mirror surface of the virtual mirror. A shape obtained by finding a point corresponding to a virtual image by the virtual mirror at each vertex of a virtual object and connecting the obtained points corresponding to the virtual image and its arrangement are the shape and the arrangement of the virtual image object. A three-dimensional graphics device characterized in that
【請求項7】仮想的な3次元空間を、当該3次元空間に
配置した2次元平面に投影した2次元画像を生成する画
像生成方法であって、 仮想的な物体と、仮想的な鏡と、前記仮想的な物体の前
記仮想的な鏡による虚像に相当する形状と配置とを有す
る物体である虚像物体とを前記3次元空間に配置するス
テップと、 前記仮想的な物体と、前記仮想的な鏡と、前記虚像物体
とを、前記2次元平面への投影した2次元画像を生成す
るステップとを有し、 前記2次元画像を生成するステップは、 前記虚像物体のみを前記2次元平面に投影した二次元画
像を生成し、当該2次元画像のうち、前記仮想的な鏡の
鏡面の範囲を通過して投影された部分のみを有効とした
第1の2次元画像を生成し、かつ、当該有効とした部分
は、前記仮想的な鏡の鏡面の位置の点から投影されたも
のとし、 前記仮想的な物体を前記2次元平面に投影した第2の二
次元画像を生成し、 順次、前記二次元平面上の各座標点について、当該座標
点に対応する前記第1の二次元画像の画素が前記有効と
した部分に含まれない画素である場合には、当該座標点
に対応する前記第1の二次元画像の画素と第2の2次元
画像の画素の値のうち、第2の2次元画像の画素の値
を、最終的な2次元画像の、当該座標点に対応する画素
の値とし、当該座標点に対応する前記第1の二次元画像
の画素が前記有効とした部分に含まれる画素である場合
には、当該座標点に対応する前記第1の二次元画像の画
素と第2の2次元画像の画素の値のうち、当該画素に投
影された点の位置が、当該画素に対応する前記二次元平
面上の座標点により近い方を、最終的な2次元画像の、
当該座標点に対応する画素の値とすることにより、前記
第1の二次元画像と第2の2次元画像を合成した最終的
な2次元画像を生成するステップであることを特徴とす
る画像生成方法。
7. An image generation method for generating a two-dimensional image by projecting a virtual three-dimensional space onto a two-dimensional plane arranged in the three-dimensional space, comprising a virtual object and a virtual mirror. Arranging, in the three-dimensional space, a virtual image object, which is an object having a shape and an arrangement corresponding to a virtual image of the virtual object by the virtual mirror, the virtual object, and the virtual object. A mirror and the virtual image object are projected onto the two-dimensional plane to generate a two-dimensional image. The step of generating the two-dimensional image includes only the virtual image object on the two-dimensional plane. Generating a projected two-dimensional image, and generating a first two-dimensional image in which only a portion of the two-dimensional image that has passed through the range of the mirror surface of the virtual mirror and is projected is effective, and The valid portion is the position of the mirror surface of the virtual mirror. It is assumed that the virtual object is projected onto the two-dimensional plane, and a second two-dimensional image is generated by projecting the virtual object onto the two-dimensional plane. When the corresponding pixel of the first two-dimensional image is a pixel not included in the validated portion, the pixel of the first two-dimensional image and the second two-dimensional image corresponding to the coordinate point Of the pixel values of the second two-dimensional image, the pixel values of the final two-dimensional image corresponding to the coordinate points are set to the first two-dimensional values corresponding to the coordinate points. If the pixel of the image is a pixel included in the valid portion, the pixel of the values of the pixel of the first two-dimensional image and the pixel of the second two-dimensional image corresponding to the coordinate point is the pixel. The position of the point projected on is defined by the coordinate point on the two-dimensional plane corresponding to the pixel. Stomach the way, the final two-dimensional image,
Image generation, which is a step of generating a final two-dimensional image in which the first two-dimensional image and the second two-dimensional image are combined by setting the value of the pixel corresponding to the coordinate point. Method.
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 true JPH0830805A (en) 1996-02-02
JP3354293B2 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6606453B2 (en) * 1999-12-17 2003-08-12 Tsuyoshi Saigo Method for photographing lustrous objects, method for photographing spectacle frames, and method for creating electronic spectacle frame catalogue

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6606453B2 (en) * 1999-12-17 2003-08-12 Tsuyoshi Saigo Method for photographing lustrous objects, method for photographing spectacle frames, and method for creating electronic spectacle frame catalogue
US6788886B2 (en) 1999-12-17 2004-09-07 Tsuyoshi Saigo Method for photographing lustrous objects, method for photographing spectacle frames, and method for creating electronic spectacle frame catalogue

Also Published As

Publication number Publication date
JP3354293B2 (en) 2002-12-09

Similar Documents

Publication Publication Date Title
CN110419061B (en) Mixed reality system and method for generating virtual content using the same
US5694533A (en) 3-Dimensional model composed against textured midground image and perspective enhancing hemispherically mapped backdrop image for visual realism
US7548236B2 (en) Image processing method, image processing apparatus, image processing program, and storage medium
US7755608B2 (en) Systems and methods of interfacing with a machine
JP3619063B2 (en) Stereoscopic image processing apparatus, method thereof, stereoscopic parameter setting apparatus, method thereof and computer program storage medium
JP3184327B2 (en) Three-dimensional graphics processing method and apparatus
US20090128552A1 (en) Image processing apparatus for combining real object and virtual object and processing method therefor
US20040021664A1 (en) Information processing device and method
JP2000251094A (en) Device and method for processing image
US20060244745A1 (en) Computerized method and computer system for positioning a pointer
JP3514947B2 (en) Three-dimensional image processing apparatus and three-dimensional image processing method
US6972758B2 (en) Methods and apparatus for rendering an image including portions seen through one or more objects of the image
JP3951362B2 (en) Image processing apparatus, game apparatus, method thereof, and recording medium
JP3629243B2 (en) Image processing apparatus and method for rendering shading process using distance component in modeling
JPH03211686A (en) Computer control display method and apparatus
JP3354293B2 (en) 3D graphics device
CN108830928A (en) Mapping method, device, terminal device and the readable storage medium storing program for executing of threedimensional model
JPH06215150A (en) Three-dimensional image display device
JP3441804B2 (en) Image processing apparatus and method
JP2001148032A (en) Method and device for plotting image, recording medium and program
JPH05342368A (en) Method and device for generating three-dimensional picture
JP2784842B2 (en) Form factor calculation device for 3D objects
JP2952585B1 (en) Image generation method
JPH07271998A (en) Method and device for three-dimensional display
TW588289B (en) 3-D digital image processor and method for visibility processing for use in the same

Legal Events

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