Grtz,
I've been messing with GEM lately and have made a bunch of GOP abstractions to make things easier. You can find then in the tarball of my cvs which is at:
http://mccormick.cx/viewcvs/s-abstractions.tar.gz?view=tar
The gfx stuff is in the sx/ directory and works best if you include the parent directory (s-abstractions/) in your path. You'll need the zexy (for [repeat]) and Gem libraries.
I have always found it strange how GEM seems to be kind of backwards in terms of the flow of data. In Pd you generally make a noise with e.g. [osc~] and then run it through some effects, into your [dac~] where it is output. In GEM it works the opposite way. You have to place all your color, translate, rotate, repeat, texture "effects" before you put the basic geom such as [cube], and the whole chain starts with the "output" [gemhead]. To address this I've been experimenting with a method of storing geometry in a [list] which is sent through geometry modifying "effects" to an object [sx/blob] which draws geometry represented as a list of verticies of triangles, to the screen. It's pretty crap and slow, and I'd love to know if there is already a better way of doing this.
You can send arbitrary geometry from blender3d into puredata by using the script in the utils/ directory. Copy it into your .blender/scripts/ directory and go File... Export... Raw Triangles across the Net... whilst having sx/netgeom-help.pd open. You can't send very complex geometry or the whole thing starts to chug pretty badly, but I think it's a start for something better.
An example of an effect on geometry is the sx/explode patch which translates all faces along their normals by some amount. This is all done as [list] math so it's hellishly slow on complex geometry.
I am particularly interested to hear if there is a better, faster way of doing this [vector level geom manipulation] that I don't know about. I have been really inspired by the fijuu stuff and I would like to be able to do similar kinds of mesh warping from withing Pd and GEM.
Best,
Chris.
chris@mccormick.cx http://mccormick.cx
Hallo, Chris McCormick hat gesagt: // Chris McCormick wrote:
To address this I've been experimenting with a method of storing geometry in a [list] which is sent through geometry modifying "effects" to an object [sx/blob] which draws geometry represented as a list of verticies of triangles, to the screen. It's pretty crap and slow, and I'd love to know if there is already a better way of doing this.
Attached is a variation of your blob which I called "anyblob" because it uses the "any-trick" to render multiple objects using just a single gemhead. Note how [repeat] is replaced by [any] from IEMlib. The only change necessary on the outside is, that you send 9-element triangle lists seperately instead of packing them all into one long list. This has several advantages. First it allows one to skip all this [list split 9] business as well as the counting of the length of the list. Second you can store the list of vertices into a [textfile] with one triangle for each line and advance through it with [next(. Third: With some more work it should possible to store single vertices with 3 coordinates on each line in this textfile, and then collect 3 lines on every gemhead-bang. This basically is the format of an *.obj-file, where vertices start with the letter "v". So with
[textfile] <= open some obj-file here | [route v] | [sx/objblob] <= TODO
you would get a custom, primitive obj-file renderer.
Frank Barknecht _ ______footils.org_ __goto10.org__
Hallo, Frank Barknecht hat gesagt: // Frank Barknecht wrote:
Third: With some more work it should possible to store single vertices with 3 coordinates on each line in this textfile, and then collect 3 lines on every gemhead-bang. This basically is the format of an *.obj-file, where vertices start with the letter "v". So with
[textfile] <= open some obj-file here | [route v] | [sx/objblob] <= TODO
you would get a custom, primitive obj-file renderer.
I've played with this idea some more and attached is the first result, which uses the patches from prev. mail. It can load and display an obj-file which is based on triangle faces (no quad faces yet.) I used some more externals: [repack] and [s2l] from zexy, and [list-drip] from list-abs, which can be replaced with drip or repack, if you like. Also attached is a test-obj-file displaying a torus.
For some unknown reason the normals of the faces aren't quite right.
Frank Barknecht _ ______footils.org_ __goto10.org__
On Mon, Jun 12, 2006 at 02:32:40PM +0200, Frank Barknecht wrote:
Hallo, Frank Barknecht hat gesagt: // Frank Barknecht wrote:
Third: With some more work it should possible to store single vertices with 3 coordinates on each line in this textfile, and then collect 3 lines on every gemhead-bang. This basically is the format of an *.obj-file, where vertices start with the letter "v". So with
[textfile] <= open some obj-file here | [route v] | [sx/objblob] <= TODO
you would get a custom, primitive obj-file renderer.
I've played with this idea some more and attached is the first result, which uses the patches from prev. mail. It can load and display an obj-file which is based on triangle faces (no quad faces yet.) I used some more externals: [repack] and [s2l] from zexy, and [list-drip] from list-abs, which can be replaced with drip or repack, if you like. Also attached is a test-obj-file displaying a torus.
This caused my GEM to lock up, but it's probably something I've done wrong on my end. I get the idea though, and it's really cool work! I will take what you've done here and do some more work on warping lists of faces and post the results when I'm done. Thanks for the tips.
For some unknown reason the normals of the faces aren't quite right.
This could have to do with the way that OBJ files store the normals of each face in another list (prefixed with 'vn') whilst my hack assumes correctly wound polys in order to determine the normal direction.
I think I might also be able to make it faster by using a [primTri] instead of separate GL calls to draw faces manually, and not recaculating all information every time.
Best,
Chris.
chris@mccormick.cx http://mccormick.cx
Hi Chris,
I have not had a chance to look at your abstractions yet, but would you be interested in making some contribution to pixelTANGO?
Thomas O. F. and yourself have any ideas to foster collaboration between us three, since we're making many Gem (GOP) abstractions...
.b.
Chris McCormick wrote:
Grtz,
I've been messing with GEM lately and have made a bunch of GOP abstractions to make things easier. You can find then in the tarball of my cvs which is at:
http://mccormick.cx/viewcvs/s-abstractions.tar.gz?view=tar
The gfx stuff is in the sx/ directory and works best if you include the parent directory (s-abstractions/) in your path. You'll need the zexy (for [repeat]) and Gem libraries.
I have always found it strange how GEM seems to be kind of backwards in terms of the flow of data. In Pd you generally make a noise with e.g. [osc~] and then run it through some effects, into your [dac~] where it is output. In GEM it works the opposite way. You have to place all your color, translate, rotate, repeat, texture "effects" before you put the basic geom such as [cube], and the whole chain starts with the "output" [gemhead]. To address this I've been experimenting with a method of storing geometry in a [list] which is sent through geometry modifying "effects" to an object [sx/blob] which draws geometry represented as a list of verticies of triangles, to the screen. It's pretty crap and slow, and I'd love to know if there is already a better way of doing this.
You can send arbitrary geometry from blender3d into puredata by using the script in the utils/ directory. Copy it into your .blender/scripts/ directory and go File... Export... Raw Triangles across the Net... whilst having sx/netgeom-help.pd open. You can't send very complex geometry or the whole thing starts to chug pretty badly, but I think it's a start for something better.
An example of an effect on geometry is the sx/explode patch which translates all faces along their normals by some amount. This is all done as [list] math so it's hellishly slow on complex geometry.
I am particularly interested to hear if there is a better, faster way of doing this [vector level geom manipulation] that I don't know about. I have been really inspired by the fijuu stuff and I would like to be able to do similar kinds of mesh warping from withing Pd and GEM.
Best,
Chris.
chris@mccormick.cx http://mccormick.cx
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On Sun, Jul 16, 2006 at 06:55:27PM -0700, B. Bogart wrote:
I have not had a chance to look at your abstractions yet, but would you be interested in making some contribution to pixelTANGO?
Thomas O. F. and yourself have any ideas to foster collaboration between us three, since we're making many Gem (GOP) abstractions...
Hi Ben,
Sounds good. Please feel free to use any of the patches in my CVS and/or cannibalise their contents for your own abstractions. I have been recommending pixelTANGO to check out for people who VJ lately, despite the fact that I haven't tried it myself! The screenshots look really cool though.
Best,
Chris.
chris@mccormick.cx http://mccormick.cx
Chris McCormick wrote:
I've just installed this, but it seems some abstractions are missing in the archive, namely: s-recorder~ s-metro s-delayunit~ s-midinote s-midictl s-snare~ s-varseq
I looked into the cvs for individual files, but they don't seem to be there either.