Processingで作ったものをPhotoshopに取り込んでいきたい。っていうのを今回はやろう。
Processingで球体を作る
まずはProcessingで球体を作るコードを書く。
float radius = 150; float step = 0; float velocity = 0.05; void setup(){ size(600, 400, P3D); } void draw(){ background(255); translate(width/2, height/2, 0); rotateY(frameCount * 0.01); for(float i = 0, p = 0; i <= 180; i++, p += step){ float theta = radians(i); float phi = radians(p); float x = radius * sin(theta) * cos(phi); float y = radius * sin(theta) * sin(phi); float z = radius * cos(theta); strokeWeight(4); point(x, y, z); } step += velocity; }
これをPhotoshopに取り込んでいく。
Photoshopに取り込む
Photoshopは画像を加工するイメージだけど、タイムラインを使えば動画を取り込むこともできる。背景には画像を入れよう。
画像を入れたら、ここにさっきprocessingで作った球体の動画を取り込む。
背景が白だけどこれを透明にしたいから、ブレンディングモードを変更しよう。球体を形作っている点の色を白色にしたいから「徐算」を選択。点の色を黒色にしたかったら「乗算」で。
あとは、明るさを調整したり色をブラシで整える。好きな色でいいんじゃないかな。今回は白色と青色を使っている。
適当に人物の写真なんかを合成して完了だ。