Download

Editing the code for a material function? Pasting not working.

Hello! I’'m currently trying to test a material function for fog for cheaper fog on a mobile platform. I wanted to ask if and how it was possible to paste a material function into the UE4.

The code describes objects within the actual engine, and how they are arranged and connected on a screen. CTRL-C->CTRL-V doesn’t seem to work, and pulls up a “Conflicting nodes substituted during paste” message. I don’t see why the message pops up, as I have not added anything that should conflict with the code.


 
 Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_2550"    Begin Object Class=EdGraphPin Name="EdGraphPin_71274"    End Object    Begin Object Class=MaterialExpressionPixelDepth Name="MaterialExpressionPixelDepth_9"    End Object    Begin Object Name="EdGraphPin_71274"       PinName="Output"       PinFriendlyName=" "       Direction=EGPD_Output       PinType=(PinCategory="mask",PinSubCategory="red")       LinkedTo(0)=EdGraphPin'MaterialGraphNode_2551.EdGraphPin_71276'    End Object    Begin Object Name="MaterialExpressionPixelDepth_9"       MaterialExpressionEditorX=-688       MaterialExpressionEditorY=480       MaterialExpressionGuid=DCE0DC42412C63E585A3D6B39DBE3141       Material=Material'/Engine/Transient.Material_25'       Desc="Depth into the world"       bCommentBubbleVisible=True    End Object    MaterialExpression=MaterialExpressionPixelDepth'MaterialExpressionPixelDepth_9'    Pins(0)=EdGraphPin'EdGraphPin_71274'    NodePosX=-688    NodePosY=480    NodeComment="Depth into the world"    bCommentBubbleVisible=True    NodeGuid=8D78435E4954865691900D919FE9E1D0 End Object Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_2551"    Begin Object Class=EdGraphPin Name="EdGraphPin_71278"    End Object    Begin Object Class=EdGraphPin Name="EdGraphPin_71277"    End Object    Begin Object Class=EdGraphPin Name="EdGraphPin_71276"    End Object    Begin Object Class=MaterialExpressionDivide Name="MaterialExpressionDivide_9"    End Object    Begin Object Name="EdGraphPin_71278"       PinName="Output"       PinFriendlyName=" "       Direction=EGPD_Output       LinkedTo(0)=EdGraphPin'MaterialGraphNode_2553.EdGraphPin_71282'    End Object    Begin Object Name="EdGraphPin_71277"       PinName="B"       PinType=(PinCategory="optional")       LinkedTo(0)=EdGraphPin'MaterialGraphNode_2561.EdGraphPin_71307'    End Object    Begin Object Name="EdGraphPin_71276"       PinName="A"       PinType=(PinCategory="optional")       LinkedTo(0)=EdGraphPin'MaterialGraphNode_2550.EdGraphPin_71274'    End Object    Begin Object Name="MaterialExpressionDivide_9"       A=(Expression=MaterialExpressionPixelDepth'MaterialGraphNode_2550.MaterialExpressionPixelDepth_9',Mask=1,MaskR=1)       B=(Expression=MaterialExpressionFunctionInput'MaterialGraphNode_2561.MaterialExpressionFunctionInput_24')       MaterialExpressionEditorX=-496       MaterialExpressionEditorY=528       MaterialExpressionGuid=800653994F5099D1C4B2419D9FA77D69       Material=Material'/Engine/Transient.Material_25'    End Object    MaterialExpression=MaterialExpressionDivide'MaterialExpressionDivide_9'    Pins(0)=EdGraphPin'EdGraphPin_71276'    Pins(1)=EdGraphPin'EdGraphPin_71277'    Pins(2)=EdGraphPin'EdGraphPin_71278'    NodePosX=-496    NodePosY=528    NodeGuid=02ACDDF74E9C9E68B4133C8A890B249E End Object Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_2553"    Begin Object Class=EdGraphPin Name="EdGraphPin_71285"    End Object    Begin Object Class=EdGraphPin Name="EdGraphPin_71284"    End Object    Begin Object Class=EdGraphPin Name="EdGraphPin_71283"    End Object    Begin Object Class=EdGraphPin Name="EdGraphPin_71282"    End Object    Begin Object Class=MaterialExpressionClamp Name="MaterialExpressionClamp_9"    End Object    Begin Object Name="EdGraphPin_71285"       PinName="Output"       PinFriendlyName=" "       Direction=EGPD_Output       LinkedTo(0)=EdGraphPin'MaterialGraphNode_2554.EdGraphPin_71292'    End Object    Begin Object Name="EdGraphPin_71284"       PinName="Max"       PinType=(PinCategory="optional")       LinkedTo(0)=EdGraphPin'MaterialGraphNode_2559.EdGraphPin_71311'    End Object    Begin Object Name="EdGraphPin_71283"       PinName="Min"       PinType=(PinCategory="optional")    End Object    Begin Object Name="EdGraphPin_71282"       PinName="Input"       PinFriendlyName=" "       PinType=(PinCategory="required")       LinkedTo(0)=EdGraphPin'MaterialGraphNode_2551.EdGraphPin_71278'    End Object    Begin Object Name="MaterialExpressionClamp_9"       Input=(Expression=MaterialExpressionDivide'MaterialGraphNode_2551.MaterialExpressionDivide_9')       Max=(Expression=MaterialExpressionFunctionInput'MaterialGraphNode_2559.MaterialExpressionFunctionInput_25')       MaterialExpressionEditorX=-368       MaterialExpressionEditorY=528       MaterialExpressionGuid=176022B84C69447A88EBD7B5FB20E111       Material=Material'/Engine/Transient.Material_25'    End Object    MaterialExpression=MaterialExpressionClamp'MaterialExpressionClamp_9'    Pins(0)=EdGraphPin'EdGraphPin_71282'    Pins(1)=EdGraphPin'EdGraphPin_71283'    Pins(2)=EdGraphPin'EdGraphPin_71284'    Pins(3)=EdGraphPin'EdGraphPin_71285'    NodePosX=-368    NodePosY=528    NodeGuid=548F79294845BDD1EFF5898BC98227B8 End Object Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_2554"    Begin Object Class=EdGraphPin Name="EdGraphPin_71293"    End Object    Begin Object Class=EdGraphPin Name="EdGraphPin_71292"    End Object    Begin Object Class=EdGraphPin Name="EdGraphPin_71291"    End Object    Begin Object Class=EdGraphPin Name="EdGraphPin_71290"    End Object    Begin Object Class=MaterialExpressionLinearInterpolate Name="MaterialExpressionLinearInterpolate_9"    End Object    Begin Object Name="EdGraphPin_71293"       PinName="Output"       PinFriendlyName=" "       Direction=EGPD_Output       LinkedTo(0)=EdGraphPin'MaterialGraphNode_2563.EdGraphPin_71272'    End Object    Begin Object Name="EdGraphPin_71292"       PinName="Alpha"       PinType=(PinCategory="optional")       LinkedTo(0)=EdGraphPin'MaterialGraphNode_2553.EdGraphPin_71285'    End Object    Begin Object Name="EdGraphPin_71291"       PinName="B"       PinType=(PinCategory="optional")       LinkedTo(0)=EdGraphPin'MaterialGraphNode_2560.EdGraphPin_71299'    End Object    Begin Object Name="EdGraphPin_71290"       PinName="A"       PinType=(PinCategory="optional")       LinkedTo(0)=EdGraphPin'MaterialGraphNode_2558.EdGraphPin_71303'    End Object    Begin Object Name="MaterialExpressionLinearInterpolate_9"       A=(Expression=MaterialExpressionFunctionInput'MaterialGraphNode_2558.MaterialExpressionFunctionInput_23')       B=(Expression=MaterialExpressionFunctionInput'MaterialGraphNode_2560.MaterialExpressionFunctionInput_22')       Alpha=(Expression=MaterialExpressionClamp'MaterialGraphNode_2553.MaterialExpressionClamp_9')       MaterialExpressionEditorX=-80       MaterialExpressionEditorY=320       MaterialExpressionGuid=2F1FB01646359E9016C136806C0878F6       Material=Material'/Engine/Transient.Material_25'       Desc="Plug into base color/emissive"       bCommentBubbleVisible=True    End Object    MaterialExpression=MaterialExpressionLinearInterpolate'MaterialExpressionLinearInterpolate_9'    Pins(0)=EdGraphPin'EdGraphPin_71290'    Pins(1)=EdGraphPin'EdGraphPin_71291'    Pins(2)=EdGraphPin'EdGraphPin_71292'    Pins(3)=EdGraphPin'EdGraphPin_71293'    NodePosX=-80    NodePosY=320    NodeComment="Plug into base color/emissive"    bCommentBubbleVisible=True    NodeGuid=59133C9E445717A0E66DD0A0373C5D07 End Object Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_2560"    Begin Object Class=EdGraphPin Name="EdGraphPin_71299"    End Object    Begin Object Class=EdGraphPin Name="EdGraphPin_71298"    End Object    Begin Object Class=MaterialExpressionFunctionInput Name="MaterialExpressionFunctionInput_22"    End Object    Begin Object Name="EdGraphPin_71299"       PinName="Output"       PinFriendlyName=" "       Direction=EGPD_Output       LinkedTo(0)=EdGraphPin'MaterialGraphNode_2554.EdGraphPin_71291'    End Object    Begin Object Name="EdGraphPin_71298"       PinName="Preview"       PinType=(PinCategory="optional")    End Object    Begin Object Name="MaterialExpressionFunctionInput_22"       InputName="Fog Color"       Description="Your fog color goes here"       Id=AE96FAA845AC0719BC2EAFB189686B9D       PreviewValue=(X=1.000000,Y=0.610000,Z=0.250000,W=1.000000)       bUsePreviewValueAsDefault=True       SortPriority=1       MaterialExpressionEditorX=-384       MaterialExpressionEditorY=336       MaterialExpressionGuid=6545C43A47B1DEEBEC4E479439505277       Material=Material'/Engine/Transient.Material_25'    End Object    MaterialExpression=MaterialExpressionFunctionInput'MaterialExpressionFunctionInput_22'    Pins(0)=EdGraphPin'EdGraphPin_71298'    Pins(1)=EdGraphPin'EdGraphPin_71299'    NodePosX=-384    NodePosY=336    NodeGuid=0A8A85F5430D3384C780EFB3E60808F1 End Object Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_2558"    Begin Object Class=EdGraphPin Name="EdGraphPin_71303"    End Object    Begin Object Class=EdGraphPin Name="EdGraphPin_71302"    End Object    Begin Object Class=MaterialExpressionFunctionInput Name="MaterialExpressionFunctionInput_23"    End Object    Begin Object Name="EdGraphPin_71303"       PinName="Output"       PinFriendlyName=" "       Direction=EGPD_Output       LinkedTo(0)=EdGraphPin'MaterialGraphNode_2554.EdGraphPin_71290'    End Object    Begin Object Name="EdGraphPin_71302"       PinName="Preview"       PinType=(PinCategory="optional")    End Object    Begin Object Name="MaterialExpressionFunctionInput_23"       InputName="Texture"       Description="Your material colors/textures go here"       Id=C3207F284CC2B41929D0C7A7498B6C28       bUsePreviewValueAsDefault=True       MaterialExpressionEditorX=-384       MaterialExpressionEditorY=160       MaterialExpressionGuid=6545C43A47B1DEEBEC4E479439505277       Material=Material'/Engine/Transient.Material_25'    End Object    MaterialExpression=MaterialExpressionFunctionInput'MaterialExpressionFunctionInput_23'    Pins(0)=EdGraphPin'EdGraphPin_71302'    Pins(1)=EdGraphPin'EdGraphPin_71303'    NodePosX=-384    NodePosY=160    NodeGuid=74AD6BB949F2D4AC7D864EAF81946958 End Object Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_2561"    Begin Object Class=EdGraphPin Name="EdGraphPin_71307"    End Object    Begin Object Class=EdGraphPin Name="EdGraphPin_71306"    End Object    Begin Object Class=MaterialExpressionFunctionInput Name="MaterialExpressionFunctionInput_24"    End Object    Begin Object Name="EdGraphPin_71307"       PinName="Output"       PinFriendlyName=" "       Direction=EGPD_Output       LinkedTo(0)=EdGraphPin'MaterialGraphNode_2551.EdGraphPin_71277'    End Object    Begin Object Name="EdGraphPin_71306"       PinName="Preview"       PinType=(PinCategory="optional")    End Object    Begin Object Name="MaterialExpressionFunctionInput_24"       InputName="Depth"       Description="Distance to max opacity"       Id=9D209ADA4D478B5098C987A22BD72498       InputType=FunctionInput_Scalar       PreviewValue=(X=5000.000000,Y=0.610000,Z=0.250000,W=1.000000)       bUsePreviewValueAsDefault=True       SortPriority=2       MaterialExpressionEditorX=-720       MaterialExpressionEditorY=576       MaterialExpressionGuid=6545C43A47B1DEEBEC4E479439505277       Material=Material'/Engine/Transient.Material_25'       bCollapsed=True    End Object    MaterialExpression=MaterialExpressionFunctionInput'MaterialExpressionFunctionInput_24'    Pins(0)=EdGraphPin'EdGraphPin_71306'    Pins(1)=EdGraphPin'EdGraphPin_71307'    NodePosX=-720    NodePosY=576    NodeGuid=893B6BB0469DB4DD4048C38D47838EC5 End Object Begin Object Class=MaterialGraphNode Name="MaterialGraphNode_2559"    Begin Object Class=EdGraphPin Name="EdGraphPin_71311"    End Object    Begin Object Class=EdGraphPin Name="EdGraphPin_71310"    End Object    Begin Object Class=MaterialExpressionFunctionInput Name="MaterialExpressionFunctionInput_25"    End Object    Begin Object Name="EdGraphPin_71311"       PinName="Output"       PinFriendlyName=" "       Direction=EGPD_Output       LinkedTo(0)=EdGraphPin'MaterialGraphNode_2553.EdGraphPin_71284'    End Object    Begin Object Name="EdGraphPin_71310"       PinName="Preview"       PinType=(PinCategory="optional")    End Object    Begin Object Name="MaterialExpressionFunctionInput_25"       InputName="Max Opacity"       Description="Max opacity of the fog"       Id=FC9837C94FC1CA02BA4560A7D5738BF8       InputType=FunctionInput_Scalar       PreviewValue=(X=0.800000,Y=0.610000,Z=0.250000,W=1.000000)       bUsePreviewValueAsDefault=True       SortPriority=3       MaterialExpressionEditorX=-624       MaterialExpressionEditorY=672       MaterialExpressionGuid=6545C43A47B1DEEBEC4E479439505277       Material=Material'/Engine/Transient.Material_25'       bCollapsed=True    End Object    MaterialExpression=MaterialExpressionFunctionInput'MaterialExpressionFunctionInput_25'    Pins(0)=EdGraphPin'EdGraphPin_71310'    Pins(1)=EdGraphPin'EdGraphPin_71311'    NodePosX=-624    NodePosY=672    NodeGuid=1E0007E84D4B1D84ED0C198BB10ED68B End Object