annotate resume/A-6-1-065746.tex @ 10:074431e5471a

fix resume
author aaa
date Sat, 13 Feb 2010 15:23:53 +0900
parents 10bfacc0dc9a
children 0786f5b33f5f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
87dcdee06b05 add resume
aaa
parents:
diff changeset
1 \documentclass[twocolumn,twoside,9.5pt]{jarticle}
87dcdee06b05 add resume
aaa
parents:
diff changeset
2 % \usepackage[dvips]{graphicx}
87dcdee06b05 add resume
aaa
parents:
diff changeset
3 \usepackage[dvipdfm]{graphicx}
87dcdee06b05 add resume
aaa
parents:
diff changeset
4 \usepackage{fancyhdr,picins}
7
a2e7c1716ad2 fix resume
aaa
parents: 6
diff changeset
5 \usepackage{comment}
3
87dcdee06b05 add resume
aaa
parents:
diff changeset
6 \pagestyle{fancy}
87dcdee06b05 add resume
aaa
parents:
diff changeset
7 \lhead{\parpic{
87dcdee06b05 add resume
aaa
parents:
diff changeset
8 \includegraphics[height=1zw,clip,keepaspectratio]{pic/emblem-bitmap.pdf}}
87dcdee06b05 add resume
aaa
parents:
diff changeset
9 琉球大学主催 工学部情報工学科 卒業研究発表会}
87dcdee06b05 add resume
aaa
parents:
diff changeset
10 \rhead{}
87dcdee06b05 add resume
aaa
parents:
diff changeset
11 \cfoot{}
87dcdee06b05 add resume
aaa
parents:
diff changeset
12
87dcdee06b05 add resume
aaa
parents:
diff changeset
13 \setlength{\topmargin}{-1in \addtolength{\topmargin}{15mm}}
87dcdee06b05 add resume
aaa
parents:
diff changeset
14 \setlength{\headheight}{0mm}
87dcdee06b05 add resume
aaa
parents:
diff changeset
15 \setlength{\headsep}{5mm}
87dcdee06b05 add resume
aaa
parents:
diff changeset
16 \setlength{\oddsidemargin}{-1in \addtolength{\oddsidemargin}{11mm}}
87dcdee06b05 add resume
aaa
parents:
diff changeset
17 \setlength{\evensidemargin}{-1in \addtolength{\evensidemargin}{21mm}}
87dcdee06b05 add resume
aaa
parents:
diff changeset
18 \setlength{\textwidth}{181mm}
87dcdee06b05 add resume
aaa
parents:
diff changeset
19 \setlength{\textheight}{261mm}
87dcdee06b05 add resume
aaa
parents:
diff changeset
20 \setlength{\footskip}{0mm}
87dcdee06b05 add resume
aaa
parents:
diff changeset
21 \pagestyle{empty}
87dcdee06b05 add resume
aaa
parents:
diff changeset
22
87dcdee06b05 add resume
aaa
parents:
diff changeset
23 \begin{document}
87dcdee06b05 add resume
aaa
parents:
diff changeset
24 \title{SceneGraph を用いた\\マルチコア CPU 向けゲームの処理}
87dcdee06b05 add resume
aaa
parents:
diff changeset
25 \author{065746J 仲宗根広樹 指導教員 : 河野真治}
87dcdee06b05 add resume
aaa
parents:
diff changeset
26 \date{\today}
87dcdee06b05 add resume
aaa
parents:
diff changeset
27 \maketitle
87dcdee06b05 add resume
aaa
parents:
diff changeset
28 \thispagestyle{fancy}
87dcdee06b05 add resume
aaa
parents:
diff changeset
29
87dcdee06b05 add resume
aaa
parents:
diff changeset
30 \section{概要}
87dcdee06b05 add resume
aaa
parents:
diff changeset
31 近年のゲームマシンは高度な並列性を持つようになっており、
87dcdee06b05 add resume
aaa
parents:
diff changeset
32 ゲームプログラムでの様々なレベルでの並列処理が必須となっている。
87dcdee06b05 add resume
aaa
parents:
diff changeset
33 プログラムの一部を並列処理するのではなく、定常的な並列度を提供する
87dcdee06b05 add resume
aaa
parents:
diff changeset
34 必要がある。しかし、
87dcdee06b05 add resume
aaa
parents:
diff changeset
35 データが処理される順番を把握することができないので出力結果などが特定しづらく、
87dcdee06b05 add resume
aaa
parents:
diff changeset
36 逐次型に比べて難易度が高い
7
a2e7c1716ad2 fix resume
aaa
parents: 6
diff changeset
37 データ転送やタスクの生成、管理等の技術が多く存在する。\\
a2e7c1716ad2 fix resume
aaa
parents: 6
diff changeset
38  現在、学生実験にて PlayStation 3(PS3) で動作するゲーム開発を行っている。
9
aaa
parents: 8
diff changeset
39 短期間の学生実験では新しい技術を習得することに時間を割かれ、ゲームの完成度を上げることが難しくなる。\\
aaa
parents: 8
diff changeset
40  そこで本研究では、
3
87dcdee06b05 add resume
aaa
parents:
diff changeset
41 SceneGraph と言うゲーム中の1つの場面(Scene) を構成するオブジェクトやその振る舞い、ゲームのルールの集合を導入する。
9
aaa
parents: 8
diff changeset
42 SceneGraph の処理を並列に行なうことにより、完成度の高いゲームの作成を可能とする。
3
87dcdee06b05 add resume
aaa
parents:
diff changeset
43
87dcdee06b05 add resume
aaa
parents:
diff changeset
44 \section{SceneGraph を使ったゲーム作成}
87dcdee06b05 add resume
aaa
parents:
diff changeset
45 SceneGraph のノードは親子関係を持つ tree で構成される(図\ref{fig:SceneGraph})。
87dcdee06b05 add resume
aaa
parents:
diff changeset
46
87dcdee06b05 add resume
aaa
parents:
diff changeset
47 SceneGraph を使用すると、ゲーム内のオブジェクトは個別に SceneGraph ノードに分けられているので、ノードを別個に処理すると自然と並列度がでてくる。
87dcdee06b05 add resume
aaa
parents:
diff changeset
48
87dcdee06b05 add resume
aaa
parents:
diff changeset
49 SceneGraph ノード は以下のようなデータと動作を持つ。
7
a2e7c1716ad2 fix resume
aaa
parents: 6
diff changeset
50 \\\\
a2e7c1716ad2 fix resume
aaa
parents: 6
diff changeset
51 {\small
a2e7c1716ad2 fix resume
aaa
parents: 6
diff changeset
52 \begin{tabular}{|l|l|}
a2e7c1716ad2 fix resume
aaa
parents: 6
diff changeset
53 \hline
9
aaa
parents: 8
diff changeset
54 データ & 説明 \\ \hline
7
a2e7c1716ad2 fix resume
aaa
parents: 6
diff changeset
55 Vertex & ポリゴンオブジェクトの頂点座標 \\ \hline
a2e7c1716ad2 fix resume
aaa
parents: 6
diff changeset
56 Texture & ポリゴンオブジェクトのテクスチャ座標 \\ \hline
a2e7c1716ad2 fix resume
aaa
parents: 6
diff changeset
57 TextureImage & テクスチャイメージ \\ \hline
a2e7c1716ad2 fix resume
aaa
parents: 6
diff changeset
58 TransMatrix & ポリゴンオブジェクトの変換行列 \\ \hline
a2e7c1716ad2 fix resume
aaa
parents: 6
diff changeset
59 Coordinates & オブジェクトの座標 \\ \hline
a2e7c1716ad2 fix resume
aaa
parents: 6
diff changeset
60 Angle & オブジェクトの角度 \\\hline
9
aaa
parents: 8
diff changeset
61 Property & オブジェクトの内部状態 \\
7
a2e7c1716ad2 fix resume
aaa
parents: 6
diff changeset
62 \hline
a2e7c1716ad2 fix resume
aaa
parents: 6
diff changeset
63 \end{tabular}
a2e7c1716ad2 fix resume
aaa
parents: 6
diff changeset
64 \\\\\\
a2e7c1716ad2 fix resume
aaa
parents: 6
diff changeset
65 \begin{tabular}{|l|l|}
a2e7c1716ad2 fix resume
aaa
parents: 6
diff changeset
66 \hline
9
aaa
parents: 8
diff changeset
67 動作 & 説明 \\ \hline
7
a2e7c1716ad2 fix resume
aaa
parents: 6
diff changeset
68 Move & 自律的なオブジェクトの動く \\ \hline
a2e7c1716ad2 fix resume
aaa
parents: 6
diff changeset
69 Collision & 他のノードとの衝突判定をする \\ \hline
a2e7c1716ad2 fix resume
aaa
parents: 6
diff changeset
70 \end{tabular}
a2e7c1716ad2 fix resume
aaa
parents: 6
diff changeset
71 }
a2e7c1716ad2 fix resume
aaa
parents: 6
diff changeset
72 \\\\
a2e7c1716ad2 fix resume
aaa
parents: 6
diff changeset
73 \begin{comment}
3
87dcdee06b05 add resume
aaa
parents:
diff changeset
74 \begin{itemize}
87dcdee06b05 add resume
aaa
parents:
diff changeset
75 \item データ
87dcdee06b05 add resume
aaa
parents:
diff changeset
76 \begin{enumerate}
87dcdee06b05 add resume
aaa
parents:
diff changeset
77 \item Vertex :ポリゴンオブジェクトの頂点座標
87dcdee06b05 add resume
aaa
parents:
diff changeset
78 \item Texture:ポリゴンオブジェクトのテクスチャ座標
87dcdee06b05 add resume
aaa
parents:
diff changeset
79 \item TextureImage:テクスチャイメージ
87dcdee06b05 add resume
aaa
parents:
diff changeset
80 \item TransMatrix :ポリゴンオブジェクトの変換行列
87dcdee06b05 add resume
aaa
parents:
diff changeset
81 \item Coordinates :オブジェクトの座標
87dcdee06b05 add resume
aaa
parents:
diff changeset
82 \item Angle:オブジェクトの角度
87dcdee06b05 add resume
aaa
parents:
diff changeset
83 \item Property:オブジェクトのゲームに係わる内部状態
87dcdee06b05 add resume
aaa
parents:
diff changeset
84 \end{enumerate}
87dcdee06b05 add resume
aaa
parents:
diff changeset
85 \item 動作
87dcdee06b05 add resume
aaa
parents:
diff changeset
86 \begin{enumerate}
87dcdee06b05 add resume
aaa
parents:
diff changeset
87 \item Move:自律的なオブジェクトの動き
87dcdee06b05 add resume
aaa
parents:
diff changeset
88 \item Collision:他のノードとの衝突判定をする
87dcdee06b05 add resume
aaa
parents:
diff changeset
89 \end{enumerate}
87dcdee06b05 add resume
aaa
parents:
diff changeset
90 \end{itemize}
7
a2e7c1716ad2 fix resume
aaa
parents: 6
diff changeset
91 \end{comment}
3
87dcdee06b05 add resume
aaa
parents:
diff changeset
92
4
e7afb57e4d2d resume part2 fix
aaa
parents: 3
diff changeset
93 SceneGraph の親子関係に沿って TransMatrix を計算し、Move, Collision を実行することで SceneGraph 内のオブジェクトが変化する。Collision によって Move が変更され、Move によって Coordinates や Angle が変更される。これらをどのように変更させるかがゲームのルールになる。
e7afb57e4d2d resume part2 fix
aaa
parents: 3
diff changeset
94
3
87dcdee06b05 add resume
aaa
parents:
diff changeset
95 \begin{figure}[htb]
87dcdee06b05 add resume
aaa
parents:
diff changeset
96 \begin{center}
87dcdee06b05 add resume
aaa
parents:
diff changeset
97 \includegraphics[scale=0.4]{image/SceneGraph.pdf}
4
e7afb57e4d2d resume part2 fix
aaa
parents: 3
diff changeset
98 \caption{tree 構造の SceneGraph}
3
87dcdee06b05 add resume
aaa
parents:
diff changeset
99 \label{fig:SceneGraph}
87dcdee06b05 add resume
aaa
parents:
diff changeset
100 \end{center}
87dcdee06b05 add resume
aaa
parents:
diff changeset
101 \end{figure}
87dcdee06b05 add resume
aaa
parents:
diff changeset
102
87dcdee06b05 add resume
aaa
parents:
diff changeset
103
87dcdee06b05 add resume
aaa
parents:
diff changeset
104 \section{Cell Broadband Engine} \label{sec:cell}
87dcdee06b05 add resume
aaa
parents:
diff changeset
105 Cell\cite{cell} は1基の PowerPC Processor Element (PPE) と8基の Synergistic Processor Element (SPE) で構成されるヘテロジニアスマルチコアプロセッサである。各プロセッサは高速バスで接続されている。本研究では6基の SPE が使用可能となっている。
87dcdee06b05 add resume
aaa
parents:
diff changeset
106
87dcdee06b05 add resume
aaa
parents:
diff changeset
107 \section{Cerium}
87dcdee06b05 add resume
aaa
parents:
diff changeset
108 Cerium とは当研究室で開発した Cell 上で動作するゲームフレームワークである。
87dcdee06b05 add resume
aaa
parents:
diff changeset
109 Cerium は SceneGraph、OSMesa に代表される Rendering Engine、そしてそれらの実行単位を Task とし、動的に全てのコアが動作する様な割り振りを行うカーネル TaskManager で構成されている。
87dcdee06b05 add resume
aaa
parents:
diff changeset
110
87dcdee06b05 add resume
aaa
parents:
diff changeset
111 現在、Cerium では SceneGraph の Move, Collision を PPE でシーケンシャルに処理しているので、この部分の処理を SPE を用いて並列に処理するように変更する。
87dcdee06b05 add resume
aaa
parents:
diff changeset
112
5
0e2dc887acbc fix resume
aaa
parents: 4
diff changeset
113 \section{SceneGraph の並列処理}
0e2dc887acbc fix resume
aaa
parents: 4
diff changeset
114 \subsection{Property}
0e2dc887acbc fix resume
aaa
parents: 4
diff changeset
115 オブジェクトの動作や衝突判定に必要になるのは Coordinates や Angle であり、Polygon や Texture のデータは不要になる。そこでゲームに必要なオブジェクトの内部状態を持った Property を用いる。Property には Coordinates, Angle の他に、tree を再生成する時に必要な親子関係なども含める。一方の tree を Rendering で使用し、もう一方を Move, Collision で使用し、両方の処理が終わったら、相互にバッファを切り替える。切替える時に二つのタスクは同期する必要がある。
3
87dcdee06b05 add resume
aaa
parents:
diff changeset
116
9
aaa
parents: 8
diff changeset
117 \subsection{chain}
10
074431e5471a fix resume
aaa
parents: 9
diff changeset
118 例題作成中
9
aaa
parents: 8
diff changeset
119 \if 0
3
87dcdee06b05 add resume
aaa
parents:
diff changeset
120 \subsection{vacuum}
87dcdee06b05 add resume
aaa
parents:
diff changeset
121 SceneGraph の処理の例題として、学生実験で作成されたゲーム vacuum を使用する。
87dcdee06b05 add resume
aaa
parents:
diff changeset
122 vacuum には自機と吸収ブロック、敵ブロックの3種類のオブジェクトがあり、自機を上下左右に移動させ、ボタンを押している間は自機の周りのブロックを引き寄せ、うまく吸収ブロックだけを自機と衝突させるゲームである。このゲームのMoveとCollisionは以下のようになる。
87dcdee06b05 add resume
aaa
parents:
diff changeset
123
87dcdee06b05 add resume
aaa
parents:
diff changeset
124 \begin{figure}[htb]
87dcdee06b05 add resume
aaa
parents:
diff changeset
125 \begin{center}
87dcdee06b05 add resume
aaa
parents:
diff changeset
126 \includegraphics[scale=0.7]{image/vacuum.png}
87dcdee06b05 add resume
aaa
parents:
diff changeset
127 \caption{vacuum のゲーム画面}
87dcdee06b05 add resume
aaa
parents:
diff changeset
128 \label{fig:vacuum}
87dcdee06b05 add resume
aaa
parents:
diff changeset
129 \end{center}
87dcdee06b05 add resume
aaa
parents:
diff changeset
130 \end{figure}
87dcdee06b05 add resume
aaa
parents:
diff changeset
131
87dcdee06b05 add resume
aaa
parents:
diff changeset
132 [Move] vacuum のオブジェクトは全て独立して動くので、使用する SPE に均等に Property を割り振る。
87dcdee06b05 add resume
aaa
parents:
diff changeset
133 SPE でオブジェクトの種類毎の Move 処理を行い、Property を更新して PPE に返す。
87dcdee06b05 add resume
aaa
parents:
diff changeset
134
87dcdee06b05 add resume
aaa
parents:
diff changeset
135 \if0
87dcdee06b05 add resume
aaa
parents:
diff changeset
136 \begin{figure}[htb]
87dcdee06b05 add resume
aaa
parents:
diff changeset
137 \begin{center}
87dcdee06b05 add resume
aaa
parents:
diff changeset
138 \includegraphics[scale=0.43]{image/Move.pdf}
87dcdee06b05 add resume
aaa
parents:
diff changeset
139 \caption{vacuum の Move}
87dcdee06b05 add resume
aaa
parents:
diff changeset
140 \label{fig:Move}
87dcdee06b05 add resume
aaa
parents:
diff changeset
141 \end{center}
87dcdee06b05 add resume
aaa
parents:
diff changeset
142 \end{figure}
87dcdee06b05 add resume
aaa
parents:
diff changeset
143 \fi
87dcdee06b05 add resume
aaa
parents:
diff changeset
144
87dcdee06b05 add resume
aaa
parents:
diff changeset
145 [Collision]
87dcdee06b05 add resume
aaa
parents:
diff changeset
146 vaccum の Collision は自機と吸収ブロック(Collision A)、自機と敵ブロック(Collision B)の二つがある。
87dcdee06b05 add resume
aaa
parents:
diff changeset
147 Collision の種類毎に SPE で動作する Collision Task を作成する。どちらの Collision も自機とブロックの衝突判定しか行わないので SPE には自機とブロックの Property を送り、SPE で2者間の衝突判定を行い、Property を更新して PPE に返す。(図\ref{fig:Collision})\\
87dcdee06b05 add resume
aaa
parents:
diff changeset
148
87dcdee06b05 add resume
aaa
parents:
diff changeset
149 \begin{figure}[htb]
87dcdee06b05 add resume
aaa
parents:
diff changeset
150 \begin{center}
87dcdee06b05 add resume
aaa
parents:
diff changeset
151 \includegraphics[scale=0.43]{image/Collision.pdf}
87dcdee06b05 add resume
aaa
parents:
diff changeset
152 \caption{Collision に使う Property を各 SPE に渡す}
87dcdee06b05 add resume
aaa
parents:
diff changeset
153 \label{fig:Collision}
87dcdee06b05 add resume
aaa
parents:
diff changeset
154 \end{center}
87dcdee06b05 add resume
aaa
parents:
diff changeset
155 \end{figure}
87dcdee06b05 add resume
aaa
parents:
diff changeset
156
87dcdee06b05 add resume
aaa
parents:
diff changeset
157 Move, Collision を SPE で処理する際に、SPE には SceneGraph ノードは送らない。代わりに vacuum の Move, Collision に必要な情報をまとめた Property を送る。
87dcdee06b05 add resume
aaa
parents:
diff changeset
158 Property は SceneGraph ノードと1対1で対応しており、Coordinates, Angle, 親子関係の情報, ノードの生成消滅の情報を持つ。
87dcdee06b05 add resume
aaa
parents:
diff changeset
159 PPE 側では返されてきた Property を元に SceneGraph を作成し Tree を再構成して Rendering に渡す。
9
aaa
parents: 8
diff changeset
160 \fi
3
87dcdee06b05 add resume
aaa
parents:
diff changeset
161
87dcdee06b05 add resume
aaa
parents:
diff changeset
162 \section{まとめと今後の課題}
87dcdee06b05 add resume
aaa
parents:
diff changeset
163 \begin{itemize}
87dcdee06b05 add resume
aaa
parents:
diff changeset
164 \item 現在は SPE 1基で SceneGraph を処理する例題の作成途中なので、複数 SPE に均等に処理を割り振る例題の作成。
87dcdee06b05 add resume
aaa
parents:
diff changeset
165 \item Property から SceneGraph を生成し tree を構築する部分において、SceneGraph の新規生成と削除を考慮した設計を行う。
87dcdee06b05 add resume
aaa
parents:
diff changeset
166 \item xml から作成された SceneGraph はオリジナルとして配列に順次格納されている。現在は SceneGraph を create する場合はオリジナルの配列をリニアサーチしてきた物をコピーしている。このオリジナルの配列を Texture を管理している hash テーブルを用いてまとめて管理できるようにする。
87dcdee06b05 add resume
aaa
parents:
diff changeset
167 \end{itemize}
87dcdee06b05 add resume
aaa
parents:
diff changeset
168
87dcdee06b05 add resume
aaa
parents:
diff changeset
169 \thispagestyle{fancy}
87dcdee06b05 add resume
aaa
parents:
diff changeset
170 \begin{thebibliography}{9}
87dcdee06b05 add resume
aaa
parents:
diff changeset
171
87dcdee06b05 add resume
aaa
parents:
diff changeset
172 \bibitem{cell}Sony Corporation.
87dcdee06b05 add resume
aaa
parents:
diff changeset
173
87dcdee06b05 add resume
aaa
parents:
diff changeset
174 Cell BroadbandEngine \texttrademark アーキテクチャ, 2006
87dcdee06b05 add resume
aaa
parents:
diff changeset
175
9
aaa
parents: 8
diff changeset
176 \if 0
3
87dcdee06b05 add resume
aaa
parents:
diff changeset
177 \bibitem{spursengine}TOSHIBA: SpursEngine
87dcdee06b05 add resume
aaa
parents:
diff changeset
178
87dcdee06b05 add resume
aaa
parents:
diff changeset
179 \verb|http://www.semicon.toshiba.co.jp|\\
87dcdee06b05 add resume
aaa
parents:
diff changeset
180 \verb|/product/assp/selection/spursengine/index.html|
87dcdee06b05 add resume
aaa
parents:
diff changeset
181
87dcdee06b05 add resume
aaa
parents:
diff changeset
182 \bibitem{cerium} SourceForge.JP: Cerium Rendering Engine
87dcdee06b05 add resume
aaa
parents:
diff changeset
183
87dcdee06b05 add resume
aaa
parents:
diff changeset
184 \verb|https//sourceforge.jp/projects/cerium/|
87dcdee06b05 add resume
aaa
parents:
diff changeset
185
87dcdee06b05 add resume
aaa
parents:
diff changeset
186 \bibitem{opencl} OpenCL
87dcdee06b05 add resume
aaa
parents:
diff changeset
187
87dcdee06b05 add resume
aaa
parents:
diff changeset
188 \verb|http://www.khronos.org/opencl/|
9
aaa
parents: 8
diff changeset
189 \fi
3
87dcdee06b05 add resume
aaa
parents:
diff changeset
190
87dcdee06b05 add resume
aaa
parents:
diff changeset
191 \bibitem{wataru} Wataru MIYAGUNI.
87dcdee06b05 add resume
aaa
parents:
diff changeset
192
87dcdee06b05 add resume
aaa
parents:
diff changeset
193 Cell 用の Fine-Grain Task Manager の実装, 2009
87dcdee06b05 add resume
aaa
parents:
diff changeset
194
87dcdee06b05 add resume
aaa
parents:
diff changeset
195 \end{thebibliography}
87dcdee06b05 add resume
aaa
parents:
diff changeset
196 \end{document}