Announcement

Collapse
No announcement yet.

How to create custom shader?

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

    How to create custom shader?

    Hello, I'm a beginner graphics programmer and I'm interesting in all stuff related to rendering. For me it seems that graphical part of UE4 is the half of the engine, but I can't find any information about it. Yes, I've read this 2 pages in documentation about graphics development but: 1. It seems outdated. 2. Well, I can't understand anything - it's so brief and dry.
    In learning purposes I want to create a shader (a set of shaders) that uses all pipeline stages. Where should I start? Can you provide a step by step guide what classes I need, how to implement this in engine (because I bet I need to modify source code).
    Last edited by nikitablack; 06-19-2014, 09:07 AM.

    #2
    Hi Nikitablack,

    I am planning on doing just this, writing some documentation on how to implement your own custom shaders using Vertex Factories, Global Shaders and Drawing Policies. I will be writing the documentation with some examples in mind, so by the end you should have some custom shaders to play with that actually do something. I will be writing the documentation over the weekend.
    FluidSurface Plugin: https://github.com/Ehamloptiran/UnrealEngine/releases
    TextureMovie Plugin: https://github.com/Ehamloptiran/TextureMoviePlugin

    Comment


      #3
      Hi Ehamloptiran,

      I saw your previous posts. The hair work is awesome! I asked a question in this thread (hair), but it seems that data lost due to some database problems yesterday. I spent 2 days on ue graphics stuff but still have very little progress. Can I help you with documentation somehow?

      Comment


        #4
        Originally posted by nikitablack View Post
        Can I help you with documentation somehow?
        Just let me know if there are any specific topics you want me to cover, or any specific effects you want to see. So far the topics I want to cover are:

        - How to create shaders based on FGlobalShader
        - How to create Vertex Factories using custom shaders (Including integrating Geometry Shaders, since initially they aren't supported)
        - A breakdown of Vertex Factory USF (What functions are required and what they do)
        - How to use Compute Shaders
        - How to create a custom Drawing Policy
        - Maybe touch on post processing and Material Editor related stuff
        FluidSurface Plugin: https://github.com/Ehamloptiran/UnrealEngine/releases
        TextureMovie Plugin: https://github.com/Ehamloptiran/TextureMoviePlugin

        Comment


          #5
          If I understood correctly, FGlobalShader is a post processing thing.
          I think that overview of the architecture would be great. With some simple flat color shader that pass through all pipeline stages.

          Comment


            #6
            Hey Ehamloptiran, are you still going to be writing any documentation on this?

            Comment


              #7
              Hi gboxentertainment,

              Yes I do still plan on getting that documentation out. It has been pretty low on my list of priorities, things with my project have been pretty hectic over the last month or so. I've also learnt a lot more about the rendering side of UE4, so I have more things to cover.

              But if there are any particular questions you want answered, or urgent help, you can usually find me on irc at #unrealengine
              FluidSurface Plugin: https://github.com/Ehamloptiran/UnrealEngine/releases
              TextureMovie Plugin: https://github.com/Ehamloptiran/TextureMoviePlugin

              Comment


                #8
                Bump been coding shaders for years and as I'm going through the UE4 "materials" video tutorials I'm facepalming so hard, there's gotta be a way to just code those up instead. A full screen of 6-8 fat wire-connected nodes for what could be 2-3 lines of shader code? This would drive me mad in practice.. I'm happy all the artsy code-hating types have a clicky tool but sheesh let me just code shaders close to the metal....... Ehamloptiran, did you ever get around to writing down some notes of your experiences on this?

                Comment


                  #9
                  Bumping on this too, would really love to see a clear workflow or the appropriate way on how to create custom shader work on Unreal Engine.
                  The least I could do is to replicate what Ehamloptiran did on FluidSurface, any notes you could share with us Ehamloptiran?

                  Comment


                    #10
                    Has there been any word on the documentation?

                    I read your thread on Metaballs by the way and there you said "Feel free to comment in https://forums.unrealengine.com/show...r&goto=newpost if there is anything specific you would like me to cover, or any certain effects you want to see." So I hope this isn't bothering anyone but I have some requests for the shader guide (and I generally would really like to see something like this):

                    glitch-looking effects, or an old vhs-style, kinda like Silent Hill 3 had. Also the deep, dark, grainy black and white look of Tetsuo:
                    Click image for larger version

Name:	Tetsuo-The-Iron-Man-1989-Movie-Image-2.jpg
Views:	1
Size:	189.6 KB
ID:	1066526

                    Of course, I don't expect you to show all of those (or any of those), just saying what I'm interested in seeing.
                    Last edited by 0vr; 02-16-2015, 04:48 AM.

                    Comment


                      #11
                      Originally posted by 0vr View Post
                      Has there been any word on the documentation?

                      I read your thread on Metaballs by the way and there you said "Feel free to comment in https://forums.unrealengine.com/show...r&goto=newpost if there is anything specific you would like me to cover, or any certain effects you want to see." So I hope this isn't bothering anyone but I have some requests for the shader guide (and I generally would really like to see something like this):

                      glitch-looking effects, or an old vhs-style, kinda like Silent Hill 3 had. Also the deep, dark, grainy black and white look of Tetsuo:

                      Of course, I don't expect you to show all of those (or any of those), just saying what I'm interested in seeing.
                      You might probably want to look at this https://forums.unrealengine.com/show...Shaders-in-UE4 Temaran write a good documentation and plugin for anyone interested to custom shader authoring
                      Last edited by ernesernesto; 02-16-2015, 10:27 PM. Reason: fix typo

                      Comment


                        #12
                        I use the Unreal Editor that came with Star Wars: Republic Commando. If I may, could someone please tell me how to export a shader and edit it to the point at which it would best befit these two images?
                        501stCommander.bmp and 501stCommanderHelmet.bmp are the names of the images. I cannot seem to post them here, so if at all possible. you can send me a private message requesting my email contact information.

                        Comment


                          #13
                          Originally posted by c81north View Post
                          I use the Unreal Editor that came with Star Wars: Republic Commando. If I may, could someone please tell me how to export a shader and edit it to the point at which it would best befit these two images?
                          501stCommander.bmp and 501stCommanderHelmet.bmp are the names of the images. I cannot seem to post them here, so if at all possible. you can send me a private message requesting my email contact information.
                          Or, better yet, you can take a look at the flickr photos shared by yours truly, Coltrane Eightone.

                          Comment


                            #14
                            If I may, is anyone still here?

                            Comment

                            Working...
                            X