Cinderのサンプルを一挙紹介

クリエイティブなC++ライブラリ "Cinder" の紹介 | Preferred Research

Cinderとは、画像、音声、動画等を簡単に処理&可視化できる、主にビジュアルデザイン向けの強力なC++ライブラリであり、The Barbarian GroupのAndrew Bell氏が中心となってオープンソースとして開発が進められています。

同様の思想を持つProcessingやopenFrameworksによく似ており、C++で簡単に記述できるうえ、WindowsMacOSXiOS(iPhone/iPad)といった複数のプラットフォームをカバーしています。


を読んでCinder楽しそう!と思ったものの作品を見てしまうと自分で出来る気しないなぁ。。
簡単なサンプルでもあればいいのにと思って中を見てみたらサンプルが50個以上もありました!

沢山サンプルがあったのでCinderでこんなこと出来るよ!っていうのをスクリーンショット&一行説明で一挙に紹介していきます。
※動作確認はWindows XP SP3 + Cinder 0.8.2で行いました。

samples (cinder\samples\_AllSamples\vc10\AllSamples.sln Debug構成)

# プロジェクト名 スクリーンショット 一行説明
1 ArcballDemo マウスで立方体をクルクル回転できる。
2 AudioAnalysisSample (no image) Runtime Error
3 AudioGenerative マウスを上下に動かして波形(音)を変更。
4 AudioGenerativeAdvanced マウスでクリックした位置によって音を鳴らす。
5 AudioInputSample (no image) _AllSamplesソリューション外だったため未確認。
6 AudioPlayback (no image) マウスでクリックすると音が鳴る。
7 basicApp マウスのドラッグで線を描画する。
8 BasicParticle 未稿。
9 bezierPath 未稿。
10 bspline 未稿。
11 Buddhabrot CPU喰い。
12 CairoBasic クリックしたところを中心に描画。
13 CaptureAdvanced f:フルスクリーンON/OFF
r:retain a random surface to exercise the surface caching code
u:unretain retained surface to exercise the Capture's surface caching code
とあるがr押すとアプリが落ちるので注意。
14 CaptureTest f:フルスクリーンON/OFF
SPACE:キャプチャの開始・停止
だがMac専用で確認できず。
15 Earthquake (no image) Runtime Error
16 eventTest マウスダウン&アップ,キーダウン&アップのサンプル。
17 FBOBasic (no image) Runtime Error
18 FBOMultipleTargets (no image) Runtime Error
19 flickrTest flickrから画像を取得して表示。
20 fontSample キーダウンで出力文字が変更。クリックするとDebug Error。
21 FrustumCulling 「3:test points」をキーダウンして緑のポイントに変更した状態
22 GLSLLighting (no image) Runtime Error
23 HodginParticles マウスカーソルに緑の玉がついてきて,クリックするとオレンジのが弾ける。
24 HodginParticlesRedux (no image) 起動後即終了で確認できず。
25 ImageFileBasic ファイル選択ダイアログが表示され,ファイルを読み込んで表示。
26 ImageHeightField ファイル選択ダイアログが表示され,ファイルを読み込んで3D表示。
マウスで画像を回転できる。
27 imageWriterSample (no image) ファイル保存ダイアログが表示され,ファイル名を入力するも保存されず。
28 iPhoneAccelerometer (no image) _AllSamplesソリューション外だったため未確認。
29 ListenerBasic ■をドラッグアンドドロップで移動可。
クリックorドラッグで●を描画。
30 MandelbrotGLSL (no image) Runtime Error
31 MultiTouch 上手く動作させられなかったので,参考動画を。
(future) Multitouch Cinder sample from flight404 on Vimeo.
32 NormalMapping (no image) Runtime Error
33 OBJLoaderDemo (no image) Runtime Error
34 OpenGLLighting 照明のサンプル。A・S・Eをキーダウンした状態。
35 ParamsBasic 立方体と照明の各パラメータを設定して確認できる。
36 perlinTest パーリンノイズ。
37 Picking3D (no image) Runtime Error
38 QuickTime (no image) 未確認。
39 QuickTimeAdvanced (no image) 未確認。
40 QuickTimeIteration (no image) 未確認。
41 QuickTimeWriter (no image) 未確認。
42 rayMarcher よく分かりません。
43 RDiffusion (no image) Runtime Error
44 resizeTest 512*512のpngをごにょごにょ。
45 rotatingBox 文字が描かれている立方体が回転する。
46 SaveImage クリックで落ちる。
47 SerialCommunication (no image) 起動後即終了で確認できず。
48 shaderTest (no image) Runtime Error
49 shadowMap (no image) 起動後即終了で確認できず。
50 RDiffusion (no image) Runtime Error
51 SurfaceBasic 二値化。
52 TextTest テキスト描画。
53 VBOSample よく分かりません。
54 VoronoiGpu Runtime Error
55 waterSim よく分かりません。
56 Wisteria 枝が生え花が咲きます。


チュートリアルも5つほどあります。

tour (cinder\tour Debug構成)

# プロジェクト名 スクリーンショット 一行説明
1 Chapter 1:
Getting Started
In the first chapter, we will set up a new project and learn how to load and display images. We go on to show how to draw simple shapes and we even set up a basic Particle engine.
2 Chapter 2:
Personality and diversity
We continue to expand our Particle engine. We also learn how to pull color data from images and put that information to good use.
3 Chapter 3:
Influence
In chapter 3, we show how to use keyboard and mouse input to control our Particle engine.
4 Chapter 4:
Fine tuning
A birth/death cycle is added to our Particle class and Perlin noise is introduced.
5 Chapter 5:
External Forces
We show you how to use nested iterators to allow the Particles to interact with each other. We then tie everything together and marvel at how far we have come.


3Dプログラミングやビジュアルデザインやってみたかったんだ!って方は,Cinder試してみるといいと思います!
開発環境は無料で手に入るので,Download :: Cinder をまずダウンロード&解凍してWelcome.html を参照してみてください。


ちなみにWindowsな方は,以下をダウンロード&インストールすることになります。