JP3934097B2 - Image processing apparatus, image processing method, and program - Google Patents

Image processing apparatus, image processing method, and program Download PDF

Info

Publication number
JP3934097B2
JP3934097B2 JP2003328457A JP2003328457A JP3934097B2 JP 3934097 B2 JP3934097 B2 JP 3934097B2 JP 2003328457 A JP2003328457 A JP 2003328457A JP 2003328457 A JP2003328457 A JP 2003328457A JP 3934097 B2 JP3934097 B2 JP 3934097B2
Authority
JP
Japan
Prior art keywords
particles
moving
data
recording
virtual space
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2003328457A
Other languages
Japanese (ja)
Other versions
JP2005092754A (en
Inventor
滋生 岡嶋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Konami Digital Entertainment Co Ltd
Original Assignee
Konami Digital Entertainment Co 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 Konami Digital Entertainment Co Ltd filed Critical Konami Digital Entertainment Co Ltd
Priority to JP2003328457A priority Critical patent/JP3934097B2/en
Publication of JP2005092754A publication Critical patent/JP2005092754A/en
Application granted granted Critical
Publication of JP3934097B2 publication Critical patent/JP3934097B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)
  • Image Generation (AREA)

Description

本発明は、パーティクルを用いて炎等、揺らぎを有するオブジェクトを生成する技術に関するものである。   The present invention relates to a technique for generating an object having fluctuation, such as a flame, using particles.

3次元仮想空間内で炎のオブジェクトを生成するための技術は従来から数多く提案されている。そのうちの代表的な手法として、パーティクルを用いるものがある。この手法では、炎を表現する領域中に複数のパーティクルを配置し、夫々のパーティクルに予め決められた式に従った挙動を与える。これによって各パーティクルは個々に不規則な移動を行う。そして各パーティクルの位置に、例えば中心部ほど明るい球体のオブジェクトを配置することで、全体として揺らぎを有する炎のオブジェクトを形成することができる。   Many techniques for generating flame objects in a three-dimensional virtual space have been proposed. One of them is a method using particles. In this method, a plurality of particles are arranged in a region expressing flame, and a behavior according to a predetermined formula is given to each particle. As a result, each particle individually moves irregularly. For example, by placing a spherical object that is brighter toward the center at each particle position, a flame object having fluctuations as a whole can be formed.

しかし上記従来技術では、各パーティクル間には何も存在しないので、パーティクルの数が少ないと、所々穴の空いた炎のオブジェクトとなり、その数によっては炎に見えないという問題がある。この問題に対処するためには当然パーティクルの数を増やせばよいのであるが、パーティクルの数を増やすと、各パーティクルの挙動を計算する計算コストや、各パーティクルの位置を管理するためのメモリ使用量といった処理コストが増大し、リアルタイムにゲーム画面のレンダリングが要求されるゲームに適用することは困難なものとなる。   However, in the above prior art, there is nothing between each particle, so if the number of particles is small, there will be a flame object with holes in some places, and depending on the number, there is a problem that it does not look like a flame. To deal with this problem, it is natural to increase the number of particles, but if the number of particles is increased, the calculation cost of calculating the behavior of each particle and the memory usage for managing the position of each particle Such processing costs increase, making it difficult to apply to a game that requires rendering of the game screen in real time.

本発明はこのような点を考慮して成されたものであり、炎のオブジェクトの生成処理に係る処理コストを軽減させることを目的とする。   The present invention has been made in consideration of such points, and an object thereof is to reduce the processing cost related to the process of generating a flame object.

また、本発明は、炎のオブジェクトに限らず、一般に煙や水など、揺らぎを有するオブジェクトの生成処理に係る処理コストについても軽減させることを目的とする。   Another object of the present invention is to reduce processing costs related to generation processing of an object having fluctuations, such as smoke and water, in addition to a flame object.

本発明の目的を達成するために、例えば本発明の画像処理装置は以下の構成を備える。   In order to achieve the object of the present invention, for example, an image processing apparatus of the present invention comprises the following arrangement.

即ち、3次元仮想空間に発生させる複数のパーティクルを用いて炎のオブジェクトを生成する画像処理装置であって、
前記3次元仮想空間におけるパーティクルの初期発生領域を設定する設定手段と、
前記初期発生領域内で発生するパーティクルの初期移動方向、及び初期移動速度を初期値データとして記録する初期値データ記録手段と、
前記3次元仮想空間内に予め設定された経路の一端に定期的若しくは不定期的に発生させた仮想の点を、当該経路の他端方向に移動させる第1の移動手段と、
所定の方向への加速度を示すデータ、及び前記初期値データに基づいて決まるパーティクルの移動方向を、前記経路上を移動している1以上の仮想の点と、当該パーティクルと、の位置関係に基づいて変更し、変更後の移動方向に当該パーティクルを移動させる第2の移動手段と、
前記第2の移動手段によって移動する前記パーティクルの各位置を示すデータを順次記録する位置記録手段と、
前記位置記録手段が記録しているデータが示す各位置間にポリゴンを配置することで、前記パーティクルの移動経路を帯状のオブジェクトとして生成する帯状オブジェクト生成手段とを備え、
前記初期値データ記録手段、前記第2の移動手段、前記位置記録手段、前記帯状オブジェクト生成手段による処理を、前記3次元仮想空間内に存在する複数のパーティクルの夫々について行うことで生成される複数の帯状のオブジェクトによって炎のオブジェクトを形成することを特徴とする。
That is, an image processing apparatus that generates a flame object using a plurality of particles generated in a three-dimensional virtual space,
Setting means for setting an initial generation region of particles in the three-dimensional virtual space;
Initial value data recording means for recording initial movement direction and initial movement speed of particles generated in the initial generation region as initial value data;
First moving means for moving a virtual point generated periodically or irregularly at one end of a path preset in the three-dimensional virtual space in the direction of the other end of the path;
The data indicating the acceleration in a predetermined direction and the moving direction of the particles determined based on the initial value data are based on the positional relationship between the one or more virtual points moving on the path and the particles. A second moving means for moving the particles in the changed moving direction ;
Position recording means for sequentially recording data indicating each position of the particles moved by the second moving means;
A belt-like object generating means for generating a moving path of the particles as a belt-like object by disposing polygons between the positions indicated by the data recorded by the position recording means;
A plurality of data generated by performing the processing by the initial value data recording means, the second moving means, the position recording means, and the belt-like object generating means for each of a plurality of particles existing in the three-dimensional virtual space. A flame object is formed by a band-shaped object.

本発明の目的を達成するために、例えば本発明の画像処理装置は以下の構成を備える。   In order to achieve the object of the present invention, for example, an image processing apparatus of the present invention comprises the following arrangement.

即ち、3次元仮想空間に発生させる複数のパーティクルを用いて揺らぎを有するオブジェクトを生成する画像処理装置であって、
前記3次元仮想空間におけるパーティクルの初期発生領域を設定する設定手段と、
前記初期発生領域内で発生するパーティクルの初期移動方向、及び初期移動速度を初期値データとして記録する初期値データ記録手段と、
前記3次元仮想空間内に予め設定された経路の一端に定期的若しくは不定期的に発生させた仮想の点を、当該経路の他端方向に移動させる第1の移動手段と、
所定の方向への加速度を示すデータ、及び前記初期値データに基づいて決まるパーティクルの移動方向を、前記経路上を移動している1以上の仮想の点と、当該パーティクルと、の位置関係に基づいて変更し、変更後の移動方向に当該パーティクルを移動させる第2の移動手段と、
前記第2の移動手段によって移動する前記パーティクルの各位置を示すデータを順次記録する位置記録手段と、
前記位置記録手段が記録しているデータが示す各位置間にポリゴンを配置することで、前記パーティクルの移動経路を帯状のオブジェクトとして生成する帯状オブジェクト生成手段とを備え、
前記初期値データ記録手段、前記第2の移動手段、前記位置記録手段、前記帯状オブジェクト生成手段による処理を、前記3次元仮想空間内に存在する複数のパーティクルの夫々について行うことで生成される複数の帯状のオブジェクトによって揺らぎを有するオブジェクトを形成することを特徴とする。
That is, an image processing apparatus that generates an object having fluctuation using a plurality of particles generated in a three-dimensional virtual space,
Setting means for setting an initial generation region of particles in the three-dimensional virtual space;
Initial value data recording means for recording initial movement direction and initial movement speed of particles generated in the initial generation region as initial value data;
First moving means for moving a virtual point generated periodically or irregularly at one end of a path preset in the three-dimensional virtual space in the direction of the other end of the path;
The data indicating the acceleration in a predetermined direction and the moving direction of the particles determined based on the initial value data are based on the positional relationship between the one or more virtual points moving on the path and the particles. A second moving means for moving the particles in the changed moving direction ;
Position recording means for sequentially recording data indicating each position of the particles moved by the second moving means;
A belt-like object generating means for generating a moving path of the particles as a belt-like object by disposing polygons between the positions indicated by the data recorded by the position recording means;
A plurality of data generated by performing the processing by the initial value data recording means, the second moving means, the position recording means, and the belt-like object generating means for each of a plurality of particles existing in the three-dimensional virtual space. An object having fluctuations is formed by the band-shaped object.

本発明の目的を達成するために、例えば本発明の画像処理方法は以下の構成を備える。   In order to achieve the object of the present invention, for example, an image processing method of the present invention comprises the following arrangement.

即ち、3次元仮想空間に発生させる複数のパーティクルを用いて炎のオブジェクトを生成する画像処理装置が行う画像処理方法であって、
前記3次元仮想空間における初期発生領域で発生するパーティクルの初期移動方向、及び初期移動速度を初期値データとして前記画像処理装置が有するメモリに記録する初期値データ記録工程と、
前記3次元仮想空間内における経路を規定するデータを前記メモリから読み出し、読み出した当該データ用いて、当該経路を前記3次元仮想空間内に設定する経路設定工程と、
前記経路設定工程で設定された経路の一端に定期的若しくは不定期的に発生させた仮想の点を、当該経路の他端方向に移動させる第1の移動工程と、
所定の方向への加速度を示すデータ、及び前記初期値データに基づいて決まるパーティクルの移動方向を、前記経路上を移動している1以上の仮想の点と、当該パーティクルと、の位置関係に基づいて変更し、変更後の移動方向に当該パーティクルを移動させる第2の移動工程と、
前記第2の移動工程で移動する前記パーティクルの各位置を示すデータを順次前記メモリに記録する位置記録工程と、
前記位置記録工程で記録したデータが示す各位置間にポリゴンを配置することで、前記パーティクルの移動経路を帯状のオブジェクトとして生成する帯状オブジェクト生成工程とを備え、
前記初期値データ記録工程、前記第2の移動工程、前記位置記録工程、前記帯状オブジェクト生成工程による処理を、前記3次元仮想空間内に存在する複数のパーティクルの夫々について行うことで生成される複数の帯状のオブジェクトによって炎のオブジェクトを形成することを特徴とする。
That is, an image processing method performed by an image processing apparatus that generates a flame object using a plurality of particles generated in a three-dimensional virtual space,
An initial value data recording step of recording the initial movement direction and initial movement speed of particles generated in the initial generation region in the three-dimensional virtual space in the memory of the image processing apparatus as initial value data;
A route setting step of reading data defining a route in the three-dimensional virtual space from the memory and using the read data to set the route in the three-dimensional virtual space;
A first movement step of moving a virtual point generated periodically or irregularly at one end of the route set in the route setting step toward the other end of the route;
The data indicating the acceleration in a predetermined direction and the moving direction of the particles determined based on the initial value data are based on the positional relationship between the one or more virtual points moving on the path and the particles. A second moving step of moving the particles in the changed moving direction ,
A position recording step of sequentially recording data indicating each position of the particles moving in the second moving step in the memory;
A belt-shaped object generating step of generating a moving path of the particles as a band-shaped object by arranging polygons between the positions indicated by the data recorded in the position recording step;
A plurality of data generated by performing the initial value data recording process, the second movement process, the position recording process, and the strip object generation process for each of a plurality of particles existing in the three-dimensional virtual space. A flame object is formed by a band-shaped object.

