I really need some help with a project of mine. I’m trying to create a pseudo mapping installation. In the installation I want to project a face onto a 3d object on the wall, but I want to make it interactive and give the user a possibility to distort the face by moving physical points (tracked by IR) that are attached to the object.
To archive this I have created a simple patch with the 2d grid filled with face textures. It is very easy to distort the grid by moving the points manually by sliders in vvvv. However when I try to add tracking with the contour node I have no control over which part of the face are where and everything is a big mess. Maybe there is some kind of simple solution to my problem, I would greatly appriciate your help.
I’m attaching a patch for reference.
sketchforfacedemorph.v4p (132.3 kB)
working with contour you have to deal with IDs. you need to sort it out and assign to your grid points. otherwise even if you have constant number of IDs, they jump in spread up and down. and you face pic will be not recognizable
dunno if it fits you needs, but i would go simple using displace shader
Maybe using attractor might help, rather than locking the points to a tracked point, they could be pulled towards the tracking points?
Hey guys, I didn’t got the time to respond.
I used the attractor node as catweasel suggested and it
works like a charm. Thank you so much!
Now I’m having another difficulty. The attractors work very good, however if the number of markers (read by the contour node) is lesser than the number of points defining the grid of my face - one attractor is being used in connection to many grid points (due to the fact that vvvv repeats slices in spreads in cases like this). I was looking through out the forums for a solution and only found this thread https://discourse.vvvv.org/t/4056 but it’s old and there is no solution provided. Could you guys help me out again? Basically, I need a way to stop the repetition of slices in spreads.
Unify (Spreads Sets) might help for simple Values.
for more advanced scenarios try this or that
note: both plugins try to take advantage of LINQ (which is awesome when dealing with filtering or correlating input data). Downside is, the vvvv-sdk makes using LINQ a little messy right now
Setify (4.5 kB)
to stop the repetition of slices in spreads
and some colorsound pills against contour headache
Thank you people, you are wonderful.
@DiMiX: logic used in this patch resolved my problem. Now only one marker is connected with one attractor and grid point. Thank you.
@velcrome: I didn’t quite get how Unify could help, but I tried to look in to the nearestPairs patch, because it seems to help with some Id problems in the contour node. However, it seems my vvvv is missing the FrameDelay(Value) node, do I need the latest addon pack to have it?
Anyway, I’m propably starting to be a real pain in the ass, but please bear with me a little more.
Now that each marker works with each attractor I’m encountering new problems. I made a small (13mb) video to show you: The red points are the positions of the points in the face grid, blue lines indicate their connection to the attractors. In the first part you can see that when I’m moving one of the markers (proprably below the x axis of the video fed to contour node) it switches positions with the other marker. In the second part (where the nose part of the face stretches so dramatically), I am adding a third marker and it becomes attached to the first attractor and basically all the attractor switch positions. It happens because the contour node adds a new slice in the first position and moves the original one the second and so on.
Is there any way to add a new slice in a spread but only at the end of the spread? And why are the positions changing in the first situation?
I can post my patch along with all the textures if you need to. If so let me know, so I will tidy it up, because it’s messy.
problems.rar (1.2 MB)
Try sort (spreads) to sort the ID’s of the blobs, and using the former index pin with a get slice to arrange the x and x position spreads in ascending order, the new points should be added at the end of the list then