Welcome to WSL!

Make yourself at home, but before posting, please may I ask you to read the following topics.


Posting 101
Server space, screenshots, and you

Thank you!

PS. please pretty please:


Image

[DEV] Greebler Fuse

Where the future is being made, today.

Welcome to the WSL development corner!

In this forum, please post your development projects. You get kudos and feedback here.
Topics ideally have preset prefixes, and this is what they (might) mean:

  • [DEV] - very much work in progress, don't build a business on this, could go anywhere
  • [BETA] - should kinda do what it's supposed to do, please test, give feedback
  • [RC] - this may end up in Reactor soon, polishing up, now's the time for last minute thoughts
  • [ABD] - died a premature death, sadness, will not see the light of day ever (unless someone picks up the scraps)

Once a development project has been released (hurray), topics can be marked as - you guessed it - [RELEASED] :cheer:

Development topics only, please. For generic questions, how-to's, questions and inquiries about existing tools etc, please go to the appropriate other forums.
User avatar
SteveWatson
Fusioneer
Posts: 111
Joined: Sat Oct 12, 2019 6:03 am
Answers: 1
Been thanked: 11 times

[DEV] Greebler Fuse

#1

Post by SteveWatson » Fri Mar 27, 2020 6:36 am

Hi,

sitting around at home(which to be honest is not much of a change from normal work life) I've been watching various stuff. I saw this video about creating interesting backgrounds.



In this he uses a tool call JSplacement which is really good, but it involves going into another program, exporting and perhaps resizing - it also doesn't let you animate the elements once created(except for translation etc of the image itself).

Having time on my hands I started working on a fuse that does something similar.

I give you the first release of Greebler(so called because it was something used in 3D modelling to create surface detail and this sort of looks a bit like that).

What it does is create a random grid of shapes. That's it, but those random shapes can then be used in a multitude of ways.



First Example

Code: Select all

