- Posts: 61
- Joined: Tue Dec 23, 2014 5:00 pm
The trick is to add a 3DLocator, which transfers any 3D location
to 2D X/Y Coordinates.
You can RMB on any point in your PointCloud and select
PointCloud -> Create Locator.
In the locator itself you have to define the camera you are rendering your scene with
as well as the resolution of the rendere image to achieve the correct result.
- Code: Select all
{
Tools = ordered() {
Camera3D1 = Camera3D {
Inputs = {
["Transform3DOp.Translate.X"] = Input {
SourceOp = "Camera3D1XOffset",
Source = "Value",
},
["Transform3DOp.Translate.Y"] = Input {
SourceOp = "Camera3D1YOffset",
Source = "Value",
},
["Transform3DOp.Translate.Z"] = Input {
SourceOp = "Camera3D1ZOffset",
Source = "Value",
},
["Transform3DOp.Rotate.X"] = Input {
SourceOp = "Camera3D1XRotation",
Source = "Value",
},
["Transform3DOp.Rotate.Y"] = Input {
SourceOp = "Camera3D1YRotation",
Source = "Value",
},
["Transform3DOp.Rotate.Z"] = Input {
SourceOp = "Camera3D1ZRotation",
Source = "Value",
},
FLength = Input { Value = 18.2123442718302, },
["Stereo.Mode"] = Input { Value = FuID { "Mono", }, },
["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 3, },
["MtlStdInputs.MaterialID"] = Input { Value = 2, },
},
ViewInfo = OperatorInfo { Pos = { 440, 82.5, }, },
},
Camera3D1XOffset = BezierSpline {
SplineColor = { Red = 250, Green = 59, Blue = 49, },
NameSet = true,
KeyFrames = {
[0] = { 1.19012571830465, RH = { 33.3333333333333, 0.892105545681506, }, Flags = { Linear = true, }, },
[100] = { 0.296065200435218, LH = { 66.6666666666667, 0.594085373058362, }, Flags = { Linear = true, }, },
},
},
Camera3D1YOffset = BezierSpline {
SplineColor = { Red = 252, Green = 131, Blue = 47, },
NameSet = true,
KeyFrames = {
[0] = { 2.25341052978214, RH = { 33.3333333333333, 1.73061481542768, }, Flags = { Linear = true, }, },
[100] = { 0.685023386718751, LH = { 66.6666666666667, 1.20781910107321, }, Flags = { Linear = true, }, },
},
},
Camera3D1ZOffset = BezierSpline {
SplineColor = { Red = 254, Green = 207, Blue = 46, },
NameSet = true,
KeyFrames = {
[0] = { 3.28299600903452, RH = { 33.3333333333333, 3.29879147288646, }, Flags = { Linear = true, }, },
[100] = { 3.33038240059032, LH = { 66.6666666666667, 3.31458693673839, }, Flags = { Linear = true, }, },
},
},
Camera3D1XRotation = BezierSpline {
SplineColor = { Red = 255, Green = 128, Blue = 128, },
NameSet = true,
KeyFrames = {
[0] = { -32.7999992370605, RH = { 33.3333333333333, -27.8666659037272, }, Flags = { Linear = true, }, },
[100] = { -17.9999992370605, LH = { 66.6666666666667, -22.9333325703939, }, Flags = { Linear = true, }, },
},
},
Camera3D1YRotation = BezierSpline {
SplineColor = { Red = 128, Green = 255, Blue = 128, },
NameSet = true,
KeyFrames = {
[0] = { 19.6000003814697, RH = { 33.3333333333333, 15.3333337148031, }, Flags = { Linear = true, }, },
[100] = { 6.80000038146973, LH = { 66.6666666666667, 11.0666670481364, }, Flags = { Linear = true, }, },
},
},
Camera3D1ZRotation = BezierSpline {
SplineColor = { Red = 128, Green = 128, Blue = 255, },
NameSet = true,
KeyFrames = {
[0] = { 0, RH = { 33.3333333333333, 0, }, Flags = { Linear = true, }, },
[100] = { 0, LH = { 66.6666666666667, 0, }, Flags = { Linear = true, }, },
},
},
Text1 = TextPlus {
Inputs = {
Width = Input { Value = 1920, },
Height = Input { Value = 1080, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2", }, },
Center = Input {
SourceOp = "Locator3D1",
Source = "Position",
},
Font = Input { Value = "Arial", },
StyledText = Input { Value = "Corner", },
Style = Input { Value = "Bold", },
ManualFontKerningPlacement = Input {
Value = StyledText {
Array = {
},
Value = "",
},
},
Alignment = Input { Value = 1, },
HorizontalJustification = Input { Value = 0, },
VerticalJustification = Input { Value = 2, },
ShadingGradient1 = Input {
Value = Gradient {
Colors = {
[0] = { 0, 0, 0, 1, },
[1] = { 1, 1, 1, 1, },
},
},
},
RenderToDPTFile = Input { Disabled = true, },
DPTType = Input { Disabled = true, },
DPTResolution = Input { Disabled = true, },
},
ViewInfo = OperatorInfo { Pos = { 935, 82.5, }, },
},
Shape3D1 = Shape3D {
CtrlWZoom = false,
Inputs = {
Shape = Input { Value = FuID { "SurfaceCubeInputs", }, },
["MtlStdInputs.MaterialID"] = Input { Value = 1, },
["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
["SurfaceCubeInputs.SubdivisionWidth"] = Input { Value = 2, },
["SurfaceCubeInputs.Wireframe"] = Input { Value = 1, },
["SurfaceCubeInputs.ObjectID.ObjectID"] = Input { Value = 2, },
},
ViewInfo = OperatorInfo { Pos = { 330, 181.5, }, },
},
Locator3D1 = Locator3D {
Inputs = {
SceneInput = Input {
SourceOp = "Merge3D1",
Source = "Output",
},
["Transform3DOp.Translate.X"] = Input { Value = 0.5, },
["Transform3DOp.Translate.Y"] = Input { Value = 0.5, },
["Transform3DOp.Translate.Z"] = Input { Value = 0.5, },
Width = Input { Value = 1920, },
Height = Input { Value = 1080, },
},
ViewInfo = OperatorInfo { Pos = { 660, 181.5, }, },
},
Renderer3D1 = Renderer3D {
Inputs = {
Width = Input { Value = 1920, },
Height = Input { Value = 1080, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2", }, },
SceneInput = Input {
SourceOp = "Locator3D1",
Source = "Output",
},
RendererType = Input { Value = FuID { "RendererOpenGL", }, },
},
ViewInfo = OperatorInfo { Pos = { 825, 181.5, }, },
},
Merge1 = Merge {
Inputs = {
Background = Input {
SourceOp = "Renderer3D1",
Source = "Output",
},
Foreground = Input {
SourceOp = "Text1",
Source = "Output",
},
PerformDepthMerge = Input { Value = 0, },
},
ViewInfo = OperatorInfo { Pos = { 935, 181.5, }, },
},
Merge3D1 = Merge3D {
Inputs = {
SceneInput1 = Input {
SourceOp = "Shape3D1",
Source = "Output",
},
SceneInput2 = Input {
SourceOp = "Camera3D1",
Source = "Output",
},
},
ViewInfo = OperatorInfo { Pos = { 495, 181.5, }, },
},
},
}
PS:
The Locator needs to be downstream of the Camera.
Else it wouldn't know the camera's position.
Cheers.
Eric.