- Posts: 2
- Joined: Mon Jun 22, 2015 10:38 pm
In your case you would apply the polygon mask to the "color" texture used in a material. So try something like this...
- Code: Select all
{
Tools = ordered() {
Ward1 = MtlWard {
Inputs = {
["Diffuse.Color.Material"] = Input {
SourceOp = "Background1",
Source = "Output",
},
MaterialID = Input { Value = 1, },
},
ViewInfo = OperatorInfo { Pos = { 1485, 115.5, }, },
},
Background1 = Background {
Inputs = {
Width = Input { Value = 2048, },
Height = Input { Value = 1536, },
TopLeftRed = Input { Value = 0.253333333333333, },
TopLeftGreen = Input { Value = 0.253333333333333, },
TopLeftBlue = Input { Value = 0.253333333333333, },
Gradient = Input {
Value = Gradient {
Colors = {
[0] = { 0, 0, 0, 1, },
[1] = { 1, 1, 1, 1, },
},
},
},
EffectMask = Input {
SourceOp = "Polygon1",
Source = "Mask",
},
},
ViewInfo = OperatorInfo { Pos = { 1265, 115.5, }, },
},
Polygon1 = PolylineMask {
DrawMode = "InsertAndModify",
DrawMode2 = "InsertAndModify",
CtrlWZoom = false,
Inputs = {
MaskWidth = Input { Value = 2048, },
MaskHeight = Input { Value = 1536, },
PixelAspect = Input { Value = { 1, 1, }, },
ClippingMode = Input { Value = FuID { "None", }, },
Polyline = Input {
SourceOp = "Polygon1Polyline",
Source = "Value",
},
Polyline2 = Input {
Value = Polyline {
},
Disabled = true,
},
},
ViewInfo = OperatorInfo { Pos = { 1045, 115.5, }, },
},
Polygon1Polyline = BezierSpline {
SplineColor = { Red = 173, Green = 255, Blue = 47, },
NameSet = true,
KeyFrames = {
[719] = { 0, Flags = { Linear = true, LockedY = true, }, Value = Polyline {
Closed = true,
Points = {
{ Linear = true, X = -0.186274513602257, Y = 0.138954862952232, LX = 0.0728267773226224, LY = -0.0507721215226966, RX = -0.0166369577248891, RY = -0.114014248053233, },
{ Linear = true, X = -0.236185386776924, Y = -0.203087881207466, LX = 0.0166369577248891, LY = 0.114014248053233, RX = 0.240641708175341, RY = -0.0427553504705429, },
{ Linear = true, X = 0.4857397377491, Y = -0.331353932619095, LX = -0.240641708175341, LY = 0.0427553504705429, RX = -0.0744007813810098, RY = 0.0836741719822608, },
{ Linear = true, X = 0.26253739360607, Y = -0.0803314166723124, LX = 0.0744007813810098, LY = -0.0836741719822608, RX = 0.00844712931700427, RY = 0.104766056519695, },
{ Linear = true, X = 0.287878781557083, Y = 0.233966752886772, LX = -0.00844712931700427, LY = -0.104766056519695, RX = -0.0852243210638243, RY = -0.0824427515008765, },
{ Linear = true, X = 0.0322058183656103, Y = -0.0133615016158573, LX = 0.0852243210638243, LY = 0.0824427515008765, RX = -0.0728267773226224, RY = 0.0507721215226966, },
},
}, },
},
},
},
}
Materials can be much more complex though. You can add reflections, normal maps, etc, and you can blend multiple materials together.