Cyclo v1.1


 
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Makis Stergiou
Creates a panoramic image out of live footage frames (or just simple coverage maps). Needs a moving camera as input.
Requirements:
6.3 or later
Linux, Windows
10 Mar 2012
691
c01

With this script you can create either stitched images out of sequences or just coverage maps.
It gets an animated camera (from a matchmoved sequence) and creates a group of frameholds, cameras and project3D nodes.
If you connect it to a sequence it outputs the stitched image. If you feed it with a constant you will get the coverage map.

Tested in v6.3 in Linux. Probably it works with older versions as well.

 

Usage:

0. Create a directory ('Cyclo') in your .nuke folder and put the script there. Add the following to the init.py

1
nuke.pluginAddPath('./Cyclo')

and this to the meny.py

1
2
3
4
5
toolbar = nuke.toolbar('Nodes')
menu = toolbar.addMenu('Cyclo')
 
import Cyclo
menu.addCommand('Cyclo','Cyclo.cyclo()')

 

1. Hit tab and type Cyclo. A pane will appear with a dropdown list with the available animated cameras and a number of projections input.
Choose the camera and the projections that you want to use and click ok.
- The number of projections is how many cameras and project3D nodes you want to use. It's good to start with a small number and when you finish tuning replace with another instance of Cyclo.

c03

 

2. The script then creates a node and connects it to the camera. In its panel you have the following options:
spacing: the arrangement of the projection rig in space,
near, far: the clipping planes of the cameras,
visible: toggles visibility of the cameras.
- I suggest a workflow like in the picture top-right: Plug the camera into a scene and add a sphere (or a cylinder if the movement is mostly horizontal pan). Feed the cyclo to the geometry and set the viewer to the scene node.

c02

 

3. You will get something similar to the image below. You will probably need to adjust the scale of the geometry (needs to be large enough to contain the rig).

c05

 

4. Then, hide the geo before start tuning the rig.
- You can continue without this step but the update of the texture on the surface will probably be slow.

Adjust the near and far clipping planes of the cameras to a large number like in the picture below. You can see this way the distribution of the projections in space.

c07

 

5. Use the spacing slider and the its curve in the curve editor to rearrange the cameras in space.
- The projection cameras use this curve to pick the frame (of the matchmoved camera) that will lock on. It is actually a lookup curve.
- I added this slider because my inspiration shot was a 360 heli which caused an uneven distribution of the cameras in space.

Occasionaly switch to the geometry - or a lowRes render of the texture - to check if the result is the desired.

c04

 

6. When you are ready add a crop node to your input image, add some softness, and render via a scanline render in uv mode. Voilà.
- If the cameras are not enough create another cyclo with more cameras and copy/paste the spacing curve you just created.

Please login in order to download these files.

Comments   

 
0 # Mike Connolly 2012-03-07 12:03
Makis, any reason why this won't work on a Mac?

I'm getting:

Traceback (most recent call last):
File "", line 1, in
File "/Users/electri cpig/.nuke/Cycl o/Cyclo.py", line 190, in cyclo
return CycloPanel().sh owModalDialog()
File "/Users/electri cpig/.nuke/Cycl o/Cyclo.py", line 187, in showModalDialog
createRig(nuke. toNode(self.cam era.value()), self.projection s.value())
File "/Users/electri cpig/.nuke/Cycl o/Cyclo.py", line 126, in createRig
first, last = getKeys(camera)
File "/Users/electri cpig/.nuke/Cycl o/Cyclo.py", line 97, in getKeys
for curve in camera['translate'].animations():
TypeError: 'NoneType' object is unsubscriptable

also:

Traceback (most recent call last):
File "", line 1, in
File "/Users/electri cpig/.nuke/Cycl o/Cyclo.py", line 190, in cyclo
return CycloPanel().sh owModalDialog()
File "/Users/electri cpig/.nuke/Cycl o/Cyclo.py", line 174, in __init__
if n.knob('transla te').isAnimated () or n.knob('rotate').isAnimated():
AttributeError: 'NoneType' object has no attribute 'isAnimated'
 
 
0 # Mike Connolly 2012-03-07 12:03
Sorry, forgot to say Nuke6.3v5
 
 
0 # Makis Stergiou 2012-03-08 01:36
Hi Mike,

I tested that only on a Linux box :-) but from the error message I suspect that maybe an error check is missing from my script and it does not relate to the os.

Are there more than one keyframes in your camera? If yes can you paste your camera to try with it?
 
 
0 # Mike Connolly 2012-03-08 04:22
Thanks. There is a camera in the script, a linked one from the camera tracker.
On the few times I got your first stage dialogue box up, the displayed camera drop down was greyed out, so it wasn't seeing the camera.
Then the dialogue stopped popping up when tabbed for and the errors I sent you came up instead.

Yes it is an animated camera, 1000 frames long.
I can make a shorter track to test if your request is to post it here?
 
 
0 # Makis Stergiou 2012-03-08 12:44
I would probably have access to an osx nuke this weekend :-)
If you make another scene please paste it in a pastebin and passe me the link - be sure that does not work :-)
 
 
0 # Mike Connolly 2012-03-08 13:48
Thanks Makis, I would appreciate that.
I've just slung something similar together totally manually but your node with the lookup to control the clustering of cards is just what I need. I love using lookups!

This was a freash script. Can't even create a node.
I have both a linked camera and one where I've generated frames for all keys to make sure it wasn't a linking thing.

http://www.yousendit.com/download/M3BtNU1Pd0FCSnA4SjhUQw
 
 
0 # Makis Stergiou 2012-03-11 01:46
I think it's ok now :-)
 
 
0 # Mike Connolly 2012-03-11 09:40
Thankyou! It works really well, just what I wanted and will use a lot. I like the built-in clipping planes and visibility for keeping things clean.

not to mention the lookups...
 
 
0 # Mike Connolly 2012-03-11 09:45
You can add OSX to system requirements now.
 
 
0 # Mike Connolly 2012-03-11 10:12
As one request, would it be possible to have a slider to setup as frame numbers, so project : 1@1, 345@600, 667@800, 1000@1000 etc.
it would be a manual spacing method to allow you to place cards exactly where you wanted them at certain points in the camera move.
 
 
0 # Makis Stergiou 2012-03-13 10:00
That would be a lot of sliders in case of a large number of cameras. lol
I am a bit busy atm (luckily) - will try to improve it in the future.
 
 
0 # Mike Connolly 2012-03-13 11:10
Thanks for future improvements. I wasn't thinking in terms of large amounts of cameras, just the ability to 'pin' certain points in time accurately.
The 'auto' side of of your script would create the spaced cards in-between.

but a big thank you once again, this becomes a real weapon of choice.
 
 
0 # Makis Stergiou 2012-03-23 10:13
You can do that if you remap the curve to the desired range ... and use more "cyclo's" for the complete camera mov. Is that ok?
 
 
0 # Mike Connolly 2012-03-23 10:46
Kind of, but I find myself looking for a correlation between the spacing slider, and the actual frame used at the point in the timeline.
If the info at the top where it says for example: frames: 0-151 (151) actually had an active frame number in the brackets to reflect the current frame being used, it would be enough.

I'm just thinking of a scenario where I've hoovered up the scene with a camera, used cyclo to project, and then want to line up with a matte painting I need to insert at frame 72.

But this is being picky in reality, as it's a great tool. Thankyou very much!
 
 
0 # Lee Watson 2020-03-03 16:08
Hello from 2020! Can this be updated? or is there a newer solution around somewhere?
 

You have no rights to post comments

We have 3066 guests and 71 members online