首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Foundry Nuke重新格式化节点问题

Foundry Nuke重新格式化节点问题
EN

Stack Overflow用户
提问于 2017-10-07 20:33:34
回答 1查看 950关注 0票数 2

我想跟踪我的镜头,并添加CG元素,作为我的核项目的一部分。为此,我对素材进行了不失真处理,并将其写到磁盘上,以加快处理速度。然而,当我试图重新扭曲书面镜头(如附图所示)时,它没有给我原始的镜头。我发现Reformat5Reformat7没有提供相同的边界框尺寸,即使这两个节点是相同的。

我的原始素材尺寸是1920*1080。在不失真之后,它变成了1928*1085。

因此,我放置了一个维度为1928x1085的Reformat4节点,并将其写到磁盘上。在左边,我再次重新格式化节点,将未失真的镜头大小调整回1920*1080,并保留大小为1928*1085的边界框,以便执行镜头失真以恢复原始镜头。

它在左侧工作得很好,但如果我在我的书面素材上做同样的事情,边界框尺寸就不一样了。

Reformat7给出的边界框大小为1924*1083,而不是1928*1085。这里我漏掉了什么?我在网上搜索,但我找不到任何解决方案。请说明一下这个问题。

我的nuke脚本如下所示:

代码语言:javascript
复制
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
}
EN

回答 1

Stack Overflow用户

发布于 2017-10-07 21:31:43

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

代码语言:javascript
复制
import nuke
nuke.createNode("CopyBBox")

或者,您可以使用以下命令创建一个与其他节点断开连接的节点:

代码语言:javascript
复制
nuke.nodes.CopyBBox()

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

某些NUKE操作(如MergeBlurLensDistortion )可能会导致边界框区域的扩展或减小,因为NUKE不知道额外的区域将是黑色或其他恒定颜色。通常,您可以通过将边界框从其中一个输入复制到结果图像来修复此问题,从而切断额外的区域。

代码语言:javascript
复制
nuke.nodes.Transform(scale=1.005, filter="Mitchell")

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

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46620171

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档