Announcement

Collapse
No announcement yet.

Put code for material in UE4

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Put code for material in UE4

    I have a piece of code someone gave me so that I could use it for my material in UE4. How do I use this code and implement it for my material.

    #2
    Ming Ning How do I paste the text directly into my material?

    Comment


      #3
      Ming Ning would it still work if it was a material text used with UE3?

      Comment


        #4
        TwoSided = true
        bDisableDepthTest = false
        bIsMasked = false
        ReferencedTextures[2] =
        {
        ReferencedTextures[0] = Texture2D'vfx_shared_textures.textures.tex_mistystuff'
        ReferencedTextures[1] = Texture2D'vfx_shared_textures.textures.tex_grad_jet'
        }
        BlendMode = BLEND_Additive (3)
        OpacityMaskClipValue = 0.333
        FlattenedTexture = None
        MobileBaseTexture = None
        MobileNormalTexture = None
        bUseMobileSpecular = false
        MobileSpecularPower = 16
        MobileSpecularMask = MSM_Constant (0)
        MobileMaskTexture = None
        Attached Files

        Comment


          #5
          Ming Ning This is my text and this is my material. I have tried Ctrl + C the text, and Ctrl + V onto this viewport uploaded above, but nothing happens

          Comment


            #6
            You can use custom expression for it:

            https://docs.unrealengine.com/en-US/...tom/index.html

            But what you posted is not a shader at all, it looks like a copy-paste custom expression node I linked above.
            Last edited by Everynone; 05-16-2020, 03:10 AM.

            Comment


              #7
              Originally posted by Ming Ning
              @Everyone I could be wrong, but I think that it looks more like shader setting seen in the details panel. If it was was copy-past of custom expression node then it should have a line in the begining Class & Object Name "MaterialExpressionCustom_X" (x node number) and a line with the actual hlsl code. And the rest like other node copy-paste.
              An example
              Begin Object Name="MaterialExpressionCustom_0"
              Code="float3 (sin(color1) + (color2) * 1.618);"
              Description="MixTextures"
              You're probably right - I sure do not know what I'm looking at This line makes sense but that's about it:

              Code="float3 (sin(color1) + (color2) * 1.618);"

              Comment


                #8
                Ming Ning would you mind showing me what the blueprints would look like in the material editor, using that code:

                TwoSided = true
                bDisableDepthTest = false
                bIsMasked = false
                ReferencedTextures[2] =
                {
                ReferencedTextures[0] = Texture2D'vfx_shared_textures.textures.tex_mistystuff'
                ReferencedTextures[1] = Texture2D'vfx_shared_textures.textures.tex_grad_jet'
                }
                BlendMode = BLEND_Additive (3)
                OpacityMaskClipValue = 0.333
                FlattenedTexture = None
                MobileBaseTexture = None
                MobileNormalTexture = None
                bUseMobileSpecular = false
                MobileSpecularPower = 16
                MobileSpecularMask = MSM_Constant (0)
                MobileMaskTexture = None

                Comment


                  #9
                  Ming Ning is there some sort of tool I could use to see what the blueprint will look like, using a piece of code?

                  Comment


                    #10
                    @X-Supreme If you Ctrl+C a blueprint graph, you actually have a text representation in your clipboard. There is a neat website called blueprintue.com which let's you preview and share your blueprint graphs.
                    If anyone wants to get more details on how to setup custom shader development, we have a couple of articles on our blog about that topic.
                    Company Website
                    Marketplace Seller Page

                    Comment

                    Working...
                    X