11
|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
3
|
|
4 <html xmlns="http://www.w3.org/1999/xhtml">
|
|
5
|
|
6 <head>
|
|
7 <title>2009年度卒業論文</title>
|
|
8 <!-- metadata -->
|
|
9 <meta name="generator" content="S5" />
|
|
10 <meta name="version" content="S5 1.1" />
|
|
11 <meta name="presdate" content="20050728" />
|
|
12 <meta name="author" content="Tagano Kaito" />
|
|
13 <meta name="company" content="ie-ryukyu" />
|
|
14 <!-- configuration parameters -->
|
|
15 <meta name="defaultView" content="slideshow" />
|
|
16 <meta name="controlVis" content="hidden" />
|
|
17 <!-- style sheet links -->
|
|
18 <link rel="stylesheet" href="ui/default/slides.css" type="text/css" media="projection" id="slideProj" />
|
|
19 <link rel="stylesheet" href="ui/default/outline.css" type="text/css" media="screen" id="outlineStyle" />
|
|
20 <link rel="stylesheet" href="ui/default/print.css" type="text/css" media="print" id="slidePrint" />
|
|
21 <link rel="stylesheet" href="ui/default/opera.css" type="text/css" media="projection" id="operaFix" />
|
|
22 <!-- S5 JS -->
|
|
23 <script src="ui/default/slides.js" type="text/javascript"></script>
|
|
24 </head>
|
|
25 <body>
|
|
26
|
|
27 <div class="layout">
|
|
28 <div id="controls"><!-- DO NOT EDIT --></div>
|
|
29 <div id="currentSlide"><!-- DO NOT EDIT --></div>
|
|
30 <div id="header"></div>
|
|
31 <div id="footer">
|
12
|
32 <h1>1-322 / 20090226</h1>
|
11
|
33 <h2>卒業論文</h2>
|
|
34 </div>
|
|
35
|
|
36 </div>
|
|
37
|
|
38
|
|
39 <div class="presentation">
|
|
40
|
|
41 <div class="slide">
|
|
42 <center>
|
|
43 <br><br>
|
|
44 <p><font size="10" color="#000000">並列プログラミングを用いた<br>ゲームフレームワークの設計と実装</font></p>
|
|
45 <br>
|
12
|
46 <p><font size="5" color="#000000">琉球大学 工学部情報 工学科 055734A</font></p>
|
|
47 <p><font size="5" color="#000000">多賀野海人</font</p>
|
|
48 <p><font size="5" color="#000000">指導教官:河野真治</font</p>
|
|
49 <p><font size="5" color="#000000">Feb, 26, 2009</font></p>
|
11
|
50 </center>
|
|
51 </div>
|
|
52
|
|
53 <div class="slide">
|
|
54 <h1>目次</h1>
|
|
55 <ul>
|
|
56 <li>研究背景と目的</li>
|
12
|
57 <li>Cell, SPE を用いた</li>
|
11
|
58 <li>Ceriumとは</li>
|
|
59 <li>ゲーム開発</li>
|
|
60 <li>Ceriumを用いたゲーム開発</li>
|
|
61 <li>Rendering</li>
|
|
62 </ul>
|
|
63 <div class="handout">
|
|
64 [any material that should appear in print but not on the slide]
|
|
65 </div>
|
|
66
|
|
67 <div class="slide">
|
|
68 <h1>研究背景と目的</h1>
|
|
69 <ul>
|
|
70 <br>
|
|
71 <li><font size="5" color="#509050">高性能なコンピュータを用いて完成度の高いゲームを作成したい!</font></li>
|
|
72 <li><font size="4" color="#000000">並列処理を用いたゲームプログラミングは、学部生にとって困難である。</font></li>
|
|
73 <li><font size="4" color="#000000">データ転送やタスクの生成等のこれまで学んだことのない技術が多く存在する。</font></li>
|
|
74 <li><font size="4" color="#000000">学生実験では、ゲームの完成度を上げることが難しい。</font></li>
|
12
|
75 <br>
|
11
|
76 <font size = "4">
|
|
77 本研究では、PlayStation3上でゲームプログラミングを行う際に、Cellの性能を活かしながら、
|
|
78 学生実験での完成度の高いゲーム開発を目的としている。
|
|
79 </font>
|
|
80 <!-- 研究背景と目的
|
|
81 <font size="5">
|
|
82 ゲームプログラミングにおける並列処理は、データが処理される順番を把握することができないので
|
|
83 出力結果などが特定しづらく、デバッグが困難である。データ転送やタスクの生成等のこれまで学んだことのない技術が多く存在する。
|
|
84 短期間の学生実験では新しい技術を習得することに時間を割かれ、ゲームの完成度を上げることが難しくなる。
|
|
85 <br><br>
|
|
86 本研究では、PlayStation3上でゲームプログラミングを行う際に、Cellの性能を活かしながら、
|
|
87 アーキテクチャに依存する記述を排除した、並列プログラミングを目的としている。
|
|
88 </font>
|
|
89 -->
|
|
90 </ul>
|
|
91 <div class="handout">
|
|
92 [any material that should appear in print but not on the slide]
|
|
93 </div>
|
|
94 </div>
|
|
95
|
|
96 <div class="slide">
|
|
97 <h1>Cellとは</h1>
|
|
98 <ul>
|
|
99 <li><font size="4" color="#000000">Cellは、マルチコアCPUの1つで、構成は「ヘテロジニアス・マルチコアプロセッサ構成」である。
|
|
100 汎用的な用途に対応した1種類のコアを用意するのではなく、制御系プロセッサコア(PPE)と演算系プロセッサコア(SPE)という異なる
|
|
101 コアを用意している。</font></li>
|
|
102 <li></li>
|
|
103 <img src="photo/Cell-main.jpg" alt="Cell-main" width="430" height="283">
|
|
104 <img src="photo/SPE.jpg" alt="SPE" width="233" height="221">
|
|
105 </ul>
|
|
106 <div class="handout">
|
|
107 [any material that should appear in print but not on the slide]
|
|
108 </div>
|
|
109
|
|
110 <div class="slide">
|
|
111 <h1>Cellとは</h1>
|
|
112 <ul>
|
|
113 <li>SPU内部のパイプライン</li>
|
|
114 <font size="4" color="#000000">SPU内部では、読み込み(read)、実行(exec)、書き出し(write)の3つの動作が3段パイプラインで実行される</font>
|
|
115 <center>
|
|
116 <br><br>
|
|
117 <img src="photo/manager-pipeline.png" alt="manager-pipeline" width="539" height="264">
|
|
118 </center>
|
|
119 </ul>
|
|
120 <div class="handout">
|
|
121 [any material that should appear in print but not on the slide]
|
|
122 </div>
|
|
123
|
|
124 <div class="slide">
|
|
125 <h1>ゲーム開発</h1>
|
|
126 <ul>
|
|
127 <li>Cellを用いたゲーム開発</li>
|
|
128 <li>必要になる知識、技術など</li>
|
|
129 <li>PS3を用いたプログラミング</li>
|
|
130 </ul>
|
|
131 <div class="handout">
|
|
132 [any material that should appear in print but not on the slide]
|
|
133 </div>
|
|
134
|
|
135 <div class="slide">
|
|
136 <h1>Ceriumを用いたゲーム開発</h1>
|
|
137 <ul>
|
|
138 <li>手順</li>
|
|
139 <li></li>
|
|
140 <li></li>
|
|
141 </ul>
|
|
142 <div class="handout">
|
|
143 [any material that should appear in print but not on the slide]
|
|
144 </div>
|
|
145
|
|
146 <div class="slide">
|
|
147 <h1>Ceriumとは</h1>
|
|
148 <ul>
|
|
149 <li><font size="4" color="#000000">Cerium は以下の3つの要素で構成されている。</font></li>
|
|
150 <pre>
|
|
151 Scene Graph
|
|
152 Rndering Engine
|
|
153 Task Manager
|
|
154 </pre>
|
|
155 <center>
|
|
156 <img src="photo/Cerium-main.png" alt="Cerium-main" width="400" height="300">
|
|
157 </center>
|
|
158 </ul>
|
|
159 <div class="handout">
|
|
160 [any material that should appear in print but not on the slide]
|
|
161 </div>
|
|
162
|
|
163 <div class="slide">
|
|
164 <h1>ToDo、Doing、Done</h1>
|
|
165 <ul>
|
|
166 <!--
|
|
167 <li><font size="3" color="#000000"><font size="5" color="#990000">済</font>: Texture の分割 (複数のTexture、blcok)</font></li>
|
|
168 <li><font size="3" color="#000000"><font size="5" color="#990000">済</font>: 分割した Texture からの Scale の作成</font></li>
|
|
169 <li><font size="3" color="#000000"><font size="5" color="#990000">済</font>: Textureの分割数(px, py)</font></li>
|
|
170 <li><font size="3" color="#000000"><font size="5" color="#990000">済</font>: 読み込んだTextureのハッシュテーブル</font></li>
|
|
171 <li><font size="3" color="#000000"><font size="5" color="#990000">済</font>: blender、空のTextureの代わりを用意する</font></li>
|
|
172 <li><font size="3" color="#000000"><font size="5" color="#990000">済</font>: Textureの分割、Scalの組み込み</font></li>
|
|
173 -->
|
|
174 <li><font size="4" color="#000000"><font size="5" color="#990000">済?</font>: BlenderのScript、base64エンコード、書き込みをxmlの最後に持っていく</font></li>
|
|
175 <li><font size="4" color="#000000"><font size="5" color="#000000">未</font>: ゲーム班のGameのPS3への移植の手伝い?</font></li>
|
|
176 <li><font size="4" color="#000000"><font size="5" color="#959500">New</font>: ユーザにxmlを記述させ、そこからMakefileを生成する</font></li>
|
|
177 <li><font size="4" color="#000000"><font size="5" color="#959500">New</font>: blenderから生成したxmlのDTD作成</font></li>
|
|
178 <li><font size="4" color="#000000"><font size="5" color="#000000">未</font>: !多体問題!</font></li>
|
|
179 </ul>
|
|
180 <div class="handout">
|
|
181 [any material that should appear in print but not on the slide]
|
|
182 </div>
|
|
183 </div>
|
|
184
|
|
185 <div class="slide">
|
|
186 <h1>blenderから生成されるxmlの仕様変更</h1>
|
|
187 <ul>
|
|
188 <li><font size="5" color="#000000"></font>変更したxmlの構成</li>
|
|
189 <font size="4">
|
|
190 <pre>
|
|
191 OBJECT-3D
|
|
192 -surface
|
|
193 --cordinate
|
|
194 --normal
|
|
195 --model
|
|
196 --texture
|
|
197 --image-flag
|
|
198 -surface
|
|
199 --cordinate
|
|
200 --normal
|
|
201 --model
|
|
202 --texture
|
|
203 --image-flag
|
|
204 :
|
|
205 :
|
|
206 -image
|
|
207 -image
|
|
208 :
|
|
209 /OBJECT-3D
|
|
210 </pre>
|
|
211 </font>
|
|
212 </ul>
|
|
213 <div class="handout">
|
|
214 [any material that should appear in print but not on the slide]
|
|
215 </div>
|
|
216 </div>
|
|
217
|
|
218 <div class="slide">
|
|
219 <h1>PythonScript</h1>
|
|
220 <ul>
|
|
221 <li><font size="5" color="#000000">Textureが貼られていなかった時に代わりのものを用意する</font></li>
|
|
222 <font size="4" color="#000000">現在は真っ白な画像、回転とかが分かるような画像に変更</font>
|
|
223 <font size="4" color="#000000">xmlファイルの生成、xmlファイル読み込みの部分の変更</font>
|
|
224 <font size="4">
|
|
225 <br><br>
|
|
226 <center>
|
|
227 <img src="photo/sample1.png" alt="sample_before.png" width="80" height="80" border="1">
|
|
228 <img src="photo/sample.png" alt="sample_after.png" width="80" height="80" border="1">
|
|
229 <br>
|
|
230 図:sample.png 左からbefore、after
|
|
231 <br>
|
|
232 </center>
|
|
233 <pre>
|
|
234
|
|
235 iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAAAAADhZOFXAAAAHklEQVQIHWP8zwACjAxMYBpIYDJg
|
|
236 MgyMMMVwETgDAGLjAgkzd5FJAAAAAElFTkSuQmCC
|
|
237
|
|
238 </pre>
|
|
239
|
|
240 <li></li>
|
|
241
|
|
242 </font>
|
|
243 </ul>
|
|
244 <div class="handout">
|
|
245 [any material that should appear in print but not on the slide]
|
|
246 </div>
|
|
247 </div>
|
|
248
|
|
249 <div class="slide">
|
|
250 <h1></h1>
|
|
251 <ul>
|
|
252 <li><font size="5" color="#000000"></font></li>
|
|
253 <font size="4">
|
|
254
|
|
255 </font>
|
|
256 </ul>
|
|
257 <div class="handout">
|
|
258 [any material that should appear in print but not on the slide]
|
|
259 </div>
|
|
260 </div>
|
|
261 <!--
|
|
262 <div class="slide">
|
|
263 <h1>Textureの分割、Scale</h1>
|
|
264 <ul>
|
|
265 <li><font size="5" color="#000000">Textureの分割、Scale処理に用いるデータ構造</font></li>
|
|
266 <font size="4">
|
|
267 <pre>
|
|
268
|
|
269 uint32 *tex_dest = (uint32*)manager->malloc(tile_size);
|
|
270
|
|
271 // 1 / 2
|
|
272 for (int y = 0; y < tex_height; y += TEXTURE_SPLIT_PIXEL*2) {
|
|
273 for (int x = 0; x < tex_width; x += TEXTURE_SPLIT_PIXEL*2) {
|
|
274 for (int j = 0; j < TEXTURE_SPLIT_PIXEL*2; j+=2) {
|
|
275 for (int i = 0; i < TEXTURE_SPLIT_PIXEL*2; i+=2) {
|
|
276 tex_dest[t++] = tex_src[(x+i) + tex_width*(y+j)];
|
|
277 }
|
|
278 }
|
|
279 }
|
|
280 }
|
|
281
|
|
282 </pre>
|
|
283 </font>
|
|
284 </ul>
|
|
285 <div class="handout">
|
|
286 [any material that should appear in print but not on the slide]
|
|
287 </div>
|
|
288 </div>
|
|
289 -->
|
|
290 <!--
|
|
291 <div class="slide">
|
|
292 <h1>ハッシュテーブル</h1>
|
|
293 <ul>
|
|
294 <pre><font size="4" color="#000000">
|
|
295 // ハッシュテーブル
|
|
296 struct
|
|
297 hashtable{
|
|
298 int tx_id; // Texture id
|
|
299 char* key; // キー
|
|
300 };
|
|
301 </font></pre>
|
|
302 <pre><font size="4" color="#000000">
|
|
303 // ハッシュ関数
|
|
304 for(int i = 0; key[i]; i++){
|
|
305 //value += key[i] + 1;
|
|
306 value += key[i]*(i+1)*17 + 1;
|
|
307 }
|
|
308 return fmod(value, N);
|
|
309 }
|
|
310 </font></pre>
|
|
311 </ul>
|
|
312 <div class="handout">
|
|
313 [any material that should appear in print but not on the slide]
|
|
314 </div>
|
|
315 </div>
|
|
316
|
|
317 <div class="slide">
|
|
318 <h1>ハッシュテーブル</h1>
|
|
319 <pre><font size="3" color="#000000">
|
|
320 // 登録、検索
|
|
321 int
|
|
322 hash::hash_regist(const char* key){
|
|
323 int hash = hash_function(key);
|
|
324 for(int i = 0; ; i++){
|
|
325 // 値が空のとき
|
|
326 if(table[hash].tx_id == -1){
|
|
327 table[hash].key = (char*)key;
|
|
328 table[hash].tx_id = id_count;
|
|
329 id_count++;
|
|
330 printf("x : hash = %d, id = %d : %s\n"
|
|
331 , hash, table[hash].tx_id, table[hash].key);
|
|
332 return table[hash].tx_id;
|
|
333 </font></pre>
|
|
334 <div class="handout">
|
|
335 [any material that should appear in print but not on the slide]
|
|
336 </div>
|
|
337 </div>
|
|
338
|
|
339
|
|
340 <div class="slide">
|
|
341 <h1>ハッシュテーブル</h1>
|
|
342 <pre><font size="3" color="#000000">
|
|
343 // 検索keyが一致したとき
|
|
344 }else if(strcmp(key, table[hash].key) == 0 && table[hash].tx_id != -1){
|
|
345 printf("o : hash = %d, id = %d : %s\n"
|
|
346 , hash, table[hash].tx_id, table[hash].key);
|
|
347 return table[hash].tx_id;
|
|
348 }
|
|
349 printf("hash = %d => ", hash);
|
|
350 hash = ((37*hash)^(11*i)) % N;
|
|
351 printf("%d\n", hash);
|
|
352 }
|
|
353 }
|
|
354 </font></pre>
|
|
355 <div class="handout">
|
|
356 [any material that should appear in print but not on the slide]
|
|
357 </div>
|
|
358 </div>
|
|
359 -->
|
|
360 <!--
|
|
361 <div class="slide">
|
|
362 <h1></h1>
|
|
363 <ul>
|
|
364 <li></li>
|
|
365 </ul>
|
|
366 <div class="handout">
|
|
367 [any material that should appear in print but not on the slide]
|
|
368 </div>
|
|
369 </div>
|
|
370 -->
|
|
371
|
|
372 </div>
|
|
373
|
|
374 </body>
|
|
375 </html>
|