铸造核武器的重新格式化node issu

2024-05-20 10:26:51 发布

您现在位置:Python中文网/ 问答频道 /正文

我想跟踪我的镜头,并添加CG元素作为我的核项目的一部分。为了达到这个目的,我对录像进行了无失真处理,并将其记录到磁盘上,以便更快地进行处理。然而,当我试图重新扭曲书面镜头(如附图所示),它没有给我原始的镜头。我发现Reformat5和{}并没有给我相同的边界框尺寸,即使这两个节点是相同的。在

enter image description here

我最初的镜头尺寸是1920*1080。在不失真后,它变成1928*1085。在

因此,我放置了一个尺寸为1928*1085的Reformat4节点,并将其写到磁盘中。在左侧,我再次设置了“重新格式化”节点,将未失真的镜头调整回1920*1080,保留了1928*1085的边框,以便执行镜头失真以恢复原始画面。在

它在左边工作很好,但是如果我在我写的镜头上做同样的事情,边界框的尺寸就不一样了。在

Reformat7给出的边框大小为1924*1083,而不是1928*1085。我错过了什么?我在网上搜索,但找不到任何解决办法。请对这个问题作些说明。在

我的核武器脚本如下:

set cut_paste_input [stack 0]
version 10.0 v3
push $cut_paste_input
LensDistortion {
 serializeKnob ""
 serialiseKnob "22 serialization::archive 9 0 0 0 0 0 0 0 0 0 0 0 0"
 distortion1 -0.007498324849
 distortion2 0.0008674863493
 distortionCenter {-0.002916968195 -0.001372990897}
 invertDistortion true
 cardScale {1.006676197 1.006676197 1}
 a 0.001508030226
 b -0.006750627421
 c -0.002457624534
 analysisStart 1
 analysisStop 329
 name LensDistortion2
 selected true
 xpos -451
 ypos 651
}
Reformat {
 format "1928 1085 0 0 1928 1085 1 undistortedFormat2"
 resize none
 name Reformat4
 selected true
 xpos -451
 ypos 684
}
set N6eafc00 [stack 0]
Reformat {
 resize none
 pbb true
 name Reformat5
 selected true
 xpos -451
 ypos 745
}
LensDistortion {
 serializeKnob ""
 serialiseKnob "22 serialization::archive 9 0 0 0 0 0 0 0 0 0 0 0 0"
 distortion1 -0.007498324849
 distortion2 0.0008674863493
 distortionCenter {-0.002916968195 -0.001372990897}
 cardScale {0.9934444427 0.9934444427 1}
 a -0.0004114751064
 b 0.004895505495
 c 0.002436506096
 analysisStart 1
 analysisStop 329
 name LensDistortion3
 selected true
 xpos -451
 ypos 782
}
push $N6eafc00
Write {
 file F:/Assignments/Nuke/CGComp/footages/undistortedFootage1080p/undistortedFootage1080p.####.exr
 file_type exr
 name Write7
 selected true
 xpos -269
 ypos 684
}
Reformat {
 resize none
 pbb true
 name Reformat7
 selected true
 xpos -269
 ypos 747
}
LensDistortion {
 serializeKnob ""
 serialiseKnob "22 serialization::archive 9 0 0 0 0 0 0 0 0 0 0 0 0"
 distortion1 -0.007498324849
 distortion2 0.0008674863493
 distortionCenter {-0.002916968195 -0.001372990897}
 cardScale {0.9934444427 0.9934444427 1}
 a -0.0004114751064
 b 0.004895505495
 c 0.002436506096
 analysisStart 1
 analysisStop 329
 name LensDistortion5
 selected true
 xpos -269
 ypos 783
}

Tags: nametrue节点尺寸serialization镜头selectedarchive
1条回答
网友
1楼 · 发布于 2024-05-20 10:26:51

您需要使用CopyBBox节点来解决您的问题。此Python命令创建已连接的CopyBBox节点:

import nuke
nuke.createNode("CopyBBox")

也可以使用以下命令创建与其他节点断开连接的节点:

^{pr2}$

CopyBBox将边界框从A输入复制到B流。边界框定义了Nuke认为具有有效图像数据的帧区域。边界框越大,Nuke处理和渲染图像的时间就越长。在

某些NUKE操作,例如MergeBlur、或{}会导致边界框区域的扩展或减少,因为NUKE不知道额外区域将是黑色或其他恒定颜色。通常,您可以通过将边界框从一个输入复制到结果图像来解决此问题,从而切断多余的区域。在

enter image description here

nuke.nodes.Transform(scale=1.005, filter="Mitchell")

如果在右边距有一个“拉伸像素效应”,请在Transform节点中使用scale=1.005参数(就在LensDistortion5节点之后)。另外,别忘了使用过滤算法。在

enter image description here

相关问题 更多 >