Understanding UVMaps - Warping with STMap - Pt. 2

Written by Florian Gellinger on .

Following the first tutorial for STMaps this second tutorial should give you some idea what else appart from recreating precise lens distortion warps you can do in Nuke using the same set of tools.

Assuming you have a 3D scene set up, doesn't matter if it's a Nuke 3D scene or a scene in Maya or Max, it can be a very time consuming task to fix renderings, to apply selective color corrections to a shot with moving camera or to switch a texture on an object. In any case - there is never a way around re-rendering everything. And especially when you have a very tight deadline you want to be able to do some last minute fixes in comp without tracking patches and without re-rendering your 3D output. Here at RISE we never failed to deliver our shots way ahead of any deadline - and this is how we do it:

Let's use this 3D scene as an example, shall we? :-)

01

 

Just a straight forward camera animated to fly towards some UV textured cubes and planes. Here is another one:

02

Let's say you wanted to do some selective color correction to your 3D scene output based on some bezier masks. Try projecting a UVMap onto your 3D scene from a frame in your camera animation that seems appropriate to you ( it should be the frame you want to use for drawing the bezier shapes). Just copy the camera (in this case frame 1), delete it's animation except for the frame you want to use for your beziers and connect it to a Project3D node.

03

 

To make it easier during crunch time just plug your UV projection scene output into some additional channels of your diffuse / standard 3D scene output. Should look something like this (you can do this in just one 3D scene - but it's easier to explain this way):

04

I'm now writing exr files with my checker board textured RGBA channels and the additional UV channels from my camera projection. Pluging my exr files into an STMap node as UV input and some bezier shapes as source input will give you this (note that I'm making my shapes on frame 1, the frame I used to project my UVMap):

05

 

Your beziers will now be warped to match the change of perspective on your geometry during your camera animation. You can use this technique to quickly apply color corrections, patches or textures to your 3D scene without it being 3D. You can warp entire matte paintings with your scene geometry. You can also setup as many UVMap projections on as many frames of your camera animation as you want and pipe them into other exr channels. It's blazing fast, especially when you have huge 3D scenes that take a long time to render. And it works with everything that renders 3D scenes, doesn't matter which renderer or 3D package. Thanks to Christian Pundschus at RISE for coming up with this great idea and for sharing it during Percy Jackson.

06

Comments   

 
+1 # Tom van Dop 2010-08-17 12:04
Awesome tutorial! Keep em coming :-)
 
 
0 # jaden star 2010-08-19 09:44
very nice tutorial. thx for sharing.

jaden
 
 
0 # pat wong 2010-08-26 19:26
hi Florian

looks like great tip, can you provide a script of the tutorial, i cant seem to get it working quite right. thx
 
 
0 # Alexey Kuchinski 2010-08-31 08:47
thanks a lot
very helpfull
 
 
0 # djati waskito 2010-10-08 07:05
speechless....i t's Rockkkk Flo. i saw ur demo on FXguide TV--ur fx on the movie-love. could u share us. Thanx
 
 
0 # Christopher Stark 2010-11-04 01:51
Absolutely brilliant! Many thanks for this awesome tip.
 
 
0 # Lewi Lewis 2010-12-28 10:39
Thanks for sharing this really great technique.
 
 
0 # Daniel Lee 2011-01-29 19:47
Such a brilliant idea!
Thanks
 
 
0 # Roman Weisgerber 2011-02-19 04:46
Great Tutorial Florian. I had a little issue with my UVmap because it was not in linear colorspace and in the end I had to invert it as well. Then everything worked just fine :-) Thanks
 
 
0 # DAZ R 2011-07-17 03:09
why not to use same projection setup for just rendering the patch (patches) instead of uvmap?
 
 
0 # Julian Lojek 2012-03-23 11:23
Hey Florian, just stumbled over this. Great stuff, I'll have to remember that. One question, though: why do you project a UV map onto the scene, instead of using the one you can get from your scanline renderer? I'm probably missing something, but until I figure it out, I thought I could as well ask you. :-)
Thanks! Cheers from London!
 
 
0 # Vincent Wauters 2012-04-19 15:28
Hi!
I asked myself the same question as Julian and DAZ, the result would be the same with the projection rendered from a scanline...
My only guess is this technique is meant to work with an actual render of a UV projection of the scene, without having the 3D scene physically in Nuke, in that case it's a pretty cool trick!
Am I right?

Thanks for the tip!
 
 
0 # Mark Andre Kolars 2012-10-24 03:30
Hi there, i just tried to re-create Florian's tutorial and it seemed to work but then i get these weird distortion when i plugin the STmap, any ideas what could have gone wrong? I also tried the UV output from the Scanline renderer and also had no success. What is so mystical about this STMap thing? So building own UV Map didn't work and pluging in the scanline render UV output didn't work either? So to conclude when i do a roto on a cube's face the weird shape sticks to the object during the animation just not in place and is heavily distorted, i also tried to invert the map, put it into another colorspace, etc. Nothing worked :-(

Any hints or experience to share?

Thanks,
Mark
 
 
0 # Ian Northrop 2013-03-12 17:54
Hello Mark Andre Kolars,

UV output for stmap really only works with 32-bit float color. Are you channel merging your newly projected UV map to an 32-bit float exr pipe? Chances are, this isn't the problem (because there could be many) but I thought it might be worth mentioning. Good luck.

-Ian
 

You have no rights to post comments

We have 2952 guests and 56 members online