{
	Tools = ordered() {
		Greebler1_1_1_1 = Fuse.Greebler {
			Inputs = {
				GlobalOut = Input { Value = 199, },
				Width = Input { Value = 1920, },
				Height = Input { Value = 1080, },
				UseFrameFormatSettings = Input { Value = 1, },
				["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
				RandomSeed = Input { Value = 26024, },
				Density = Input { Value = 0.339, },
				ShowSolidTriangles = Input { Value = 0, },
				ShowOutlineTriangles = Input { Value = 0, },
				ShowSolidSquares = Input { Value = 0, },
				SoSquareScaleRandom = Input { Value = 1, },
				SoSquareScale = Input { Value = 5.83, },
				SoSquareAngle = Input { Value = 45, },
				OutlineSquares = Input { Value = 1, },
				OutSquareScaleRandom = Input { Value = 1, },
				OutSquareScale = Input { Value = 3.31, },
				OutSquareAngle = Input {
					Value = 18,
					Expression = "time/25 * 5",
				},
				OutSquareThick = Input { Value = 6.77, },
				ShowSolidCircles = Input { Value = 0, },
				ShowOutlineCircles = Input { Value = 0, },
			},
			ViewInfo = OperatorInfo { Pos = { 770, -148.5 } },
		},
		Greebler1_1_1_1_1 = Fuse.Greebler {
			Inputs = {
				GlobalOut = Input { Value = 199, },
				Width = Input { Value = 1920, },
				Height = Input { Value = 1080, },
				UseFrameFormatSettings = Input { Value = 1, },
				["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
				RandomSeed = Input { Value = 26024, },
				ShowSolidTriangles = Input { Value = 0, },
				ShowOutlineTriangles = Input { Value = 0, },
				SolidSquares = Input { Value = 1, },
				SoSquareScaleRandom = Input { Value = 1, },
				SoSquareAngle = Input { Value = 45, },
				OutlineSquares = Input { Value = 1, },
				ShowOutlineSquares = Input { Value = 0, },
				OutSquareScaleRandom = Input { Value = 1, },
				OutSquareScale = Input { Value = 3.31, },
				OutSquareThick = Input { Value = 4.09, },
				SolidCircles = Input { Value = 1, },
				ShowSolidCircles = Input { Value = 0, },
				SoCircScaleRandom = Input { Value = 1, },
				SoCircScale = Input { Value = 2.6, },
				ShowOutlineCircles = Input { Value = 0, },
			},
			ViewInfo = OperatorInfo { Pos = { 770, -115.5 } },
		},
		Greebler1_1_1 = Fuse.Greebler {
			Inputs = {
				GlobalOut = Input { Value = 199, },
				Width = Input { Value = 1920, },
				Height = Input { Value = 1080, },
				UseFrameFormatSettings = Input { Value = 1, },
				["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
				RandomSeed = Input { Value = 2653, },
				ShowSolidTriangles = Input { Value = 0, },
				OutlineTriangles = Input { Value = 1, },
				ShowOutlineTriangles = Input { Value = 0, },
				SolidSquares = Input { Value = 1, },
				SoSquareScaleRandom = Input { Value = 1, },
				SoSquareScale = Input { Value = 0.87, },
				SoSquareAngle = Input { Value = 45, },
				OutlineSquares = Input { Value = 1, },
				ShowOutlineSquares = Input { Value = 0, },
				SolidCircles = Input { Value = 1, },
				ShowSolidCircles = Input { Value = 0, },
				OutlineCircles = Input { Value = 1, },
				ShowOutlineCircles = Input { Value = 0, },
			},
			ViewInfo = OperatorInfo { Pos = { 770, -82.5 } },
		},
		Colour2 = Background {
			NameSet = true,
			Inputs = {
				GlobalOut = Input { Value = 199, },
				Width = Input { Value = 1920, },
				Height = Input { Value = 1080, },
				UseFrameFormatSettings = Input { Value = 1, },
				["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
				TopLeftRed = Input { Value = 0.69803923368454, },
				TopLeftGreen = Input { Value = 0.827451050281525, },
				TopLeftBlue = Input { Value = 0.882353007793427, },
				EffectMask = Input {
					SourceOp = "Greebler1_1_1",
					Source = "Output",
				}
			},
			ViewInfo = OperatorInfo { Pos = { 1045, -82.5 } },
		},
		Colour4 = Background {
			NameSet = true,
			Inputs = {
				GlobalOut = Input { Value = 199, },
				Width = Input { Value = 1920, },
				Height = Input { Value = 1080, },
				UseFrameFormatSettings = Input { Value = 1, },
				["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
				TopLeftRed = Input { Value = 0.77647066116333, },
				TopLeftGreen = Input { Value = 0.415686309337616, },
				TopLeftBlue = Input { Value = 0.670588254928589, },
				EffectMask = Input {
					SourceOp = "Greebler1_1_1_1_1",
					Source = "Output",
				}
			},
			ViewInfo = OperatorInfo { Pos = { 1045, -115.5 } },
		},
		Colour3 = Background {
			NameSet = true,
			Inputs = {
				GlobalOut = Input { Value = 199, },
				Width = Input { Value = 1920, },
				Height = Input { Value = 1080, },
				UseFrameFormatSettings = Input { Value = 1, },
				["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
				TopLeftRed = Input { Value = 0.94901967048645, },
				TopLeftGreen = Input { Value = 0.811764776706696, },
				TopLeftBlue = Input { Value = 0.854902029037476, },
				EffectMask = Input {
					SourceOp = "Greebler1_1_1_1",
					Source = "Output",
				}
			},
			ViewInfo = OperatorInfo { Pos = { 1045, -148.5 } },
		},
		Greebler1_1 = Fuse.Greebler {
			Inputs = {
				GlobalOut = Input { Value = 199, },
				Width = Input { Value = 3870, },
				Height = Input { Value = 1080, },
				["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
				RandomSeed = Input { Value = 22899, },
				ShowSolidTriangles = Input { Value = 0, },
				OutlineTriangles = Input { Value = 1, },
				ShowOutlineTriangles = Input { Value = 0, },
				SolidSquares = Input { Value = 1, },
				SoSquareScaleRandom = Input { Value = 1, },
				SoSquareScale = Input { Value = 0.79, },
				SoSquareAngle = Input { Value = 45, },
				OutlineSquares = Input { Value = 1, },
				ShowOutlineSquares = Input { Value = 0, },
				SolidCircles = Input { Value = 1, },
				ShowSolidCircles = Input { Value = 0, },
				OutlineCircles = Input { Value = 1, },
				ShowOutlineCircles = Input { Value = 0, },
			},
			ViewInfo = OperatorInfo { Pos = { 770, -49.5 } },
		},
		Colour1 = Background {
			NameSet = true,
			Inputs = {
				GlobalOut = Input { Value = 199, },
				Width = Input { Value = 1920, },
				Height = Input { Value = 1080, },
				UseFrameFormatSettings = Input { Value = 1, },
				["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
				TopLeftRed = Input { Value = 0.129411771893501, },
				TopLeftGreen = Input { Value = 0.607843160629272, },
				TopLeftBlue = Input { Value = 0.764705955982208, },
				EffectMask = Input {
					SourceOp = "Transform1",
					Source = "Output",
				}
			},
			ViewInfo = OperatorInfo { Pos = { 1045, -49.5 } },
		},
		Transform1 = Transform {
			Inputs = {
				Center = Input {
					SourceOp = "Path1",
					Source = "Position",
				},
				Input = Input {
					SourceOp = "Greebler1_1",
					Source = "Output",
				},
			},
			ViewInfo = OperatorInfo { Pos = { 935, -49.5 } },
		},
		Path1 = PolyPath {
			DrawMode = "InsertAndModify",
			CtrlWZoom = false,
			Inputs = {
				Displacement = Input {
					SourceOp = "Path1Displacement",
					Source = "Value",
				},
				PolyLine = Input {
					Value = Polyline {
						Points = {
							{ Linear = true, LockY = true, X = -0.235294117647059, Y = 0, RX = 0.0784313725490196, RY = 0 },
							{ Linear = true, LockY = true, X = 0, Y = 0, LX = -0.0784313725490196, LY = 0 }
						}
					},
				},
			},
		},
		Path1Displacement = BezierSpline {
			SplineColor = { Red = 255, Green = 0, Blue = 255 },
			NameSet = true,
			KeyFrames = {
				[0] = { 0, RH = { 66.3333333333333, 0.333333333333333 }, Flags = { Linear = true, LockedY = true } },
				[199] = { 1, LH = { 132.666666666667, 0.666666666666667 }, Flags = { Linear = true, LockedY = true } }
			}
		},
		Merge2 = Merge {
			Inputs = {
				Background = Input {
					SourceOp = "Colour1",
					Source = "Output",
				},
				Foreground = Input {
					SourceOp = "Colour2",
					Source = "Output",
				},
				ApplyMode = Input { Value = FuID { "Screen" }, },
				PerformDepthMerge = Input { Value = 0, },
			},
			ViewInfo = OperatorInfo { Pos = { 1155, -49.5 } },
		},
		Colour5 = Background {
			NameSet = true,
			Inputs = {
				GlobalOut = Input { Value = 199, },
				Width = Input { Value = 1920, },
				Height = Input { Value = 1080, },
				UseFrameFormatSettings = Input { Value = 1, },
				["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
				TopLeftRed = Input { Value = 0.407843172550201, },
				TopLeftGreen = Input { Value = 0.254901975393295, },
				TopLeftBlue = Input { Value = 0.498039245605469, },
			},
			ViewInfo = OperatorInfo { Pos = { 1045, -16.5 } },
		},
		Merge3 = Merge {
			Inputs = {
				Blend = Input { Value = 4, },
				Background = Input {
					SourceOp = "Merge2",
					Source = "Output",
				},
				Foreground = Input {
					SourceOp = "Colour4",
					Source = "Output",
				},
				PerformDepthMerge = Input { Value = 0, },
			},
			ViewInfo = OperatorInfo { Pos = { 1265, -49.5 } },
		},
		Merge4 = Merge {
			Inputs = {
				Background = Input {
					SourceOp = "Merge3",
					Source = "Output",
				},
				Foreground = Input {
					SourceOp = "Colour3",
					Source = "Output",
				},
				PerformDepthMerge = Input { Value = 0, },
			},
			ViewInfo = OperatorInfo { Pos = { 1375, -49.5 } },
		},
		Merge5 = Merge {
			CtrlWZoom = false,
			Inputs = {
				Background = Input {
					SourceOp = "Colour5",
					Source = "Output",
				},
				Foreground = Input {
					SourceOp = "Merge4",
					Source = "Output",
				},
				PerformDepthMerge = Input { Value = 0, },
			},
			ViewInfo = OperatorInfo { Pos = { 1375, -16.5 } },
		},
		MediaOut1 = MediaOut {
			Inputs = {
				Index = Input { Value = "0", },
				Input = Input {
					SourceOp = "Merge5",
					Source = "Output",
				},
			},
			ViewInfo = OperatorInfo { Pos = { 1540, -16.5 } },
		}
	}
}
2nd example

Code: Select all

{
	Tools = ordered() {
		Greebler1 = Fuse.Greebler {
			Inputs = {
				GlobalOut = Input { Value = 249, },
				Width = Input { Value = 1920, },
				Height = Input { Value = 1080, },
				UseFrameFormatSettings = Input { Value = 1, },
				["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
				RandomSeed = Input { Value = 26024, },
				ShowSolidTriangles = Input { Value = 0, },
				OutlineTriangles = Input { Value = 1, },
				ShowOutlineTriangles = Input { Value = 0, },
				ShowSolidSquares = Input { Value = 0, },
				ShowOutlineSquares = Input { Value = 0, },
				ShowSolidCircles = Input { Value = 0, },
				OutlineCircles = Input { Value = 1, },
				OutCircScaleRandom = Input { Value = 1, },
				OutCircScale = Input { Value = 3.23, },
				OutCircThick = Input { Value = 4.17, },
			},
			ViewInfo = OperatorInfo { Pos = { 1320, 16.5 } },
		},
		Teal = Background {
			NameSet = true,
			Inputs = {
				FitMask = Input { Value = FuID { "Stretch" }, },
				GlobalOut = Input { Value = 249, },
				Width = Input { Value = 1920, },
				Height = Input { Value = 1080, },
				UseFrameFormatSettings = Input { Value = 1, },
				["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
				TopLeftRed = Input { Value = 0.52549022436142, },
				TopLeftGreen = Input { Value = 0.77647066116333, },
				TopLeftBlue = Input { Value = 0.745098054409027, },
				EffectMask = Input {
					SourceOp = "Greebler1",
					Source = "Output",
				}
			},
			ViewInfo = OperatorInfo { Pos = { 1430, 16.5 } },
		},
		ImagePlane3D1 = ImagePlane3D {
			Inputs = {
				["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
				MaterialInput = Input {
					SourceOp = "Teal",
					Source = "Output",
				},
				["MtlStdInputs.MaterialID"] = Input { Value = 1, },
			},
			ViewInfo = OperatorInfo { Pos = { 1540, 16.5 } },
		},
		ImagePlane3D1_1 = ImagePlane3D {
			Inputs = {
				["Transform3DOp.Translate.Z"] = Input { Value = -1.52908795014805, },
				["Transform3DOp.Scale.X"] = Input { Value = 1.812, },
				["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
				MaterialInput = Input {
					SourceOp = "Orange",
					Source = "Output",
				},
				["MtlStdInputs.MaterialID"] = Input { Value = 1, },
			},
			ViewInfo = OperatorInfo { Pos = { 1540, 49.5 } },
		},
		Orange = Background {
			NameSet = true,
			Inputs = {
				GlobalOut = Input { Value = 249, },
				Width = Input { Value = 1920, },
				Height = Input { Value = 1080, },
				UseFrameFormatSettings = Input { Value = 1, },
				["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
				TopLeftRed = Input { Value = 1, },
				TopLeftGreen = Input { Value = 0.584313750267029, },
				TopLeftBlue = Input { Value = 0.372549027204514, },
				EffectMask = Input {
					SourceOp = "Greebler1_1",
					Source = "Output",
				}
			},
			ViewInfo = OperatorInfo { Pos = { 1430, 49.5 } },
		},
		Greebler1_1 = Fuse.Greebler {
			Inputs = {
				GlobalOut = Input { Value = 249, },
				Width = Input { Value = 1920, },
				Height = Input { Value = 1080, },
				UseFrameFormatSettings = Input { Value = 1, },
				["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
				RandomSeed = Input { Value = 26024, },
				Density = Input { Value = 0.244, },
				ShowSolidTriangles = Input { Value = 0, },
				OutlineTriangles = Input { Value = 1, },
				ShowOutlineTriangles = Input { Value = 0, },
				SolidSquares = Input { Value = 1, },
				SoSquareScale = Input { Value = 1.65, },
				ShowOutlineSquares = Input { Value = 0, },
				ShowSolidCircles = Input { Value = 0, },
				OutlineCircles = Input { Value = 1, },
				ShowOutlineCircles = Input { Value = 0, },
				OutCircScaleRandom = Input { Value = 1, },
				OutCircScale = Input { Value = 3.23, },
				OutCircThick = Input { Value = 4.17, },
			},
			ViewInfo = OperatorInfo { Pos = { 1320, 49.5 } },
		},
		ImagePlane3D1_1_1 = ImagePlane3D {
			Inputs = {
				["Transform3DOp.Translate.Z"] = Input { Value = -3.52620340034179, },
				["Transform3DOp.Scale.X"] = Input { Value = 3.268, },
				["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
				MaterialInput = Input {
					SourceOp = "MidGreen",
					Source = "Output",
				},
				["MtlStdInputs.MaterialID"] = Input { Value = 1, },
			},
			ViewInfo = OperatorInfo { Pos = { 1540, 82.5 } },
		},
		Greebler1_1_1 = Fuse.Greebler {
			Inputs = {
				GlobalOut = Input { Value = 249, },
				Width = Input { Value = 1920, },
				Height = Input { Value = 1080, },
				UseFrameFormatSettings = Input { Value = 1, },
				["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
				RandomSeed = Input { Value = 26024, },
				Density = Input { Value = 0.244, },
				ShowSolidTriangles = Input { Value = 0, },
				OutlineTriangles = Input { Value = 1, },
				ShowOutlineTriangles = Input { Value = 0, },
				SolidSquares = Input { Value = 1, },
				ShowSolidSquares = Input { Value = 0, },
				SoSquareScale = Input { Value = 1.65, },
				OutlineSquares = Input { Value = 1, },
				OutSquareScaleRandom = Input { Value = 1, },
				OutSquareScale = Input { Value = 4.17, },
				OutSquareAngle = Input { Value = 45, },
				OutSquareThickRandom = Input { Value = 1, },
				OutSquareThick = Input { Value = 0.16, },
				ShowSolidCircles = Input { Value = 0, },
				OutlineCircles = Input { Value = 1, },
				ShowOutlineCircles = Input { Value = 0, },
				OutCircScaleRandom = Input { Value = 1, },
				OutCircScale = Input { Value = 3.23, },
				OutCircThick = Input { Value = 4.17, },
			},
			ViewInfo = OperatorInfo { Pos = { 1320, 82.5 } },
		},
		MidGreen = Background {
			NameSet = true,
			Inputs = {
				GlobalOut = Input { Value = 249, },
				Width = Input { Value = 1920, },
				Height = Input { Value = 1080, },
				UseFrameFormatSettings = Input { Value = 1, },
				["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
				TopLeftRed = Input { Value = 0.650980412960052, },
				TopLeftGreen = Input { Value = 0.77647066116333, },
				TopLeftBlue = Input { Value = 0.298039227724075, },
				EffectMask = Input {
					SourceOp = "Greebler1_1_1",
					Source = "Output",
				}
			},
			ViewInfo = OperatorInfo { Pos = { 1430, 82.5 } },
		},
		Merge3D1 = Merge3D {
			Inputs = {
				SceneInput1 = Input {
					SourceOp = "ImagePlane3D1",
					Source = "Output",
				},
				SceneInput2 = Input {
					SourceOp = "Camera3D1",
					Source = "Output",
				},
				SceneInput3 = Input {
					SourceOp = "ImagePlane3D1_1",
					Source = "Output",
				},
				SceneInput4 = Input {
					SourceOp = "ImagePlane3D1_1_1",
					Source = "Output",
				},
				SceneInput5 = Input {
					SourceOp = "ImagePlane3D1_1_1_1",
					Source = "Output",
				},
			},
			ViewInfo = OperatorInfo { Pos = { 1760, 49.5 } },
		},
		Camera3D1 = Camera3D {
			Inputs = {
				["Transform3DOp.Translate.Y"] = Input { Value = 0.00608381425912591, },
				["Transform3DOp.Translate.Z"] = Input {
					SourceOp = "Camera3D1ZOffset",
					Source = "Value",
				},
				AoV = Input { Value = 13.5499698045993, },
				FLength = Input { Value = 50, },
				PlaneOfFocus = Input {
					SourceOp = "Camera3D1FocalPlane",
					Source = "Value",
				},
				["Stereo.Mode"] = Input { Value = FuID { "OffAxis" }, },
				FilmGate = Input { Value = FuID { "BMD_URSA_4K_16x9" }, },
				ApertureW = Input { Value = 0.831496062992126, },
				ApertureH = Input { Value = 0.467716535433071, },
				ControlVis = Input { Value = 1, },
				PlaneOfFocusVis = Input { Value = 1, },
				["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 2, },
				["MtlStdInputs.MaterialID"] = Input { Value = 2, },
			},
			ViewInfo = OperatorInfo { Pos = { 1870, -16.5 } },
		},
		Camera3D1ZOffset = BezierSpline {
			SplineColor = { Red = 254, Green = 56, Blue = 46 },
			NameSet = true,
			KeyFrames = {
				[0] = { 2.24796533273242, RH = { 83, 1.03864355515495 }, Flags = { Linear = true } },
				[249] = { -1.38, LH = { 166, -0.170678222422526 }, Flags = { Linear = true } }
			}
		},
		Camera3D1FocalPlane = BezierSpline {
			SplineColor = { Red = 114, Green = 8, Blue = 229 },
			NameSet = true,
			KeyFrames = {
				[0] = { 2.22, RH = { 83, 3.31733333333333 }, Flags = { Linear = true } },
				[249] = { 5.512, LH = { 166, 4.41466666666667 }, Flags = { Linear = true } }
			}
		},
		Renderer3D1 = Renderer3D {
			CustomData = {
				ToolVersion = 2,
			},
			Inputs = {
				GlobalOut = Input { Value = 249, },
				Width = Input { Value = 1920, },
				Height = Input { Value = 1080, },
				UseFrameFormatSettings = Input { Value = 1, },
				["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
				SceneInput = Input {
					SourceOp = "Merge3D1",
					Source = "Output",
				},
				RendererType = Input { Value = FuID { "RendererOpenGL" }, },
				["RendererOpenGL.AntiAliasing.Channels.RGBA.HighQuality.Enable"] = Input { Value = 1, },
				["RendererOpenGL.AntiAliasing.Presets.Color.Supersampling.HighQuality.RateX"] = Input { Value = 3, },
				["RendererOpenGL.AntiAliasing.Presets.Color.Supersampling.HighQuality.RateY"] = Input { Value = 3, },
				["RendererOpenGL.AntiAliasing.Presets.Color.Multisampling.LowQuality.SampleCount"] = Input { Value = 2, },
				["RendererOpenGL.AntiAliasing.Presets.Color.Multisampling.HighQuality.SampleCount"] = Input { Value = 3, },
				["RendererOpenGL.AntiAliasing.Presets.Aux.Supersampling.HighQuality.RateX"] = Input { Value = 3, },
				["RendererOpenGL.AntiAliasing.Presets.Aux.Supersampling.HighQuality.RateY"] = Input { Value = 3, },
				["RendererOpenGL.AntiAliasing.Presets.Aux.Multisampling.LowQuality.SampleCount"] = Input { Value = 2, },
				["RendererOpenGL.AntiAliasing.Presets.Aux.Multisampling.HighQuality.SampleCount"] = Input { Value = 3, },
				["RendererOpenGL.AccumulationEffects"] = Input { Value = 1, },
				["RendererOpenGL.EnableAccumEffects"] = Input { Value = 1, },
				["RendererOpenGL.AccumQuality"] = Input { Value = 16, },
				["RendererOpenGL.DoFBlur"] = Input { Value = 0.02, },
			},
			ViewInfo = OperatorInfo { Pos = { 1925, 49.5 } },
			SubInputsData = {
				RendererOpenGL = {
					Version = 1
				}
			}
		},
		ImagePlane3D1_1_1_1 = ImagePlane3D {
			Inputs = {
				["Transform3DOp.Translate.Z"] = Input { Value = -6.91702880439852, },
				["Transform3DOp.Scale.X"] = Input { Value = 4.331, },
				["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
				MaterialInput = Input {
					SourceOp = "Red",
					Source = "Output",
				},
				["MtlStdInputs.MaterialID"] = Input { Value = 1, },
			},
			ViewInfo = OperatorInfo { Pos = { 1540, 115.5 } },
		},
		Red = Background {
			NameSet = true,
			Inputs = {
				GlobalOut = Input { Value = 249, },
				Width = Input { Value = 1920, },
				Height = Input { Value = 1080, },
				UseFrameFormatSettings = Input { Value = 1, },
				["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
				TopLeftRed = Input { Value = 0.784313797950745, },
				TopLeftBlue = Input { Value = 0.011764707043767, },
				EffectMask = Input {
					SourceOp = "Greebler1_1_1_1",
					Source = "Output",
				}
			},
			ViewInfo = OperatorInfo { Pos = { 1430, 115.5 } },
		},
		Greebler1_1_1_1 = Fuse.Greebler {
			Inputs = {
				GlobalOut = Input { Value = 249, },
				Width = Input { Value = 1920, },
				Height = Input { Value = 1080, },
				UseFrameFormatSettings = Input { Value = 1, },
				["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
				RandomSeed = Input { Value = 26024, },
				Density = Input { Value = 0.244, },
				SolidTriangles = Input { Value = 1, },
				SoTriAngleRandom = Input { Value = 1, },
				OutlineTriangles = Input { Value = 1, },
				OutTriScaleRandom = Input { Value = 1, },
				OutTriScale = Input { Value = 2.6, },
				OutTriAngle = Input { Value = 30, },
				OutTriThick = Input { Value = 10, },
				SolidSquares = Input { Value = 1, },
				ShowSolidSquares = Input { Value = 0, },
				SoSquareScale = Input { Value = 1.65, },
				OutlineSquares = Input { Value = 1, },
				ShowOutlineSquares = Input { Value = 0, },
				OutSquareScaleRandom = Input { Value = 1, },
				OutSquareScale = Input { Value = 4.17, },
				OutSquareAngle = Input { Value = 45, },
				OutSquareThickRandom = Input { Value = 1, },
				OutSquareThick = Input { Value = 0.16, },
				ShowSolidCircles = Input { Value = 0, },
				OutlineCircles = Input { Value = 1, },
				ShowOutlineCircles = Input { Value = 0, },
				OutCircScaleRandom = Input { Value = 1, },
				OutCircScale = Input { Value = 3.23, },
				OutCircThick = Input { Value = 4.17, },
			},
			ViewInfo = OperatorInfo { Pos = { 1320, 115.5 } },
		},
		DarkGreen = Background {
			NameSet = true,
			Inputs = {
				GlobalOut = Input { Value = 249, },
				Width = Input { Value = 1920, },
				Height = Input { Value = 1080, },
				UseFrameFormatSettings = Input { Value = 1, },
				["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
				TopLeftRed = Input { Value = 0.250980406999588, },
				TopLeftGreen = Input { Value = 0.364705890417099, },
				TopLeftBlue = Input { Value = 0.227450996637344, },
			},
			ViewInfo = OperatorInfo { Pos = { 1925, 115.5 } },
		},
		Merge1 = Merge {
			Inputs = {
				Background = Input {
					SourceOp = "DarkGreen",
					Source = "Output",
				},
				Foreground = Input {
					SourceOp = "Renderer3D1",
					Source = "Output",
				},
				PerformDepthMerge = Input { Value = 0, },
			},
			ViewInfo = OperatorInfo { Pos = { 2035, 115.5 } },
		},
		MediaOut1 = MediaOut {
			CtrlWZoom = false,
			Inputs = {
				Index = Input { Value = "0", },
				Input = Input {
					SourceOp = "Merge1",
					Source = "Output",
				},
			},
			ViewInfo = OperatorInfo { Pos = { 2200, 115.5 } },
		}
	}
}
I'm planning to add more shapes, so if anyone has suggestions let me know.

It is based on stuff done by Dunn Lewis in his fuses.
Greebler.fuse
You do not have the required permissions to view the files attached to this post.

User avatar
Midgardsormr
Fusionator
Posts: 1756
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 14
Location: Los Angeles, CA, USA
Been thanked: 89 times
Contact:

Re: [DEV] Greebler Fuse

#2

Post by Midgardsormr » Fri Mar 27, 2020 8:16 am

Cool! I started something similar a while back—a pattern generator Fuse, as a combination of MultiMerge and my OpenCL experiments. But then OpenCL fuses got deprecated and I shelved it.

Instead of pre-defining the shapes, you could let the user specify the number of layers, the number of sides for each layer, and the rendering qualities. Maybe an 'Add Layer' button that creates a new set of controls—see MT_MultiMerge for a technique to do that.

User avatar
SteveWatson
Fusioneer
Posts: 111
Joined: Sat Oct 12, 2019 6:03 am
Answers: 1
Been thanked: 11 times

Re: [DEV] Greebler Fuse

#3

Post by SteveWatson » Fri Mar 27, 2020 8:30 am

Midgardsormr wrote:
Fri Mar 27, 2020 8:16 am

Instead of pre-defining the shapes, you could let the user specify the number of layers, the number of sides for each layer, and the rendering qualities. Maybe an 'Add Layer' button that creates a new set of controls—see MT_MultiMerge for a technique to do that.
Hi,

I think I understand what you mean, but I think what you are suggesting could be done using cloners, feed in a basic shape, use scale and rotation effectors to change the look randomly then merge them, Whereas this fuse is more of a random generator. Just my understanding of what you said, I may have missed your point.

Added in 39 minutes 33 seconds:


first update.

This adds lines, which are just random lines, you can determine how many segments the random lines have.

Also made the default everything off except solid triangles, I don't think you would want to use all of them at once, so this makes it easier to choose which ones.(only put triangles on because I wanted it to show something when tool first added)
Greebler.fuse
You do not have the required permissions to view the files attached to this post.

User avatar
SteveWatson
Fusioneer
Posts: 111
Joined: Sat Oct 12, 2019 6:03 am
Answers: 1
Been thanked: 11 times

Re: [DEV] Greebler Fuse

#4

Post by SteveWatson » Fri Mar 27, 2020 10:31 am

Hi,

another update. I added straight lines and renamed original lines squiggly lines.
Greebler.fuse
You do not have the required permissions to view the files attached to this post.

User avatar
Midgardsormr
Fusionator
Posts: 1756
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 14
Location: Los Angeles, CA, USA
Been thanked: 89 times
Contact:

Re: [DEV] Greebler Fuse

#5

Post by Midgardsormr » Fri Mar 27, 2020 12:11 pm

Mmmm... No, I think you missed what I was saying. Instead of having several sets of controls that each make one specific type of polygon, imagine you had a control template:
Shape
-- Shape type (poly, lines, squiggles)
-- Number of sides
-- Solid
-- Scale
-- Starriness
-- etc

These controls would be there by default.

And a button: Add shapes

Pressing the button would load in another set of controls underneath the existing ones, which the user can use to set up another layer of random shapes. So instead of having to make another set of controls for pentagons, hexagons, heptagons, octogons, etc, plus all their starry variations; you could just let the combination of a flexible UI and the createPoly() function do that work.

I pointed out MultiMerge because it's an example of a fuse that adds controls as-needed. The limitation is that there's not a good way of forcing the control panel to update with the new controls—you have to switch to another tab then back again to make them show up.

Or you could skip the modular controls and just have a 'Number of sides' control for each of the existing polygons instead of Triangles, Squares, and Circles.

edit: Actually, as I think about it, the MultiMerge example isn't necessarily a good one because it depends on counting connected inputs to be able to rebuild its control panel. You'd need a different method of remembering how many layers there were supposed to be upon reloading the comp. CustomData, maybe? Well, put that off for a while. I still think letting the user choose how many sides for the polygons is a more flexible way to go than hard-coding them.

User avatar
SteveWatson
Fusioneer
Posts: 111
Joined: Sat Oct 12, 2019 6:03 am
Answers: 1
Been thanked: 11 times

Re: [DEV] Greebler Fuse

#6

Post by SteveWatson » Fri Mar 27, 2020 12:30 pm

Hi,

I think I now understand, but you are perhaps overestimating my lua coding skills.

I'll have a look at this idea in next couple of days.

Thanks.

User avatar
Midgardsormr
Fusionator
Posts: 1756
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 14
Location: Los Angeles, CA, USA
Been thanked: 89 times
Contact:

Re: [DEV] Greebler Fuse

#7

Post by Midgardsormr » Fri Mar 27, 2020 2:02 pm

Here's a quick code doodle prototype:
Code: [Select all] [Expand/Collapse] [Download] (Greebler.fuse)
  1. --[[--
  2. Greebler.Fuse
  3.  
  4.  
  5. Tool for generating random stuff, uses code from Dunn Lewis
  6.  
  7.  
  8. version 0.4
  9. 26/03/20
  10. Steve Watson
  11.  
  12.  
  13. version history
  14.  
  15. 0.4
  16. Prototyped flexible shape controls
  17.  
  18. 0.3
  19. Added Straight Lines
  20.  
  21. 0.2
  22. Added Lines
  23. Made Default everything Off except solid triangles
  24.  
  25. 0.1
  26. Initial Release
  27.  
  28. --]]--
  29.  
  30.  
  31. FuRegisterClass("Greebler", CT_SourceTool, {
  32.     REGS_Name = "Greebler",
  33.     REGS_Category = "Creator",
  34.     REGS_OpIconString = "Grb",
  35.     REGS_OpDescription = "Random Stuff Generator",
  36.    
  37.     REGS_Company = "SteveWatson",
  38.     REGS_URL = "",
  39.    
  40.     REG_Source_GlobalCtrls = true,
  41.     REG_Source_SizeCtrls = true,
  42.     REG_Source_AspectCtrls = true,
  43.     REG_Source_DepthCtrls = true,
  44.     })
  45.    
  46.  
  47. function Create()
  48.  
  49.     InRandomise = self:AddInput("Randomize", "Randomize", {
  50.         LINKID_DataType     = "Number",
  51.         INPID_InputControl  = "ButtonControl",
  52.         INP_DoNotifyChanged = true,
  53.         ICD_Width           = 0.25,
  54.         })
  55.  
  56.     InSeed = self:AddInput("Random Seed", "RandomSeed", {
  57.         LINKID_DataType     = "Number",
  58.         INPID_InputControl  = "SliderControl",
  59.         INP_MinAllowed,     0.0,
  60.         INP_MaxAllowed      = 32767.0,
  61.         INP_Integer         = true,
  62.         ICD_Width           = 0.75,
  63.     })
  64.    
  65.     InDensity = self:AddInput("Density", "Density", {
  66.         LINKID_DataType     = "Number",
  67.         INPID_InputControl  = "SliderControl",
  68.         INP_MinAllowed,     0.0,
  69.         INP_MaxAllowed      = 1,
  70.         INP_Default = 0.5,
  71.    
  72.     })
  73.     self:BeginControlNest("Shape 1", "SolidTriangles", false, {})
  74.    
  75.         InShowSolidTriangles = self:AddInput("Show Solid Triangles", "ShowSolidTriangles", {
  76.             LINKID_DataType = "Number",
  77.             INPID_InputControl = "CheckboxControl",
  78.             INP_Default = 1,
  79.        
  80.             INP_DoNotifyChanged = true,
  81.         })
  82.        
  83.         InShape1Sides = self:AddInput("Sides", "shape1sides", {
  84.             LINKID_DataType = "Number",
  85.             INPID_InputControl = "SliderControl",
  86.             INP_Default = 3,
  87.             INP_Integer = true,
  88.             INP_MaxScale = 20,
  89.             INP_MinScale = 3,
  90.         })
  91.        
  92.         InShape1Solid = self:AddInput("Solid", "SoTriSolid", {
  93.             LINKID_DataType = "Number",
  94.             INPID_InputControl = "CheckboxControl",
  95.             INP_Default = 0,
  96.        
  97.             INP_DoNotifyChanged = false,
  98.         })
  99.        
  100.         InSoTriScaleRandom = self:AddInput("Random Scale", "SoTriScaleRandom", {
  101.             LINKID_DataType = "Number",
  102.             INPID_InputControl = "CheckboxControl",
  103.             INP_Default = 0,
  104.        
  105.             INP_DoNotifyChanged = true,
  106.         })
  107.         InSoTriScale = self:AddInput("Scale", "SoTriScale", {
  108.             LINKID_DataType = "Number",
  109.             INPID_InputControl = "SliderControl",
  110.             INP_MaxScale = 10.0,
  111.             INP_Default = 1.0,
  112.            
  113.         })
  114.        
  115.         InSoTriAngleRandom = self:AddInput("Random Angle", "SoTriAngleRandom", {
  116.             LINKID_DataType = "Number",
  117.             INPID_InputControl = "CheckboxControl",
  118.             INP_Default = 0,
  119.        
  120.             INP_DoNotifyChanged = true,
  121.         })
  122.        
  123.         InSoTriAngle = self:AddInput("Angle", "SoTriAngle", {
  124.         LINKID_DataType = "Number",
  125.         INPID_InputControl = "ScrewControl",
  126.         INP_Default = 0,
  127.         INP_MaxScale = 360,
  128.        
  129.         })
  130.    
  131.        
  132.  
  133.    
  134.     self:EndControlNest()
  135.    
  136.     self:BeginControlNest("Outline Triangles", "OutlineTriangles", false, {})
  137.    
  138.         InShowOutlineTriangles = self:AddInput("Show Outline Triangles", "ShowOutlineTriangles", {
  139.             LINKID_DataType = "Number",
  140.             INPID_InputControl = "CheckboxControl",
  141.             INP_Default = 0,
  142.    
  143.             INP_DoNotifyChanged = true,
  144.         })
  145.         InOutTriScaleRandom = self:AddInput("Random Scale", "OutTriScaleRandom", {
  146.             LINKID_DataType = "Number",
  147.             INPID_InputControl = "CheckboxControl",
  148.             INP_Default = 0,
  149.        
  150.             INP_DoNotifyChanged = true,
  151.         })
  152.         InOutTriScale = self:AddInput("Scale", "OutTriScale", {
  153.             LINKID_DataType = "Number",
  154.             INPID_InputControl = "SliderControl",
  155.             INP_MaxScale = 10.0,
  156.             INP_Default = 1.0,
  157.            
  158.         })
  159.        
  160.         InOutTriAngleRandom = self:AddInput("Random Angle", "OutTriAngleRandom", {
  161.             LINKID_DataType = "Number",
  162.             INPID_InputControl = "CheckboxControl",
  163.             INP_Default = 0,
  164.        
  165.             INP_DoNotifyChanged = true,
  166.         })
  167.        
  168.         InOutTriAngle = self:AddInput("Angle", "OutTriAngle", {
  169.             LINKID_DataType = "Number",
  170.             INPID_InputControl = "ScrewControl",
  171.             INP_Default = 0,
  172.             INP_MaxScale = 360,
  173.        
  174.         })
  175.         InOutTriThickRandom = self:AddInput("Random Thickness", "OutTriThickRandom", {
  176.             LINKID_DataType = "Number",
  177.             INPID_InputControl = "CheckboxControl",
  178.             INP_Default = 0,
  179.        
  180.             INP_DoNotifyChanged = true,
  181.         })
  182.         InOutTriThick = self:AddInput("Thickness", "OutTriThick", {
  183.             LINKID_DataType = "Number",
  184.             INPID_InputControl = "SliderControl",
  185.             INP_MaxScale = 10.0,
  186.             INP_Default = 1.0,
  187.            
  188.         })
  189.  
  190.    
  191.     self:EndControlNest()
  192.    
  193.     self:BeginControlNest("Solid Squares", "SolidSquares", false, {})
  194.    
  195.         InShowSolidSquares = self:AddInput("Show Solid Squares", "ShowSolidSquares", {
  196.             LINKID_DataType = "Number",
  197.             INPID_InputControl = "CheckboxControl",
  198.             INP_Default = 0,
  199.        
  200.             INP_DoNotifyChanged = true,
  201.         })
  202.         InSoSquareScaleRandom = self:AddInput("Random Scale", "SoSquareScaleRandom", {
  203.             LINKID_DataType = "Number",
  204.             INPID_InputControl = "CheckboxControl",
  205.             INP_Default = 0,
  206.        
  207.             INP_DoNotifyChanged = true,
  208.         })
  209.         InSoSquareScale = self:AddInput("Scale", "SoSquareScale", {
  210.             LINKID_DataType = "Number",
  211.             INPID_InputControl = "SliderControl",
  212.             INP_MaxScale = 10.0,
  213.             INP_Default = 1.0,
  214.            
  215.         })
  216.        
  217.         InSoSquareAngleRandom = self:AddInput("Random Angle", "SoSquareAngleRandom", {
  218.             LINKID_DataType = "Number",
  219.             INPID_InputControl = "CheckboxControl",
  220.             INP_Default = 0,
  221.        
  222.             INP_DoNotifyChanged = true,
  223.         })
  224.        
  225.         InSoSquareAngle = self:AddInput("Angle", "SoSquareAngle", {
  226.             LINKID_DataType = "Number",
  227.             INPID_InputControl = "ScrewControl",
  228.             INP_Default = 0,
  229.             INP_MaxScale = 360,
  230.        
  231.         })
  232.  
  233.  
  234.    
  235.     self:EndControlNest()
  236.    
  237.     self:BeginControlNest("Outline Squares", "OutlineSquares", false, {})
  238.    
  239.         InShowOutlineSquares = self:AddInput("Show Outline Squares", "ShowOutlineSquares", {
  240.             LINKID_DataType = "Number",
  241.             INPID_InputControl = "CheckboxControl",
  242.             INP_Default = 0,
  243.        
  244.             INP_DoNotifyChanged = true,
  245.         })
  246.         InOutSquareScaleRandom = self:AddInput("Random Scale", "OutSquareScaleRandom", {
  247.             LINKID_DataType = "Number",
  248.             INPID_InputControl = "CheckboxControl",
  249.             INP_Default = 0,
  250.        
  251.             INP_DoNotifyChanged = true,
  252.         })
  253.         InOutSquareScale = self:AddInput("Scale", "OutSquareScale", {
  254.             LINKID_DataType = "Number",
  255.             INPID_InputControl = "SliderControl",
  256.             INP_MaxScale = 10.0,
  257.             INP_Default = 1.0,
  258.            
  259.         })
  260.        
  261.         InOutSquareAngleRandom = self:AddInput("Random Angle", "OutSquareAngleRandom", {
  262.             LINKID_DataType = "Number",
  263.             INPID_InputControl = "CheckboxControl",
  264.             INP_Default = 0,
  265.        
  266.             INP_DoNotifyChanged = true,
  267.         })
  268.        
  269.         InOutSquareAngle = self:AddInput("Angle", "OutSquareAngle", {
  270.             LINKID_DataType = "Number",
  271.             INPID_InputControl = "ScrewControl",
  272.             INP_Default = 0,
  273.             INP_MaxScale = 360,
  274.        
  275.         })
  276.         InOutSquareThickRandom = self:AddInput("Random Thickness", "OutSquareThickRandom", {
  277.             LINKID_DataType = "Number",
  278.             INPID_InputControl = "CheckboxControl",
  279.             INP_Default = 0,
  280.        
  281.             INP_DoNotifyChanged = true,
  282.         })
  283.         InOutSquareThick = self:AddInput("Thickness", "OutSquareThick", {
  284.             LINKID_DataType = "Number",
  285.             INPID_InputControl = "SliderControl",
  286.             INP_MaxScale = 10.0,
  287.             INP_Default = 1.0,
  288.            
  289.         })
  290.  
  291.    
  292.     self:EndControlNest()
  293.    
  294.     self:BeginControlNest("Solid Circles", "SolidCircles", false, {})
  295.    
  296.         InShowSolidCircles = self:AddInput("Show Solid Circles", "ShowSolidCircles", {
  297.             LINKID_DataType = "Number",
  298.             INPID_InputControl = "CheckboxControl",
  299.             INP_Default = 0,
  300.        
  301.             INP_DoNotifyChanged = true,
  302.         })
  303.         InSoCircScaleRandom = self:AddInput("Random Scale", "SoCircScaleRandom", {
  304.             LINKID_DataType = "Number",
  305.             INPID_InputControl = "CheckboxControl",
  306.             INP_Default = 0,
  307.        
  308.             INP_DoNotifyChanged = true,
  309.         })
  310.         InSoCircScale = self:AddInput("Scale", "SoCircScale", {
  311.             LINKID_DataType = "Number",
  312.             INPID_InputControl = "SliderControl",
  313.             INP_MaxScale = 10.0,
  314.             INP_Default = 1.0,
  315.            
  316.         })
  317.        
  318.  
  319.    
  320.     self:EndControlNest()
  321.    
  322.     self:BeginControlNest("Outline Circles", "OutlineCircles", false, {})
  323.    
  324.         InShowOutlineCircles = self:AddInput("Show Outline Circles", "ShowOutlineCircles", {
  325.             LINKID_DataType = "Number",
  326.             INPID_InputControl = "CheckboxControl",
  327.             INP_Default = 0,
  328.        
  329.             INP_DoNotifyChanged = true,
  330.         })
  331.         InOutCircScaleRandom = self:AddInput("Random Scale", "OutCircScaleRandom", {
  332.             LINKID_DataType = "Number",
  333.             INPID_InputControl = "CheckboxControl",
  334.             INP_Default = 0,
  335.        
  336.             INP_DoNotifyChanged = true,
  337.         })
  338.         InOutCircScale = self:AddInput("Scale", "OutCircScale", {
  339.             LINKID_DataType = "Number",
  340.             INPID_InputControl = "SliderControl",
  341.             INP_MaxScale = 10.0,
  342.             INP_Default = 1.0,
  343.            
  344.         })
  345.         InOutCircThickRandom = self:AddInput("Random Thickness", "OutCircThickRandom", {
  346.             LINKID_DataType = "Number",
  347.             INPID_InputControl = "CheckboxControl",
  348.             INP_Default = 0,
  349.        
  350.             INP_DoNotifyChanged = true,
  351.         })
  352.         InOutCircThick = self:AddInput("Thickness", "OutCircThick", {
  353.             LINKID_DataType = "Number",
  354.             INPID_InputControl = "SliderControl",
  355.             INP_MaxScale = 10.0,
  356.             INP_Default = 1.0,
  357.            
  358.         })
  359.    
  360.     self:EndControlNest()
  361.    
  362.     self:BeginControlNest("Straight Lines", "StraightLines", false, {})
  363.         InShowStraightLines = self:AddInput("Show Straight Lines", "ShowStraightLines", {
  364.             LINKID_DataType = "Number",
  365.             INPID_InputControl = "CheckboxControl",
  366.             INP_Default = 0,
  367.        
  368.             INP_DoNotifyChanged = true,
  369.         })
  370.        
  371.        
  372.         InShowVertLines = self:AddInput("Vertical Lines", "VerticalLines", {
  373.             LINKID_DataType = "Number",
  374.             INPID_InputControl = "CheckboxControl",
  375.             INP_Default = 1,
  376.        
  377.             INP_DoNotifyChanged = true,
  378.         })
  379.        
  380.        
  381.         InShowHoriLines = self:AddInput("Horizontal Lines", "HorizontalLines", {
  382.             LINKID_DataType = "Number",
  383.             INPID_InputControl = "CheckboxControl",
  384.             INP_Default = 1,
  385.        
  386.             INP_DoNotifyChanged = true,
  387.         })
  388.        
  389.        
  390.        
  391.        
  392.         InRandLinesLength = self:AddInput("Random Length", "RandomLength", {
  393.             LINKID_DataType = "Number",
  394.             INPID_InputControl = "CheckboxControl",
  395.             INP_Default = 0,
  396.        
  397.             INP_DoNotifyChanged = true,
  398.         })
  399.        
  400.    
  401.        
  402.         InStraightLineLength = self:AddInput("Length", "StraightLineLength", {
  403.             LINKID_DataType = "Number",
  404.             INPID_InputControl = "SliderControl",
  405.             INP_MaxScale = 10.0,
  406.             INP_Default = 1.0,
  407.            
  408.         })
  409.        
  410.    
  411.        
  412.         InStraightLineThickRandom = self:AddInput("Random Thickness", "StraightLineThickRandom", {
  413.             LINKID_DataType = "Number",
  414.             INPID_InputControl = "CheckboxControl",
  415.             INP_Default = 0,
  416.        
  417.             INP_DoNotifyChanged = true,
  418.         })
  419.        
  420.    
  421.        
  422.        
  423.         InStraightLineThick = self:AddInput("Thickness", "StraightLineThick", {
  424.             LINKID_DataType = "Number",
  425.             INPID_InputControl = "SliderControl",
  426.             INP_MaxScale = 10.0,
  427.             INP_Default = 1.0,
  428.            
  429.         })
  430.        
  431.        
  432.    
  433.     self:EndControlNest()
  434.    
  435.     self:BeginControlNest("Squiggly Lines", "SquigglyLines", false, {})
  436.    
  437.         InShowLines = self:AddInput("Show Squiggly Lines", "ShowSquigglyLines", {
  438.             LINKID_DataType = "Number",
  439.             INPID_InputControl = "CheckboxControl",
  440.             INP_Default = 0,
  441.        
  442.             INP_DoNotifyChanged = true,
  443.         })
  444.        
  445.  
  446.        
  447.         InLinePoints = self:AddInput("Number of Segments", "LinePoints", {
  448.             LINKID_DataType = "Number",
  449.             INPID_InputControl = "SliderControl",
  450.             INP_MaxScale = 10.0,
  451.             INP_MinScale = 1,
  452.             INP_Default = 3,
  453.             INP_Integer = true,
  454.         })
  455.        
  456.        
  457.        
  458.         InLineThickRandom = self:AddInput("Random Thickness", "LineThickRandom", {
  459.             LINKID_DataType = "Number",
  460.             INPID_InputControl = "CheckboxControl",
  461.             INP_Default = 0,
  462.        
  463.             INP_DoNotifyChanged = true,
  464.         })
  465.         InLineThick = self:AddInput("Thickness", "LineThick", {
  466.             LINKID_DataType = "Number",
  467.             INPID_InputControl = "SliderControl",
  468.             INP_MaxScale = 10.0,
  469.             INP_Default = 1.0,
  470.            
  471.         })
  472.    
  473.    
  474.     self:EndControlNest()
  475.        
  476.        
  477.    
  478.     -- outputs
  479.     OutImage = self:AddOutput("Output", "Output", {
  480.         LINKID_DataType = "Image",
  481.         LINK_Main = 1,
  482.         })
  483.  
  484. end
  485.  
  486. function NotifyChanged(inp, param, time)
  487.     if inp ~= nil and param ~= nil then
  488.         if inp == InPolyFill and param then
  489.             InLineType:SetAttrs({IC_Visible = (param.Value == 0)})
  490.             InFilter:SetAttrs({IC_Visible = (param.Value == 0)})
  491.             InSoftness:SetAttrs({IC_Visible = (param.Value == 0)})
  492.             InThickness:SetAttrs({IC_Visible = (param.Value == 0)})
  493.             InWriteOnStart:SetAttrs({IC_Visible = (param.Value == 0)})
  494.             InWriteOnEnd:SetAttrs({IC_Visible = (param.Value == 0)})
  495.             InOffset:SetAttrs({IC_Visible = (param.Value == 0)})
  496.             InSubdivs:SetAttrs({IC_Visible = (param.Value == 0)})
  497.         elseif inp == InRandomise then
  498.             InSeed:SetSource(Number(math.random(0,32767)), time)
  499.         elseif inp == InSoTriAngleRandom and param then
  500.             InSoTriAngle:SetAttrs({IC_Visible = (param.Value == 0)})
  501.         elseif inp == InOutTriAngleRandom and param then
  502.             InOutTriAngle:SetAttrs({IC_Visible = (param.Value == 0)})
  503.         elseif inp == InSoSquareAngleRandom and param then
  504.             InSoSquareAngle:SetAttrs({IC_Visible = (param.Value == 0)})
  505.         elseif inp == InOutSquareAngleRandom and param then
  506.             InOutSquareAngle:SetAttrs({IC_Visible = (param.Value == 0)})
  507.            
  508.         end
  509.     end
  510. end
  511.  
  512.  
  513. -- function convertY ----------------------------------------
  514.  
  515. function convertY(y, ref_img)
  516.     return y * (ref_img.Height * ref_img.YScale) / (ref_img.Width * ref_img.XScale)
  517. end
  518.  
  519.  
  520. -- function createPoly Shapes-------------------------------
  521.  
  522. function createPoly(sides, r, angle,dup, img)
  523.    
  524.     local mat = Matrix4()
  525.     mat:Identity()
  526.     mat:Move(0, convertY(0,img), 0)
  527.    
  528.     local sin = math.sin
  529.     local cos = math.cos
  530.  
  531.     local sh = Shape()
  532.     local x = cos(angle) * r
  533.     local y = sin(angle) * r
  534.    
  535.     sh:MoveTo(x,y)
  536.     for i = 1, sides - 1 do
  537.         x = cos(i/sides * math.pi * 2 + angle) * r
  538.         y = sin(i/sides * math.pi * 2 + angle) * r
  539.         sh:LineTo(x,y)
  540.     end
  541.     sh:Close()
  542.  
  543.     return sh
  544. end
  545.  
  546.  
  547.  
  548.  
  549. -- Alternate method of the above. Calculates only once instead of on-demand.
  550. function calcAspect(ref_img)
  551.     return (ref_img.Height * ref_img.YScale) / (ref_img.Width * ref_img.XScale)
  552. end
  553.  
  554. function Process(req)
  555. -- Standard set up for Creator tools
  556.     local realwidth = Width;
  557.     local realheight = Height;
  558.    
  559.     -- We'll handle proxy ourselves
  560.     Width = Width / Scale
  561.     Height = Height / Scale
  562.     Scale = 1
  563.    
  564.     -- Attributes for new images
  565.     local imgattrs = {
  566.         IMG_Document = self.Comp,
  567.         { IMG_Channel = "Red", },
  568.         { IMG_Channel = "Green", },
  569.         { IMG_Channel = "Blue", },
  570.         { IMG_Channel = "Alpha", },
  571.         IMG_Width = Width,
  572.         IMG_Height = Height,
  573.         IMG_XScale = XAspect,
  574.         IMG_YScale = YAspect,
  575.         IMAT_OriginalWidth = realwidth,
  576.         IMAT_OriginalHeight = realheight,
  577.         IMG_Quality = not req:IsQuick(),
  578.         IMG_MotionBlurQuality = not req:IsNoMotionBlur(),
  579.         }
  580.        
  581.     if not req:IsStampOnly() then
  582.         imgattrs.IMG_ProxyScale = 1
  583.     end
  584.    
  585.     if SourceDepth ~= 0 then
  586.         imgattrs.IMG_Depth = SourceDepth
  587.     end
  588.  
  589.     -- Set up image
  590.     local img = Image(imgattrs)
  591.     local out = img:CopyOf()
  592.     local p = Pixel({R=0,G=0,B=0,A=0})
  593.     img:Fill(p) -- Clear the image so the next frame doesn't contain the previous one.
  594.     out:Fill(p)
  595.  
  596.     local aspect = calcAspect(img)
  597.  
  598. -- Import variables from control panel
  599.  
  600.     local seed = InSeed:GetValue(req).Value
  601.     math.randomseed(seed)
  602.    
  603.     local showSolidTriangles = InShowSolidTriangles:GetValue(req).Value
  604.     local soTriAngle = InSoTriAngle:GetValue(req).Value * (math.pi*2) / 360.0
  605.     local soTriAngleRandom = InSoTriAngleRandom:GetValue(req).Value
  606.     local soTriScaleRandom = InSoTriScaleRandom:GetValue(req).Value
  607.     local soTriScale = InSoTriScale:GetValue(req).Value
  608.     local shape1solid = InShape1Solid:GetValue(req).Value
  609.     local shape1Sides = InShape1Sides:GetValue(req).Value
  610.    
  611.    
  612.    
  613.     local showOutlineTriangles = InShowOutlineTriangles:GetValue(req).Value
  614.     local outTriAngle = InOutTriAngle:GetValue(req).Value * (math.pi*2) / 360.0
  615.     local outTriAngleRandom = InOutTriAngleRandom:GetValue(req).Value
  616.     local outTriScaleRandom = InOutTriScaleRandom:GetValue(req).Value
  617.     local outTriScale = InOutTriScale:GetValue(req).Value
  618.     local outTriThickRandom = InOutTriThickRandom:GetValue(req).Value
  619.     local outTriThick = InOutTriThick:GetValue(req).Value
  620.    
  621.     local showSolidSquares= InShowSolidSquares:GetValue(req).Value
  622.     local soSquareAngle = InSoSquareAngle:GetValue(req).Value * (math.pi*2) / 360.0
  623.     local soSquareAngleRandom = InSoSquareAngleRandom:GetValue(req).Value
  624.     local soSquareScaleRandom = InSoSquareScaleRandom:GetValue(req).Value
  625.     local soSquareScale = InSoSquareScale:GetValue(req).Value
  626.    
  627.     local showOutlineSquares = InShowOutlineSquares:GetValue(req).Value
  628.     local outSquareAngle = InOutSquareAngle:GetValue(req).Value * (math.pi*2) / 360.0
  629.     local outSquareAngleRandom = InOutSquareAngleRandom:GetValue(req).Value
  630.     local outSquareScaleRandom = InOutSquareScaleRandom:GetValue(req).Value
  631.     local outSquareScale = InOutSquareScale:GetValue(req).Value
  632.     local outSquareThickRandom = InOutSquareThickRandom:GetValue(req).Value
  633.     local outSquareThick = InOutSquareThick:GetValue(req).Value
  634.    
  635.     local showSolidCircles = InShowSolidCircles:GetValue(req).Value
  636.     local soCircScaleRandom = InSoCircScaleRandom:GetValue(req).Value
  637.     local soCircScale = InSoCircScale:GetValue(req).Value
  638.    
  639.     local showOutlineCircles = InShowOutlineCircles:GetValue(req).Value
  640.     local outCircScaleRandom = InOutCircScaleRandom:GetValue(req).Value
  641.     local outCircScale = InOutCircScale:GetValue(req).Value
  642.     local outCircThickRandom = InOutCircThickRandom:GetValue(req).Value
  643.     local outCircThick = InOutCircThick:GetValue(req).Value
  644.    
  645.     local showStraightLines =   InShowStraightLines:GetValue(req).Value
  646.     local showVertLines =   InShowVertLines:GetValue(req).Value
  647.     local showHoriLines =   InShowHoriLines:GetValue(req).Value
  648.     local randomLineLength =    InRandLinesLength:GetValue(req).Value
  649.     local straightLineLength =  InStraightLineLength:GetValue(req).Value
  650.     local straightLineRandomThick = InStraightLineThickRandom:GetValue(req).Value
  651.     local straightLineThick = InStraightLineThick:GetValue(req).Value
  652.    
  653.    
  654.    
  655.    
  656.     local showLines = InShowLines:GetValue(req).Value
  657.     local maxPoints = InLinePoints:GetValue(req).Value
  658.     local lineThickRandom = InLineThickRandom:GetValue(req).Value
  659.     local lineThick = InLineThick:GetValue(req).Value
  660.    
  661.     local totalShapeVariations = showSolidTriangles + showOutlineTriangles + showSolidSquares + showOutlineSquares + showSolidCircles + showOutlineCircles
  662.    
  663.     local shapeVariationBanks = 1/16
  664.    
  665.  
  666.        
  667.    
  668.    
  669.    
  670.    
  671.     local imageHeight = img.Height
  672.     local imageWidth = img.Width
  673.     local centreX = (imageWidth/2)/imageWidth
  674.     local centreY = ((imageHeight/2)/imageHeight)*aspect
  675.    
  676.     local density = InDensity:GetValue(req).Value/32
  677.    
  678.     local xGridSize = imageWidth * density
  679.     local yGridSize = imageHeight * density
  680.    
  681.     local xGridGap = imageWidth / xGridSize
  682.     local yGridGap = imageHeight / yGridSize
  683.     local baseSize = xGridGap/ (2 * imageWidth)
  684.    
  685.    
  686.     local fullShape = Shape()
  687.    
  688.     local outputShape = Shape()
  689.    
  690.     local xPos = 0
  691.     local yPos = 0
  692.     local counter = 0
  693.     local twoPi = (math.pi*2)
  694.     for i=0,xGridSize do
  695.         xPos = (xPos + (i * xGridGap))/imageWidth
  696.         for j=0,yGridSize do
  697.             yPos = ((yPos + (j * yGridGap))/imageHeight)
  698.             local showChange = math.random()
  699.            
  700.             if showChange < 0.5 then
  701.            
  702.                 local matG=Matrix4()
  703.                 matG:Identity()
  704.                 matG:Move(xPos, yPos * aspect, 0)
  705.                 local rec_BOX2= Shape()
  706.    
  707.                 -- side radius angle duplicate radius
  708.                
  709.                 local angle = (showChange * 360) * twoPi / 360.0
  710.                
  711.                 -- Solid Triangles
  712.            
  713.                 if showChange < shapeVariationBanks then
  714.                
  715.                     if showSolidTriangles == 1 then
  716.                         local useAngle = soTriAngle
  717.                         if soTriAngleRandom == 1 then
  718.                             useAngle = angle
  719.                         end
  720.                        
  721.                         local useScale = baseSize * soTriScale
  722.                        
  723.                         if soTriScaleRandom == 1 then
  724.                        
  725.                             useScale = (soTriScale * math.random())/16
  726.                            
  727.                         end
  728.                        
  729.                         rec_BOX2=createPoly(shape1Sides,useScale,useAngle,0,img)
  730.                         rec_BOX2=rec_BOX2:TransformOfShape(matG)
  731.                        
  732.                         if shape1solid == 0 then
  733.                             local useThick = 0.001 * outTriThick
  734.                        
  735.                             if outTriThickRandom == 1 then
  736.                                
  737.                                 useThick = (outTriThick * math.random())/4
  738.                                
  739.                             end
  740.                             local newShape = rec_BOX2:OutlineOfShape(useThick, "OLT_Solid", "OJT_Round", (req:IsQuick() and 8 or 16))
  741.                             outputShape:AddShape(newShape)
  742.                         else
  743.                             outputShape:AddShape(rec_BOX2)
  744.                         end
  745.                     end
  746.                    
  747.                 end
  748.                 -- Outline Triangles
  749.                 if showChange >= shapeVariationBanks and showChange < shapeVariationBanks * 2  then
  750.                
  751.                     if showOutlineTriangles == 1 then
  752.                         local useAngle = outTriAngle
  753.                         if outTriAngleRandom == 1 then
  754.                             useAngle = angle
  755.                         end
  756.                        
  757.                         local useScale = baseSize * soTriScale
  758.                        
  759.                         if outTriScaleRandom == 1 then
  760.                        
  761.                             useScale = (outTriScale * math.random())/16
  762.                            
  763.                         end
  764.                        
  765.                         local useThick = 0.001 * outTriThick
  766.                        
  767.                         if outTriThickRandom == 1 then
  768.                            
  769.                             useThick = (outTriThick * math.random())/4
  770.                            
  771.                         end
  772.                        
  773.                        
  774.                        
  775.                        
  776.                         rec_BOX2=createPoly(3,useScale,useAngle,0,img)
  777.                         rec_BOX2=rec_BOX2:TransformOfShape(matG)
  778.                         local newShape = rec_BOX2:OutlineOfShape(useThick, "OLT_Solid", "OJT_Round", (req:IsQuick() and 8 or 16))
  779.                         outputShape:AddShape(newShape)
  780.                     end
  781.                    
  782.                 end
  783.                 -- Solid Squares
  784.                 if showChange >= shapeVariationBanks * 2 and showChange < shapeVariationBanks * 3  then
  785.                
  786.                     if showSolidSquares == 1 then
  787.                         local useAngle = soSquareAngle
  788.                         if soSquareAngleRandom == 1 then
  789.                             useAngle = angle
  790.                         end
  791.                        
  792.                         local useScale = baseSize * soSquareScale
  793.                        
  794.                         if soSquareScaleRandom == 1 then
  795.                        
  796.                             useScale = (soSquareScale * math.random())/8
  797.                            
  798.                         end
  799.                        
  800.                         rec_BOX2=createPoly(4,useScale,useAngle,0,img)
  801.                         rec_BOX2=rec_BOX2:TransformOfShape(matG)
  802.                         outputShape:AddShape(rec_BOX2)
  803.                     end
  804.                    
  805.                 end
  806.                 -- Outline Squares
  807.                 if showChange >= shapeVariationBanks * 3 and showChange < shapeVariationBanks * 4  then
  808.                
  809.                     if showOutlineSquares == 1 then
  810.                         local useAngle = outSquareAngle
  811.                         if outSquareAngleRandom == 1 then
  812.                             useAngle = angle
  813.                         end
  814.                        
  815.                         local useScale = baseSize * outSquareScale
  816.                        
  817.                         if outSquareScaleRandom == 1 then
  818.                        
  819.                             useScale = (outSquareScale * math.random())/8
  820.                            
  821.                         end
  822.                        
  823.                         local useThick = 0.001 * outSquareThick
  824.                        
  825.                         if outSquareThickRandom == 1 then
  826.                            
  827.                             useThick = (outSquareThick * math.random())/16
  828.                            
  829.                         end
  830.                        
  831.                         rec_BOX2=createPoly(4,useScale,useAngle,0,img)
  832.                         rec_BOX2=rec_BOX2:TransformOfShape(matG)
  833.                         local newShape = rec_BOX2:OutlineOfShape(useThick, "OLT_Solid", "OJT_Round", (req:IsQuick() and 8 or 16))
  834.                         outputShape:AddShape(newShape)
  835.                     end
  836.                    
  837.                 end
  838.                 -- Solid Circles
  839.                     if showChange >= shapeVariationBanks * 4 and showChange < shapeVariationBanks * 5  then
  840.                
  841.                     if showSolidCircles == 1 then
  842.                        
  843.                        
  844.                         local useScale = baseSize * soCircScale
  845.                        
  846.                         if soCircScaleRandom == 1 then
  847.                        
  848.                             useScale = useScale * math.random()
  849.                            
  850.                         end
  851.                        
  852.                         rec_BOX2=createPoly(30,useScale,0,0,img)
  853.                         rec_BOX2=rec_BOX2:TransformOfShape(matG)
  854.                         outputShape:AddShape(rec_BOX2)
  855.                     end
  856.                    
  857.                 end
  858.                 -- Outline Circles
  859.                 if showChange >= shapeVariationBanks * 5 and showChange < shapeVariationBanks * 6  then
  860.                
  861.                     if showOutlineCircles == 1 then
  862.                    
  863.                         local useScale = baseSize * outCircScale
  864.                        
  865.                         if outCircScaleRandom == 1 then
  866.                        
  867.                             useScale = useScale * math.random()
  868.                            
  869.                         end
  870.                        
  871.                         local useThick = 0.001 * outCircThick
  872.                        
  873.                         if outCircThickRandom == 1 then
  874.                            
  875.                             useThick = (outCircThick * math.random())/16
  876.                            
  877.                         end
  878.                        
  879.                        
  880.                         rec_BOX2=createPoly(30,useScale,angle,0,img)
  881.                         rec_BOX2=rec_BOX2:TransformOfShape(matG)
  882.                         local newShape = rec_BOX2:OutlineOfShape(useThick, "OLT_Solid", "OJT_Round", (req:IsQuick() and 8 or 16))
  883.                         outputShape:AddShape(newShape)
  884.                        
  885.                     end
  886.                    
  887.                 end
  888.                 -- Squiggly Lines
  889.                 if showChange >= shapeVariationBanks * 6 and showChange < shapeVariationBanks * 7  then
  890.                
  891.                     if showLines == 1 then
  892.                    
  893.                        
  894.                        
  895.                         local maxSize = 2
  896.                        
  897.                         rec_BOX2:MoveTo(xPos,yPos)
  898.                        
  899.                        
  900.                         local startx = xPos
  901.                         local starty = yPos
  902.                    
  903.                         for i = 0,maxPoints - 1 do
  904.                        
  905.                             local whichDirection = math.random()
  906.                            
  907.                            
  908.                             if whichDirection <= 0.25 then
  909.                                 startx = startx + (xGridGap/imageWidth * math.random() * maxSize)
  910.                                 starty = starty + (yGridGap/imageHeight * math.random() * maxSize)
  911.                                
  912.                            
  913.                             elseif whichDirection <= 0.5 then
  914.                                 startx = startx - (xGridGap/imageWidth * math.random() * maxSize)
  915.                                 starty = starty - (yGridGap/imageHeight * math.random() * maxSize)
  916.                                
  917.                             elseif whichDirection <= 0.75 then
  918.                                 startx = startx + (xGridGap/imageWidth * math.random() * maxSize)
  919.                                 starty = starty - (yGridGap/imageHeight * math.random() * maxSize)
  920.                             else
  921.                                 startx = startx - (xGridGap/imageWidth * math.random() * maxSize)
  922.                                 starty = starty + (yGridGap/imageHeight * math.random() * maxSize)
  923.                            
  924.                            
  925.                             end
  926.                             rec_BOX2:LineTo(startx,starty)
  927.                            
  928.                            
  929.                        
  930.                         end
  931.                        
  932.                         local useThick = 0.001 * lineThick
  933.                        
  934.                         if lineThickRandom == 1 then
  935.                            
  936.                             useThick = (lineThick * math.random())/64
  937.                            
  938.                         end
  939.                        
  940.                        
  941.                        
  942.                         local newShape = rec_BOX2:OutlineOfShape(useThick, "OLT_Solid", "OJT_Round", (req:IsQuick() and 8 or 16))
  943.                         outputShape:AddShape(newShape)
  944.                        
  945.                     end
  946.                    
  947.                 end
  948.                
  949.                
  950.                
  951.            
  952.            
  953.                 --local randomLineLength =  InRandLinesLength:GetValue(req).Value
  954.                
  955.                
  956.                
  957.                
  958.                 -- Straight Lines
  959.                 if showChange >= shapeVariationBanks * 7 and showChange < shapeVariationBanks * 8  then
  960.                
  961.                     if showStraightLines == 1 then
  962.                    
  963.                        
  964.                        
  965.                         local maxSize = 2
  966.                        
  967.                         rec_BOX2:MoveTo(xPos,yPos)
  968.                        
  969.                        
  970.                         local startx = xPos
  971.                         local starty = yPos
  972.                    
  973.                        
  974.                        
  975.                         local whichDirection = math.random()
  976.                         local additionalLength = 1
  977.                         if randomLineLength == 1 then
  978.                             additionalLength = math.random()
  979.                         end
  980.                        
  981.                        
  982.                         if whichDirection <= 0.25  and showHoriLines == 1 then
  983.                             startx = startx + (xGridGap/imageWidth * additionalLength * straightLineLength)
  984.                            
  985.                            
  986.                        
  987.                         elseif whichDirection <= 0.5 and showHoriLines == 1 then
  988.                             startx = startx - (xGridGap/imageWidth * additionalLength * straightLineLength)
  989.                            
  990.                            
  991.                         elseif whichDirection <= 0.75 and showVertLines == 1 then
  992.                            
  993.                             starty = starty - (yGridGap/imageHeight * additionalLength * aspect * straightLineLength)
  994.                         elseif showVertLines == 1 then
  995.                            
  996.                             starty = starty + (yGridGap/imageHeight * additionalLength * aspect *  straightLineLength)
  997.                        
  998.                        
  999.                         end
  1000.                         rec_BOX2:LineTo(startx,starty)
  1001.                            
  1002.                            
  1003.                        
  1004.                        
  1005.                        
  1006.                         local useThick = 0.001 * straightLineThick
  1007.                        
  1008.                         if straightLineRandomThick == 1 then
  1009.                            
  1010.                             useThick = (straightLineThick * math.random())/64
  1011.                            
  1012.                         end
  1013.                        
  1014.                        
  1015.                        
  1016.                         local newShape = rec_BOX2:OutlineOfShape(useThick, "OLT_Solid", "OJT_Round", (req:IsQuick() and 8 or 16))
  1017.                         outputShape:AddShape(newShape)
  1018.                        
  1019.                     end
  1020.                    
  1021.                 end
  1022.                
  1023.                
  1024.                
  1025.                
  1026.                
  1027.                
  1028.  
  1029.            
  1030.                
  1031.             end
  1032.            
  1033.        
  1034.        
  1035.        
  1036.         end
  1037.    
  1038.    
  1039.    
  1040.     end
  1041.    
  1042.    
  1043.    
  1044.    
  1045.  
  1046.  
  1047.    
  1048.     -- put shape to image
  1049.     local ic = ImageChannel(out, 8)
  1050.     local fs = FillStyle()
  1051.     ic:SetStyleFill(fs)
  1052.    
  1053.     local cs = ChannelStyle()
  1054.  
  1055.  
  1056.         ic:ShapeFill(outputShape)
  1057.         if self.Status == "OK" then
  1058.             ic:PutToImage("CM_Merge", cs)
  1059.         end
  1060.    
  1061.    
  1062.     OutImage:Set(req, out)
  1063.    
  1064. end

User avatar
SteveWatson
Fusioneer
Posts: 111
Joined: Sat Oct 12, 2019 6:03 am
Answers: 1
Been thanked: 11 times

Re: [DEV] Greebler Fuse

#8

Post by SteveWatson » Sat Mar 28, 2020 3:32 am

Midgardsormr wrote:
Fri Mar 27, 2020 2:02 pm
Here's a quick code doodle prototype:

Hi,

Having looked at your shape, I now think I may have completely over engineered this.

I think it was because I looked at the JSplacement and it's use is varied so it mixes things etc together.

As someone said in another thread, fusion's way is to compartmentalise tools then put them together. Rather than try and get over complicated by trying to manage layers within the tool, which as you said is not trivial, the tool should be simpler.

My point is perhaps this should be a tool that generates a grid of simple random single shapes(defined using the controls of your shape(with perhaps a couple of extra options(e.g line thickness))). The user can then use multiple versions merged together to get the look they want. e.g 1 greebler doing squares, another doing lines which could be merged,masked, channeled etc to get a look. That is after all how I used it in the examples.

I think I was trying to make it a one stop shop with all controls in a single node which is not necessarily fusion's way.

I'd be interested in other points of view on this.

User avatar
SteveWatson
Fusioneer
Posts: 111
Joined: Sat Oct 12, 2019 6:03 am
Answers: 1
Been thanked: 11 times

Re: [DEV] Greebler Fuse

#9

Post by SteveWatson » Sat Mar 28, 2020 6:53 am

Hi,

I give you

Greebler2:Electric Greebaloo
Greebler2 - just when you thought it was safe to greeb in the fusion
Greebler is back - and it's never even been here before(if anyone gets that one I will be impressed)

In fact it's just version 0.5. Much much simpler, to get complex effects just merge etc greeblers together.(if you want lines make sure solid is off and put sides to 2 - nothing will appear if you have solid and 2 sides)

Thanks to Bryan for helping me see the wood from the trees.
Greebler.fuse
You do not have the required permissions to view the files attached to this post.

User avatar
SteveWatson
Fusioneer
Posts: 111
Joined: Sat Oct 12, 2019 6:03 am
Answers: 1
Been thanked: 11 times

Re: [DEV] Greebler Fuse

#10

Post by SteveWatson » Mon Mar 30, 2020 8:48 am

Hi,

spent a bit of time over weekend playing around.


User avatar
Midgardsormr
Fusionator
Posts: 1756
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 14
Location: Los Angeles, CA, USA
Been thanked: 89 times
Contact:

Re: [DEV] Greebler Fuse

#11

Post by Midgardsormr » Mon Mar 30, 2020 11:05 am

Love this one!

Image

User avatar
Kristof
Fusionista
Posts: 760
Joined: Thu Aug 07, 2014 1:30 pm
Answers: 2
Been thanked: 15 times

Re: [DEV] Greebler Fuse

#12

Post by Kristof » Thu Apr 16, 2020 3:39 am

SteveWatson wrote:
Sat Mar 28, 2020 3:32 am
Midgardsormr wrote:
Fri Mar 27, 2020 2:02 pm
Here's a quick code doodle prototype:

As someone said in another thread, fusion's way is to compartmentalise tools then put them together. Rather than try and get over complicated by trying to manage layers within the tool, which as you said is not trivial, the tool should be simpler.

My point is perhaps this should be a tool that generates a grid of simple random single shapes(defined using the controls of your shape(with perhaps a couple of extra options(e.g line thickness))). The user can then use multiple versions merged together to get the look they want. e.g 1 greebler doing squares, another doing lines which could be merged,masked, channeled etc to get a look. That is after all how I used it in the examples.

I think I was trying to make it a one stop shop with all controls in a single node which is not necessarily fusion's way.

I'd be interested in other points of view on this.
Yes, providing building blocks (nodes) doing one thing will allow a user to combine them in ways you maybe didn't think of. That's indeed the way to do it. Looking forward to see your fuse evolve.

User avatar
Shem Namo
Fusionista
Posts: 502
Joined: Sun Oct 06, 2019 9:15 pm
Location: North Israel
Real name: David Kohen
Been thanked: 13 times

Re: [DEV] Greebler Fuse

#13

Post by Shem Namo » Fri May 22, 2020 2:44 am

Cool fuse!! It’s a little bit like plexus. Thanks Steve!!