本発明の目的を達成するために、例えば本発明の画像処理方法は以下の構成を備える。   In order to achieve the object of the present invention, for example, an image processing method of the present invention comprises the following arrangement.

即ち、3次元仮想空間に発生させる複数のパーティクルを用いて揺らぎを有するオブジェクトを生成する画像処理装置が行う画像処理方法であって、
前記3次元仮想空間における初期発生領域内で発生するパーティクルの初期移動方向、及び初期移動速度を初期値データとして前記画像処理装置が有するメモリに記録する初期値データ記録工程と、
前記3次元仮想空間内における経路を規定するデータを前記メモリから読み出し、読み出した当該データ用いて、当該経路を前記3次元仮想空間内に設定する経路設定工程と、
前記経路設定工程で設定された経路の一端に定期的若しくは不定期的に発生させた仮想の点を、当該経路の他端方向に移動させる第1の移動工程と、
所定の方向への加速度を示すデータ、及び前記初期値データに基づいて決まるパーティクルの移動方向を、前記経路上を移動している1以上の仮想の点と、当該パーティクルと、の位置関係に基づいて変更し、変更後の移動方向に当該パーティクルを移動させる第2の移動工程と、
前記第2の移動工程で移動する前記パーティクルの各位置を示すデータを順次前記メモリに記録する位置記録工程と、
前記位置記録工程で記録したデータが示す各位置間にポリゴンを配置することで、前記パーティクルの移動経路を帯状のオブジェクトとして生成する帯状オブジェクト生成工程とを備え、
前記初期値データ記録工程、前記第2の移動工程、前記位置記録工程、前記帯状オブジェクト生成工程による処理を、前記3次元仮想空間内に存在する複数のパーティクルの夫々について行うことで生成される複数の帯状のオブジェクトによって揺らぎを有するオブジェクトを形成することを特徴とする。
That is, an image processing method performed by an image processing apparatus that generates an object having fluctuation using a plurality of particles generated in a three-dimensional virtual space,
An initial value data recording step of recording the initial movement direction and initial movement speed of particles generated in the initial generation region in the three-dimensional virtual space in the memory of the image processing apparatus as initial value data;
A route setting step of reading data defining a route in the three-dimensional virtual space from the memory and using the read data to set the route in the three-dimensional virtual space;
A first movement step of moving a virtual point generated periodically or irregularly at one end of the route set in the route setting step toward the other end of the route;
The data indicating the acceleration in a predetermined direction and the moving direction of the particles determined based on the initial value data are based on the positional relationship between the one or more virtual points moving on the path and the particles. A second moving step of moving the particles in the changed moving direction ,
A position recording step of sequentially recording data indicating each position of the particles moving in the second moving step in the memory;
A belt-shaped object generating step of generating a moving path of the particles as a band-shaped object by arranging polygons between the positions indicated by the data recorded in the position recording step;
A plurality of data generated by performing the initial value data recording process, the second movement process, the position recording process, and the strip object generation process for each of a plurality of particles existing in the three-dimensional virtual space. An object having fluctuations is formed by the band-shaped object.

本発明の構成によって、炎のオブジェクトの生成処理に係る処理コストを軽減させることができる。また、炎のオブジェクトに限らず、一般に煙や水など、揺らぎを有するオブジェクトの生成処理に係る処理コストについても軽減させることができる。   With the configuration of the present invention, it is possible to reduce the processing cost related to the flame object generation process. Further, not only the flame object but also the processing cost related to the generation processing of the object having fluctuations such as smoke and water can be reduced.

以下添付図面を参照して、本発明の好適な実施形態について詳細に説明する。   Preferred embodiments of the present invention will be described below in detail with reference to the accompanying drawings.

[第1の実施形態]
本実施形態では、「揺らぎ」を有するオブジェクトとして「炎を表現するオブジェクト(以下、炎のオブジェクト)」を生成する。以下、この「炎のオブジェクト」の生成処理についてより詳細に説明する。
[First Embodiment]
In the present embodiment, “an object expressing flame (hereinafter referred to as a flame object)” is generated as an object having “fluctuation”. Hereinafter, the generation process of the “flame object” will be described in more detail.

図1は本実施形態に係る「炎のオブジェクト」の生成処理を実行する画像処理装置として機能するコンピュータの基本構成を示すブロック図である。   FIG. 1 is a block diagram illustrating a basic configuration of a computer that functions as an image processing apparatus that executes a process of generating a “flame object” according to the present embodiment.

101はCPUで、RAM102やROM103に記憶されているプログラムやデータを用いて本装置全体の制御を行うと共に、本実施形態に係る上記「炎のオブジェクト」の生成処理を実行する。   Reference numeral 101 denotes a CPU that controls the entire apparatus using programs and data stored in the RAM 102 and the ROM 103, and executes the above-described “fire object” generation process according to the present embodiment.

102はRAMで、外部記憶装置107や記憶媒体ドライブ装置108からロードされたプログラムやデータを一時的に記憶するためのエリアを備えると共に、CPU101が各種の処理を実行するために用いるワークエリアを備える。   Reference numeral 102 denotes a RAM which has an area for temporarily storing programs and data loaded from the external storage device 107 and the storage medium drive device 108 and a work area used by the CPU 101 for executing various processes. .

103はROMで、ブートプログラムや本装置の設定に係るデータなどが格納されている。   Reference numeral 103 denotes a ROM which stores a boot program, data related to the setting of the apparatus, and the like.

104,105は夫々キーボード、マウスで、CPU101に各種の指示を入力するために使用されるものである。なお、CPU101に各種の指示を入力することができるデバイスとしてはこれ以外にも、例えばジョイスティックやゲームパッドなどの他のデバイスを用いることもできる。   Reference numerals 104 and 105 denote a keyboard and a mouse, which are used for inputting various instructions to the CPU 101. In addition, as a device that can input various instructions to the CPU 101, other devices such as a joystick and a game pad can be used.

106は表示部で、CRTや液晶画面などにより構成されており、CPU101による処理結果を画像や文字などの情報により表示することができる。   A display unit 106 includes a CRT, a liquid crystal screen, and the like, and can display processing results by the CPU 101 by information such as images and characters.

