Microsoft PowerPoint - RayTracing-A070

Similar documents
Microsoft Word - povray.docx

POV-Ray による CG 作成 秋田工業高等専門学校竹下大樹 引用元釧路工業高等専門学校技術室報告集第 9 号二谷聡志著 オープンソースソフトウェアによる CG 作成および動画作成

PowerPoint プレゼンテーション

Microsoft PowerPoint povray演習-2.pptx

untitled

POV-Ray revision revision01 Copyright c Daikoku Manabu This tutorial

POV-Ray 1 POV-Ray POV-Ray for Windows. [OK]. 2 [NEW] ( 4 ) Lesson-1 1 Sphere( ) Cube( ) Cone_Y( ) Disk_Y( ). 4 POV-Ray 3 1. [Save] (

PYTHON 資料 電脳梁山泊烏賊塾 PYTHON 入門 GUI プログラミング Python/Tkinter(Tcl/Tk) の利用 全般 Tcl/Tk とは GUI(Graphical User Interface) 用のスクリプト言語で 此れを利用すると ウィジェット (widget) と呼ば

コンピュータグラフィックス第8回

スライド 1

PDF Convertor for mac スタートアップガイド

ライティングの基本要素ライト ( 光源 ) の位置や種類 強さを決め モデルやシーンの見せ方を決めることをライティングとよぶ また モデルの表面での光の反射の度合いを調節することで ライティングの効果を変化させることができる 今回は ライティングの基本的な要素を解説し SketchUp のライティン

Dahua アプリかんたん手順(2) SmartPlayer操作手順書

スライド 1

1. マイピクチャの中に [ 講習用 ] フォルダーを作成し その中に上記の図のような階層構造のフォルダーを作成します (1) まず マイピクチャの中に [ 講習用 ] フォルダーを作成します [ コンピューター ] [ マイピクチャ ]1 [ マイピクチャ ] フォルダ内 ( 右枠 ) の空白部分

SnNCutCnvs ステッカーウィザードを使ってデザインを作成する ここでは スターターキットに付属している A4 サイズ (210 mm 297 mm) のプリントステッカーを使用する場合の例を説明します [ ステップ 1] エリアサイズを変更します パソコンの場合 : 編集画面 >[ プロジェ

XAML Do-It-Yourself シリーズ 第 12 回 3D グラフィックス -1-

CubePDF ユーザーズマニュアル

ピクシア練習問題① 明るさ・コントラスト

JTrimで「さくらんぼ《を描く[下巻]

コンピュータグラフィックス第6回

情報工学実験Ⅲ

スライド 1

1. 花形の模様枠を作る 1 JTim の アイコンをクリックして起動します 2 背景色を 黒 にします 表示 背景色 黒 OK します 3 250*250 の 白 で新規作成します ファイル 新規作成 横 250*250 * キャンバスの色白 OK 4 範囲 60 で 円形 フェードアウトします

画像ファイルを扱う これまでに学んだ条件分岐, 繰り返し, 配列, ファイル入出力を使って, 画像を扱うプログラムにチャレンジしてみよう

PowerPoint で作成したプレゼンファイルを動画に変換 フォトアルバムを作成し, ビデオ形式で保存します 作成したビデオは YouTube にアップロードしたり DVD を作成し テレビでも視聴でき 家族で楽しむ事もできます 1.PowerPoint を起動 1 スタートボタンをクリックし P

目次 はじめに ツールのインストール ソフトウェアを起動する 画像ファイルの選択... 7 位置の調整... 8 背景色の設定 進捗バーの設定 パスワード設定 ユーザー情報の設定 設定

目次 1. プロフィール画像工房の概要 3 2. プロフィール画像の作成 8 3. プロフィール画像の登録 まとめ 27 レッスン内容 プロフィール画像工房 インターネット上に提供されているさまざまなサービス ( これ以降 サービス と記述します ) を利用するときには 利用するユーザー

大阪ガス株式会社 情報通信部 御中

基本設計書

Microsoft Word - macマニュアル【 】.doc

目次 1. ログイン ログアウト デスクトップ ( 例 :Word Excel 起動中 ) Dock( 例 :Word Excel 起動中 ) Finder ウィンドウ メニューバー ( 例 :Word 起動中 )...

tc15_tutorial02

manual_ezcap_edit

Microsoft PowerPoint - pr_12_template-bs.pptx

共済会_Kねっと利用マニュアル(2018).indd

Computer Graphics

このうち ツールバーが表示されていないときは メニューバーから [ 表示 (V)] [ ツールバー (T)] の [ 標準のボタン (S)] [ アドレスバー (A)] と [ ツールバーを固定する (B)] をクリックしてチェックを付けておくとよい また ツールバーはユーザ ( 利用者 ) が変更

Img_win.book

PCの基本操作

monologue Sound Librarian 取扱説明書

Microsoft Word - shape

目次 1. プロフィール画像工房の概要 3 2. プロフィール画像の作成 9 3. プロフィール画像の登録 まとめ 29 レッスン内容 プロフィール画像工房 インターネット上に提供されているさまざまなサービス ( これ以降 サービス と記述します ) を利用するときには 利用するユーザー

Microsoft PowerPoint - Salome-Meca.pptx

始める前にお読みください デジカメ写真のパソコンへの取り込み 保存 印刷 の注意点 1. この操作手順は Windows 7 の機能だけを使用しています 2. 使用するパソコンにインストールされているデジカメ写真の管理ソフトや画像処理ソフト 等をデジカメ写真の取り込み 保存 印刷に使用するときは こ

Field Logic, Inc. 標準モード 3D モデル作成 配置編 Field Logic, Inc. 第 1 版

monologue Sound Librarian 取扱説明書

C#の基本

Microsoft Word - VB.doc

スライド 1

コンピュータグラフィックス基礎              No

RR1soft.book

PDF・画像の貼付け

</div> </div> </body> </html> CSS の記述 (3DCubeAnime1.css) #stage ステージのスタイルを指定します 背景色を黒色で指定します 画像に軽く遠近感を出すために perspective: 1000px; と指定し perspective-orig

Windows8.1基礎 ファイル管理

クリックしてタイトル入力

2 ソフトを使っての年賀状作成準備前もって コンピュータ ( PC ) ライブラリ ピクチャ ( マイピクチャ をクリックして空白のところで右クリック 新規作成 フォルダ クリック 新しいフォルダ を右クリック 名前の変更 をクリック 平成 28 年年賀状作成素材 と入力する (1) Photo F

画像編集のワンポイントテクニック・簡単操作ガイド

Microsoft Word - GIMP.doc

0 21 カラー反射率 slope aspect 図 2.9: 復元結果例 2.4 画像生成技術としての計算フォトグラフィ 3 次元情報を復元することにより, 画像生成 ( レンダリング ) に応用することが可能である. 近年, コンピュータにより, カメラで直接得られない画像を生成する技術分野が生

Microsoft Word - 操作マニュアル(PowerPoint2010).doc

目次 1. HLA Fusion 3.0 がインストール可能な環境 HLA Fusion 3.0 のインストール HLA Fusion 3.4 のインストール 初期設定用データベース接続 ( 初めての方のみ ) 既存データベースのUpg

やさしくPDFへ文字入力 フォーム入力用 v.3.0 簡易操作マニュアル

全国保育士会会員名簿の 更新にかかる 操作手順

2. PhotoScore Lite を起動すると PhotoScore Ultimate へのアップグレードを促す画面が表示されます 確 認したら [continue] をクリックしてください 以上で準備は完了です ステップ 1 へ進みましょう ステップ 1 - 楽譜のスキャン PhotoScor

Spydercheckr03.indd

EPSON PS Folder

EDITOR を起動する 1. MS-3 をパソコンと USB ケーブルで接続し MS-3 の電源を入れます MS-3 とパソコンを USB ケーブルで接続しなくても ライブセットの編集はできます ただし パッチをエディットした結果を保存することはできません 保存にはパソコンとの接続が必要です パッ

2.Picasa3 の実行 デスクトップの をダブルククリック 一番最初の起動の時だけ下記画 面が立ち上がります マイドキュメント マイピクチャ デスクトップのみスキャン にチェックを入れ続行 これはパソコン内部の全画像を検索して Picasa で使用する基本データを作成するものですが 完全スキャン

目次 2 トップ画面の説明 設定画面を開きます iphoneなどの連絡先 ( アドレス帳 ) をバックアップ 復元します アプリ内のデータを表示します USBメモリー内のデータを表示します Dropboxと連携し Dropboxのデータを表示します 各

PE4 Training Text 2

また おすすめはしませんが C: Program Files Adobe Adobe After Effects [version] Support Files Plug-ins に配置することによって After Effects からのみ使用できます macos の場合 /Library/Appl

更新履歴 変更履歴 版数 リリース日 更新内容 第 1 版 2017/5/15 第 1 版発行 第 2 版 2017/7/13 更新履歴 変更内容を追加 (2ページ) 編集の前に を追加(8 ページ ) ブロックエディタ スマートモード エディタモード の説明を追加 (10~12 ページ ) ブロッ

tottori2013-print.key

Studuinoソフトウェアのインストール

GIMP 紹介 (1) 写真の合成と修正 ( コピーしないで下さい ) 1/18 ページ GIMP 紹介 (1) 写真の合成と修正 GIMP( ギンプ ) はフリーソフトですが かなり高度なグラフィックソフトです GIMP 機能の総てを勉強するには 時間が足りませんから 今回は 写真の合成と修正 で

Microsoft Word - 操作マニュアル(PowerPoint2013)

問 1 図 1 の図形を作るプログラムを作成せよ 但し ウィンドウの大きさは と し 座標の関係は図 2 に示すものとする 図 1 作成する図形 原点 (0,0) (280,0) (80,0) (180,0) (260,0) (380,0) (0,160) 図 2 座標関係 問 2

PowerPoint プレゼンテーション

■新聞記事

ポストカード

ZVH_VIEWER

Transcription:

レイトレーシング入門 放送大学面接授業 担当講師 : 鈴木一史 ( 放送大学 教育支援センター 准教授 ) 担当講師の電子メールアドレス ouj.raytrace@gmail.com V.2015 10 改 6 レイトレーシング入門 放送大学 専門科目 : 情報 参考サイト http://goo.gl/6gzjl ( 土 ) ( 日 ) 1 レイトレーシングの仕組み POV RAYの操作 2 基本形状 テクスチャ 材質 空 地面 3 金属 ガラス 拡大縮小 回転 平行移動 4 様々な光源 CSGとブーリアン演算 作品発表 ( 数分の簡単な説明 希望者のみ ) 5 カメラ 光源 虹 霧 フォント 6 ハイトフィールド ポリゴン ボリュームデータ 7 アニメーション化 プログラミング 8 作品制作 作品発表 ( 数分の簡単な説明 希望者のみ ) 1

PC の準備 ファイルを USB メモリーにコピー 右クリックメニューの コピー を使う方法 1. ファイルを右クリックし コピー をクリックする 2. コピー先のフォルダで 右クリックし 貼り付け をクリックする コピー先のフォルダにファイルがコピーされます ドラッグ & ドロップでコピーする方法 1. USBメモリーは ファイルやフォルダをドラッグ & ドロップするだけでコピーできます 例としてUSBメモリーにファイルをコピーする方法を説明します 2. USBメモリーをUSBコネクターに差し込む USBメモリーのフォルダが開きます 3. データを保存しているフォルダを開き USBメモリーのフォルダにファイルをドラッグ & ドロップする 2

USB メモリーの取り外し USBメモリなどを安全に取り外すには 以下の操作手順を行ってください 1. Windows キーを押しながら D キーを押して デスクトップ を表示します 2. デスクトップのタスクバーの通知領域に表示されている をクリックします 3. 表示された一覧から ハードウェアを安全に取り外してメディアを取り出す アイコンをクリックします 4. 表示された一覧から取り外す周辺機器の項目をクリックします ここでは例として USB Flash Disk の取り出し をクリックします 1 3

POV-Ray ( ポブレイ ) レイトレーシングによる非常に美しいコンピューターグラフィックス画像を生成できる POV-Ray( ポブレイ ) は Persistence of Vision Raytracer の略 フリーウェア C++ 言語によって書かれたソースコードも公開 Windows Mac OS X Linux 等をはじめ 様々なオペレーティングシステム上で動作 その歴史は古く 1980 年代から開発が始まる Persistence: 存続 ( すること ) 持続性 Vision: 画像 映像 視力 視覚 The POV-Team という開発者達によって現在も開発が進む POV-Ray の情報 http://www.povray.org/ 様々な OS で利用が可能 Windows Mac Linux バージョン 3.6 と 3.7 がある 4

POV-Ray の画面 (MS-Windows 版 ) ワープロソフトウェアと似ている シーン記述言語を入力してレンダリングを実行 授業で利用するソースプログラムファイル準備 1. ZIP ファイル ( ソースプログラム ) の取得 http://goo.gl/w3ngy0 2. ZIP ファイルを保存 ダブリュー サン エヌ ジー ワイ ゼロ 大文字と小文字も区別 3. ZIP ファイルの解凍 ファイル選択し 右クリックして すべて展開 解凍には時間がかかる (2-3 分程度 ) 5

POV-Ray のメニュー よく利用するボタンの例 新ファイル作成 ファイルを開く レンダリング実行 出力画像のサイズ変更 POV-Ray とシーン記述言語 シーン記述言語 (xxxxxx.pov) 画像の出力 (xxxxxx.bmp) Windows 標準では pov ファイルと画像は以下のディレクトリに保存されるドキュメント Pov-Ray v3.6 scenes 6

POV-Ray の設定 標準設定での出力 Windows bmp Mac pict Linux tga 画質は良いがファイルのサイズが非常に大きい PNG(Portable Network Graphics) 利用が便利 (Win7 等 ) レンダリングオプションに "+FN" を付け加える // 2013 camera{ location <0.0, 0.0, 10.0> look_at <0.0, 0.0, 0.0> light_source { <5.0,5.0, 5.0> color rgb <1.0, 1.0, 1.0> <0.0, 0.0,0.0>, 2.0 pigment { rgb <0.0, 1.0, 0.0> POV-Ray を動かしてみよう シーン記述ファイルを開く 01-sample.pov 読み込む Run ボタンで実行 画像のサイズを変更してみましょう 画像ファイルができたフォルダを開いてみましょう 7

3 次元空間 +Y +Z 3 次元空間に物体が置かれる -X (0,0,0) +X -Z -Y RGB カラーモデル グレースケール画像 (Grayscale Image) 白から黒に至る中間色 ( 濃度の異なる灰色 ) カラー画像 (Color Image) RGB カラーモデル ( 加法混色 ) = + + 8

RGB カラーモデル RGB=(1,0,0) RGB=(0,1,0) RGB=(0,0,1) RGB=(0,1,1) RGB=(1,0,1) RGB=(1,1,0) 加法混色 (Additive Color Mixing) POV-ray の場合 0.0 最小値 1.0 最大値 赤色 (Red) シアン (Cyan) 緑色 (Green) マジェンタ (Magenta) 青色 (Blue) 黄色 (Yellow) シーン記述言語 // 2013 camera{ location <0.0, 0.0, 10.0> look_at <0.0, 0.0, 0.0> light_source { <5.0,5.0, 5.0> color rgb <1.0, 1.0, 1.0> <0.0, 0.0,0.0>, 2.0 pigment { rgb <0.0, 1.0, 0.0> カメラ 照明 物体 カメラの位置 カメラが向いている方向 照明の位置 照明の色 (RGB 値 ) 球の位置 球の半径 球の色 (RGB 値 ) 9

物体の色を変える // 01 sphere01.pov camera{ location <0.0, 0.0, 10.0> look_at <0.0, 0.0, 0.0> light_source { <5.0,5.0, 5.0> color rgb <1.0, 1.0, 1.0> <0.0, 0.0,0.0>, 3.0 pigment { rgb <1.0, 0.0, 0.0> 球の色を変えてみよう rgb <1.0, 0.0, 0.0> 球の大きさを変えてみよう <0.0, 0.0,0.0>, 3.0 球の大きさ 球の色 物体の位置 // 01 sphere02.pov camera{ location <0.0, 0.0, 10.0> look_at <0.0, 0.0, 0.0> light_source { <5.0,5.0, 5.0> color rgb <1.0, 1.0, 1.0> <3.0, 0.0,0.0>, 2.0 pigment { rgb <0.0, 1.0, 0.0> 球の位置を変えてみよう <3.0, 0.0,0.0>, 2.0 球の 3 次元座標 10

複数の物体 // 01 sphere03.pov <0.0, 0.0,0.0>, 2.0 pigment { rgb <1.0, 0.0, 0.0> < 4.0, 0.0,0.0>, 2.0 pigment { rgb <0.0, 1.0, 0.0> <4.0, 0.0,0.0>, 2.0 pigment { rgb <0.0, 0.0, 1.0> 球 ( 赤 ) 球 ( 緑 ) 球 ( 青 ) 球を増やしてみよう 様々な形状の物体 ( 三角錐 コーン ) // 01 cone01.pov camera{ location <0.0, 0.0, 10.0> look_at <0.0, 0.0, 0.0> light_source { <5.0,5.0, 5.0> color rgb <1.0, 1.0, 1.0> cone { <0, 3, 0>, 0.0 <0, 0, 0>, 1.0 open pigment {color rgb <0.0, 1.0, 0.0> 円の中心座標と半径 円の中心座標と半径 Open を指定すると蓋が無くなる 11

様々な形状の物体 ( 直方体 ボックス ) // 01 box01.pov camera{ location <0.0, 0.0, 10.0> look_at <0.0, 0.0, 0.0> light_source { <5.0,5.0, 5.0> color rgb <1.0, 1.0, 1.0> box { < 1.0, 1.0, 1.0> < 1.0, 1.0, 1.0> pigment {color rgb <0.0, 1.0, 0.0> 点の座標 2 点の座標 1 様々な形状の物体 ( 円柱 シリンダー ) // 01 cylinder01.pov camera{ location <0.0, 0.0, 10.0> look_at <0.0, 0.0, 0.0> light_source { <5.0,5.0, 5.0> color rgb <1.0, 1.0, 1.0> cylinder { <0, 0, 0>, <3, 3, 3>, 1 pigment {color rgb <0.0, 1.0, 0.0> 円の中心座標 円の中心座標 円半径 12

様々な形状の物体 ( トーラス ) // 01 torus01.pov camera{ location <0.0, 3.0, 3.0> look_at <0.0, 0.0, 0.0> light_source { <5.0,5.0, 5.0> color rgb <1.0, 1.0, 1.0> torus { 0.8, 0.6 pigment {color rgb <0.0, 1.0, 0.0> X-Z 平面の原点がドーナツの中心になる メジャー半径 マイナー半径 中心線 Blob Box Cone Cylinder Height Field Julia Fractal Lathe Prism Sphere Sphere Sweep Superquadric Ellipsoid Surface of Revolution Text Torus 様々な形状の例 Insert / Shapes に様々な形状がある 手で文字入力しなくても良い? ヘルプに書式の説明あり 13

POV-Ray の設定 エディターのフォントの大きさを変える Options Editor Window Editor Preferences Color/Font Font レンダリング完了時の音を消す Render Sound Settings Render Complete のチェックをオフにする chocolate (0.82, 0.41, 0.12) firebrick (0.70, 0.13, 0.13) brown (0.65, 0.16, 0.16) DarkSalmon (0.91, 0.59, 0.48) salmon (0.98, 0.50, 0.45) LightSalmon (1.00, 0.63, 0.48) orange (1.00, 0.65, 0.00) DarkOrange (1.00, 0.55, 0.00) coral (1.00, 0.50, 0.31) LightCoral (0.94, 0.50, 0.50) tomato (1.00, 0.39, 0.28) OrangeRed (1.00, 0.27, 0.00) red (1.00, 0.00, 0.00) HotPink (1.00, 0.41, 0.71) DeepPink (1.00, 0.08, 0.58) pink (1.00, 0.75, 0.80) LightPink (1.00, 0.71, 0.76) PaleVioletRed (0.86, 0.44, 0.58) maroon (0.69, 0.19, 0.38) MediumVioletRed (0.78, 0.08, 0.52) VioletRed (0.82, 0.13, 0.56) magenta (1.00, 0.00, 1.00) violet (0.93, 0.51, 0.93) plum (0.87, 0.63, 0.87) orchid (0.85, 0.44, 0.84) MediumOrchid (0.73, 0.33, 0.83) DarkOrchid (0.60, 0.20, 0.80) 14

LightBlue (0.68, 0.85, 0.90) PowderBlue (0.69, 0.88, 0.90) PaleTurquoise (0.69, 0.93, 0.93) DarkTurquoise (0.00, 0.81, 0.82) MediumTurquoise (0.28, 0.82, 0.80) turquoise (0.25, 0.88, 0.82) cyan (0.00, 1.00, 1.00) LightCyan (0.88, 1.00, 1.00) CadetBlue (0.37, 0.62, 0.63) MediumAquamarine (0.40, 0.80, 0.67) aquamarine (0.50, 1.00, 0.83) DarkGreen (0.00, 0.39, 0.00) DarkOliveGreen (0.33, 0.42, 0.18) DarkSeaGreen (0.56, 0.74, 0.56) SeaGreen (0.18, 0.55, 0.34) MediumSeaGreen (0.24, 0.70, 0.44) LightSeaGreen (0.13, 0.70, 0.67) PaleGreen (0.60, 0.98, 0.60) SpringGreen (0.00, 1.00, 0.50) LawnGreen (0.49, 0.99, 0.00) green (0.00, 1.00, 0.00) chartreuse (0.50, 1.00, 0.00) MediumSpringGreen (0.00, 0.98, 0.60) GreenYellow (0.68, 1.00, 0.18) LimeGreen (0.20, 0.80, 0.20) OldLace (0.99, 0.96, 0.90) linen (0.98, 0.94, 0.90) AntiqueWhite (0.98, 0.92, 0.84) PapayaWhip (1.00, 0.94, 0.84) BlanchedAlmond (1.00, 0.92, 0.80) bisque (1.00, 0.89, 0.77) PeachPuff (1.00, 0.85, 0.73) NavajoWhite (1.00, 0.87, 0.68) moccasin (1.00, 0.89, 0.71) cornsilk (1.00, 0.97, 0.86) ivory (1.00, 1.00, 0.94) LemonChiffon (1.00, 0.98, 0.80) seashell (1.00, 0.96, 0.93) honeydew (0.94, 1.00, 0.94) MintCream (0.96, 1.00, 0.98) azure (0.94, 1.00, 1.00) AliceBlue (0.94, 0.97, 1.00) lavender (0.90, 0.90, 0.98) LavenderBlush (1.00, 0.94, 0.96) MistyRose (1.00, 0.89, 0.88) white (1.00, 1.00, 1.00) 15

ファイルの保存 こまめにバックアップを! File メニューから Save As で別名をつけて保存できる例えば : Sphere001.pov Sphere002.pov Sphere003.pov Sphere004.pov 学習センターでは マイドキュメントフォルダ以外に保存するとデータが消える (PC 起動時にデータが初期化される ) 重要なファイルは USB メモリーへコピーするかメールに添付して保存する 球 立方体 三角錐 円柱 トーラス 練習課題 1 1. 様々な物体を配置してみよう ( 最低 3 個の物体 ) 2. 各物体の色を変えてみよう 3. 各物体の大きさを変えてみよう 01-assignment01.pov を参考に 16

2 レイトレーシングの仕組み 影付け 屈折 反射などの表現でリアルな画像を生成 光源 視点 画素 可視点 物体 光源から発せられた光で目に届く光をすべて求める レイトレーシングでは 光源から光を追わず視点から光を追跡 可視点の輝度を計算する ( 拡散反射輝度 + 鏡面反射輝度 + 物体反射 + 物体透過 ) 17

colors.inc を使う // 02 sphere01.pov #include "colors.inc" camera{ location <0.0, 0.0, 5.0> look_at <0.0, 0.0, 0.0> light_source { <5.0,5.0, 5.0> color rgb <1.0, 1.0, 1.0> <0, 0, 0> 0.5 pigment {color Green #include colors.inc を使うと pigment {color Green のような宣言が可能になる http://www.povray.org/documentation/view/3.6.1/433/ Red Green Blue Yellow Cyan Magenta Clear White Black Gray05 Gray10 Gray15 Gray20 Gray25 Gray30 Gray35 Gray40 Gray45 Gray50 Gray55 Gray60 Gray65 Gray70 Gray75 Gray80 Gray85 Gray90 Gray95 DimGray DimGrey Gray Grey LightGray LightGrey VLightGray VLightGrey Aquamarine BlueViolet Brown CadetBlue Coral CornflowerBlue DarkGreen DarkOliveGreen DarkOrchid DarkSlateBlue DarkSlateGray DarkSlateGrey DarkTurquoise Firebrick ForestGreen Gold Goldenrod GreenYellow IndianRed Khaki LightBlue LightSteelBlue LimeGreen Maroon MediumAquamarine MediumBlue MediumForestGreen MediumGoldenrod MediumOrchid MediumSeaGreen MediumSlateBlue MediumSpringGreen MediumTurquoise MediumVioletRed MidnightBlue Navy NavyBlue Orange OrangeRed Orchid PaleGreen Pink Plum Salmon SeaGreen Sienna SkyBlue SlateBlue SpringGreen SteelBlue Tan Thistle Turquoise Violet VioletRed Wheat Yellow Green SummerSky RichBlue Brass Copper Bronze Bronze2 Silver BrightGold OldGold Feldspar Quartz Mica NeonPink DarkPurple NeonBlue CoolCopper MandarinOrange LightWood MediumWood DarkWood SpicyPink SemiSweetChoc BakersChoc Flesh NewTan NewMidnightBlue VeryDarkBrown DarkBrown DarkTan GreenCopper DkGreenCopper DustyRose HuntersGreen Scarlet Med_Purple Light_Purple Very_Light_Purple 背景を変える // 02 sphere02.pov #include colors.inc Camera{ location <0.0, 0.0, 5.0> look_at <0.0, 0.0, 0.0> Light_source { <5.0,5.0, 5.0> color rgb <1.0, 1.0, 1.0> background{ color SkyBlue <0, 0, 0> 0.5 pigment {color Green background { color SkyBlue 18

空と地面 // 02 sphere03.pov #include "colors.inc" #include "skies.inc" camera{ location <0.0, 0.0, 5.0> look_at <0.0, 0.0, 0.0> light_source { <5.0,5.0, 5.0> color rgb <1.0, 1.0, 1.0> sky_ S_Cloud1 plane { y, 1 pigment { color rgb <0.7,0.5,0.3> <0, 0, 0> 0.5 pigment {color Green 空と地面があると見た目が良い!? 空と地面の例 S_Cloud1 S_Cloud2 S_Cloud3 S_Cloud4 S_Cloud5 #include "skies.inc" sky S_Cloud1 19

物体のテクスチャを変える 1 // 02 texture01.pov #include "colors.inc" #include "skies.inc" #include "textures.inc" camera{ location <0.0, 0.0, 5.0> look_at <0.0, 0.0, 0.0> light_source { <5.0,5.0, 5.0> color rgb <1.0, 1.0, 1.0> sky_ S_Cloud1 plane { y, 1 pigment { color rgb <0.7,0.5,0.3> <0, 0, 0> 1.0 texture { pigment { White_Marble finish { Shiny scale 0.5 大理石のテクスチャ ( 模様 ) 物体のテクスチャを変える 2 <0, 0, 0> 1.0 texture { pigment { White_Marble finish { phong 0.5 scale 0.5 ライブラリーとして すでにあるテクスチャを利用できる Finish は 物体の表面の光の屈折 ハイライトなどを記述 Scale は テクスチャのスケールを変える 20

<0, 0, 0> 1.0 texture { pigment { White_Marble <0, 0, 0> 1.0 texture { PinkAlabaster 物体のテクスチャを変える 3 texture{ を使うとき pigment をつけるとエラーになるものがある 例 1 例 2 テクスチャを使用するために #include 文を忘れずに! #include "colors.inc" #include "shapes.inc" #include "textures.inc" #include "Woods.inc" #include "stones.inc" #include "glass.inc" #include "metals.inc" pigment{ をつけない! 41 テクスチャのリスト 石 http://texlib.povray.org/allcategories.html // 02 texture list 1.pov 省略 < 3.0, +3.0, 0> 0.45 texture { pigment { Jade 省略 Agate( アゲット ; めのう ), Granite( グラニィト ; 花崗岩 ), Jade( ジェイド ; ひすい ) 42 21

// GLASSES ガラス texture { Glass Glass2 //"Plexiglas" Glass3 //"Bleiglas" Green_Glass NBglass NBoldglass NBwinebottle NBbeerbottle Ruby_Glass Dark_Green_Glass Vicks_Bottle_Glass Yellow_Glass Orange_Glass // SKIES and CLOUDS pigment { Blue_Sky Bright_Blue_Sky Blue_Sky2 Blue_Sky3 Blood_Sky Apocalypse Clouds FBM_Clouds texture { // Sky Shadow_Clouds 空 雲 // SPECIAL EFFECTS pigment { Candy_Cane Y_Gradient X_Gradient texture { Peel Water Cork Lightening1 Lightening2 Starfield 効果 texture{ を使うとき pigment をつけるとエラーになるものがある 43 // WOODS pigment { Cork Cherry_Wood Pine_Wood Dark_Wood Tan_Wood White_Wood Tom_Wood DMFWood1 DMFWood2 DMFWood3 DMFWood4 DMFWood5 DMFLightOak DMFDarkOak 木 texture { // WOOD DMFWood6 EMBWood1 Yellow_Pine Rosewood Sandalwood // METALS texture { Chrome_Metal Brass_Metal Bronze_Metal Gold_Metal Silver_Metal Copper_Metal Polished_Chrome Polished_Brass New_Brass Spun_Brass Brushed_Aluminum Silver1 Silver2 Silver3 Brass_Valley Rust Rusty_Iron Soft_Silver New_Penny Tinny_Brass Gold_Nugget Aluminum Bright_Bronze 金属 texture{ を使うとき pigment をつけるとエラーになるものがある 44 22

物体のテクスチャを変える ( 木と石 ) // 02 texture02.pov 省略 <2, 2, 2> 1.0 texture { T_Wood1 cylinder { < 1, 1, 1>, <1, 1, 1>, 0.5 texture { pigment { Jade finish { Shiny scale 1.0 #include "colors.inc" #include "shapes.inc" #include "skies.inc #include "textures.inc" #include Woods.inc" #include "stones.inc" #include "glass.inc" #include "metals.inc " 物体のテクスチャ SCALE を変える // 02 texture03.pov <0, 0, 0> 1.0 texture { pigment { Red_Marble finish { Shiny scale 0.5 省略 同じテクスチャでも scale を変えると見た目が変化する 1.00, 0.75, 0.50, 0.25, 0.01 scale の違い 23

物体のテクスチャ finish // 02 texture04.pov <0, 0, 0> 1.0 texture { pigment { Red_Marble finish { Shiny scale 0.5 省略 表面反射の指定 上段 :Phong_Shiny, Phong_Dull, Phong_Glossy, 下段 :Shiny, Dull, Glossy, Luminous, Mirror ぴかぴか くすんだ つやつやした 光を発する 鏡 球 立方体 三角錐 円錐 練習課題 2 1. 様々な物体を配置してみよう ( 最低 3 個の物体 ) 2. 空または地面を追加してみよう 3. 各物体のテクスチャを変えてみよう #include "colors.inc" #include "shapes.inc" #include "skies.inc #include "textures.inc" #include Woods.inc" #include "stones.inc" #include "glass.inc" #include "metals.inc " 練習課題 1 を拡張 または 02-assignment01.pov を参考に 24

3 物体のテクスチャを変える ( 金属 ) // 03 texture01.pov 省略 <0, 0, 0> 0.4 texture { Gold_Texture <+1, 0, 0> 0.4 texture { Silver_Texture <+2, 0, 0> 0.4 texture { Copper_Texture 省略 #include "metals.inc " 25

// 03 texture02.pov 省略 < 2, 0, 0> 0.4 material{m_glass < 1, 0, 0> 0.4 material{m_glass2 <0, 0, 0> 0.4 material{m_glass3 物体のテクスチャを変える ( ガラス ) #include "glass.inc" {M_Dark_Green_Glass {M_Yellow_Glass {M_Orange_Glass {M_Vicks_Bottle_Glass {F_Glass1 {M_Glass {M_Glass2 {M_Glass3 {M_Green_Glass {M_Ruby_Glass ガラスでは texture ではなく material を使用する ガラスでは透過光が綺麗に表現される レイトレーシングならではの画像! 移動 (translation) 拡大縮小 (scaling) 回転 (rotation) 物体の移動 拡大縮小 回転 アフィン変換 (Affine transformation) 図形等を回転 引き延ばしたりする変換はアフィン変換とよばれる 平行移動 + 線形変換 ( 拡大縮小 回転 剪断 ) の組み合わせで表現される Affine は英語の発音ではアファインに近い 剪断 ( せんだん ) あるいはシア (shear) は はさみなどを使って挟み切るように 物体の面に対して平行方向に力が作用すること 26

物体の移動 // 03 sphere01.pov 省略 plane { y, 1 pigment { color rgb <0.8,0.6,0.4> <0, 0, 0>, 1 pigment { Red <0, 0, 0>, 1 pigment { Green translate <3,0,0> 物体の拡大縮小 // 03 sphere02.pov #include "colors.inc" #include "skies.inc" sky_ S_Cloud2 plane { y, 1 pigment { color rgb <0.8,0.6,0.4> <0, 0, 0>, 1 pigment { Green scale <3,1,1> 27

物体の回転 // 03 cyliner01.pov sky_ S_Cloud2 plane { y, 1 pigment { color rgb <0.8,0.6,0.4> cylinder { <0, 0, 0>, <0, 3, 0>, 1 pigment { Green rotate <0,0,45> 移動 拡大 縮小 回転の順番 緑球の中心の X 座標は 3.0 // 03 sphere03.pov <0, 0, 0>, 0.5 pigment { Blue <6, 0, 0>, 0.5 pigment { Red <0, 0, 0>, 1 pigment { Green scale <1.5, 1.5, 1.5> translate <3,0,0> 緑球の中心の X 座標は 3 1.5=4.5 // 03 sphere04.pov <0, 0, 0>, 0.5 pigment { Blue <6, 0, 0>, 0.5 pigment { Red <0, 0, 0>, 1 pigment { Green translate <3,0,0> scale <1.5, 1.5, 1.5> 回転 拡大縮小は原点を中心に行われる 回転 拡大縮小を行った後に移動を行う 28

球 立方体 三角錐 円錐 練習課題 3 1. 様々な物体を配置してみよう ( 最低 3 個の物体 ) 2. 空または地面を追加してみよう 3. 各物体のテクスチャを変えてみよう #include "colors.inc" #include "shapes.inc" #include "skies.inc #include "textures.inc" #include Woods.inc" #include "stones.inc" #include "glass.inc" #include "metals.inc " 練習課題 2 を拡張 または 03-assignment01.pov を参考に 4 29

光源の種類 点光源 : 全方向に放射 スポットライト : 円錐形に収束した光が放射 円柱光源 : 円柱形に収束した光が放射 面光源 : 長方形の領域に点光源が複数あり放射 light_source { < 光源の座標 > color 光源の色と明るさ光源の種類属性 // 04 light01.pov camera{ location <0.0, 20.0, 0.0> look_at <0.0, 0.0, 0.0> light_source { <0.0,0.0, 10.0> color rgb <1.0, 1.0, 1.0> <0.0, 0.0,0.0>, 3.0 pigment { rgb <1.0, 0.0, 0.0> plane { <0.0,0.0,1.0>, 10 pigment { rgb <1.0, 1.0, 1.0> 点光源 点光源 : 全方向に照射 30

// 04 light02.pov camera{ location <0.0, 20.0, 0.0> look_at <0.0, 0.0, 0.0> light_source { <0.0, 20.0, 20.0> color rgb <1.0, 1.0, 1.0> spotlight point_at<0.0, 0.0, 0.0> radius 3 falloff 15 <0.0, 0.0,0.0>, 3.0 pigment { rgb <1.0, 0.0, 0.0> スポットライト Falloff Radius 中心線からの角度の数値内側 : 光減衰なし外側 : 光減衰する範囲 point_at // 04 light02.pov camera{ location <0.0, 20.0, 0.0> look_at <0.0, 0.0, 0.0> light_source { <0.0, 20.0, 20.0> color rgb <1.0, 1.0, 1.0> spotlight point_at<0.0, 0.0, 0.0> radius 3 falloff 15 <0.0, 0.0,0.0>, 3.0 pigment { rgb <1.0, 0.0, 0.0> スポットライト ( 光減衰範囲の比較 ) Falloff 15 Falloff 30 31

// 04 light03.pov camera{ location <0.0, 20.0, 0.0> look_at <0.0, 0.0, 0.0> light_source { <0.0, 20.0, 20.0> color rgb <1.0, 1.0, 1.0> cylinder point_at<0.0, 0.0, 0.0> radius 0.50 falloff 1.00 <0.0, 0.0,0.0>, 3.0 pigment { rgb <1.0, 0.0, 0.0> 円柱光源 光の束が円錐形ではなく円柱形で制限 スポットライトは光源から遠ざかると光の半径が大きくなるが 円柱光源は半径がほぼ一定 レーザー光線のような効果! // 04 light04.pov camera{ location <0.0, 20.0, 0.0> look_at <0.0, 0.0, 0.0> light_source { <0.0, 20.0, 20.0> color rgb <1.0, 1.0, 1.0> area_light <1,0,0>, <0,1,0> 30,30 <0.0, 0.0,0.0>, 3.0 pigment { rgb <1.0, 0.0, 0.0> 面光源 X 軸に沿って 1 ユニット Y 軸に沿って 1 ユニット 30x30 個のライト 影がソフトになる レンダリングに時間がかかる 32

// 04 light05.pov camera{ location <0.0, 20.0, 0.0> look_at <0.0, 0.0, 0.0> light_source { <0.0, 5.0, 5.0> color rgb <1.0, 1.0, 1.0> looks_like { sphere{ <0,0,0>, 0.5 pigment { rgb <1.0, 1.0, 1.0> finish {ambient 1 <0.0, 0.0,0.0>, 3.0 pigment { rgb <1.0, 0.0, 0.0> 光源の位置の表示 Looks_like で光源の位置を表示できる 光源を見せかけ (Looks_like) の形状で表示 CSG モデル Constructive Solid Geometry (CSG) プリミティブ形状を組み合わせより複雑な形状を作る union, intersection, difference, merge がある + 三角錐 ( コーン ) 球 ( スフェア ) 33

CSG モデルの演算 Union 和 Intersection 積 Difference 差 Merge 併合 CSG モデル ( 和と併合の違い ) 透明な物体の場合 重なっている部分の見え方が異なる Union 和 Merge 併合 34

// 04 csg sample.pov 省略 union { cone{ < 1.5, 1.5, 1.5>, 1.5 <1.5, 1.5, 1.5>, 0.1 material { M_Green_Glass sphere{ <1.0, 1.0, 1.0> 1.5 material { M_Green_Glass CSG モデル 物体に名前をつける #declare // 04 object 01.pov #include "colors.inc" #include "skies.inc" sky_sphere{ S_Cloud2 plane { y, 1 pigment { color rgb <0.8,0.6,0.4> camera { location <0.0, 1.0, 5.0> look_at <0.0, 0.5, 0.0> light_source { <150, 150, 150> color rgb 1.0 #declare MyObj = union { object { <0, 0, 0>, 0.5 pigment { Blue translate <0, 1, 0> object { cone { <0, 0.5, 0>, 0.5, <0, 1, 0>, 0 pigment { Green object { MyObj object { MyObj translate < 1.2, 0, 0> object { MyObj translate < 1.2, 0, 0> #declare を使って名前を付ける union 等を使いオブジェクトを組み合わせたものに名前をつけておくと便利!! 35

POV-Ray に関する情報 家のコンピューターにインストールしてみよう http://www.povray.org/download/ 様々な OS で利用が可能 Windows Mac Linux 作品制作 課題 4 自由なテーマで作品を制作 複数の物体を入れる テクスチャを物体につける 拡大縮小 回転 移動などを利用する CSG モデルを利用する これまでに使った練習課題を拡張 変更しても良い 紙に各物体 照明 カメラの座標を書くとわかりやすい 作品発表 ( 数分の簡単な説明 希望者のみ ) 練習課題 3 を拡張 または 04-assignment01.pov を参考に 36

5 カメラの位置と方向 camera{ location <0.0, 0.0, 3.0> look_at <0.0, 0.0, 0.0> camera{ location <0.0, 4.0, 0.0> look_at <0.0, 0.0, 0.0> camera{ location <0.0, 1.1, 2.1> look_at <0.0, 0.0, 0.0> 同じ物体でも観察する位置によって印象が大きく変化する! 37

環境光 (ambient) // 05 light ambient.pov #include "colors.inc" #include "skies.inc" sky_ S_Cloud2 camera{ location <0.0, 0.0, 12.0> look_at <0.0, 0.0, 0.0> light_source { <0.0,3.0, 3.0> color rgb <1.0, 1.0, 1.0> plane { y, 1.0 pigment {checker Green, White < 6,0,0>, 1 pigment { Blue finish { ambient 1.0 1.0 0.8 0.6 0.4 0.2 フィニッシュとは仕上げのこと 物体表面の光の反射を指定して物体の質感を表現 光源の光が物体などによって散乱された間接光 拡散光 (diffuse) // 05 light diffuse.pov #include "colors.inc" #include "skies.inc" sky_ S_Cloud2 camera{ location <0.0, 0.0, 12.0> look_at <0.0, 0.0, 0.0> light_source { <0.0,3.0, 3.0> color rgb <1.0, 1.0, 1.0> plane { y, 1.0 pigment {checker Green, White < 6,0,0>, 1 pigment { Blue finish { diffuse 1.0 1.0 0.8 0.6 0.4 0.2 表面の非常に細かい凹凸によって光が散乱される反射 38

// 05 light specular.pov #include "colors.inc" #include "skies.inc" sky_ S_Cloud2 camera{ location <0.0, 0.0, 12.0> look_at <0.0, 0.0, 0.0> light_source { <0.0,3.0, 3.0> color rgb <1.0, 1.0, 1.0> plane { y, 1.0 pigment {checker Green, White < 6,0,0>, 1 pigment { Blue finish { specular 1.0 鏡面反射光 (specular) 1.0 0.8 0.6 0.4 0.2 光の入射角と反射角が等しい反射 非常に滑らかな表面で起きる 鏡面反射は視点に依存 <0,0,0>, 1 pigment { BrightGold finish { ambient 0.1 diffuse 0.1 specular 1.0 roughness 0.001 reflection { 0.75 環境光 + 拡散光 + 反射光 39

レインボウ ( 虹 ) // 05 sphere rainbow.pov rainbow { angle 40 width 5 distance 1500 direction <0.0, 0.4,1.0> jitter 0.01 arc_angle 180 falloff_angle 60 color_map { [0.000 color rgbf <1.0, 0.5, 1.0, 1.0> ] [0.100 color rgbf <1.0, 0.5, 1.0, 0.8> ] [0.214 color rgbf <0.5, 0.5, 1.0, 0.8> ] [0.328 color rgbf <0.2, 0.2, 1.0, 0.8> ] [0.442 color rgbf <0.2, 1.0, 1.0, 0.8> ] [0.556 color rgbf <0.2, 1.0, 0.2, 0.8> ] [0.670 color rgbf <1.0, 1.0, 0.2, 0.8> ] [0.784 color rgbf <1.0, 0.5, 0.2, 0.8> ] [0.900 color rgbf <1.0, 0.2, 0.2, 0.8> ] Fog( 霧 ) // 05 sphere fog01.pov fog { fog_type 1 distance 10 color Gray // 05 sphere fog02.pov fog { fog_type 1 distance 20 color Gray // 05 sphere fog03.pov fog { fog_type 1 distance 30 color Gray 霧で奥行き感をだすことができる!! Color の指定で様々な色の霧になる 40

フォント text{ ttf Arial.ttf, // フォントファイル名 ABC, // 文字列 5, // 文字の厚さ 0 // 文字間隔 TrueType フォント アウトラインフォントシステムであるため 拡大 縮小してもジャギーが生じず 解像度によらない精細な出力 // 05 font01.pov #include "colors.inc" #include "shapes.inc" camera{ location <0.0, 1.0, 3.0> look_at <0.0, 0.0, 0.0> light_source { <5.0,5.0, 5.0> color rgb <1.0, 1.0, 1.0> background{color White text{ ttf "Arial.ttf", "ABC", 5, 0 pigment{color rgb<0.0,1.0,0.0> フォント 41

日本語フォント 日本語フォントを利用する場合 global_settings { charset utf8 POV-Ray のエディタは UTF-8 不可 外部のエディタで編集する必要あり 日本語フォントを利用することも可能ですが 処理が複雑なので 本授業では扱いません 課題 5 フォントを利用した物体を作成しましょう (1 個以上 ) 様々形状の物体を配置しましょう (3 個以上 ) 物体に照明を 3 方向から当てましょう ( 照明 3 個以上 ) カメラ位置を変え物体を様々な方向から見てみましょう 新規作成 あるいは これまでの例を拡張 あるいは 05-assignment01.pov を参考に 42

6 ハイトフィールドと画像 // 06 height field01.pov #include "colors.inc" #include "skies.inc" camera{ location <0.0, 7.0, 2.0> look_at <0.0, 0.0, 0.0> light_source { <5.0,5.0, 5.0> color rgb <1.0, 1.0, 1.0> sky_ S_Cloud2 height_field { sys "tori bmp bw rev.bmp" smooth pigment {Green translate < 0.5, 1.0, 0.5> scale <6, 0.2, 6> 左側の白黒の二値画像を利用して右側の画像をつくることができる 白い部分が高くなる 黒い部分が低くなる 43

ハイトフィールドと画像 1 // 06 height field02bmp.pov #include "colors.inc" #include "skies.inc" camera{ location <0.0, 0.0, 5.0> look_at <0.0, 0.0, 0.0> light_source { <3.0,3.0,3.0> color rgb <1.0, 1.0, 1.0> plane { <0,0,1>, 10 pigment { wrinkles color_map { [ 0 0.1*White] [ 1 White ] これを実行すると上のような しわ の模様の 2 次元画像ができあがる wrinkle: リンクル 布などの しわ の意味 ハイトフィールドと画像 2 // 06 height field02.pov #include "colors.inc" #include "skies.inc" camera{ location <0.0, 1.0, 3.0> look_at <0.0, 0.0, 0.0> light_source { <5.0,5.0, 5.0> color rgb <1.0, 1.0, 1.0> sky_ S_Cloud2 height_field { sys "06 height field02bmp.bmp" smooth pigment {Gold translate < 0.5, 1.0, 0.5> scale <50, 10, 50> JPGE などのファイルも指定できる例 : jpeg sample.jpg" 山脈? 44

ハイトフィールドと画像 // 06 height field03.pov #include "colors.inc" #include "skies.inc" camera{ location <0.0, 7.0, 0.0> look_at <0.0, 0.0, 0.0> light_source { <5.0,5.0, 5.0> color rgb <1.0, 1.0, 1.0> height_field { sys "neko.bmp" smooth pigment {White translate < 0.5, 1.0, 0.5> scale <10, 0.3, 10> ポリゴンモデル ポリゴン (Polygon; 多角形 ) で形状を近似する ポリゴンが集まって 多面体 (Polyhedron) となる 45

ポリゴンデータの表現 シンプルな形状の例 ( ピラミッド形状 ) 4 つの三角形と 1 つの四角形からピラミッドをつくることができる (-1,0,1) (-1,0,-1) z ポリゴンデータの表現 1 y 0 2 3 (0,1,0) 4 (1,0,1) (1,0,-1) x 頂点番号 座標 (x, y, z) 0 ( 0.0, +1.0, 0.0 ) 1 (-1.0, 0.0, -1.0 ) 2 (-1.0, 0.0, +1.0 ) 3 (+1.0, 0.0, +1.0 ) 4 (+1.0, 0.0, -1.0) 面番号 頂点の番号 面の形 0 1 2 3 4 012 023 034 041 4321 三角形三角形三角形三角形四角形 46

3D ポリゴンデータ // 06 polygon01.pov #include "colors.inc" #include "skies.inc" camera { location <0, 0, 10> look_at <0.4, 0.5, 3.0> light_source { <5, 5, 5> color rgb <1.0, 1.0, 1.0> plane { <0, 1, 0>, 3 pigment { color rgb <0.8, 0.9, 0.8> sky_ S_Cloud2 triangle { < 0.5, 0.5, 0.5>, < 2.0, 2.0, 2.0>, < 2.0, 2.0, 2.0> pigment { color rgb <0, 1, 0.3> finish { ambient 0.5 diffuse 0.8 specular 0.8 roughness 0.01 // 06 polygon01.pov 3D ポリゴンデータ triangle { <0.022800861312161, 1.3235245682703, 0.69665948084376>, < 0.19418416608243, 1.3814593542487, 0.54193595981424>,< 0.23070168614644, 1.1104768564277, 0.95946447713384> pigment { color rgb <0, 0, 1> finish { ambient 0.2 diffuse 0.4 specular 0.4 roughness 0.05 triangle { < 1.9246127175519, 3.2975042103089, 1.7208955352425>, < 2.2393816256866, 3.261592431099, 1.6580715552272>,< 1.9393668340706, 3.1576213402059, 1.2074868941529> pigment { color rgb <0, 0, 1> finish { ambient 0.2 diffuse 0.4 specular 0.4 roughness 0.05 triangle { < 0.76037879589012, 2.1330490814857, 1.1280050406487>, < 0.7499513997581, 2.5080892046076, 1.1929491136535>,< 1.1208378713087, 2.5136706739064, 0.92343770076402> pigment { color rgb <0, 0, 1> finish { ambient 0.2 diffuse 0.4 specular 0.4 roughness 0.05 948 個の面のデータが続く 点 :453 面 :948 ファイル :06_bunny_s.pov 47

3D ポリゴンデータ 点 :453 面 :948 ファイル :06_bunny_s.pov 点 :8171 面 :16301 ファイル :06_bunny_m.pov 点 :35947 面 :69451 ファイル :06_bunny_l.pov 3D データと 3D プリンター出力 48

3D ポリゴンデータ 点 :100250 面 :202520 ファイル :06_dragon.pov 面の数が 20 万件以上ある! 50MB 以上のファイルサイズ 処理に若干時間がかかる ボリューメトリックモデル y ピクセル ( 画素 ) y ボクセル x 2 次元画像データ z x 3 次元ボリュームデータ 49

ボリュームデータの例 1 ボリュームビジュアライゼーション ボクセルの集合によって作成されるボリュームデータの断面画像を表示することや データ内部を透視する技術 ボリュームデータ 256 256 256 ボリュームデータ一部分をカット ボリュームデータ一部分をカット ボリュームデータの例 2 ポリゴンモデルやパラメトリック曲面モデルと異なり 物体内部にもデータを持っている ボリュームデータ 128 128 128 ボリュームデータ一部分をカット ボリュームデータ一部分をカット 50

ボリュームデータの解像度 異なる解像度のボリュームデータを比較 130 メガバイト! 32 32 32 64 64 64 128 128 128 256 256 256 257 Kbytes 2,049 Kbytes 16,385 Kbytes 131,073 Kbytes より多くのボクセルを使用した物体が正確な形状になる ボクセルが増えるとデータ容量が爆発的に大きくなる 3D ボリュームデータ 51

3D ボリュームデータとポリゴン 大理石のボリュームデータと 3 次元ポリゴンデータを組み合わせた複雑な例 Density file ( ボリューム密度 ) Mesh file( ポリゴン形状 ) 複雑な応用例 :3D ボリュームデータとポリゴン // 06 volume 01.pov global_settings { assumed_gamma 2.2 #include "colors.inc" #include "skies.inc" #declare T1= texture{ pigment{ density_file df3 "06 volume 01.df3" interpolate 1 color_map{[0.0 Red][1.0 White] camera { location <+0.0, 0.0, 1.50> sky_ S_Cloud2 plane { y, 1.01 pigment {checker White, Grey light_source { <300.0, 500.0, 500.0> color White light_source { < 50.0, 10.0, 500.0> color White object { #include "06 volume 01 mesh 01.inc" // #include "06 volume 01 mesh 02.inc" // #include "06 volume 01 mesh 03.inc" scale 1.0000 texture { T1 translate < 0.50, 0.50, 0.50> rotate <360*clock,360*clock+90,360*clock> 52

7 アニメーション 静止画を連続的に表示する 動画 パラパラ漫画 映画 テレビなど The human eye needs a sequence of about 25 single slightly changing images per second to give us the illusion of a continuous motion. 53

アニメーション ( 回転の例 ) // 07 animation01.pov #include "colors.inc" #include "shapes.inc" #include "stones.inc" background{color White camera { location <0, 0, 5> look_at <0, 0, 0> light_source { <5,5, 10> color White cylinder { <0, 2.0, 0>, <0, 2.0, 0>, 0.8 texture {T_Stone2 rotate <0,0,180*clock> 円柱を回転させる例 Z 軸に対して 180 度回転 アニメーション Render Edit Setting/Render 別の方法としては animation ini file を作る方法もある Initial_Frame=0 Final_Frame=10 54

cylinder { <0, 2.0, 0>, <0, 2.0, 0>, 0.8 texture {T_Stone2 rotate <0, 0, 180*clock> アニメーション ( 回転の例 ) Initial_Frame=0 Final_Frame=10 clock は 0.00 から 1.00 まで増加 11 枚の画像が生成される アニメーション ( 色変化の例 ) // 07 animation02.pov #include "colors.inc" #include "shapes.inc" #include "stones.inc" background{color White camera { location <0, 0, 5> look_at <0, 0, 0> light_source { <5,5, 10> color White cylinder { <0, 1.0, 0>, <0, 1.0, 0>, 0.8 pigment {color rgb<0.0, 1.0, clock> 色を変化させる 緑 水色 55

アニメーション ( 色変化の例 ) cylinder { <0, 1.0, 0>, <0, 1.0, 0>, 0.8 pigment {color rgb<0.0, 1.0, clock> rgb<0.0, 1.0, 0.0> rgb<0.0, 1.0, 1.0> アニメーション ( 視点回転の例 ) camera { angle 35 location <3.0, 0.0, 10.0> right x*image_width/image_height look_at <0.0, 0.0, 0.0> rotate <0, 360*(clock+0.10),0> 07 animation03.pov 56

アニメーション じふアニメーションGIF (animated gif) http://gifmaker.me/ 07 animation04.pov アニメーション GIMP 等の画像処理ソフトウェアで GIF アニメーション画像を作成することができる http://gifmaker.me/ 複数のレイヤーを作成 アニメーション 興味のある方は やり方を検索してみましょう 検索 GIMP アニメーション 57

プログラミング // 07 while loop 01.pov #include "colors.inc" camera { location <0.0, 1.0, 5.0> look_at <0.0, 0.0, 0.0> light_source { <150, 150, 100> color rgb 1.0 #declare Value = 2; #while ( Value <= 2 ) object { <0, 0, 0>, 0.5 pigment { Blue translate <Value, 0, 0> #declare Value = Value + 1; #end プログラミングで 大量の同じオブジェクトを簡単に作成! #while (...)~#end は (...) 内の条件である間は ~ の部分の処理をする命令 1. #declareでvalueの値を宣言する(value = 2) 2. #whileの行に条件を書く(value <= 2) 3. 必要な部分 (translate) にValueを書く 4. Valueの値を変更 (Value = Value + 1) 5. 条件に一致しなくなったら繰り返し処理終了 (#end) 課題 7 アニメーション POV-Ray のアニメーション機能を使ってみましょう 例題を参考にして 物体の回転 拡大縮小 移動などのアニメーション画像を生成してみましょう これまで作成した課題を拡張 または 07-assingment01.pov を参考にしてもよい 58

8 課題 8 自由なテーマで作品を制作 作品制作 これまでに使った練習課題を拡張 変更しても良い 作品発表 ( 数分の簡単な説明 希望者のみ ) 59

作品の WEB 掲載 今回の面接授業で作成した作品を WEB に掲載しても良いという方は担当講師に画像ファイルを送付して下さい 次学期の面接授業等で作品を紹介します ( ただし すべての作品ではありません ) PNG または JPEG 形式の画像 画像サイズは 1024x768 以下を目安に メール件名 面接授業 POVRAY 本名は載せないので ペンネームを考えてください 担当講師の電子メールアドレス : ouj.raytrace@gmail.com 60