plane shaping

Jun 25, 2009 at 12:05am

plane shaping

Hi all

Is there a way to shape a plane of [jit.gl.videoplane] into something else then the rectangle possibilities?

< - either w. a matrix. of even without the jit.matrix.

This is for mapping onto something like say a teapot. or any shape that is not symmetrical. It doesn’t have to curve, just outline the silhouette.

Planes are great when things are square but how do I do I change it’s shape keeping it a flat surface in a 3d gl world.

I’m shure it’s not to trivial, but I haven’t be able to find anything on this in the forum .

thanks a million in adavance.

phil

#44529
Jun 25, 2009 at 6:36am

map on other gl objects like jit.gl.sketch or jit.gl.nurbs or jit.matrix ….

curved mapping in jitter -> http://www.vimeo.com/1534943

#160135
Jun 25, 2009 at 4:08pm

Hi MJ

Thanks a lot the leads and also for your vids very nice.

I think that what I want to do is even more simple, (although I wouldn’t mind learning how to do what you showed in the vids).

**In other words, what I want to do is the equivalency taking a pair of scissors and cutting a sheet of paper (plane) into any shape I want. Keeping it in a 3D world.

An example of that would be your “Big X” mapping. Was that a 3D shape you created or is it multiple planes placed together? Even there, How did you create the frontal shape of the “Big X”.

Was this all done w. jit.gl.draw.

Also, when you suggest the jit.matrix < - After a lot of time searching, I have still not found how to create a plane in the gl world, using the jit.matrix. <- I know , I know basic stuff but !?

Again image ,skipping forward and saving a lot of time by using this method I’ve been hypothesising about: The cv.jit.floodfill determine the matrix. < - then you create a shape w. all the values that not black (255 in the jit.cellblock I believe)

But anyways, just the shaping of a plane would help lots right now.

Endless thanks for your help

phil

#160136
Jun 25, 2009 at 5:26pm

Hi again MJ

The (jit.gl.nurbs-video-deform.pat) sort does the concept to what I want, meaning, the shape of the gl object is based on the matrix , but it’s all distorted. What about 2d!?

Also, was it complicated to curve your plane in your video?
I assume this should be simple no? What objects did you use? < - Is this top secret??

Thanks

phil

#160137
Jun 25, 2009 at 8:12pm

the big-x are many planes together
the frontal shape is just a ‘square’ plane with black planes on top /in front cutting it in a x-shape and then the sides a placed on top of that.

i make my planes in many jit.matrix
should rtm about how 3d objects are represented as a jit.matrix with 13 planes (> appendix B)

the curved thing is made using bezier splines on the data which filled the 3d jit.matrix

and yeah its kinda ‘top secret’ ..trying to earn some money from it

but if you make some patches i can help you out

#160138
Jun 25, 2009 at 8:37pm

WOW thanks a lot for the hints MJ .

