Hey vvvvers, I’m experimenting with the Facetracker node to generate real-time meshes of the tracked points. I know the index and vertex information is in the mesh.idx and mesh.tcx files in the freeframes directory but how do I get the info from those files to create the mesh?Do I load the file as a string and then parse it to match the current positions? A bit of newbie so any help will be appreciated.
right, read files as strings, parse them and put the data in a VertexBuffer (EX9.Geometry Join) (see its helppatch).
Thanks joreg, but how do i read and parse the files? copy/paste and then IO Value advanced node (string)?
check helppatches of:
Thanks Joreg, all that definitely points in the direction im looking for. :)
Hmm, had another go at it. The reader and the seperator part seems easy enough, read the file, use (NewLineAutoDectection) to separate it to to a spread of numbers and but then when i get to RegExpr and key in \s it doesn’t give me a spread of numbers I can use.
Once the numbers are parsed you will need to convert the datatype with AsVaule(string). You might also want to use another Separate so you have individual slices for each value, if it is still a number of vaules per line.
I think i read the idx file correctly as a sequence of two separators, one
as a Space, then as a NewLineAuto… does that sound right? The TCX file corrosponds to texture coordinates yes?
textures still seem a bit messed up though. Is there a workaround?
consider someone with no idea of what you’re talking about. this sounds like a rather vague question, right? pro tip: show your patch and use more words to describe your problem.
sorry joreg, was probably thinking this was a usual problem that came up. Here’s the patch as it is at this point.I might be parsing the tcx file wrongly- or both the idx and tcx file. Any help would be greatly appreciated!!
FACETRACKERDEBUG.zip (4.4 kB)
seems you packed only the original helppatch!?
ACK. sorry joreg,here is the altered patch with vertexbuffer and mesh added.
FACETRACKER.zip (4.7 kB)
oui, just a hint: the texture-coordinate in the file are given in pixels. vvvv takes them in tex-coord units though (which is 0…1) . so you basically need to divide the numbers by the size of the larges tex-coord found (for x and y).
for this check out Bounds (Spectral) to detect the largest value in the spread. then take that value and divide all texcoords through it (separately for X and Y of course).
hope that helps.
ah ok, i know what u mean, i figured that might have been an issue but I was trying to fix it via a Map node. The bounds thing would would work to set a maximum input as well no? Either way I will try out both methods.Thanks so much for your patience joreg and everyoneishappy. Much appreciated. I’ll post the finished patch for the reference of others when it’s done.
note the bounds-node only helps you to detect the maximum in the spread. the map-node can than of course be used as an alternative to a simple division.
For some reason I just had a very quick look at this.
Now it kinda works, but it still needs some tweaking (maybee its my face). I get 2 or 3 holes in my textured mesh. I don´t know why, maybee its the indicies or an error in the texturecoordinates. The texturecoordinate file contains 133 values, which I find a bit weird for a 2-dimensional coordinate system. I just dropped the first value, and it seems okay, but not perfect.
Maybee someone else has a hint
ft.zip (319.5 kB)
hmm… works actually pretty great with a 2D delaunay triangulation on the vertices from the FaceTracker
FACETRACKERDEBUG_delaunay.v4p (38.2 kB)
i just discovered how much fun brings the facetracker node.
I played with the last patch in this old tread and an idea came up… but i need some advices to make it:
I’d like to make a still image ( let’s say a poster) and animate the face with just the caracteristics (mouth, nose, eyes), not the position in the space.
In the sample you’ll find (ironman) i separated via getSpread the vertex of the tracked face, but i need to transform their position in something relative to a fixed coordinates.
i need to apply the transformed coords to a “face layer” which should be positioned according to the background.
This will allow us (me for sure) to create stuff like this
or the typical haunted house painting of the dead acient owner :D
Hope you can help me, maybe it’s almost easy to achive this…
FT still image.zip (494.2 kB)