107は外部記憶装置で、ハードディスクドライブ装置などの大容量情報記憶装置として機能するものであり、ここにOS(オペレーティングシステム)や、CPU101に後述する本実施形態に係る上記「炎のオブジェクト」の生成処理を実行させるためのプログラムやデータ、以下説明する3次元モデルのデータ(3次元モデルがポリゴンにより表現されるものである場合には、3次元モデルを構成する各ポリゴンの各頂点座標位置、各ポリゴンの法線ベクトルを示すデータ、そしてこの3次元モデルにテクスチャをマッピングする場合には、このテクスチャのデータ等)等が保存されており、これらはCPU101による制御により、必要に応じてRAM102に読み出される。   Reference numeral 107 denotes an external storage device that functions as a large-capacity information storage device such as a hard disk drive device. The OS (operating system) and the CPU 101 generate the above “flame object” according to the present embodiment described later. Programs and data for executing processing, data of a three-dimensional model described below (when the three-dimensional model is expressed by polygons, each vertex coordinate position of each polygon constituting the three-dimensional model, each The data indicating the normal vector of the polygon, and the texture data, etc. when mapping the texture to this three-dimensional model are stored, and these are read out to the RAM 102 as needed under the control of the CPU 101. It is.

108は記憶媒体ドライブ装置で、CD−ROMやDVD−ROMなどの記憶媒体に記録されているプログラムやデータを読み出し、RAM102や外部記憶装置107に出力するものである。なおCPU101に後述する本実施形態に係る「炎のオブジェクト」の生成処理を実行させるためのプログラムやデータ、上記3次元モデルのデータをこの記憶媒体に記録させておいても良く、その場合には、これらプログラムやデータは、CPU101による制御の下、記憶媒体ドライブ装置108によって記憶媒体から読み出され、RAM102に出力される。また、記憶媒体がCD−RやDVD−RAMなどの書き込み可能なものである場合には、記憶媒体ドライブ装置108はCPU101の制御により、この記憶媒体にプログラムやデータを書き込む処理を行う。   Reference numeral 108 denotes a storage medium drive device that reads out programs and data recorded on a storage medium such as a CD-ROM or DVD-ROM and outputs them to the RAM 102 or the external storage device 107. Note that a program or data for causing the CPU 101 to execute a “flame object” generation process according to the present embodiment, which will be described later, or the data of the three-dimensional model may be recorded in this storage medium. These programs and data are read from the storage medium by the storage medium drive device 108 under the control of the CPU 101 and output to the RAM 102. If the storage medium is a writable medium such as a CD-R or a DVD-RAM, the storage medium drive device 108 performs a process of writing a program and data to the storage medium under the control of the CPU 101.

109は上記各部を繋ぐバスである。   Reference numeral 109 denotes a bus connecting the above-described units.

次に、以上の構成を備えるコンピュータが行う、本実施形態に係る「炎のオブジェクト」の生成処理について説明する。   Next, a “flame object” generation process according to this embodiment, which is performed by a computer having the above-described configuration, will be described.

図2は、炎のオブジェクトを生成するために用いるパーティクルの初期発生領域を説明するための図である。同図において201は「ろうそく」の3次元モデル、202はこのろうそく上に炎のオブジェクトを生成、配置するために、パーティクルを発生させるための初期位置が取りうる許容領域を示す。   FIG. 2 is a diagram for explaining an initial generation region of particles used for generating a flame object. In the figure, reference numeral 201 denotes a three-dimensional model of “candle”, and 202 denotes an allowable area that an initial position for generating particles can take in order to generate and arrange a flame object on the candle.

3次元モデル201は3次元仮想空間中に3次元形状を有するモデルであり、例えば、複数のポリゴンによりその形状が表現され、必要に応じてその表面上(ポリゴン上)にはテクスチャ画像がマッピングされている。このような3次元モデルの表現方法については周知の技術であるので、これ以上の説明は省略する。   The three-dimensional model 201 is a model having a three-dimensional shape in a three-dimensional virtual space. For example, the shape is represented by a plurality of polygons, and a texture image is mapped on the surface (on the polygon) as necessary. ing. Since such a three-dimensional model representation method is a well-known technique, further explanation is omitted.

202はパーティクルを発生させるための領域を示し、パーティクルはこの領域202内のランダムに決められた位置で発生する。この初期発生領域202の設定方法としては、例えばこの領域202の中心位置を3次元モデル201上に設定すると共に、この中心位置からの最大半径を設定する。この場合、パーティクルの発生方法は、この中心位置からランダムに方向、半径(0より大きく、且つ上記最大半径以下となるような半径)を決め、上記中心位置から決めた方向に決めた半径分だけ進んだ位置にパーティクルを発生させればよい。   Reference numeral 202 denotes an area for generating particles, and the particles are generated at randomly determined positions in the area 202. As a method for setting the initial generation area 202, for example, the center position of the area 202 is set on the three-dimensional model 201, and the maximum radius from the center position is set. In this case, the particle generation method is to determine a direction and a radius (a radius that is larger than 0 and equal to or less than the maximum radius) from the center position, and only the radius determined in the direction determined from the center position. Particles can be generated at advanced positions.

なお、本実施形態ではろうそく上に炎が存在するという設定で、このパーティクルの初期発生領域をろうそくの3次元モデル上に設けたのであるが、この領域を3次元仮想空間中の何れの位置に設けても、本実施形態に係る炎のオブジェクトの生成処理が適用可能であるということは、以下の説明から明らかとなるであろう。   In this embodiment, the initial generation region of the particle is provided on the three-dimensional model of the candle with the setting that the flame is present on the candle. However, this region is located at any position in the three-dimensional virtual space. It will be apparent from the following description that even if provided, the flame object generation processing according to the present embodiment is applicable.

次に、この初期発生領域内に発生させたパーティクルに与える挙動について説明する。図3は、図2に示した初期発生領域201内で発生させたパーティクルに挙動を与えるために、パーティクルに対して設定する内容を説明する図である。尚同図において、図2と同じ部分には同じ番号を付けており、その説明は省略する。また、初期発生領域内には複数のパーティクルを発生させるのであるが、以下ではそのうちの1つを例に取り説明する。この説明はその他の複数のパーティクルについても同様に適用可能である。   Next, the behavior given to the particles generated in the initial generation region will be described. FIG. 3 is a diagram for explaining the contents set for the particles in order to give behavior to the particles generated in the initial generation region 201 shown in FIG. In the figure, the same parts as those in FIG. 2 are denoted by the same reference numerals, and the description thereof is omitted. In addition, a plurality of particles are generated in the initial generation region, and one of them will be described below as an example. This description can be similarly applied to a plurality of other particles.

同図において301はパーティクルを示す、パーティクル301を初期発生領域内で発生させると、このパーティクル301には、初期移動方向、初期移動速度を設定する。また、パーティクルを発生させるということは、このパーティクルの初期位置を与えることをも含む。   In the figure, reference numeral 301 denotes a particle. When the particle 301 is generated in the initial generation region, an initial moving direction and an initial moving speed are set for the particle 301. In addition, generating a particle includes giving an initial position of the particle.

この初期移動方向、初期移動速度を、本実施形態では、速度ベクトル(同図ではV)でもって表現する。同図の通り、この速度ベクトルVを構成する要素はvx、vy、vzの3つであり、これら3つの要素は3次元仮想空間中の座標系に従ったものである。よって、パーティクルの3次元仮想空間における移動方向は、この3つの要素によって表現することができる。   In this embodiment, the initial moving direction and the initial moving speed are expressed by a speed vector (V in the figure). As shown in the figure, there are three elements constituting the velocity vector V, vx, vy, and vz, and these three elements follow the coordinate system in the three-dimensional virtual space. Therefore, the moving direction of the particles in the three-dimensional virtual space can be expressed by these three elements.

従って、現在のパーティクルの位置をX(X=[x y z])とすると、
X=X+V
即ち、
x=x+vx
y=y+vy
z=z+vz
を計算することで、このパーティクル301は設定した速度ベクトル方向に、このベクトルの大きさだけ移動することになる。
Therefore, if the current particle position is X (X = [x y z] T ),
X = X + V
That is,
x = x + vx
y = y + vy
z = z + vz
This particle 301 moves in the set velocity vector direction by the magnitude of this vector.

従って、初期発生領域内でパーティクルを発生させると、先ず発生させたパーティクルに対して、速度ベクトルを設定する。速度ベクトルの設定とは、速度ベクトルを構成する上記3つの要素を決定することであるが、この速度ベクトルの要素、vx、vy、vzは夫々ある範囲内でランダムに決まった数値とする。しかし、この決定方法は特に限定されるものではない。   Therefore, when particles are generated in the initial generation region, first, a velocity vector is set for the generated particles. The setting of the velocity vector is to determine the above three elements constituting the velocity vector, and the elements of the velocity vector, vx, vy, and vz are values determined at random within a certain range. However, this determination method is not particularly limited.

このようにパーティクルを発生させるたびに、このパーティクルについて速度ベクトルが設定されるのであるが、設定された速度ベクトルのデータは順次RAM102に記録されていく。これによりRAM102には現在発生しているパーティクルの速度ベクトルのデータが記録されていることになり、現在発生しているパーティクルの速度ベクトルを管理することができる。   Each time a particle is generated in this way, a velocity vector is set for the particle, but the set velocity vector data is sequentially recorded in the RAM 102. As a result, the velocity vector data of the currently generated particles is recorded in the RAM 102, and the currently generated particle velocity vectors can be managed.

なお、パーティクルを発生させた場合には上記速度ベクトルと共に、生存寿命を示すデータも生成されるのであるが、これについて詳しくは後述する。   When particles are generated, data indicating the life span is generated along with the velocity vector, which will be described in detail later.

一方、3次元仮想空間中で炎の上がる方向、即ち、ろうそくに対して上向きの加速度を示すデータが予め作成されて外部記憶装置107もしくは記憶媒体に記録されており、外部記憶装置107から、もしくは記憶媒体ドライブ装置108によって記憶媒体からRAM102にロードされている。   On the other hand, data indicating the direction in which the flame rises in the three-dimensional virtual space, that is, the upward acceleration with respect to the candle, is created in advance and recorded in the external storage device 107 or the storage medium. It is loaded from the storage medium into the RAM 102 by the storage medium drive device 108.

即ち、上記の式であるX=X+Vに従った計算を繰り返すと、各パーティクルの各々の位置は初期発生領域から遠ざかる一方の動きとなってしまう。   That is, when the calculation according to the above formula X = X + V is repeated, the position of each particle becomes one movement away from the initial generation region.

そこで、このように、3次元仮想空間中で炎の上がる方向、即ち、ろうそくに対して上向きの加速度を設け、この加速度をa(a=[ax ay az])としたときに、
V=V+a
即ち、
vx=vx+ax
vy=vy+ay
vz=vz+az
を計算し、計算後のVを用いてX=X+Vを計算すれば、パーティクルの動きは、初めは各々に設定された初期移動方向に移動するものの、徐々に炎の上がる方向、即ち、ろうそくに対して上向きの方向に移動することになる。
Thus, in this way, in the three-dimensional virtual space, when the acceleration direction of the flame, that is, the upward acceleration with respect to the candle is provided and this acceleration is a (a = [ax ay az] T ),
V = V + a
That is,
vx = vx + ax
vy = vy + ay
vz = vz + az
If X = X + V is calculated using the calculated V, the particle movement initially moves in the initial movement direction set for each, but gradually moves up to the flame, that is, in the candle. On the other hand, it moves in the upward direction.

まとめれば、このようにパーティクルを移動させるためには、V=V+aを計算し、次に、更新後のVを用いてX=X+Vを計算すれば良いことになる。   In summary, in order to move the particles in this way, V = V + a is calculated, and then X = X + V is calculated using the updated V.

しかし、以上の計算だけでは夫々のパーティクルは最終的には共に平行に、且つろうそくに対して上向きの方向に移動するだけで、夫々の挙動には炎独特の「揺らぎ」は見られない。従って次に、発生させた各パーティクルに「揺らぎ」の挙動を与える処理について説明する。   However, with the above calculations alone, the respective particles eventually move in parallel and upward in the direction of the candle, and there is no “fluctuation” unique to the flame in their behavior. Therefore, a process for giving a “fluctuation” behavior to each generated particle will be described next.

図4は、発生させた各パーティクルに対して「揺らぎ」の挙動を与えるための仕組みを示す図である。同図において図2と同じ部分については同じ番号を付けており、その説明は省略する。   FIG. 4 is a diagram showing a mechanism for giving a “fluctuation” behavior to each generated particle. In the figure, the same parts as those in FIG. 2 are denoted by the same reference numerals, and the description thereof is omitted.

同図において401は3次元モデル201の上面(同図において斜線部分)から螺旋状に上向きの方向に延長する経路で、402a、402b、402cは夫々、この経路401上を同図矢印方向に移動して上向きに上昇する重力点である。なお、この経路401,重力点402a、402b、402cは夫々以下説明する処理のために計算上設けたものであって、表示されるものではない。また、重力点の数は同図では3つとしているが、以下の説明の本質がこの数に限定されたものではないことは、以下の説明より明らかとなるであろう。   In the figure, 401 is a path extending in a spiral upward direction from the upper surface (shaded portion in the figure) of the three-dimensional model 201, and 402a, 402b, and 402c move on the path 401 in the direction of the arrow in the figure. It is a gravity point that rises upward. The path 401 and the gravity points 402a, 402b, and 402c are provided for calculation for the processing described below, and are not displayed. Although the number of gravity points is three in the figure, it will be clear from the following description that the essence of the following description is not limited to this number.

重力点(402a、402b、402c)は夫々順次定期的もしくは不定期的に3次元モデル201の上面における経路401の一端(同図では403で示している位置)に発生し、上述の通り、経路401上を同図矢印方向に移動する。例えば同図の場合、先に重力点402cが発生し、経路401上を同図矢印方向に移動する。そして所定の時間の経過後、次に重力点402bが発生し、同様に経路401上を同図矢印方向に移動する。そして更に所定の時間の経過後、次に重力点402aが発生し、同様に経路401上を同図矢印方向に移動する。夫々の重力点の移動速度は同じでも良いし、異なっていても良い。なお、この経路401の長さは有限である故に、経路401上を移動する重力点が経路401の他端(同図では404で示している位置)に来た場合には、この重力点を消去する。そしてまた、次に重力点を一端403の位置に発生させる処理を繰り返す。   Gravity points (402a, 402b, 402c) are generated at one end of the path 401 (position indicated by 403 in the figure) on the upper surface of the three-dimensional model 201 periodically or irregularly in sequence, as described above. 401 is moved in the direction of the arrow in FIG. For example, in the case of the figure, the gravity point 402c occurs first and moves on the path 401 in the direction of the arrow in the figure. Then, after elapse of a predetermined time, a gravity point 402b is generated next, and similarly moves on the path 401 in the direction of the arrow. Further, after a predetermined time has passed, a gravity point 402a is generated next, and similarly, moves on the path 401 in the direction of the arrow. The moving speed of each gravity point may be the same or different. Since the length of the path 401 is finite, when the gravity point moving on the path 401 comes to the other end of the path 401 (position indicated by 404 in the figure), the gravity point is to erase. Then, the process of generating a gravity point at the position of one end 403 is repeated.

以上の、経路401を示すデータ(例えば自由曲線により経路401を生成するためには各制御点の座標位置のデータ)は予め生成されており、必要に応じてRAM102にロードされるものである。また、各重力点の発生、移動処理についてはCPU101が行うものとする。   The above data indicating the path 401 (for example, data on the coordinate position of each control point in order to generate the path 401 using a free curve) is generated in advance and is loaded into the RAM 102 as necessary. Further, the generation and movement processing of each gravity point is performed by the CPU 101.

次に上記各重力点を用いてパーティクルの移動方向を制御し、その移動に「揺らぎ」を与えるための処理について説明する。   Next, a process for controlling the movement direction of the particles using each gravity point and giving “fluctuation” to the movement will be described.

図5は、2つの重力点402a、402bによってパーティクルの移動方向を制御する処理を説明する為の図である。同図において図4と同じ部分については同じ番号を付けており、その説明は省略する。   FIG. 5 is a diagram for explaining processing for controlling the moving direction of the particles by the two gravity points 402a and 402b. In the figure, the same parts as those in FIG. 4 are denoted by the same reference numerals, and the description thereof is omitted.

同図において501はパーティクルで、402a、402bは夫々上記重力点である。先ず、パーティクル501と重力点402aとの距離r1を求める。そして以下の式
F1=k/(r1×r1)
を計算することでF1の値を求める。ここでkについては説明を簡単にするためにk=1とする。そして、パーティクル501の位置から重力点402aの位置に向かうベクトルをg1(重力点402aの位置Yからパーティクル501の位置Xを引いた結果得られるベクトル)を求め、求めたベクトルg1を用いて
f1=F1×g1/|g1|
を計算し、ベクトルf1を得る。ここで|g1|はベクトルg1の大きさを示す。即ち、このベクトルf1は、重力点402aが存在するが故に、パーティクル501が重力点402aに対して引かれる力のベクトルを表す。
In the figure, reference numeral 501 denotes particles, and 402a and 402b denote gravity points. First, a distance r1 between the particle 501 and the gravity point 402a is obtained. And the following formula F1 = k / (r1 × r1)
To calculate the value of F1. Here, k = 1 is set to k = 1 to simplify the description. Then, g1 (vector obtained as a result of subtracting the position X of the particle 501 from the position Y of the gravity point 402a) from the position of the particle 501 to the position of the gravity point 402a is obtained, and using the obtained vector g1, f1 = F1 × g1 / | g1 |
To obtain a vector f1. Here, | g1 | indicates the magnitude of the vector g1. That is, the vector f1 represents a force vector that the particle 501 is attracted to the gravity point 402a because the gravity point 402a exists.

同様にして、今度はパーティクル501と重力点402bとの距離r2を求める。そして以下の式
F2=k/(r2×r2)
を計算することでF2の値を求める。そして、パーティクル501の位置から重力点402bの位置に向かうベクトルをg2(重力点402bの位置Zからパーティクル501の位置Xを引いた結果得られるベクトル)を求め、求めたベクトルg2を用いて
f2=F2×g2/|g2|
を計算し、ベクトルf2を得る。ここで|g2|はベクトルg2の大きさを示す。即ち、このベクトルf2は、重力点402bが存在するが故に、パーティクル501が重力点402bに対して引かれる力のベクトルを表す。
Similarly, the distance r2 between the particle 501 and the gravity point 402b is obtained this time. And the following formula F2 = k / (r2 × r2)
To calculate the value of F2. Then, a vector g2 (a vector obtained as a result of subtracting the position X of the particle 501 from the position Z of the gravity point 402b) from the position of the particle 501 to the position of the gravity point 402b is obtained, and using the obtained vector g2, f2 = F2 × g2 / | g2 |
To obtain a vector f2. Here, | g2 | indicates the magnitude of the vector g2. That is, the vector f2 represents a force vector that the particle 501 is attracted to the gravity point 402b because the gravity point 402b exists.

このように、重力点の存在に起因してパーティクル501に作用する力(同図ではf1,f2)のベクトルを求める処理は、パーティクル501の位置の近傍にある重力点について全て行うものとするが、経路401上に存在する重力点のうち、それに対して引かれる力を計算するのかは特に限定するものではない。   As described above, the processing for obtaining the vector of the force (f1, f2 in the figure) acting on the particle 501 due to the presence of the gravity point is performed for all gravity points in the vicinity of the position of the particle 501. Of the gravity points existing on the path 401, there is no particular limitation as to whether the force drawn against the gravity point is calculated.

次に、同図では力のベクトルf1,f2が求まったので、これらのベクトルを合成し、合成結果のベクトルをf3で表す。従って同図では重力点402a、402bの存在によりパーティクル501に作用する力のベクトルをf3として求めることができる。   Next, since force vectors f1 and f2 are obtained in the same figure, these vectors are combined, and the resultant vector is represented by f3. Therefore, in the figure, the force vector acting on the particle 501 due to the presence of the gravity points 402a and 402b can be obtained as f3.

そしてこの力のベクトルf3によりパーティクル501の移動方向を制御するのであるが、より具体的にはパーティクル501に対する加速度方向を制御する。そこで、上記加速度aの代わりに、(a+f3)を用いれば良い。即ち、V=V+(a+f3)を計算し、次に、更新後のVを用いてX=X+Vを計算すれば良い。   The direction of movement of the particle 501 is controlled by the force vector f3. More specifically, the direction of acceleration relative to the particle 501 is controlled. Therefore, (a + f3) may be used instead of the acceleration a. That is, V = V + (a + f3) is calculated, and then X = X + V is calculated using the updated V.

このように、複数の重力点を発生させ、夫々を移動させることで、既に発生しているパーティクルとの距離が動的に変化するので、パーティクルに対して加わる力のベクトルの方向や大きさも動的に変化することになり、これによりパーティクルの挙動に揺らぎを与えることができる。   In this way, by generating a plurality of gravity points and moving each of them, the distance from the particle already generated changes dynamically, so the direction and magnitude of the force vector applied to the particle also changes. As a result, the behavior of the particles can be fluctuated.

図6は以上の処理によって各パーティクルに与える挙動を説明する図である。上述の通り、同図に示したパーティクル601乃至604は夫々、重力点402a、402b、402c、402d、402eの何れかからの距離に応じて上記ベクトルf3の方向が変わるので、夫々のパーティクルは夫々異なる方向に移動している。   FIG. 6 is a diagram for explaining the behavior given to each particle by the above processing. As described above, the particles 601 to 604 shown in the figure each change the direction of the vector f3 according to the distance from any one of the gravity points 402a, 402b, 402c, 402d, and 402e. Moving in different directions.

以上の処理によって各パーティクルは、初めは各々に設定された初期移動方向に移動するものの、徐々に炎の上がる方向、即ち、ろうそくに対して上向きの方向に移動し、更にその移動過程において1つ以上の重力点の存在による影響によってその移動方向に揺らぎを与えることができる。   By the above processing, each particle initially moves in the initial moving direction set for each particle, but gradually moves in the flame rising direction, that is, in the upward direction with respect to the candle. The movement direction can be fluctuated by the influence of the existence of the gravity point.

次に、このような挙動を示すパーティクルを用いて、炎のオブジェクトを生成する処理について説明する。本実施形態では炎のオブジェクトを、複数の帯状のオブジェクトによって表現する。そして夫々の帯状のオブジェクトは1つのパーティクルの移動の軌跡に基づいて生成されるものである。以下の説明では、複数の帯状のオブジェクトのうちの1つの帯状のオブジェクトを例に取り、この帯状のオブジェクトを生成する処理について説明する。   Next, a process for generating a flame object using particles exhibiting such behavior will be described. In the present embodiment, the flame object is represented by a plurality of band-like objects. Each band-like object is generated based on the movement trajectory of one particle. In the following description, one band-shaped object among a plurality of band-shaped objects will be taken as an example, and processing for generating this band-shaped object will be described.

CPU101は、パーティクルの位置を上記処理によって移動させる毎に、移動した位置をRAM102にデータとして記録する。図7はあるパーティクル(注目パーティクル)の移動の軌跡を示す図である。同図において701が注目パーティクルの移動の軌跡を示すものであり、702乃至707の各点は上記注目パーティクルを上記式に従って移動させた各位置を示すものである。   The CPU 101 records the moved position as data in the RAM 102 every time the particle position is moved by the above processing. FIG. 7 is a diagram showing a movement locus of a certain particle (target particle). In the figure, reference numeral 701 indicates the locus of movement of the target particle, and points 702 to 707 indicate positions where the target particle has been moved according to the above equation.

上述の通り、パーティクルを発生させる際には速度ベクトルと共に、生存寿命を示すデータも生成される。この生存寿命とは、パーティクルが3次元仮想空間中に存在する時間を示すものである。CPU101はパーティクルを発生させると、不図示の内部タイマを用いて計時を始める。パーティクルを複数発生させる場合には夫々について発生後経過する時間を計時する。そしてパーティクルの発生後計時示された時間が、このパーティクルに設定された生存寿命に達した場合には、このパーティクルを3次元仮想空間から消去し、このパーティクルに係るデータを用いて以下説明する帯状のオブジェクトを生成する処理を行った後に、このパーティクルに係るデータを破棄する。   As described above, when the particles are generated, data indicating the life span is generated together with the velocity vector. The lifespan indicates the time during which particles exist in the three-dimensional virtual space. When the CPU 101 generates particles, it starts timing using an internal timer (not shown). When a plurality of particles are generated, the time elapsed after the generation of each particle is counted. When the time measured after the generation of the particle reaches the life span set for the particle, the particle is deleted from the three-dimensional virtual space, and the band-like pattern described below using the data related to the particle is used. After the processing for generating the object is performed, the data relating to the particles is discarded.

従ってパーティクルの移動した軌跡の長さは当然有限となるので、パーティクルが移動した各位置を示すデータも有限の個数となる。図7の例では注目パーティクルは702乃至707で示す6カ所の位置を順次移動しているので、注目パーティクルについては、702乃至707で示す6カ所の位置のデータが順次RAM102に記憶されることになる。   Accordingly, since the length of the locus of movement of the particles is naturally finite, the data indicating each position where the particles have moved is also a finite number. In the example of FIG. 7, since the target particle is sequentially moved at the six positions indicated by 702 to 707, the data of the six positions indicated by 702 to 707 are sequentially stored in the RAM 102 for the target particle. Become.

図8は、RAM102に記憶された、注目パーティクルが移動した各位置のデータを管理するテーブルを示す図である。同図では、注目パーティクルはN箇所の位置を移動しており、夫々の位置(3次元仮想空間中の位置であるので、x、y、zの3つの座標値でもって表現している)が順次このテーブルに登録される。   FIG. 8 is a diagram illustrating a table for managing data at each position where the target particle has moved, which is stored in the RAM 102. In the figure, the target particle has moved at N positions, and each position (which is a position in the three-dimensional virtual space, is represented by three coordinate values of x, y, and z). It is sequentially registered in this table.

次に、このテーブルを用いて、帯状のオブジェクトを生成する処理について説明する。本実施形態に係る炎のオブジェクト生成処理によって生成される炎のオブジェクトは当然、3次元仮想空間中に設けられた視点の位置から見るものである。よってこの炎のオブジェクトを構成する帯状のオブジェクトも当然この視点から見えるように、帯の面の部分が視点側に向いていなくてはいけない。以下ではそのような帯状のオブジェクトの生成について説明する。   Next, processing for generating a strip-like object using this table will be described. Naturally, the flame object generated by the flame object generation process according to the present embodiment is viewed from the position of the viewpoint provided in the three-dimensional virtual space. Therefore, the surface of the band must face the viewpoint side so that the band-shaped object composing the flame object can also be seen from this viewpoint. Hereinafter, generation of such a band-like object will be described.

図9は本実施形態に係る帯状のオブジェクトを生成する処理を説明するための図である。本実施形態に係る帯状のオブジェクトは、パーティクルが移動した各位置間にポリゴン(以下、帯ポリゴン)を配置することで、パーティクルの移動経路を帯状のオブジェクトで表現するというものである。   FIG. 9 is a diagram for explaining processing for generating a strip-shaped object according to the present embodiment. In the band-shaped object according to the present embodiment, polygons (hereinafter referred to as band polygons) are arranged between the positions where the particles have moved, so that the movement path of the particles is expressed by a band-shaped object.

同図では、パーティクルが移動した位置Pn−1と位置Pとの間にポリゴンを配置する処理を説明している。位置Pn−1、位置P夫々の座標位置のデータは上述の通り、RAM102に記憶されているものであるのでこれらのデータを用いて、位置Pn−1から位置Pに向かうベクトルvを求めることができる。 In the figure, a process of arranging a polygon between the position P n−1 and the position P n where the particle has moved is described. Since the data of the coordinate positions of the position P n-1 and the position P n are stored in the RAM 102 as described above, the vector v from the position P n -1 to the position P n is used using these data. n can be obtained.

ここで901は視点を表しており、視点901の視線方向ベクトル(同図ではvで表している)は操作者がキーボード104やマウス105,もしくはその他のデバイスを用いて操作しうるものであるので、CPU101が管理している。管理している視点901の視線方向ベクトルのデータはRAM102に記憶されている。 Here 901 represents the viewpoint, (in the figure is indicated by v e) line-of-sight direction vector of the viewpoint 901 are those operator can operate using the keyboard 104 or the mouse 105 or other device, Therefore, the CPU 101 manages it. Data of the line-of-sight vector of the viewpoint 901 being managed is stored in the RAM 102.

従ってこの視線方向ベクトルvと上記ベクトルvとの外積を計算し、その結果を外積結果のベクトルのサイズで正規化したベクトルvを求める。より具体的には以下の式に従ってベクトルvを求める。 Therefore to calculate the cross product between the viewing direction vector v e and the vector v n, determine the normalized vector v m in size resulting vector cross product results. More specifically determine the vector v m according to the following formula.

=v×v/|v×v
なお、正規化処理は以下の処理を簡単にする目的で行ったものであり必須なものではない。この式に従って求めたベクトルvは帯ポリゴンの幅方向に向かう大きさ1のベクトルである。求めたこのベクトルvのデータはRAM102に記憶される。
v m = v e × v n / | v e × v n |
The normalization process is performed for the purpose of simplifying the following process and is not essential. Vector v m that was determined according to this formula is the vector of size 1 toward the width direction of the band polygon. Data of this vector v m obtained are stored in the RAM 102.

次に、このベクトルvと上記ベクトルvとの外積を計算し、その結果を外積結果のベクトルのサイズで正規化したベクトルvを求める。より具体的には以下の式に従ってベクトルvを求める。 Next, the cross product of the vector v m and the vector v n is calculated, and a vector v l obtained by normalizing the result with the vector size of the cross product is obtained. More specifically, the vector v l is obtained according to the following equation.

=v×v/|v×v
なお、正規化処理は以下の処理を簡単にする目的で行ったものであり必須なものではない。この式に従って求めたベクトルvは帯ポリゴンの法線方向に向かう大きさ1のベクトルである。求めたこのベクトルvのデータはRAM102に記憶される。
v l = v m × v n / | v m × v n |
The normalization process is performed for the purpose of simplifying the following process and is not essential. The vector v l obtained according to this equation is a vector of size 1 that goes in the normal direction of the belt polygon. The obtained data of the vector v l is stored in the RAM 102.

そして一辺が大きさ1の正方形のポリゴンを周知の方法でRAM102内に生成し、このポリゴンを一辺の方向にベクトルvのサイズ分だけスケーリングし、この一辺に垂直な他辺の方向に予め決めておいた帯状のオブジェクトの幅分だけスケーリングした結果、帯ポリゴンが得られる。 And one side is produced in the RAM102 square polygon size 1 in a known manner, the polygon scaled in the direction of one side by the size of the vector v n, predetermined direction perpendicular other side to the one side As a result of scaling by the width of the band-shaped object, a band polygon is obtained.

そして得られたこの帯ポリゴンを、図9に示すように、ベクトルvの長さを有する一辺がベクトルvと平行となり、且つポリゴンの幅方向の中心位置がベクトルv上にくるように、且つ帯ポリゴンの法線方向がベクトルvが示す方向と同じになるようにする。 Then the strip polygons obtained, as shown in FIG. 9, it is parallel to one side vector v n having a length of a vector v n, and the width direction of the center position of the polygon to come on the vector v n In addition, the normal direction of the band polygon is set to be the same as the direction indicated by the vector v 1 .

このように帯ポリゴンを配置することで、視点901からこのポリゴンの面が見えるようになり、且つ、この帯ポリゴンによって、位置Pn−1から位置Pまでの経路を帯状に示すことができる。 By arranging the band polygon in this way, the surface of the polygon can be seen from the viewpoint 901, and the path from the position P n −1 to the position P n can be shown in a band shape by the band polygon. .

なお、帯ポリゴンを生成して本実施形態のように配置するためには、上記方法に限定されるものではなくて何れの方法を用いても良く、結果として図9に示す如く、視点901から帯ポリゴンの面が見えるようになり、且つ、この帯ポリゴンによって、位置Pn−1から位置Pまでの経路を帯状に示すことができれば良い。 It should be noted that any method can be used for generating the band polygon and arranging it as in the present embodiment, and any method can be used. As a result, as shown in FIG. It suffices if the surface of the band polygon can be seen and the path from the position P n −1 to the position P n can be indicated by the band polygon.

このような処理をパーティクルが移動する各位置間について行うことで、このパーティクルの移動の軌跡を複数のポリゴンにより帯状に表現することができる。   By performing such processing between the positions where the particles move, the movement trajectory of the particles can be expressed in a band shape by a plurality of polygons.

図10は、パーティクルが移動した各位置間に帯ポリゴンを上記処理によって配置し、その結果得られる、このパーティクルの軌跡を帯状に表現したもの、即ち、帯状のオブジェクトを示す図である。   FIG. 10 is a diagram showing a band-like object obtained by arranging band polygons between the positions where the particles have moved by the above-described processing and expressing the particle trajectory in a band shape as a result.

同図において1000はパーティクルの移動の軌跡を示し、1001a、1001b、1001c、1001d、1001e、1001fは夫々、パーティクルの移動した位置(図8に示すテーブルに記録される位置)を示す。各位置は当然軌跡1000上にある。以上説明した帯ポリゴンの配置処理を行うと、位置1001aと位置1001bとの間、位置1001bと位置1001cとの間、位置1001cと位置1001dとの間、位置1001dと位置1001eとの間、位置1001eと位置1001fとの間に夫々帯ポリゴンを配置することができる。しかも夫々の帯ポリゴンは視点の位置からその面が見えるように配置されているので、結果としてこの帯状のオブジェクトは視点の位置から各面が見えるように生成される。   In the figure, reference numeral 1000 denotes a trajectory of particle movement, and reference numerals 1001a, 1001b, 1001c, 1001d, 1001e, and 1001f denote particle movement positions (positions recorded in the table shown in FIG. 8). Each position is naturally on the locus 1000. When the band polygon arrangement processing described above is performed, the position 1001a and the position 1001b, the position 1001b and the position 1001c, the position 1001c and the position 1001d, the position 1001d and the position 1001e, the position 1001e, A band polygon can be arranged between the position 1001f and the position 1001f. Moreover, since each band polygon is arranged so that its surface can be seen from the viewpoint position, this band-like object is generated so that each surface can be seen from the viewpoint position.

なお、帯ポリゴンの配置処理は、パーティクルが生存寿命によってその移動が終了してから、移動した各位置間について行っても良いし、パーティクルが移動する毎に、現在の位置と移動する直前の位置との間について行うようにしても良い。   In addition, the arrangement processing of the belt polygon may be performed between the moved positions after the movement of the particles is finished due to the life span, or each time the particles move, the current position and the position immediately before the movement. You may make it perform between.

また、この帯ポリゴンには例えば炎の色のテクスチャをマッピングしたり、赤や黄色などの色を付けておき、帯ポリゴンの配置後、時間の経過と共にこの帯ポリゴンに対するα値を徐々に下げるようにしても良く、その場合、徐々にその部分の炎が消えていく様を表現することができる。また、この生成した帯状のオブジェクトは所定時間が経過すると、消去する。   In addition, for example, a texture of flame color is mapped to this band polygon, or a color such as red or yellow is added, and after the band polygon is arranged, the α value for the band polygon is gradually lowered with time. However, in that case, it can be expressed that the flame of that part gradually disappears. The generated band-like object is deleted when a predetermined time has elapsed.

以上説明した帯状のオブジェクトを生成する処理を、他のパーティクルの移動の軌跡についても行う。即ち、個々のパーティクルの移動する各位置を記録し(即ち、個々のパーティクルについて、図8に示す「移動した各位置を示すデータのテーブル」をRAM102内に作成する)、記録した位置のデータを用いて個々のパーティクルの移動の軌跡を帯状に表現する帯状のオブジェクトを生成する処理を行う。   The process for generating the band-shaped object described above is also performed for the movement trajectory of other particles. That is, each moving position of each particle is recorded (that is, for each individual particle, a “data table indicating each moved position” shown in FIG. 8 is created in the RAM 102), and the recorded position data is recorded. A process for generating a band-like object that represents the movement trajectory of each particle in a band shape is performed.

このようにすれば、各パーティクルの移動の軌跡を夫々帯状のオブジェクトでもって表現することができる。図11は、各パーティクルの移動の軌跡を夫々帯状のオブジェクトでもって表現した結果、得られるオブジェクトの例を示す図である。201は上述のろうそくの3次元モデルで、1101は各パーティクルの移動の軌跡を夫々帯状のオブジェクトでもって表現することで得られるオブジェクトである。また各パーティクルの生存寿命は発生させる各パーティクルによって異ならせるので、夫々のパーティクルの移動する軌跡の長さ、即ち帯状のオブジェクトの長さも当然、夫々で異なる。   In this way, the movement trajectory of each particle can be expressed by a belt-like object. FIG. 11 is a diagram illustrating an example of an object obtained as a result of expressing the movement trajectory of each particle with a band-like object. Reference numeral 201 denotes a three-dimensional model of the above-mentioned candle, and reference numeral 1101 denotes an object obtained by expressing the movement trajectory of each particle with a band-like object. Further, since the lifespan of each particle varies depending on each particle to be generated, the length of the trajectory in which each particle moves, that is, the length of the belt-like object naturally varies.

仮にパーティクルだけでオブジェクト1101の存在する領域を埋めようとする場合、多数必要であることが容易に分かる。しかし帯状のオブジェクトを用いると、夫々は視点の位置にその面を向けているので、比較的少ない数で同じ領域を覆うことができる。また、帯状のオブジェクトは1つのパーティクルの移動によって生成されるものであるので、結果として用いるパーティクルの数は従来のものよりも少なくてすむ。従って、各パーティクルの挙動を計算する計算コストや、各パーティクルの位置を管理するためのメモリ使用量をより軽減させることができる。   If the region where the object 1101 exists is to be filled only with particles, it can be easily understood that many are necessary. However, when a band-like object is used, since the surface is directed to the position of the viewpoint, the same region can be covered with a relatively small number. Further, since the band-like object is generated by the movement of one particle, the number of particles used as a result is smaller than that of the conventional one. Therefore, the calculation cost for calculating the behavior of each particle and the memory usage for managing the position of each particle can be further reduced.

図12は以上説明した、本実施形態に係る炎のオブジェクトの生成処理のフローチャートである。なお、同図のフローチャートに従ったプログラムは外部記憶装置107からRAM102に、もしくは記憶媒体から記憶媒体ドライブ装置108によってRAM102にロードされるものであり、CPU101がこれを実行することにより、本実施形態に係る画像処理装置は同図のフローチャートに従った処理を実行することになる。尚、同図のフローチャートにおいてあるステップによっては上記説明の通りであるのでそのようなステップについては説明は簡単にする。   FIG. 12 is a flowchart of the flame object generation process according to the present embodiment described above. The program according to the flowchart of FIG. 10 is loaded from the external storage device 107 to the RAM 102 or from the storage medium to the RAM 102 by the storage medium drive device 108. The image processing apparatus according to this executes processing according to the flowchart of FIG. Note that some steps in the flowchart of the same figure are as described above, so that the description of such steps will be simplified.

先ず、新たにパーティクルを初期発生領域内で発生させるか否かを判断する(ステップS1201)。これは例えば、まだ発生しているパーティクルの数が少ない場合にはより高い確率で発生させ、発生しているパーティクルの数が多い場合にはより低い確率で発生させるようにする。与えられた確率に従ってパーティクルを発生させる処理は周知の技術であるので、ここでの説明は省略する。   First, it is determined whether or not to newly generate particles in the initial generation region (step S1201). For example, it is generated with a higher probability when the number of particles that are still generated is small, and with a lower probability when the number of particles that are generated is large. Since the process of generating particles according to a given probability is a well-known technique, a description thereof is omitted here.

新たにパーティクルを発生させる場合には処理をステップS1202に進め、初期発生領域内の乱数的に決めた任意の位置にパーティクルを発生させ(ステップS1202)、更に、このパーティクルに対する速度ベクトル、生存寿命を設定する(ステップS1203)。設定した速度ベクトル、生存寿命のデータは上述の通り、RAM102に記録される。また、発生させたパーティクルの初期位置のデータも、RAM102内に記憶されている。   If a new particle is to be generated, the process proceeds to step S1202, and a particle is generated at an arbitrary position randomly determined in the initial generation region (step S1202). Further, the velocity vector and the life span for this particle are determined. Setting is performed (step S1203). The set speed vector and survival data are recorded in the RAM 102 as described above. In addition, data on the initial position of the generated particles is also stored in the RAM 102.

次に、発生している各パーティクルについてステップS1204からステップS1206までの処理を行う。先ず、パーティクルの位置を上記処理によって移動させ(ステップS1204)、移動した位置のデータをRAM102に記録し(ステップS1205)、前の位置と現在の位置との間に上記処理によって帯ポリゴンを配置する(ステップS1207)。   Next, the processing from step S1204 to step S1206 is performed for each generated particle. First, the position of the particle is moved by the above process (step S1204), the data of the moved position is recorded in the RAM 102 (step S1205), and the band polygon is arranged by the above process between the previous position and the current position. (Step S1207).

そしてステップS1204からステップS1206までの処理を発生している全てのパーティクルについて行えば(ステップS1207における判断処理)、処理をステップS1208に進め、発生から経過した時間が設定された生存寿命に達したパーティクルが存在するか否かをチェックする(ステップS1208)。これは夫々のパーティクルについて、パーティクルが発生してから計時した結果が、発生時に設定された生存寿命に達したか否かを判断することで、このパーティクルが寿命に達したか否かをチェックすることができる。   If all the particles that have undergone the processing from step S1204 to step S1206 are performed (judgment processing in step S1207), the processing proceeds to step S1208, and the particles that have reached the set life span have elapsed since the occurrence. Is checked (step S1208). This is to check whether each particle has reached the end of its life by judging whether the result of counting after the generation of the particle has reached the lifetime set at the time of occurrence. be able to.

そして寿命に達したパーティクルについては、3次元仮想空間から消去し、更に、このパーティクルに係るデータをRAM102から消去する処理を行う(ステップS1209)。   Then, the particles that have reached the end of their lifetime are erased from the three-dimensional virtual space, and further, a process of erasing data relating to the particles from the RAM 102 is performed (step S1209).

そして、処理をステップS1201に戻し、以降の処理を繰り返す。   Then, the process returns to step S1201, and the subsequent processes are repeated.

以上の処理によって、炎のオブジェクトを生成するために用いるパーティクルの数を減少させることができるので、パーティクルの挙動を計算する計算コストや、パーティクルの位置を管理するためのメモリ使用量をより軽減させることができる。   By the above process, the number of particles used to generate the flame object can be reduced, so that the calculation cost for calculating the behavior of the particles and the memory usage for managing the position of the particles are further reduced. be able to.

また、本実施形態では帯状のオブジェクトを用いているので、本来無数のパーティクルを用いないと埋め尽くせなかった領域を、少ない数の帯状のオブジェクトで埋め尽くすことができる。また、1つ帯状のオブジェクトを生成するためには1つのパーティクルしか用いないので、結果として用いるパーティクルの数を減少させることができ、これにより上述の通り、パーティクルの挙動を計算する計算コストや、パーティクルの位置を管理するためのメモリ使用量をより軽減させることができる。   In addition, since the band-like object is used in the present embodiment, an area that could not be filled without using innumerable particles can be filled with a small number of band-like objects. In addition, since only one particle is used to generate one band-like object, the number of particles used as a result can be reduced, and as described above, the calculation cost for calculating the behavior of particles, The amount of memory used for managing the position of the particles can be further reduced.

尚、図12に示したフローチャートは、パーティクルが移動する毎に帯ポリゴンを配置するというものであったが、パーティクルが自身の生存寿命内に移動した経路が決まった時点で、これまでに移動した各位置間に帯ポリゴンを配置するという処理形態の場合には、図12に示したフローチャートを以下のように修正したフローチャートに従った処理を行えばよい。   In the flowchart shown in FIG. 12, the polygon is arranged every time the particle moves. However, when the path along which the particle has moved within its own life is determined, it has moved so far. In the case of a processing form in which band polygons are arranged between positions, processing according to a flowchart obtained by modifying the flowchart shown in FIG. 12 as follows may be performed.

即ち、ステップS1206における処理を以下のように修正した処理を、ステップS1209にける処理の直前で行うようにすればよい。即ち、寿命に達したパーティクルが存在する場合には、ステップS1205で記録したこのパーティクルのこれまでに移動した位置のデータを用いて、各位置間に帯ポリゴンを配置する処理を行う。そして配置後、上記ステップS1209の処理、即ち、このパーティクル、及びこのパーティクルに係るデータの消去処理を行う。   In other words, the process modified in step S1206 as follows may be performed immediately before the process in step S1209. In other words, when there is a particle that has reached the end of its life, processing is performed to place a band polygon between the positions using the data of the position of the particle that has been moved so far recorded in step S1205. Then, after the arrangement, the process of step S1209, that is, the erasure process of the particles and the data related to the particles is performed.

[第2の実施形態]
本実施形態では、第1の実施形態とは異なる式に基づいて重力点によるパーティクルの移動方向の制御を行う。
[Second Embodiment]
In the present embodiment, the movement direction of the particles by the gravity point is controlled based on an expression different from that in the first embodiment.

本実施形態の場合、重力点j(jは各重力点に付けられるインデックス)に対してパラメータm、パーティクルi(iは各パーティクルに付けられるインデックス)に対してパラメータMを、発生時に速度ベクトル、生存寿命に加えて設定する。各重力点に設定されるパラメータmは夫々異なる値を取りうるものであるとする。また、各パーティクルに設定されるパラメータMについても夫々異なる値を取りうるものであるとする。 In the present embodiment, the parameter m j for the gravity point j (j is an index attached to each gravity point), the parameter M i for the particle i (i is an index attached to each particle), and the speed at the time of occurrence. Set in addition to vector and lifespan. It is assumed that the parameters m j set for each gravity point can take different values. Further, the even the parameters M i is set for the respective particles in which can take different respective values.

その場合、重力点jとパーティクルiとの距離をrとすると、パーティクルiが重力点jに対して引かれる力Fを以下の式に従って計算する。   In this case, if the distance between the gravity point j and the particle i is r, the force F that the particle i is attracted to the gravity point j is calculated according to the following equation.

F=k×M×m/(r×r)
そして第1の実施形態と同様に、パーティクルiの位置の近傍にある重力点j全てについてこの式に従った計算を行い、夫々の重力点に対して引かれる力のベクトルの合成を行い、合成結果の力ベクトルfを求める。
F = k × M i × m j / (r × r)
Then, as in the first embodiment, calculation is performed according to this equation for all gravity points j in the vicinity of the position of the particle i, and the force vectors drawn for the respective gravity points are synthesized. Find the resulting force vector f.

このように、各パーティクル、各重力点で異なる値のパラメータを設定し、これを用いて夫々の重力点に対して引かれる力を計算するので、計算に用いる重力点の個数が同じでも、毎回同じ大きさの力ベクトルが求まらないことも生じうるので、より複雑な挙動をパーティクルに与えることができる。   In this way, different values of parameters are set for each particle and each gravity point, and the force drawn for each gravity point is calculated using this parameter. Even if the number of gravity points used for the calculation is the same, each time Since a force vector having the same magnitude may not be obtained, more complicated behavior can be given to the particles.

なお、本実施形態の場合、上記加速度aの代わりに、(a+f/M)を用いる。即ち、V=V+(a+f/M)を計算し、次に、更新後のVを用いてX=X+Vを計算する。 In the present embodiment, (a + f / M i ) is used instead of the acceleration a. That is, V = V + (a + f / M i ) is calculated, and then X = X + V is calculated using the updated V.

また、本実施形態において全てのi、jについてM=m=1とすれば、本実施形態は第1の実施形態と等価である。 Further, in the present embodiment, if M i = m j = 1 for all i and j, this embodiment is equivalent to the first embodiment.

また、第1の実施形態で説明した様々なパラメータによっては、動的に変更しても良い。例えば、加速度ベクトルについても、毎回同じ方向、同じサイズのベクトルとせずに、加速度ベクトルの方向、大きさを動的に変更しても良い。   Further, depending on various parameters described in the first embodiment, the parameters may be changed dynamically. For example, the direction and magnitude of the acceleration vector may be dynamically changed without changing the acceleration vector to the same direction and the same size every time.

また、上記実施形態では、炎のオブジェクトを生成するための処理について説明したが、パーティクルの移動速度、予め設けた加速度、重力点の移動速度などを調整すると、各パーティクル間の距離の発散の程度や、移動速度などが異なってくる。しかし基本的に、これらのパーティクルの運動は揺らぎを持って移動するものであるので、例えば帯ポリゴンの色、もしくは帯ポリゴンにマッピングする画像の色を白っぽくし、各パーティクルの移動速度がより遅くなるようにすれば、結果として帯状のオブジェクトの集合を煙として表現することもでき、またその調整によっては噴水に見えることもある。   In the above embodiment, the process for generating the flame object has been described. However, when the movement speed of the particles, the acceleration provided in advance, the movement speed of the gravity point, and the like are adjusted, the degree of divergence of the distance between the particles And moving speed will be different. Basically, however, these particle movements move with fluctuations. For example, the color of the band polygon or the color of the image mapped to the band polygon is made whitish, and the movement speed of each particle becomes slower. By doing so, as a result, a set of band-like objects can be expressed as smoke, and depending on the adjustment, it may appear as a fountain.

従って上記実施形態で説明した処理の本質は帯状のオブジェクトを生成することで、この帯状のオブジェクトの集合で「揺らぎ」を有するものを表現することにあるので、上述の通り、パーティクルの挙動に関するパラメータ、帯ポリゴン(テクスチャ画像が貼り付けられた場合も含む)の色の調整によっては、上記実施形態で説明した技術は、炎以外の対象をも表現し得るものである。   Therefore, the essence of the processing described in the above embodiment is to generate a band-like object, and to express what has “fluctuation” in this set of band-like objects. Depending on the adjustment of the color of the belt polygon (including the case where the texture image is pasted), the technique described in the above embodiment can express an object other than the flame.

また、以上の処理(例えば図12に示したフローチャートの一部、もしくは全部に従った処理)をプログラムとしてCD−R、ROMやDVD−ROM、MO、ゲームカートリッジ等の記憶媒体に記憶させ、この記憶媒体に記憶されているプログラムをコンピュータに読み込ませ(インストール、もしくはコピーさせる)、このコンピュータのCPU又はMPUがこれを実行することでこのコンピュータに以上の処理を実現させることができる。従って、このプログラムを記憶した記憶媒体もまた本発明を実施可能なものにするので、この記憶媒体も本発明の範疇にあることは明白である。   Further, the above processing (for example, processing according to part or all of the flowchart shown in FIG. 12) is stored as a program in a storage medium such as a CD-R, ROM, DVD-ROM, MO, game cartridge, etc. The program stored in the storage medium is read (installed or copied) into the computer, and the computer or the CPU of the computer executes the program, whereby the computer can realize the above processing. Therefore, since the storage medium storing this program also enables the present invention, it is obvious that this storage medium is also within the scope of the present invention.

また、サーバ装置に以上の処理(例えば図12に示したフローチャートの一部、もしくは全部に従った処理)のプログラムを保持させておき、周知の技術によりネットワークを介してコンピュータにこれらを供給することができる。そしてこれらプログラムやデータを供給されたコンピュータのCPU又はMPUはこれを用いて以上の処理を実現させることができるので、このサーバ装置もまた上記記憶媒体として解釈することができるので、このサーバ装置も本発明の範疇にあることは明白である。   In addition, the server device holds a program for the above processing (for example, processing according to part or all of the flowchart shown in FIG. 12), and supplies these to the computer via the network by a well-known technique. Can do. Since the CPU or MPU of the computer supplied with these programs and data can be used to realize the above processing, this server device can also be interpreted as the storage medium. Obviously, it is within the scope of the present invention.

またこの記憶媒体は外部からコンピュータにプログラムやデータを提供するもの以外であっても良く、コンピュータに内蔵されたメモリチップなどであっても良いし、この記憶媒体成る定義はより広く解釈されるべきである。   The storage medium may be other than a program or data provided to the computer from the outside, may be a memory chip incorporated in the computer, and the definition of the storage medium should be interpreted more widely. It is.

本発明の第1の実施形態に係る「炎のオブジェクト」の生成処理を実行する画像処理装置として機能するコンピュータの基本構成を示すブロック図である。FIG. 2 is a block diagram illustrating a basic configuration of a computer that functions as an image processing apparatus that executes a process of generating a “flame object” according to the first embodiment of the present invention. 炎のオブジェクトを生成するために用いるパーティクルの初期発生領域を説明するための図である。It is a figure for demonstrating the initial generation area | region of the particle | grains used in order to produce | generate a flame object. 図2に示した初期発生領域201内で発生させたパーティクルに挙動を与えるために、パーティクルに対して設定する内容を説明する図である。It is a figure explaining the content set with respect to the particle in order to give a behavior to the particle generated in the initial generation area | region 201 shown in FIG. 発生させた各パーティクルに対して「揺らぎ」の挙動を与えるための仕組みを示す図である。It is a figure which shows the mechanism for giving the behavior of "fluctuation" with respect to each generated particle. 2つの重力点402a、402bによってパーティクルの移動方向を制御する処理を説明する為の図である。It is a figure for demonstrating the process which controls the moving direction of a particle by two gravity points 402a and 402b. 各パーティクルに与える挙動を説明する図である。It is a figure explaining the behavior given to each particle. あるパーティクル(注目パーティクル)の移動の軌跡を示す図である。It is a figure which shows the locus | trajectory of a movement of a certain particle (attention particle). RAM102に記憶された、注目パーティクルが移動した各位置のデータを管理するテーブルを示す図である。It is a figure which shows the table which manages the data of each position where the attention particle moved memorize | stored in RAM102. 本発明の第1の実施形態に係る帯状のオブジェクトを生成する処理を説明するための図である。It is a figure for demonstrating the process which produces | generates the strip | belt-shaped object which concerns on the 1st Embodiment of this invention. パーティクルが移動した各位置間に帯ポリゴンを配置し、その結果得られる、このパーティクルの軌跡を帯状に表現したもの、即ち、帯状のオブジェクトを示す図である。FIG. 5 is a diagram showing a band-like object obtained by arranging a belt polygon between positions where particles move and expressing the particle trajectory in a band shape as a result. 各パーティクルの移動の軌跡を夫々帯状のオブジェクトでもって表現した結果、得られるオブジェクトの例を示す図である。It is a figure which shows the example of the object obtained as a result of expressing the locus | trajectory of the movement of each particle with a strip | belt-shaped object, respectively. 本発明の第1の実施形態に係る炎のオブジェクトの生成処理のフローチャートである。It is a flowchart of the production | generation process of the flame object which concerns on the 1st Embodiment of this invention.

Claims (9)

3次元仮想空間に発生させる複数のパーティクルを用いて炎のオブジェクトを生成する画像処理装置であって、
前記3次元仮想空間におけるパーティクルの初期発生領域を設定する設定手段と、
前記初期発生領域内で発生するパーティクルの初期移動方向、及び初期移動速度を初期値データとして記録する初期値データ記録手段と、
前記3次元仮想空間内に予め設定された経路の一端に定期的若しくは不定期的に発生させた仮想の点を、当該経路の他端方向に移動させる第1の移動手段と、
所定の方向への加速度を示すデータ、及び前記初期値データに基づいて決まるパーティクルの移動方向を、前記経路上を移動している1以上の仮想の点と、当該パーティクルと、の位置関係に基づいて変更し、変更後の移動方向に当該パーティクルを移動させる第2の移動手段と、
前記第2の移動手段によって移動する前記パーティクルの各位置を示すデータを順次記録する位置記録手段と、
前記位置記録手段が記録しているデータが示す各位置間にポリゴンを配置することで、前記パーティクルの移動経路を帯状のオブジェクトとして生成する帯状オブジェクト生成手段とを備え、
前記初期値データ記録手段、前記第2の移動手段、前記位置記録手段、前記帯状オブジェクト生成手段による処理を、前記3次元仮想空間内に存在する複数のパーティクルの夫々について行うことで生成される複数の帯状のオブジェクトによって炎のオブジェクトを形成することを特徴とする画像処理装置。
An image processing apparatus that generates a flame object using a plurality of particles generated in a three-dimensional virtual space,
Setting means for setting an initial generation region of particles in the three-dimensional virtual space;
Initial value data recording means for recording initial movement direction and initial movement speed of particles generated in the initial generation region as initial value data;
First moving means for moving a virtual point generated periodically or irregularly at one end of a path preset in the three-dimensional virtual space in the direction of the other end of the path;
The data indicating the acceleration in a predetermined direction and the moving direction of the particles determined based on the initial value data are based on the positional relationship between the one or more virtual points moving on the path and the particles. A second moving means for moving the particles in the changed moving direction ;
Position recording means for sequentially recording data indicating each position of the particles moved by the second moving means;
A belt-like object generating means for generating a moving path of the particles as a belt-like object by disposing polygons between the positions indicated by the data recorded by the position recording means;
A plurality of data generated by performing the processing by the initial value data recording means, the second moving means, the position recording means, and the belt-like object generating means for each of a plurality of particles existing in the three-dimensional virtual space. An image processing apparatus, wherein a flame object is formed by a band-shaped object.
3次元仮想空間に発生させる複数のパーティクルを用いて揺らぎを有するオブジェクトを生成する画像処理装置であって、
前記3次元仮想空間におけるパーティクルの初期発生領域を設定する設定手段と、
前記初期発生領域内で発生するパーティクルの初期移動方向、及び初期移動速度を初期値データとして記録する初期値データ記録手段と、
前記3次元仮想空間内に予め設定された経路の一端に定期的若しくは不定期的に発生させた仮想の点を、当該経路の他端方向に移動させる第1の移動手段と、
所定の方向への加速度を示すデータ、及び前記初期値データに基づいて決まるパーティクルの移動方向を、前記経路上を移動している1以上の仮想の点と、当該パーティクルと、の位置関係に基づいて変更し、変更後の移動方向に当該パーティクルを移動させる第2の移動手段と、
前記第2の移動手段によって移動する前記パーティクルの各位置を示すデータを順次記録する位置記録手段と、
前記位置記録手段が記録しているデータが示す各位置間にポリゴンを配置することで、前記パーティクルの移動経路を帯状のオブジェクトとして生成する帯状オブジェクト生成手段とを備え、
前記初期値データ記録手段、前記第2の移動手段、前記位置記録手段、前記帯状オブジェクト生成手段による処理を、前記3次元仮想空間内に存在する複数のパーティクルの夫々について行うことで生成される複数の帯状のオブジェクトによって揺らぎを有するオブジェクトを形成することを特徴とする画像処理装置。
An image processing apparatus that generates an object having fluctuation using a plurality of particles generated in a three-dimensional virtual space,
Setting means for setting an initial generation region of particles in the three-dimensional virtual space;
Initial value data recording means for recording initial movement direction and initial movement speed of particles generated in the initial generation region as initial value data;
First moving means for moving a virtual point generated periodically or irregularly at one end of a path preset in the three-dimensional virtual space in the direction of the other end of the path;
The data indicating the acceleration in a predetermined direction and the moving direction of the particles determined based on the initial value data are based on the positional relationship between the one or more virtual points moving on the path and the particles. A second moving means for moving the particles in the changed moving direction ;
Position recording means for sequentially recording data indicating each position of the particles moved by the second moving means;
A belt-like object generating means for generating a moving path of the particles as a belt-like object by disposing polygons between the positions indicated by the data recorded by the position recording means;
A plurality of data generated by performing the processing by the initial value data recording means, the second moving means, the position recording means, and the belt-like object generating means for each of a plurality of particles existing in the three-dimensional virtual space. An image processing apparatus, wherein an object having fluctuation is formed by a band-shaped object.
3次元仮想空間に発生させる複数のパーティクルを用いて炎のオブジェクトを生成する画像処理装置が行う画像処理方法であって、
前記3次元仮想空間における初期発生領域内で発生するパーティクルの初期移動方向、及び初期移動速度を初期値データとして前記画像処理装置が有するメモリに記録する初期値データ記録工程と、
前記3次元仮想空間内における経路を規定するデータを前記メモリから読み出し、読み出した当該データ用いて、当該経路を前記3次元仮想空間内に設定する経路設定工程と、
前記経路設定工程で設定された経路の一端に定期的若しくは不定期的に発生させた仮想の点を、当該経路の他端方向に移動させる第1の移動工程と、
所定の方向への加速度を示すデータ、及び前記初期値データに基づいて決まるパーティクルの移動方向を、前記経路上を移動している1以上の仮想の点と、当該パーティクルと、の位置関係に基づいて変更し、変更後の移動方向に当該パーティクルを移動させる第2の移動工程と、
前記第2の移動工程で移動する前記パーティクルの各位置を示すデータを順次前記メモリに記録する位置記録工程と、
前記位置記録工程で記録したデータが示す各位置間にポリゴンを配置することで、前記パーティクルの移動経路を帯状のオブジェクトとして生成する帯状オブジェクト生成工程とを備え、
前記初期値データ記録工程、前記第2の移動工程、前記位置記録工程、前記帯状オブジェクト生成工程による処理を、前記3次元仮想空間内に存在する複数のパーティクルの夫々について行うことで生成される複数の帯状のオブジェクトによって炎のオブジェクトを形成することを特徴とする画像処理方法。
An image processing method performed by an image processing apparatus that generates a flame object using a plurality of particles generated in a three-dimensional virtual space,
An initial value data recording step of recording the initial movement direction and initial movement speed of particles generated in the initial generation region in the three-dimensional virtual space in the memory of the image processing apparatus as initial value data;
A route setting step of reading data defining a route in the three-dimensional virtual space from the memory and using the read data to set the route in the three-dimensional virtual space;
A first movement step of moving a virtual point generated periodically or irregularly at one end of the route set in the route setting step toward the other end of the route;
Data indicating the acceleration in a predetermined direction and the moving direction of the particles determined based on the initial value data are based on the positional relationship between one or more virtual points moving on the path and the particles. A second moving step of moving the particles in the changed moving direction ,
A position recording step of sequentially recording data indicating each position of the particles moving in the second moving step in the memory;
A belt-shaped object generating step of generating a moving path of the particles as a belt-shaped object by arranging polygons between the positions indicated by the data recorded in the position recording step;
A plurality of data generated by performing the initial value data recording process, the second movement process, the position recording process, and the strip object generation process for each of a plurality of particles existing in the three-dimensional virtual space. An image processing method characterized in that a flame object is formed by a strip-shaped object.
前記初期値データ記録工程では、前記初期発生領域内で発生するパーティクルの生存時間を示すデータを前記初期値データに含めて前記メモリに記録することを特徴とする請求項3に記載の画像処理方法。   4. The image processing method according to claim 3, wherein, in the initial value data recording step, data indicating a lifetime of particles generated in the initial generation region is included in the initial value data and recorded in the memory. . 前記帯状オブジェクト生成工程では、前記生存時間内にパーティクルが移動した各位置を示すデータが前記位置記録工程で前記メモリに記録された後に、当該データが示す各位置間にポリゴンを配置することで、前記パーティクルの移動経路を帯状のオブジェクトとして生成することを特徴とする請求項に記載の画像処理方法。 In the band-like object generation step, after data indicating each position where the particle has moved within the lifetime is recorded in the memory in the position recording step, a polygon is arranged between the positions indicated by the data, The image processing method according to claim 4 , wherein the movement path of the particles is generated as a band-like object. 前記帯状オブジェクト生成工程では、パーティクルが第1の位置から第2の位置に移動し、当該第2の位置を示すデータが前記位置記録工程で前記メモリに記録された後に、前記第1の位置と前記第2の位置との間にポリゴンを配置する処理を、前記パーティクルが前記生存時間内で移動する毎に行うことを特徴とする請求項に記載の画像処理方法。 In the band-shaped object generating step, the particles move from the first position to the second position, and after the data indicating the second position is recorded in the memory in the position recording step, the first position and The image processing method according to claim 4 , wherein the process of arranging a polygon between the second position and the second position is performed every time the particle moves within the lifetime. 前記帯状オブジェクト生成工程は更に、
前記3次元仮想空間中に設定された視点の視線方向ベクトルと、パーティクルが移動した位置間の移動方向へのベクトルとの外積を計算する第1の計算工程と、
前記第1の計算工程で計算した外積結果のベクトルと、前記移動方向へのベクトルとの外積を計算する第2の計算工程とを備え、
前記第2の計算工程で計算した外積結果のベクトルが示す方向を法線方向とし、且つ前記移動方向に、前記移動方向へのベクトルのサイズを有するポリゴンを、前記位置間に配置することを特徴とする請求項3乃至の何れか1項に記載の画像処理方法。
The band-shaped object generation step further includes
A first calculation step of calculating a cross product of a line-of-sight direction vector of a viewpoint set in the three-dimensional virtual space and a vector in a movement direction between positions where particles move;
A second calculation step of calculating a cross product of a vector of the outer product result calculated in the first calculation step and a vector in the moving direction;
The direction indicated by the vector of the outer product result calculated in the second calculation step is a normal direction, and a polygon having a vector size in the movement direction is arranged between the positions in the movement direction. The image processing method according to any one of claims 3 to 6 .
3次元仮想空間に発生させる複数のパーティクルを用いて揺らぎを有するオブジェクトを生成する画像処理装置が行う画像処理方法であって、
前記3次元仮想空間における初期発生領域内で発生するパーティクルの初期移動方向、及び初期移動速度を初期値データとして前記画像処理装置が有するメモリに記録する初期値データ記録工程と、
前記3次元仮想空間内における経路を規定するデータを前記メモリから読み出し、読み出した当該データ用いて、当該経路を前記3次元仮想空間内に設定する経路設定工程と、
前記経路設定工程で設定された経路の一端に定期的若しくは不定期的に発生させた仮想の点を、当該経路の他端方向に移動させる第1の移動工程と、
所定の方向への加速度を示すデータ、及び前記初期値データに基づいて決まるパーティクルの移動方向を、前記経路上を移動している1以上の仮想の点と、当該パーティクルと、の位置関係に基づいて変更し、変更後の移動方向に当該パーティクルを移動させる第2の移動工程と、
前記第2の移動工程で移動する前記パーティクルの各位置を示すデータを順次前記メモリに記録する位置記録工程と、
前記位置記録工程で記録したデータが示す各位置間にポリゴンを配置することで、前記パーティクルの移動経路を帯状のオブジェクトとして生成する帯状オブジェクト生成工程とを備え、
前記初期値データ記録工程、前記第2の移動工程、前記位置記録工程、前記帯状オブジェクト生成工程による処理を、前記3次元仮想空間内に存在する複数のパーティクルの夫々について行うことで生成される複数の帯状のオブジェクトによって揺らぎを有するオブジェクトを形成することを特徴とする画像処理方法。
An image processing method performed by an image processing apparatus that generates an object having fluctuation using a plurality of particles generated in a three-dimensional virtual space,
An initial value data recording step of recording the initial movement direction and initial movement speed of particles generated in the initial generation region in the three-dimensional virtual space in the memory of the image processing apparatus as initial value data;
A route setting step of reading data defining a route in the three-dimensional virtual space from the memory and using the read data to set the route in the three-dimensional virtual space;
A first movement step of moving a virtual point generated periodically or irregularly at one end of the route set in the route setting step toward the other end of the route;
The data indicating the acceleration in a predetermined direction and the moving direction of the particles determined based on the initial value data are based on the positional relationship between the one or more virtual points moving on the path and the particles. A second moving step of moving the particles in the changed moving direction ,
A position recording step of sequentially recording data indicating each position of the particles moving in the second moving step in the memory;
A belt-shaped object generating step of generating a moving path of the particles as a band-shaped object by arranging polygons between the positions indicated by the data recorded in the position recording step;
A plurality of data generated by performing the initial value data recording process, the second movement process, the position recording process, and the strip object generation process for each of a plurality of particles existing in the three-dimensional virtual space. An image processing method, wherein an object having fluctuation is formed by a band-shaped object.
コンピュータに請求項3乃至の何れか1項に記載の画像処理方法を実行させることを特徴とするプログラム。 A program causing a computer to execute the image processing method according to any one of claims 3 to 8 .
JP2003328457A 2003-09-19 2003-09-19 Image processing apparatus, image processing method, and program Expired - Fee Related JP3934097B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003328457A JP3934097B2 (en) 2003-09-19 2003-09-19 Image processing apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003328457A JP3934097B2 (en) 2003-09-19 2003-09-19 Image processing apparatus, image processing method, and program

Publications (2)

Publication Number Publication Date
JP2005092754A JP2005092754A (en) 2005-04-07
JP3934097B2 true JP3934097B2 (en) 2007-06-20

Family

ID=34458026

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003328457A Expired - Fee Related JP3934097B2 (en) 2003-09-19 2003-09-19 Image processing apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP3934097B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4760111B2 (en) * 2005-04-26 2011-08-31 株式会社セガ Data structure generation program for video object representation, data structure generation method for video object representation, video software development device, video processing program, video processing method, video processing device, data structure for video object representation, and recording medium
CN102128570B (en) * 2010-12-29 2014-04-09 电子科技大学 Carrier rocket tail flame simulation method based on particle system
CN112270732B (en) * 2020-11-17 2024-06-25 Oppo广东移动通信有限公司 Particle animation generation method, processing device, electronic device and storage medium

Also Published As

Publication number Publication date
JP2005092754A (en) 2005-04-07

Similar Documents

Publication Publication Date Title
US10685152B2 (en) Systems and methods for fast simulation and visualization of sparse fluids
US9478109B2 (en) Virtual sensor in a virtual environment
JP4503073B2 (en) Image resource loading system and image resource loading method for loading object for updating game screen
JP3760347B2 (en) Program, recording medium, game character drawing method, and game apparatus
JP4015644B2 (en) Image processing apparatus and image processing method
JP4719579B2 (en) Image processing program and image processing apparatus
US6778948B1 (en) Method of creating a dynamic image, storage medium and program executing apparatus
CN104854622A (en) Method for forming an optimized polygon based shell mesh
JP3934097B2 (en) Image processing apparatus, image processing method, and program
US10617954B2 (en) Storage medium, information processing apparatus and control method
JP4636741B2 (en) Image processing apparatus and three-dimensional shape display program
US8538736B1 (en) System and method for simulating object weight in animations
Chen et al. Real-time continuum grass
JP2003091738A (en) Image forming system, program and information storage medium
JP2003091740A (en) Image forming system, program and information storage medium
JP4408681B2 (en) Program, information storage medium, and image generation system
Crause et al. A system for real-time deformable terrain
JP2009251887A (en) Image generation system, program, and information storage medium
JP3766974B2 (en) Program and recording medium
JP2001276414A (en) Game device and information memory medium
JP6863678B2 (en) Program and game equipment
JP3934096B2 (en) Image processing apparatus, image processing method, and program
JP3757396B2 (en) Program, recording medium, polygon surface calculation method, and game apparatus
JP2006075619A (en) Image processing method and image processing device
JP2005165962A (en) Data processing method and data processing unit

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20050428

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20060427

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20060530

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060808

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060825

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061011

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: 20070223

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070314

R150 Certificate of patent or registration of utility model

Ref document number: 3934097

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100330

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100330

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110330

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110330

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120330

Year of fee payment: 5

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130330

Year of fee payment: 6

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140330

Year of fee payment: 7

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

S802 Written request for registration of partial abandonment of right

Free format text: JAPANESE INTERMEDIATE CODE: R311802

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

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

LAPS Cancellation because of no payment of annual fees