In this tutorial i will show how to make a small patch for easy data-bending.
The trick is very simple. I open the file in the built-in text editor of osx, copy the text to quartz composer , change several numbers and save the file with a new name.
The file type we want to use is an .obj file (3d object) – if you don’t have it just download from the net.
Why an .obj file? because the structure of the file is really easy, not disturbing captions like in the collada format, what i’ve tried earlier.
v -23.041946 2.132653 4.222926
v -23.768387 2.117765 3.861515
v -23.290339 1.885496 3.681014
v -23.290339 2.763085 3.681014
and more variations (i think these are the coordinates of the vertices).
So lets open the .obj file in the text editor and copy the text (all). Then in quartz composer lets put a ´string replace´node 2 or 3 times or as many time as we wish to modify the values. At the end lets hook a “kineme text file write” from the´kineme file tools´. Now lets paste the text to the first `string replace´string input. If we take a look into the coordinates of the obj file we’ll find this: x.xxx , so my concept was to replace first all the 1 to 2 and then change all the .0 to .2. This is just one variation but it works well. I’ve tested with a sea-star, and i got a really nice abstract form. More variations are possible of course, its a good opportunity for further experiment.
For those who don’t know how to open the (data-bended) `.obj´file, there are two options:
–Kineme 3d this is not free, but really cheap and you have the option to use some post process things like the ´Kineme 3D Object Blend´to make a nice morph between the original model and the modified one.
–V002 Model Loader (from Vade), this one is free and has a lot of goodies (wireframe, texture options and more)
I would put one of those in a track ball macro and after in a lighting macro and done.
So the question is this: is it possible to use this solution with other file formats?
the answer: Yes, from the bitmap formats there is the ´.raw´file. The problem with the non raw based formats, there is this header thing, if we modify it, the file will be dead. The raw format is without header. Anytime i tried to do it with any other formats, quartz composer did something with all the text and i was unable to re-open the file.
so i randomly modified the letter “o” to the letter “p” in my raw file. After i reloaded in photoshop.
i would share two important links at this point:
1. the ´Vernacular file formats´
2. Stallio´s tutorial
happy bending!!!
Thank you for sharing. By any chance, are you writing to file in real time with this? I have long spinning beach ball lags with a model using ~400,000 vertices. But it works! Also, the Kineme String With File patch works to read the file — no copy / paste necessary!
I have enjoyed your work for some time. Great! Definitely some of my favorite ideas on the topic of Quartz Composer, real time, etc. Maybe one day I’ll get to see a performance!
thanks, iam thinking to make something more realtime. lets see.
Love to see it.
[…] when I came across PixelNozz’s 3D model bending with Quartz Composer, I was […]
stupid question – following the “model loader” link i just get a “model importer” in which is no “file” input.. so i linked instead the “model path”
but theres no result..
Hey, did you ever find a solution to this problem?
well the thing is that, i didnt continue this experiments, but i made some research with kineme data tools, namely with the “convert from data” node, but without any success. After i made several tests with processing and with the “loadbytes”-“savebytes” it works pretty well (including every kind of file formats, images, sounds, 3d objects, fonts, vector files).