Not Randy's Black Belt Camera Projection

Digging up an old thread with a use case variation…

I have to do some painting (object removal) on a complex and moving/changing body shape. I have it solved in Nuke, but was trying to find the Flame equivalent. Watched the old Jet-Li video referenced in the ancestry of this thread, and it’s all connected.

TL;DR: Instead of a 3D camera track and static card in 3D space, I have a Mocha Mesh Wrap which I want to un-wrap, paint, and then re-wrap. The objective is to stabilize the area of interest, and remove all the distortions from the body movement.

So essentially the camera has no tracking data, and instead of a card, it’s an animated alembic Geo.

I’ve tried adapting it by replacing the card and projected diffuse map with the geo and the same diffuse map, pointing a camera at it, and changing the output of the first action to UV, hoping I would get a UV unwrap of the geo which I can then paint on, and then reverse as usual.

Close, not there yet. If someone has done this combination before, would be nice to hear.

Here’s the Nuke script that works - adapted from the KeenTools Facetracker Unwrap technique. It utilizes the ability of the scanline render to output a UV mapping.

The ReadGeo node and Camera comes from the Alembic export from Mocha MeshTrack. The rest is just Nuke 3D projection stuff.

PS: In theory the MochaPro plugin render notes ‘stabilize warp’ and ‘stabilize unwarp’ are an alternative built-in path, but they’re not doing what I expected (and have seen in the past).

1 Like

I was on the same scenario two weeks ago, unfortunately couldnt find a way to unwrap the geo. I had a geo tracked on top of the object and what i did was just to work on the stabilized geo output but THIS IS NOT unwrap, just stabilized the object. While my hope was unwrapping -which didnt work- having the geo stabilized did work perfectly for me. I also tried mocha but yeah, exactly as you, didnt do what I expected. Also, mocha powermesh only work with flat surfaces which also didnt work for me since I need to track and replace a football ball so thats why a tracked/stabilized sphere worked right away.

Keentools is quite good, sometimes the “only” way to go. I really wish they launch geotrack for flame. I know it has been asked before and their answer was something like “not possible due flame has not unwrap mode like nuke’s scanline” which is true but at least we have the geo stabilized and make life easier.

2 Likes

Helpful confirmation/insight. thanks.

I do use GeoTracker regularly. Works really well. Had to do some deco replacement and cleanups on products not long ago.

In this project, it’s mostly a flat surface, but one that is morphing (belly of a pregnant woman who is moving in the shot). For less surface centric shapes like a ball, yes GeoTracker is better path.

Would be nice if some of this existed in Flame. Alas, bouncing between Flame and Nuke is not too bad. Just adds project complexity.

1 Like

Challenge accepted.

Here’s how you do it wrapped up in a Flame 2025 archive.
Source material included but should not be passed around please…

It looks like Mocha projects UVs from camera onto the power mesh alembic from the reference frame btw. There are some small tricks you can use to make the unwrap larger in frame. I can try to add those tomorrow if needs be.

5 Likes

That is super cool. Pixelspread and UV math for the win!

This is what happens when Flame artists are bored watching the Closing Ceremony on Sunday evening and have a laptop at hand??

PS: We should put a screen shot of the node graph into this thread to save it for later reference in case the Dropbox link disappears (which is ok).

1 Like

version 2024 doesn’t work?

@Fernandovfx - it’s most likely a flame 2025+ archive

Yes, says in the description: 2025 archive.

Here are screenshots of @cnoellert 's batch, to memorialize and for those that can’t open the archive:

It takes the UV projection of the Mocha geo, computes a diff with a standard UV map and uses that to drive a pixelspread which you can then paint on and reverse.

Action on the left with Mocha cam + geo, ABC import, projecting a standard UV image and also a matte of the geo.

The config of the Pixelspread. You need to manipulate the parameters so that the origin is in the bottom left corner. This will be shot dependent. And click the ‘Under’ checkbox.

This shows the rewrap with a copy of the first action, but now using the painted on flattened geo.

Why not use MotionVectors for this? The tracking in the setup is slipping quite a bit.

  1. Curiosity if this method can be adapted to tracked geos.

  2. Another tool in the box. That way you have two separate trackers, hoping that one will do a good job in a bind. Especially in situation where the go is morphing significantly.

I didn’t really track it for accuracy @ALan, just as POC.

4 Likes

The issue becomes UV distribution/mapping and sidedness, but it can work.

If you’re thinking keen tools, all you have to do is bake the anim in nuke or blender along with the camera, out as an abc into action with UV output enabled. Basically try it out…

3 Likes

Totally. There’s no silver bullet here. It won’t work for heavily curved geos or areas out of sight of the camera.

My use case was the painting out something on the belly of a very pregnant woman with very heavy motion in the shot of 600 frames. When you use motion vectors pixel regions can get compressed and don’t recover very well from that. The mesh tracker presumably can have an advantage that it doesn’t treat each pixel as a tracking point, but only the mesh control points. They can recover after a compression a bit more gracefully.

The other advantage is that in Mocha Mesh, you draw the mask larger to establish the mesh surface, but then before tracking shrink the mask to a lightly smaller area which is then used by the planar tracker. In a way you get an overscan of the operation which can be helpful. Something that motion vectors are not very good at.

Also it’s very easy to create hold-out masks in Mocha for the mesh tracking. Don’t recall how easy that is for motion vectors. You have the ROI, but can you do a holdout for the tracker yet still get coverage?

Re: Keentools - if that becomes the use case, with real world geos (like products), I just do that in Nuke and call it a day.

Since MVs are always going to be a sim/solver situation, you get the fidelity entropy problem… power mesh isn’t a sim/solver so it doesn’t suffer that particular issue.

1 Like

That’s a much more concise answer than my version :wink:

2 Likes

This is the way. Keen in blender is amazing.

2 Likes

I opened the archive in flame 2025. Geometry animation timing is messed. I had to add an offset in timing parameters of the geometry to align animation timing with the BG. Anyway, the complete setup is not working. What could be going on?

EDIT → Ok. I had to add same timing offset in second action. Now it’s ok. But I wonder why geometry is slipped. Maybe an Start Frame issue?

You found it. It’s the mocha exporter being off a frame. I fixed it on import before archiving though—so strange that didn’t come along with the archive…

Bug or feature.

OK. Thanks. The tip is great. It goes directly to my user bin.

1 Like