I find Jitter way more “corsée”< - french for (well I don't we say that for wine Wink , to learn if you know nothing about it. I am very comfortable w. Max MSP < - been doing it quite a lot (hooked!) for the pass 2 years. Yes one can tweak the ready made jitter patches but then your not taking advantage of it's full power.

Anyways.

>>the curved thing is made using bezier splines on the data which filled the 3d jit.matrix

-Did you get your bezier spline in the jasch_objects_??

>>i make my planes in many jit.matrix
should rtm about how 3d objects are represented as a jit.matrix with 13 planes (> appendix B)
Thanks for the lead.

SO based on this, my theory for efficient quick mapping setups using the cv.jit.floodfill would then be possible. Am I right??

>>and yeah its kinda ‘top secret’ ..trying to earn some money from it

I totally respect that.

Thanks a lot for your hints and generosity.

phil

#160139
Jun 25, 2009 at 9:11pm

Hi again Mj

One last little one Wink

I just read Appendix B and phew ! it’s a little over my head right now. What tutorial or patches on this forum would you suggest I start from.

That’s how I totally learned MaxMSP @ 1st. < - from taking patches apart. Reverse for ZtoA if you will. Way more beneficial for my way of learning. (this way I keep the creative juices flowing)
My curiosity always brings me to point A in the end , but @ least the results are always there from the start.

thanks

phil

#160140
Jun 26, 2009 at 6:05am

used the bezier curves from jasch before but or this project i just entered the formula (this one http://local.wasp.uwa.edu.au/~pbourke/geometry/bezier/cubicbezier.html)

dont know of any exmples that goes with appendix B….
i found out by trial&error

#160141
Jun 26, 2009 at 1:32pm

>>i found out by trial&error

NOOOO0000ooooo!!! There goes my summer !!! Wink

>>i make my planes in many jit.matrix
should rtm about how 3d objects are represented as a jit.matrix with 13 planes (> appendix B)

Are your jit.matrix plugged in together??

my jitter knowledge is hanging by a “thread” Wink

thanks again

phil

#160142
Jun 26, 2009 at 7:37pm
phil hughes wrote on Fri, 26 June 2009 07:32
>>
NOOOO0000ooooo!!! There goes my summer !!! Wink

and autumn ,winter, etc
been using max/jitter since ±2001

btw 50% of my mapping patch is in javascript in a jsui..

#160143
Jun 26, 2009 at 8:19pm

Yes I know what you mean.

The past 2 years of my life have completely been dedicated to maxMSP. < - my family and friend just look up in the air , when I speak , cause they know it will involve something having to do w. maxMSP or the nord lead.

But I,m sure what I want to do could be done without javascript. I’m sure there is a way to hack it otherwise.
Not that I want to weasel out the hard work< - but I need results fast even if it's not the most orthodox way Smile.

I’m sure it’s super simple (of course once you know how to work it) to shape the contor of a plane in anything you want.

But again, I think the most effecience way to map something’s silhouette could but done w. the cv.jit.floodfill or whatnot and take the output matrix as the plane shape.

Have you seen this?
http://www.youtube.com/watch?v=XgrGjJUBF_I&feature=channel
http://www.youtube.com/watch?v=67pzdxhRbrM

I think my approach could be a cheap hack version Wink (you would not get the angle but at least it would place at the right place in an efficient manner) this you fix the angles by hand.

anyways

thanks

phil

#160144
Jun 28, 2009 at 7:29am

Those videos are really impressive. The calibration one definitely shows how we can extend flat projections to just about any surface we want… I hope they do get to interactive speeds for the calibration, it would be amazing to watch projections which track moving objects—even if it was a bit laggy it would still be amazing to experiment with. Also if it could be done with infrared that would be nice.

I wonder what additional possibilities you could have if what you’re projecting is from a Jitter window, some kind of image or OpenGL which uses the calibration coordinates somehow. So not only would the image be changing, the projection angle and size could be too.

Even using a flat projection, you could get coordinate information from a bunch of objects that you want to project onto, and the visualization or videos that you’re working with could be precisely (or not so precisely) mapped to those objects using gridshapes with textures.

I wonder if a calibration system for objects could be done without the sensors—maybe all the objects are white, you shine a light over the whole scene, then analyze where the bright spots are using a camera. Then you’d have a list of coordinates and areas you could work with when designing how the visuals behave, plus have control over what you project in the areas between them.

Great stuff!

#160145
Jun 28, 2009 at 8:19am

Hey great to hear from you seejay!

your white tracking is sort of exactly the idea I mention in my post last week (and this one too). Did you get my personal message?

I was thinking using cv.jit.floodfill. Take a picture of something (room etc.) then you can zoom in on a spot. then w. the matrix containing the exclusive area you create a 2D plane in gl.

This is what I don’t know how to do! Turn a matrix into a gl shape. Or more precisely, turn the exclusive spot into a gl shape.

As for the link: I saw something from the same guy (johnny lee) do 3D mapping in realtime using the wiimote. He calls it “foldable displays”

http://www.youtube.com/watch?v=nhSR_6-Y5Kg&feature=channel

Briefly back to my topic;
do you think this would be something that could be easy to do
matrix w.(exclusive spot)-> spot to gl 2d plane shape.

thanks a lot

phil

#160146
Jun 28, 2009 at 11:49am

If you’re using cv.jit probably the easiest thing is to use blobs.centroids on your picture/video and take the info from that. You get position and size of each blob, so these would be converted into the position and scale attributes of each jit.gl.gridshape. Could use circles or planes, whatever you want. Circles with dim 3 can be triangles, or hexagons if they have 6, etc. Then you can texture each gridshape with your imagery.

You’d have to scale the values coming from blobs.centroids to match up to your GL scene, which would also depend on how far away the GL camera is. Typically the range is -1. to 1. in each of the X and Y directions, with [camera 0 0 2] I think.

Yep, got your message, thanks! Smile

#160147
Jun 28, 2009 at 2:42pm

thanks for the advice ,

I’ll try it today. Only thing is that your stuck w. geometrical shapes right?

I ‘ll try it and get back to you.

thanks again

phil

#160148
Jun 28, 2009 at 9:25pm

With gridshape you would be stuck with the shapes it offers, but wit jit.gl.model you could use imported shapes, or with jit.gl.sketch you could draw pretty much whatever you want. In fact, it might be worth trying jit.gl.sketch and just plot points anywhere they’re above a certain brightness, or plot points everywhere and alter the point_size based upon brightness. But you’d need multiple jit.gl.sketch objects to be able to texture the areas differently. Try the points with and without antialiasing, it makes a big difference in the appearance (but also the drawing speed for the rounded points).

For the most control you’d want jit.gl.sketch, though you’d need to figure out just how you want the shapes to be drawn, not just plop in a gridshape which would be a bit easier.

This sounds like it’s going to be pretty cool, and would definitely be able to keep up with some level of motion. Once the camera’s input gets into Jitter, the rest happens pretty fast… though I’ve definitely noticed some lag at the front end, getting the input to the processing stage—it happens with iMovie too, so it’s not Jitter per se. Hopefully this will continue to get better, it will really help things like motion tracking of laser dots or other “sense-able” input methods, for interaction using large areas and camera tracking.

#160149
Jun 28, 2009 at 10:22pm

just an smal addition.
with one jit.gl.sketch object its possible to put multiple textures on multiple shapes using the “glbindtexture” command.

will

#160150
Jun 28, 2009 at 11:10pm

WOw thanks a lot guys! This is pure gold Smile

Seejay I think what I want is more simple than you think.
It will not involve motion tracking. Simply mapping on a shapes that that is not geometrical.

I have not had time today to try any of your suggestions. I am stuck working on another little music project.

I will really try to test your suggestions tomorrow. And gt back to you.

Thanks a lot guys

phil

#160151

You must be logged in to reply to this topic.