Here's a really simple example of using projection mapping with an ambient light. You can copy the code and paste in the Fusion flow. You'll just have to replace the loader in this flow with something you have locally.
- Code: Select all
{
Tools = ordered() {
aniCam = Camera3D {
CtrlWZoom = false,
NameSet = true,
Inputs = {
["Transform3DOp.Translate.X"] = Input { Value = -4.7676106345563, },
["Transform3DOp.Translate.Z"] = Input { Value = 6.40997375086043, },
["Transform3DOp.Rotate.Y"] = Input { Value = -29.1084695649333, },
AoV = Input { Value = 24.3265863475745, },
["Stereo.Mode"] = Input { Value = FuID { "OffAxis", }, },
["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 3, },
["MtlStdInputs.MaterialID"] = Input { Value = 3, },
},
ViewInfo = OperatorInfo { Pos = { 957.016, 195.926, }, },
},
Note1 = Note {
Inputs = {
Comments = Input { Value = "Replace this loader with a texture\r\n", },
},
ViewInfo = StickyNoteInfo {
Pos = { 349.455, -42.2308, },
Flags = {
Expanded = true,
},
Size = { 196, 256.468, },
},
},
Merge3D1 = Merge3D {
Inputs = {
SceneInput1 = Input {
SourceOp = "Shape3D1",
Source = "Output",
},
SceneInput2 = Input {
SourceOp = "Projection",
Source = "Output",
},
SceneInput3 = Input {
SourceOp = "aniCam",
Source = "Output",
},
},
ViewInfo = OperatorInfo { Pos = { 947.949, 79.4737, }, },
},
Renderer3D1 = Renderer3D {
Inputs = {
Width = Input { Value = 1920, },
Height = Input { Value = 1080, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2", }, },
SceneInput = Input {
SourceOp = "Merge3D1",
Source = "Output",
},
CameraSelector = Input { Value = FuID { "aniCam", }, },
["RendererSoftware.LightingEnabled"] = Input { Value = 1, },
},
ViewInfo = OperatorInfo { Pos = { 1192.52, 72.6272, }, },
},
Loader1 = Loader {
Clips = {
Clip {
ID = "Clip1",
Filename = "W:\\Screen Shot 2015-11-12 at 4.42.16 PM.png",
FormatID = "PNGFormat",
StartFrame = -1,
LengthSetManually = true,
TrimIn = 0,
TrimOut = 0,
ExtendFirst = 0,
ExtendLast = 0,
Loop = 0,
AspectMode = 0,
Depth = 0,
TimeCode = 0,
GlobalStart = 0,
GlobalEnd = 0,
},
},
Inputs = {
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2", }, },
},
ViewInfo = OperatorInfo { Pos = { 391.884, 74.4243, }, },
},
Projection = Camera3D {
NameSet = true,
Inputs = {
["Transform3DOp.Translate.X"] = Input { Value = 0.0193685565341013, },
["Transform3DOp.Translate.Y"] = Input { Value = -0.406645391977143, },
["Transform3DOp.Translate.Z"] = Input { Value = 5.17223036796109, },
["Transform3DOp.Rotate.X"] = Input { Value = 0.557934392709285, },
AoV = Input { Value = 24.3265863475745, },
["Stereo.Mode"] = Input { Value = FuID { "OffAxis", }, },
ControlVis = Input { Value = 1, },
["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 2, },
ImageInput = Input {
SourceOp = "Loader1",
Source = "Output",
},
["MtlStdInputs.Diffuse.Opacity"] = Input { Value = 0, },
["MtlStdInputs.MaterialIDNest"] = Input { Value = 1, },
["MtlStdInputs.MaterialID"] = Input { Value = 2, },
ProjectionEnabled = Input { Value = 1, },
},
ViewInfo = OperatorInfo { Pos = { 658.121, 76.2913, }, },
},
Shape3D1 = Shape3D {
Inputs = {
["Transform3DOp.Translate.Y"] = Input { Value = -0.361870951064561, },
Shape = Input { Value = FuID { "SurfaceCubeInputs", }, },
["MtlStdInputs.MaterialIDNest"] = Input { Value = 1, },
["MtlStdInputs.MaterialID"] = Input { Value = 1, },
["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
["SurfaceConeInputs.ObjectID.ObjectID"] = Input { Value = 4, },
["SurfaceSphereInputs.ObjectID.ObjectID"] = Input { Value = 5, },
["SurfaceCubeInputs.Visibility.Nest"] = Input { Value = 1, },
["SurfaceCubeInputs.Lighting.Nest"] = Input { Value = 1, },
["SurfaceCubeInputs.ObjectID.ObjectID"] = Input { Value = 1, },
},
ViewInfo = OperatorInfo { Pos = { 972.822, -49.1062, }, },
},
},
}
In addition to Yuri's suggestion, Alkesh has a lot of information in his Projection Mapping and re-lighting tutorials. This is a good place to start: