JP6530453B2 - Game program and game system - Google Patents
Game program and game system Download PDFInfo
- Publication number
- JP6530453B2 JP6530453B2 JP2017139582A JP2017139582A JP6530453B2 JP 6530453 B2 JP6530453 B2 JP 6530453B2 JP 2017139582 A JP2017139582 A JP 2017139582A JP 2017139582 A JP2017139582 A JP 2017139582A JP 6530453 B2 JP6530453 B2 JP 6530453B2
- Authority
- JP
- Japan
- Prior art keywords
- virtual
- game
- distance
- virtual space
- pair
- 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.)
- Active
Links
- 238000004364 calculation method Methods 0.000 claims description 20
- 238000000034 method Methods 0.000 description 25
- 238000001514 detection method Methods 0.000 description 15
- 210000003128 head Anatomy 0.000 description 11
- 230000008569 process Effects 0.000 description 10
- 230000033001 locomotion Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 7
- 230000001133 acceleration Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 6
- 230000015572 biosynthetic process Effects 0.000 description 4
- 238000003786 synthesis reaction Methods 0.000 description 4
- 230000000007 visual effect Effects 0.000 description 4
- 238000009877 rendering Methods 0.000 description 3
- 230000002194 synthesizing effect Effects 0.000 description 3
- 239000000203 mixture Substances 0.000 description 2
- 230000003213 activating effect Effects 0.000 description 1
- 230000004913 activation Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000008054 signal transmission Effects 0.000 description 1
- 238000002834 transmittance Methods 0.000 description 1
Images
Landscapes
- Processing Or Creating Images (AREA)
- User Interface Of Digital Computer (AREA)
Description
本発明は、ヘッドマウントディスプレイ(以下、HMD)に仮想空間の画像を表示するゲームを実現するゲームプログラム及びゲームシステムに関する。 The present invention relates to a game program and a game system for realizing a game for displaying an image of a virtual space on a head mounted display (hereinafter, HMD).
近年、HMDを装着したユーザがバーチャルリアリティ(以下、VR)を体験できるゲーム(以下、VR対応ゲーム)が実現されている。VR対応ゲームでは、三次元の仮想空間をユーザが立体視できるように、一対の仮想カメラで撮影した該仮想空間を、視差を有する一対の仮想二次元画像としてHMDの画面に表示する。 BACKGROUND In recent years, games (hereinafter, VR compatible games) in which a user wearing an HMD can experience virtual reality (hereinafter, VR) have been realized. In the VR compatible game, the virtual space photographed by a pair of virtual cameras is displayed on the screen of the HMD as a pair of virtual two-dimensional images having parallax so that the user can stereoscopically view a three-dimensional virtual space.
ところで、従来からゲーム分野では、ゲーム画面の一部に、ユーザに提示する情報として、メニュー等のグラフィカル・ユーザ・インタフェース(以下、GUI)やキャラクタの会話、キャラクタのステータス等を表示することがしばしば行われる。このようなユーザ提示情報は、単一の仮想二次元画像を表示するゲームでは、ゲーム画面の最前面に描画される場合が多い。しかし、VR対応ゲームでは、ユーザに提示する情報を最前面に描画するとユーザが焦点を合わせにくくなるという問題がある。このため、VR対応ゲームでは、平面を有するオブジェクトを仮想空間内に配置し、その平面上にユーザ提示情報を描画することがある。 By the way, conventionally, in the game field, it is often used to display a graphical user interface (hereinafter, GUI) such as a menu or the like, character conversation, character status, etc. as information to be presented to the user on part of the game screen. To be done. Such user presentation information is often drawn in the foreground of the game screen in a game that displays a single virtual two-dimensional image. However, in the VR compatible game, there is a problem that it is difficult for the user to focus when the information presented to the user is drawn in the foreground. For this reason, in a VR compatible game, an object having a plane may be arranged in a virtual space, and user presentation information may be drawn on the plane.
例えば特許文献1には、仮想空間内にメニュー項目を割り当てたオブジェクト(例えば、コップのオブジェクト)を配置するとともに、仮想空間内における当該オブジェクトの上方に、メニュー(例えば、「入れる」、「飲む」、「動かす」)が表示された表示体を配置するゲームが開示されている。
For example, in
上述の特許文献1ではオブジェクトの上方にGUIを配置する方法が示されたが、GUIの配置方法としては、仮想カメラとの位置関係のみに基づいて配置する方法、例えば、仮想カメラからその前方に所定の距離だけ離れた位置に配置する方法が考えられる。しかし、仮想空間に配置したGUIによって、その近くのオブジェクトが隠れてしまうと、ユーザが仮想空間の様子を把握しにくくなるおそれがある。このようなことは、GUIに限らず、キャラクタの会話等のテキストを描画する場合にも当てはまる。
Although the method of arranging the GUI above the object is shown in the above-mentioned
そこで本発明は、仮想空間に配置したGUI等の描画対象要素を描画した画像から、当該仮想空間の様子をユーザが把握しやすいVR対応ゲームを実現することのできるゲームプログラム及びゲームシステムを提供することを目的とする。 Therefore, the present invention provides a game program and a game system capable of realizing a VR compatible game in which the user can easily grasp the state of the virtual space from an image obtained by drawing a drawing target element such as a GUI arranged in the virtual space. The purpose is
上記課題を解決するために、本発明に係るゲームプログラムは、一対の仮想カメラで撮影した該仮想空間を、視差を有する一対の仮想二次元画像として表示するHMDを備えるコンピュータに実行させるゲームプログラムであって、前記コンピュータを、オブジェクトが配置された前記仮想空間を生成する仮想空間生成手段、前記仮想空間に前記一対の仮想カメラを配置するカメラ配置手段、前記仮想空間内の前記一対の仮想カメラに対向した所定の位置に、描画対象要素を描画するための平面要素を配置する平面配置手段、前記平面要素を複数の部分領域に分割したときの各部分領域について、前記オブジェクトまでの距離を算出する距離算出手段、前記距離が設定値より小さい前記部分領域については、前記描画対象要素において前記部分領域に対応する部分要素の透明度を、前記距離が短いほど高くなるように決定する透明度決定手段、及び、決定した前記透明度に基づいて、前記平面要素上に前記描画対象要素を描画する描画手段、として機能させる。 In order to solve the above problem, a game program according to the present invention is a game program to be executed by a computer including an HMD that displays the virtual space photographed by a pair of virtual cameras as a pair of virtual two-dimensional images having parallax. A virtual space generation means for generating the virtual space in which objects are arranged; a camera arrangement means for arranging the pair of virtual cameras in the virtual space; and a pair of virtual cameras in the virtual space Planar arrangement means for arranging a planar element for drawing a drawing target element at a predetermined position opposite to each other, and calculating the distance to the object for each partial area when the planar element is divided into a plurality of partial areas Distance calculation means, for the partial region in which the distance is smaller than a set value, the portion Transparency determining means for determining the transparency of the partial element corresponding to the area to be higher as the distance is shorter, and drawing means for drawing the element to be drawn on the plane element based on the determined transparency, Act as
上記のゲームプログラムによれば、描画対象要素におけるオブジェクトまでの距離が設定値より小さい部分について、オブジェクトに近い部分ほど透明度を高めるため、描画対象要素の近くのオブジェクトの様子をユーザが把握しやすくなる。更に、平面要素がオブジェクトと交差する位置に配置された場合でも、オブジェクトと交差する部分で描画対象要素が透明になるように透明度を設定することも可能になる。このため、ユーザの視認性が向上する。 According to the above-described game program, the user can easily grasp the situation of the object near the rendering target element because the transparency is increased as the portion closer to the object is closer to the object in the portion where the distance to the object in the rendering target element is smaller . Furthermore, even when the plane element is disposed at the position where the object intersects the object, it is possible to set the transparency so that the element to be drawn becomes transparent at the intersection with the object. Therefore, the visibility of the user is improved.
前記部分領域は、前記平面要素を、前記一対の仮想カメラで撮影する各画像の画素単位で分割したものであり、前記距離算出手段は、前記平面要素の各前記部分領域について、前記仮想カメラから当該部分領域を見た視線の先の前記オブジェクトの対応部位に関する第1の深度値から、当該部分領域に関する第2の深度値を減算することにより、各前記部分領域から前記オブジェクトの前記対応部位までの距離を算出してもよい。これにより、隠面消去方法として公知のZバッファ法により取得される各画素の深度値を用いて、画素単位で分割した平面要素の部分領域とオブジェクトの対応部位との距離を算出するため、距離算出に伴う処理負荷を低減することができる。 The partial area is obtained by dividing the planar element in units of pixels of each image captured by the pair of virtual cameras, and the distance calculating unit is configured to calculate the partial area of the planar element from the virtual camera. By subtracting the second depth value of the partial area from the first depth value of the corresponding area of the object ahead of the line of sight when the partial area is viewed, from each of the partial areas to the corresponding area of the object The distance of may be calculated. Thereby, the distance between the partial area of the plane element divided in pixel units and the corresponding portion of the object is calculated using the depth value of each pixel acquired by the Z buffer method known as the hidden surface removal method. The processing load involved in the calculation can be reduced.
前記描画対象要素は、例えばGUIである。 The drawing target element is, for example, a GUI.
また、本発明に係るゲームシステムは、上記のゲームプログラムを記憶したプログラム記憶部と、前記プログラム記憶部に記憶されたプログラムを実行するコンピュータとを備える。 Further, a game system according to the present invention includes a program storage unit storing the above-described game program, and a computer that executes a program stored in the program storage unit.
本発明によれば、仮想空間に配置したGUI等の描画対象要素を描画した画像から、当該仮想空間の様子をユーザが把握しやすいVR対応ゲームを実現することのできるゲームプログラム及びゲームシステムを提供することができる。 According to the present invention, there is provided a game program and a game system capable of realizing a VR compatible game in which the user can easily grasp the state of the virtual space from an image obtained by drawing a drawing target element such as a GUI arranged in the virtual space. can do.
以下、本発明の実施の形態に係るゲームプログラムおよびゲームシステムについて、図面を参照しつつ説明する。 Hereinafter, a game program and a game system according to an embodiment of the present invention will be described with reference to the drawings.
[ハードウェア構成]
図1は、ゲームシステム1のハードウェア構成を示すブロック図である。ゲームシステム1は、コンピュータであるゲーム装置2及びサーバ装置3を備えている。ゲーム装置2は、他のゲーム装置2及びサーバ装置3との間で、インターネット又はLANなどの通信ネットワークNWを介して互いに通信可能である。このゲーム装置2は、その動作を制御するCPU10を備え、このCPU10にはバス11を介して、ディスクドライブ12、メモリカードスロット13、記憶部(プログラム記憶部)を成すHDD14及びROM15、並びにRAM16が接続されている。
[Hardware configuration]
FIG. 1 is a block diagram showing the hardware configuration of the
ディスクドライブ12には、DVD−ROM等のディスク型記録媒体30が装填可能である。該ディスク型記録媒体30には、本実施の形態に係るゲームプログラム30a及びゲームデータ30bが記録されている。このゲームデータ30bには、仮想空間の形成に必要なデータ、及び、ゲーム中で再生されるサウンドデータなど、本ゲームの進行に必要な各種のデータが含まれる。また、メモリカードスロット13にはカード型記録媒体31が装填でき、ゲームの途中経過等のプレイ状況を示すセーブデータを、CPU10からの指示に応じて記録可能である。
The
HDD14はゲーム装置2が内蔵する大容量記録媒体であって、ディスク型記録媒体30から読み込んだゲームプログラム30a及びゲームデータ30b、更にはセーブデータ等を記録する。ROM15は、マスクROM又はPROMなどの半導体メモリであり、ゲーム装置2を起動する起動プログラムや、ディスク型記録媒体30が装填されたときの動作を制御するプログラムなどを記録している。RAM16は、DRAM又はSRAMなどから成り、CPU10が実行すべきゲームプログラム30aや、その実行の際に必要になるゲームデータ30bなどを、ゲームのプレイ状況に応じてディスク型記録媒体30又はHDD14から読み込んで一時的に記録する。
The HDD 14 is a large-capacity recording medium built in the
また、CPU10には更に、バス11を介して、HMD用インタフェース17、光検出装置用インタフェース18、グラフィック処理部19、オーディオ合成部20、オーディオインタフェース21、無線通信制御部22、及びネットワークインタフェース23が接続されている。そして、HMD用インタフェース17、光検出装置用インタフェース18及びオーディオインタフェース21には、それぞれ、HMD40、光検出装置46及びヘッドホン47が夫々接続されている。
The
HMD40は、ユーザの頭部に装着可能である。HMD40は、一対の表示部41(41a,41b)、加速度センサ42、ジャイロセンサ43、光放出部44及び制御部45を備える。HMD40がユーザの頭部に装着されることにより、当該ユーザの左目と右目の前方には、左目用の表示部41aと右目用の表示部41bとが夫々配置される。
The HMD 40 can be worn on the head of the user. The HMD 40 includes a pair of display units 41 (41a and 41b), an acceleration sensor 42, a
加速度センサ42及びジャイロセンサ43は、ユーザの頭部のモーションを検出するモーション検出システムを構成する。加速度センサ42は、例えば重力方向に対するHMD40の向き、即ちユーザの頭部の傾きを検出する。ジャイロセンサ43は、例えばHMD40の角速度、即ちユーザが頭部を傾けたり回転したりする速さを検出する。加速度センサ42及びジャイロセンサ43から得られたモーション情報は、HMD用インタフェース17を介して、グラフィック処理部19及びオーディオ合成部20に送られる。
The acceleration sensor 42 and the
HMD40の光放出部44は、光検出装置46と共に、ユーザの頭部の位置を検出する位置検出システムを構成する。本実施形態では、光放出部44は、例えば互いに離間してHMD40に設けられた複数のLEDライトである。光検出装置46は、例えばユーザの前方に固定的に配置され、HMD40の光放出部44から放たれる光の位置を検出する。光検出装置46は、光放出部44から放たれる光の位置を検出することにより、該光検出装置46に対するユーザの頭部の位置情報を取得する。当該位置情報は、上述のモーション情報を補正するために用いられてもよい。光検出装置46から得られた位置情報は、光検出装置用インタフェース18を介して、グラフィック処理部19及びオーディオ合成部20に送られる。
The
なお、ユーザの頭部の位置を検出する位置検出システムは、これに限定されない。例えば、HMD40側に光センサを設けて、ユーザの周りに配置された光放出装置から放たれた光を、当該光センサで検出することにより、ユーザの頭部の位置を検出してもよい。
In addition, the position detection system which detects the position of a user's head is not limited to this. For example, a light sensor may be provided on the
制御部45は、加速度センサ42及びジャイロセンサ43からゲーム装置2へのデータの送信や光放出部44への信号の送信など、HMD40が有する各種機器の制御を行う。
The
グラフィック処理部19は、CPU10の指示に従って三次元の仮想ゲーム空間等を含むゲーム画像を描画する。例えば、グラフィック処理部19は、ユーザが三次元の仮想空間を立体視できるよう、互いに視差を有する一対の仮想二次元画像を生成する。即ち、グラフィック処理部19は、仮想三次元空間に配置された一対の仮想カメラの夫々で撮影した互いに視差を有する左目用及び右目用の仮想二次元画像を生成する。そして、この一対の仮想二次元画像は、動画形式に変換されて、HMD用インタフェース17を介してHMD40に送られ、一対の表示部41a,41bに夫々表示される。また、グラフィック処理部19は、ユーザに仮想空間内に入り込んだような臨場感を与えるよう、HMD40及び光検出装置46から送られたユーザに関するモーション情報及び位置情報に合わせて、リアルタイムでHMD40に送る一対の仮想二次元画像を変化させる。
The
オーディオ合成部20は、CPU10の指示に従って、ゲームデータ30bに含まれるデジタル形式のサウンドデータを再生及び合成する。オーディオ合成部20にて再生及び合成されたサウンドデータは、アナログ形式にデコードされた後、オーディオインタフェース21を介してヘッドホン47に送られ出力される。その結果、本ゲームをプレイしているユーザは、再生されたサウンドを聴取することができる。ヘッドホン47は、HMD40と一体的に構成されてもよい。また、オーディオ合成部20は、ユーザに仮想空間内に入り込んだような臨場感を与えるよう、HMD40及び光検出装置46から送られたモーション情報及び位置情報に合わせて、リアルタイムでヘッドホン47から出力される音響を変化させてもよい。オーディオインタフェース21には、ヘッドホン47の代わりに、スピーカが接続されてもよい。
The
無線通信制御部22は、2.4GHz帯の無線通信モジュールを有し、ゲーム装置2に付属するコントローラ48との間で無線により接続され、データの送受信が可能となっている。ユーザは、このコントローラ48に設けられたボタン等の操作部を操作することにより、ゲーム装置2へ信号を入力することができる。
The wireless
ネットワークインタフェース23は、インターネット又はLANなどの通信ネットワークNWに対してゲーム装置2を接続するものであり、他のゲーム装置2及びサーバ装置3との間で通信可能である。そして、ゲーム装置2を、通信ネットワークNWを介して他のゲーム装置2と接続し、互いにデータを送受信することにより、同一の仮想空間内で同期してゲームを進行させるマルチプレイが可能になっている。
The
[ゲーム装置の機能的構成]
図2は、ゲームシステム1が備えるゲーム装置2の機能的な構成を示すブロック図である。ゲーム装置2は、本発明のゲームプログラム30aを実行することで、仮想空間生成手段51、カメラ配置手段52、平面配置手段53、距離算出手段54、透明度決定手段55、及び描画手段56として機能する。なお、このような各機能は、ハード的には図1に示すCPU10,HDD14,ROM15,RAM16,グラフィック処理部19,オーディオ合成部20,無線通信制御部22等から構成されている。
[Functional configuration of game device]
FIG. 2 is a block diagram showing a functional configuration of the
このうち、仮想空間生成手段51は、所定の広がりを有する三次元の仮想空間を生成する。この仮想空間には、壁、建物、キャラクタなど様々なオブジェクトが配置される。カメラ配置手段52は、上述した左目用及び右目用の仮想二次元画像を夫々撮影するための一対の仮想カメラを仮想空間内に配置する。一対の仮想カメラCL,CRの前方所定位置には、投影面が設定されており、HMD40の左目用の表示部41aと右目用の表示部41bの夫々に、投影面に投影された仮想空間Sが表示される。
Among these, the virtual
平面配置手段53、距離算出手段54、透明度決定手段55、及び描画手段56は、仮想空間に描画対象要素としてのGUI要素を描画するためのGUI要素描画処理を実行する。後述するように、GUI要素描画処理では、平面配置手段53が、仮想カメラに対向する所定位置に平面要素を配置し、描画手段56が、当該平面要素上にGUI要素を描画する。
The
[平面要素及びGUI要素]
GUI要素描画処理の詳細について説明する前に、まず平面配置手段53により仮想空間内に配置される平面要素とその上に描画されるGUI要素について、図3及び図4を参照しながら説明する。
[Plane element and GUI element]
Before describing the details of the GUI element drawing process, first, the plane elements arranged in the virtual space by the
図3は、カメラ配置手段52により仮想空間Sに配置された一対の仮想カメラCL,CRの平面図である。これらの仮想カメラCL,CRは交差法(互いの視軸を交差させる方式)により配設される。なお、仮想カメラCL,CRの配置には平行法(互いの視軸を平行にする方式)を用いてもよい。
FIG. 3 is a plan view of a pair of virtual cameras CL and CR arranged in the virtual space S by the
本実施形態では、仮想空間S内に、コントローラ48の操作によりユーザが直接的にその動作を制御することのできるプレイヤキャラクタ(図示せず)が存在する。カメラ配置手段52は、当該プレイヤキャラクタの頭部の位置に一対の仮想カメラCL,CRを配置する。本実施形態では、一対の仮想カメラCL,CRは、プレイヤキャラクタの移動に応じて、即ち、コントローラ48に対するユーザの操作に応じて、仮想空間S内を移動する。なお、一対の仮想カメラCL,CRは、HMD40が装着されたユーザの頭部の動きに応じて、仮想空間S内を移動してもよい。
In the present embodiment, in the virtual space S, there is a player character (not shown) whose user can directly control the operation by the operation of the
図3に示すように、平面配置手段53は、仮想空間S内の一対の仮想カメラCL,CRに対向する所定の位置に平面要素61を配置する。平面要素61は、描画対象要素としてのGUI要素62(図4参照)を描画するためのものである。即ち、平面要素61自体は、ユーザに不可視なものであり、描画対象要素が描画される位置を示す要素である。平面要素61は、例えば透明な平面であってもよいし、例えば透明な板状のオブジェクトが有する平面であってもよい。
As shown in FIG. 3, the
平面要素61は、仮想カメラCL,CRの夫々の画角内に含まれるよう配置される。また、平面要素61は、その上に描画される描画対象要素に対してユーザが焦点を合わせやすいよう、仮想カメラCL,CRから一定の距離以上離れて配置される。例えば、仮想カメラCL,CRから平面要素61までの距離や仮想カメラCL,CRに対する平面要素61の向きは、当該平面要素61に描画される描画対象要素の種類やサイズに応じて設定される。
The
また、平面要素61は、仮想空間S内の配置した位置に固定される。即ち、コントローラ48の操作により仮想空間S内を仮想カメラCL,CRが移動する場合でも、平面要素は61の位置は維持される。なお、仮想カメラCL,CRが移動する場合に、平面要素61が仮想カメラCL,CRとの相対位置を維持するように仮想空間S内を移動してもよい。
Further, the
図4は、図3に示す一対の仮想カメラCL,CRのうちの1つの仮想カメラ(例えば仮想カメラCL)で撮影した仮想二次元画像の模式図である。図4に示すように、平面要素61上に、描画手段56によりGUI要素62が描画される。
FIG. 4 is a schematic view of a virtual two-dimensional image captured by one virtual camera (for example, the virtual camera CL) of the pair of virtual cameras CL and CR shown in FIG. As shown in FIG. 4, the
GUI要素62は、例えばコントローラ48に対するユーザの操作に応じて、仮想空間S内のキャラクタが使用するアイテムや装備を選択したり、キャラクタのステータスを確認したりするためのメニュー要素である。図4に示すGUI要素62は、複数の選択項目63と、これら選択項目63の中から1つの選択項目を選択するポインタ64を含む。ポインタ64は、平面要素61上をコントローラ48の操作に応じて移動する。なお、GUI要素62は、ポインタ64を含む代わりに、複数の選択項目63の中の1つが強調表示されてもよく、コントローラ48の操作に応じて強調表示される選択項目が変更されるように設定されてもよい。
The
[GUI要素描画処理]
次に、GUI要素62を描画するGUI要素描画処理について、図5〜図8を参照しながら説明する。なお、一対の仮想カメラCL,CRで撮影する画像の夫々について、同様のGUI要素描画処理が実行される。このため、以下の説明では、一対の仮想カメラCL,CRのうちの仮想カメラCLに関するGUI要素描画処理について説明し、仮想カメラCRに関するGUI要素描画処理についての説明は省略する。
[GUI element drawing process]
Next, GUI element drawing processing for drawing the
図5は、図3に示した位置とは別の位置にある仮想カメラCLの平面図を示す。また、図6は、図5に示す仮想カメラCLで撮影した仮想二次元画像の模式図を示す。図5及び図6に示すように、仮想カメラCLの前方には、仮想カメラCLから見て右方手前側から左方奥側へと延びる鉛直な壁オブジェクト65が配置されている。壁オブジェクト65は、仮想カメラCLから見て平面要素61より奥側に位置する。図6では、GUI要素62における壁オブジェクト65に近い部分は、透過率が高い。
FIG. 5 shows a plan view of the virtual camera CL at a position different from the position shown in FIG. 6 shows a schematic view of a virtual two-dimensional image taken by the virtual camera CL shown in FIG. As shown in FIGS. 5 and 6, a
図7は、GUI要素描画処理の流れを示すフローチャートである。GUI要素描画処理は、例えば、コントローラ48に対するユーザの操作によるGUI要素62の表示要求があった場合に開始される。
FIG. 7 is a flowchart showing the flow of GUI element drawing processing. The GUI element drawing process is started, for example, when there is a display request for the
GUI要素描画処理が開始されると、まず平面配置手段53が、仮想空間S内の仮想カメラCLに対向する所定の位置に平面要素61を配置する(ステップS1)。
When the GUI element drawing process is started, first, the
次に、距離算出手段54が、平面要素61を複数の部分領域に分割したときの各部分領域について、仮想空間Sに配置されたオブジェクトまでの距離を算出する(ステップS2)。本実施形態では、平面要素61を分割する単位を、仮想カメラCLで撮影する画像の画素に設定している。そして、距離算出手段54は、隠面消去方法として公知のZバッファ法により取得される各画素の深度値を用いて、平面要素61の部分領域とオブジェクトとの距離を算出する。
Next, the distance calculation means 54 calculates the distance to the object arranged in the virtual space S for each partial area when dividing the
距離算出手段54による距離算出方法について、より詳しく説明する。隠面消去した画像を生成するために、Zバッファ法では、画像の画素の色情報を格納するフレームバッファと共に、当該画素ごとに、視点である仮想カメラCLからその視軸に沿った奥行き情報である深度値を格納するZバッファがRAM16等に用意される。即ち、GUI要素描画処理が実行される前には、仮想カメラCLから見えるオブジェクトに関する深度値(第1の深度値Z1)が画素ごとにZバッファに格納されている。
The distance calculation method by the distance calculation means 54 will be described in more detail. In order to generate a hidden-surface-eliminated image, in the Z-buffer method, together with a frame buffer that stores color information of the pixels of the image, depth information from the virtual camera CL, which is a viewpoint, along its visual axis A Z buffer for storing a certain depth value is prepared in the
距離算出手段54では、GUI要素62を描画する前の第1の深度値Z1を利用する。具体的には、距離算出手段54は、画素単位で分割した平面要素61の各部分領域について、仮想カメラCLから当該部分領域を見た視線の先のオブジェクトの対応部位に関する第1の深度値Z1(言い換えれば、GUI要素描画処理実行前にZバッファに格納された深度値)と、当該視線の先の部分領域に関する第2の深度値Z2を取得する。そして、距離算出手段54は、平面要素61の各部分領域について、第1の深度値Z1から第2の深度値Z2を減算することにより、平面要素61の各部分領域からオブジェクトの対応部位までの距離を算出する。
The distance calculation means 54 uses the first depth value Z1 before drawing the
例えば図5には、仮想カメラCLから平面要素61の1つの部分領域を見た視線と壁オブジェクト65の対応部位との交点X1とその深度値Z1が示される。また、図5には、同視線と平面要素61の部分領域との交点X2とその深度値Z2が示される。距離算出手段54は、平面要素61のこの部分領域について、点X1の深度値Z1から点X2の深度値Z2を減算して、当該部分領域から壁オブジェクト65までの距離Z3を算出する。こうして、平面要素61の全ての部分領域について、壁オブジェクト65までの距離Z3が算出される。
For example, FIG. 5 shows an intersection point X1 of a line of sight when looking at one partial region of the
次に、透明度決定手段55が、算出した距離Z3が設定値Zsより小さい部分領域について、GUI要素62において当該部分領域に対応する部分要素の透明度αを、距離Z3が短いほど高くなるように決定する(ステップS3)。
Next, for the partial area where the calculated distance Z3 is smaller than the set value Zs, the transparency determination means 55 determines the transparency α of the partial element corresponding to the partial area in the
図8は、平面要素61の部分領域とオブジェクトとの距離Z3と、当該部分領域に対応するGUI要素62の部分要素の透明度αとの関係を示すグラフの一例である。部分要素の透明度αは、その値が「1」である場合に、当該部分要素が完全に透明になり、値が「0」である場合に、当該部分要素が完全に不透明になる。例えば透明度αは、仮想カメラCLから部分領域を見た視線の先のオブジェクトの対応部位の色と、当該視線の先の部分領域に描画されるGUI要素62の部分要素の色とをブレンドするブレンド率である。
FIG. 8 is an example of a graph showing the relationship between the distance Z3 between the partial area of the
図8に示すように、距離Z3の閾値として設定値Zsが設けられている。距離Z3が設定値Zsより小さい部分領域については、対応する部分要素の透明度αを、算出した距離Z3が短いほど高くなる。距離Z3が設定値Zsより大きい部分領域については、対応する部分要素の透明度αを一定値である「0」にする。 As shown in FIG. 8, a set value Zs is provided as a threshold of the distance Z3. For partial areas where the distance Z3 is smaller than the set value Zs, the transparency α of the corresponding partial element increases as the calculated distance Z3 decreases. For partial areas where the distance Z3 is larger than the set value Zs, the transparency α of the corresponding partial element is set to “0” which is a constant value.
このように、透明度決定手段55は、画像の画素単位であるGUI要素62の部分要素ごとに、その透明度αを決定する。
Thus, the
図7に戻って、GUI要素62の部分要素ごとに透明度αが決定されると、描画手段56は、決定した透明度αに応じて、各画素の色を更新して、GUI要素62を描画する(ステップS4)。
Returning to FIG. 7, when the transparency α is determined for each partial element of the
GUI要素62の描画が完了すると、GUI要素描画処理を終了する。GUI要素62が仮想カメラCLの画角内にある間は、毎フレーム、ステップS2〜S4を繰り返す。また、例えば、コントローラ48に対するユーザの操作によるGUI要素62の非表示要求があった場合には、平面要素61は仮想空間Sから削除され、GUI要素62が仮想カメラCLの画角内にある間実行されたステップS2〜S4の繰り返しも終了する。
When the drawing of the
以上に示したように、本実施形態に係るゲームシステム1では、GUI要素62におけるオブジェクトまでの距離Z3が設定値Zsより小さい部分について、オブジェクトに近い部分ほど透明度αを高めるため、GUI要素62の近くのオブジェクトの様子をユーザが把握しやすくなる。更に、平面要素61がオブジェクトと交差する位置に配置された場合でも、オブジェクトと交差する部分でGUI要素62が透明になる。このため、ユーザの視認性が向上する。
As described above, in the
また、本実施形態では、距離算出手段54が、隠面消去方法として公知のZバッファ法により取得される各画素の深度値を用いて、画素単位で分割した平面要素の部分領域とオブジェクトの対応部位との距離を算出するため、距離算出に伴う処理負荷を低減することができる。 Further, in the present embodiment, the distance calculation means 54 uses the depth value of each pixel obtained by the known Z buffer method as the hidden surface removal method, and corresponds the object to the partial area of the planar element divided in pixel units. Since the distance to the part is calculated, the processing load involved in the distance calculation can be reduced.
本発明は上述した実施形態に限定されるものではなく、本発明の要旨を逸脱しない範囲で種々の変形が可能である。 The present invention is not limited to the embodiments described above, and various modifications can be made without departing from the scope of the present invention.
例えば、上記実施形態で説明されたハードウェアの構成も一例にすぎず、視差を有する一対の仮想二次元画像を表示するHMD40を備えた構成であればよい。例えば、HMD40が有する加速度センサ42、ジャイロセンサ43及び光放出部44や光検出装置46などは、なくてもよい。
For example, the configuration of the hardware described in the above embodiment is only an example, and the configuration may be any configuration provided with the
上記実施形態では、コントローラ48に対するユーザの操作により平面要素61が配置されたが、例えば仮想カメラCの仮想空間S上での位置やゲームの進行状況などに応じて平面要素61が配置されてもよい。
In the above embodiment, the
また、上記実施形態では、距離算出手段54が、Zバッファ法の深度値を用いて、平面要素61の部分領域ごとにオブジェクトまでの距離を算出したが、当該距離の算出方法はこれに限定されない。例えば、距離算出手段54は、画素単位で分割した平面要素61の各部分領域について、仮想カメラからある部分領域を見た視線方向に沿った当該仮想カメラからオブジェクトまでの距離と、当該視線方向に沿った当該仮想カメラから当該部分領域までの距離を減算してもよい。あるいは、例えば、距離算出手段54は、平面要素を画素より大きな単位で分割した部分領域(例えば方形状の領域)について、各部分領域の中心点からオブジェクトまでの最短距離を、平面要素の部分領域とオブジェクトまでの距離として算出してもよい。
In the above embodiment, the
また、上記実施形態では、透明度決定手段55が、距離算出手段54で算出した距離Z3から、図8に示す関係に基づき、GUI要素62の部分要素の透明度αを決定したが、図8に示す関係は一例であり、本発明を制限するものではない。例えば、距離Z3が設定値Zsより大きい部分領域について、透明度αは「0」以外の一定値(例えば「0.3」など)であってもよいし、距離Z3が設定値Zs以下におけるグラフの傾きは一定でなくてもよい。また、透明度決定手段55が、GUI要素62の部分要素の透明度αを表す指標として、GUI要素62の部分要素の不透明度を決定してもよい。
Further, in the above embodiment, the
また、上記実施形態では、描画対象要素としてGUI要素を描画する処理について説明したが、本発明は、例えば平面要素上にキャラクタのセリフなどを表示する字幕やオブジェクトの説明のためのテキストを描画する処理にも適用可能である。 Further, although the process of drawing a GUI element as a drawing target element has been described in the above embodiment, the present invention, for example, draws a text for explaining captions or objects that display serifs of characters on a plane element. It is applicable also to processing.
51 :仮想空間生成手段
52 :カメラ配置手段
53 :平面配置手段
54 :距離算出手段
55 :透明度決定手段
56 :描画手段
61 :平面要素
62 :GUI要素
B :壁オブジェクト
C(CL,CR) :仮想カメラ
51: Virtual space generation means
52: Camera arrangement means
53: Flat arrangement means
54: Distance calculation means
55: Means of determining transparency
56: Drawing means
61: Plane element
62: GUI element
B: Wall object
C (CL, CR): virtual camera
Claims (4)
前記コンピュータを、
オブジェクトが配置された前記仮想空間を生成する仮想空間生成手段、
前記仮想空間に前記一対の仮想カメラを配置するカメラ配置手段、
前記仮想空間内の前記一対の仮想カメラに対向した所定の位置に、描画対象要素を描画するための平面要素を配置する平面配置手段、
前記平面要素を複数の部分領域に分割したときの各部分領域について、前記オブジェクトまでの距離を算出する距離算出手段、
前記距離が設定値より小さい前記部分領域については、前記描画対象要素において前記部分領域に対応する部分要素の透明度を、前記距離が短いほど高くなるように決定する透明度決定手段、及び、
決定した前記透明度に基づいて、前記平面要素上に前記描画対象要素を描画する描画手段、として機能させる、ゲームプログラム。 A game program to be executed by a computer including a head mounted display for displaying the virtual space photographed by a pair of virtual cameras as a pair of virtual two-dimensional images having parallax,
The computer,
Virtual space generation means for generating the virtual space in which objects are arranged;
Camera placement means for placing the pair of virtual cameras in the virtual space;
Planar arrangement means for arranging a planar element for drawing a drawing target element at a predetermined position facing the pair of virtual cameras in the virtual space;
Distance calculation means for calculating the distance to the object for each partial area when the plane element is divided into a plurality of partial areas;
A transparency determining unit configured to determine the transparency of the partial element corresponding to the partial area in the drawing target element to be higher as the distance is shorter, for the partial area whose distance is smaller than a set value;
A game program which functions as drawing means for drawing the drawing target element on the plane element based on the determined degree of transparency.
前記距離算出手段は、前記平面要素の各前記部分領域について、前記仮想カメラから当該部分領域を見た視線の先の前記オブジェクトの対応部位に関する第1の深度値から、当該部分領域に関する第2の深度値を減算することにより、各前記部分領域から前記オブジェクトの前記対応部位までの距離を算出する、請求項1に記載のゲームプログラム。 The partial area is obtained by dividing the planar element in units of pixels of each image captured by the pair of virtual cameras,
The distance calculating means is configured to calculate, for each of the partial areas of the planar element, a second depth value of the partial area from a first depth value of a corresponding part of the object beyond the line of sight when the partial area is viewed from the virtual camera. The game program according to claim 1, wherein a distance from each of the partial areas to the corresponding portion of the object is calculated by subtracting a depth value.
前記プログラム記憶部に記憶されたプログラムを実行するコンピュータとを備えた、ゲームシステム。 A program storage unit storing the game program according to any one of claims 1 to 3.
A game system comprising: a computer that executes a program stored in the program storage unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017139582A JP6530453B2 (en) | 2017-07-19 | 2017-07-19 | Game program and game system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017139582A JP6530453B2 (en) | 2017-07-19 | 2017-07-19 | Game program and game system |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2019017755A JP2019017755A (en) | 2019-02-07 |
JP6530453B2 true JP6530453B2 (en) | 2019-06-12 |
Family
ID=65354254
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017139582A Active JP6530453B2 (en) | 2017-07-19 | 2017-07-19 | Game program and game system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6530453B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6818092B2 (en) * | 2019-06-25 | 2021-01-20 | 株式会社コロプラ | Game programs, game methods, and information terminals |
JP7175529B1 (en) | 2021-07-21 | 2022-11-21 | 生也 近藤 | Display device and display method |
CN114003163B (en) * | 2021-10-27 | 2023-10-24 | 腾讯科技(深圳)有限公司 | Image processing method and device, storage medium and electronic equipment |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3372832B2 (en) * | 1997-07-25 | 2003-02-04 | コナミ株式会社 | GAME DEVICE, GAME IMAGE PROCESSING METHOD, AND COMPUTER-READABLE RECORDING MEDIUM CONTAINING GAME IMAGE PROCESSING PROGRAM |
JP3990648B2 (en) * | 2003-03-31 | 2007-10-17 | 株式会社バンダイナムコゲームス | Program, information storage medium, and image generation apparatus |
JP2012178060A (en) * | 2011-02-25 | 2012-09-13 | Namco Bandai Games Inc | Program, information storage medium and stereoscopic image generation device |
JP6034079B2 (en) * | 2012-07-12 | 2016-11-30 | 株式会社カプコン | Computer program and computer system |
-
2017
- 2017-07-19 JP JP2017139582A patent/JP6530453B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2019017755A (en) | 2019-02-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10229541B2 (en) | Methods and systems for navigation within virtual reality space using head mounted display | |
JP6484340B2 (en) | Method and system for user interaction in a virtual or augmented reality scene using a head mounted display | |
CN107636534A (en) | General sphere catching method | |
US20110306413A1 (en) | Entertainment device and entertainment methods | |
JPWO2016203792A1 (en) | Information processing apparatus, information processing method, and program | |
JP6126821B2 (en) | Image generation method, image display method, image generation program, image generation system, and image display apparatus | |
JP5675260B2 (en) | Image processing program, image processing apparatus, image processing system, and image processing method | |
US11865448B2 (en) | Information processing apparatus and user guide presentation method | |
JP2007042073A (en) | Video presentation system, video presentation method, program for causing computer to execute video presentation method and storage medium | |
JP6530453B2 (en) | Game program and game system | |
JP2014095808A (en) | Image creation method, image display method, image creation program, image creation system, and image display device | |
JP2012088777A (en) | Image processing program, image processing device, image processing system, and image processing method | |
US20140092133A1 (en) | Computer-readable medium, image processing device, image processing system, and image processing method | |
JP2024061769A (en) | Information processing device and warning presentation method | |
JP2002300611A (en) | Image generating device, program, and information recording medium | |
JP6634654B2 (en) | Information processing apparatus and warning presentation method | |
JP2019133207A (en) | Video generation apparatus, video generation method, and video generation program | |
US20200257112A1 (en) | Content generation apparatus and method | |
WO2022004422A1 (en) | Information processing device, information processing method, and recording medium | |
JP6603291B2 (en) | Game program and game system | |
JP6446072B2 (en) | Game program and game system | |
JP6499728B2 (en) | Game program and game system | |
JP6442619B2 (en) | Information processing device | |
WO2023242981A1 (en) | Head-mounted display, head-mounted display system, and display method for head-mounted display | |
JP6332658B1 (en) | Display control apparatus and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20190408 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20190423 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20190516 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6530453 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |