Hi. How so I go abuot creating a structure that works with the gl tools? I tried the structure makers. But the structure makers do not output a structure similar to the "get mesh component" I would like to set some sprites in space using the interaction patch with the mouse and then use the coordinates of those sprites as "vertices" that I can input in the gl quad structure patch so I can create some complex geometries made with quads. The idea is tha I can create a kind of mask that I can use for projection mapping on a object made with a lot of real cubes Any help would be apreciated! Thanks. Oh I am not so good with javascrpt :0( but I can learn by example. :)
i think the Kineme GL grid generator and renderer are handy for this kind of mapping things. Or the one by Memo: http://www.memo.tv/projection_mapping_quad_warping_with_quartz_composer_...
thanks monkeypresso; I am aware of those tools. The problem is not so much about the tools (I could use quads structure, GL grid or memo's stuff) but about how to manipulate a pre-established structure (which i will write to a file) so when I load it, i can modify easily. I think the best way would be with a mouse so i can move the "vertices" so I can adjust the projection mapping quickly. I know there is a threat here that talks about how to replace elements on the structure of a GL grid, and in fact, I use some of that info in another project. But for this one, the object is so complex and I have so little time to set up that being able to quickly access coordinates in a structure and modify them, would be what I am looking for. That is why i thought of using interactive sprites as the vertices that will make the quads structure... Any help on how to this would be greatly appreciated, I will try to post some pictures of the object later so it is clear what i mean. Thanks again!
as a sidenote, you can manipulate a KnM GLgridStructure patch with the Grid Editor patch. It is specifically designed for this. Sorry not to have pointed it before... Here's a snapshot of the patch, in case ....
if you want to construct funky geometry on the fly, i guess you'd better use a queue patch to generate a serie of structures suitable for GLquad structure patch.
yes thats true, but the texture for the GL quad structure will be difficult!
Thanks franz. I look into the queue, I dont know how to use it but if you got some examples i look at them... will also look into the dev examples and of course here in kineme. Thanks again!
That's really interesting franz. I would think to approach it by generating the mesh with javascript, and then multiplexing the source javascripts, with the multiplexer hooked to the Quad Structure. What would you feed the queue with, the same kind of javascript like I'm describing? I'm curious what you find the advantage of the queue to be in this scenario...thanks!
With the Quad approach, I'm not sure that there's any real way to texture....other than to use CI blend filters, and have the Quads be the mask or something. I don't know if that would be enough control of the image.
with the queue you click the four corners of a quad. Each time you click, you queue in a XYZ(and eventually U,V,R,G,B,A,nX,nY,nZ) structure, where X and Y is your mouse coord. Every 4 structure recorded, you got a new quad.
Texture is okay if you want the same texture for each quad. If not, you can beg Chris so that the Quad Structure patch takes ImagesStructure as input (already discussed, doable but apparently boring) - or you can fiddle the UV coords by hand, provided you know the total number of quads you'll be drawing.
Hence no javascript needed
Modifying the quad structure afterwards is another tricky thing, but i remember we had a thread about Structure manipulations via javascript, where problems were finally solved in the end.
here are the threads about structure editing:
http://kineme.net/Discussion/DevelopingCompositions/Justmodifingoneorman......
http://kineme.net/Discussion/General/JavascriptMerge2structures
http://kineme.net/Discussion/ProgrammingQuartzComposerPatches/HowuseStru...
Oh, are you using the structure maker then? (Still trying to figure out what it is that turns the clicks+coordinate into a structure to feed the quad).
Yeah, I've been wanting image structure input to quad and point too... I think it's that the overhead would be pretty high, more than it being boring. I would still love it to be there, to at least see. I played with putting it in myself to the last published gl tools source, but couldn't get it going... I guess I should look again, because my understanding had grown since trying that.
yeah yeah, structure maker, of course.
As long as you don't feed the quads with 800*600 image structure , it should be ok. I would also love to have a ImageStructure input on that patch ! IMO it would be pretty handy.
No kidding... and for points, it would be cool, because you could "Draw" sequences of differing icons/textures as well; by making a few rows with an iterator, you could have stuff that looked like you were drawing simple scrolling landscape on the fly. (It wouldn't work for projection mapping since they always face front).
I don't know though, I think Smokris said something about thinking it would be taxing. I may have the wrong impression, or have misunderstood.
For a second I thought I was scratching my head, because I couldn't figure out how the heck you were creating the points if not with javascript- that's pretty cool. I shifted to javascript for making those kind of things for fear of the structure maker getting phased out in SL.
I like the idea of the whole "auto click" thing, saving the resulting structure, and then having a bunch of structures in the bag... lots of possibilities in that.
i dont think you will be able to this without javascript. im working on something similar using the grid renderer. i tried it with the interaction patch but gave up because of some problem with interaction inside an iterator (cant remember exactly why).
i attached a basic example of how i do it now.
Thanks for the help. Last night I spend some time with the dragable points from fsk (thanks!). an It looks like I have something going. I will report back in the next few days... Thanks everybody! kineme Rocks!
Re: Structure for GL tools (quad)
Hey kimba23
I have the same problem. But i did it without Javascript. You can edit the square by pressing either „1“, „2“, „3“ or „4“. (For the four corners). With “S” you can store the coordinates. And with “L” you can load old stored coordinates.
Next time there will be a lot more quads. And a way how to handle it.
See you soon!
THANKS!!! Stammhim, I give it a go later tonight! U da man