Announcement

Collapse
No announcement yet.

Interesting post from AnswerHub on how to setup a Layer Car Paint shader

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

    #31
    Thanks for the video link! It's cool to see their approach for flake normals. My system takes advantage of a masking flake texture/noise normal map to produce the flake. The custom map they use for rendering unique and randomized flakes is a good approach. I think that would be a great way of simulating dense flake layers.

    My textures are using much less dense flake patterns, and each flake is being handled by individual pixels. Essentially, the flake in my material is enhancing the look of a solid metallic surface, adding high contrasting highlights. I will have to see if I can find a way of generating a similar map to the video. I think that UE4 could definitely handle it! And it might look a lot better than my current setup!

    My original plan was to create a similar normal map, but after testing, the masking system seemed to work nicely. But after seeing these results, I am definitely going to have to revisit the normals.

    Cheers,
    Vince

    Originally posted by MC Stryker View Post
    Looking great and glad to see you are back working on it Stimpanzee! And also hope your wedding went great bud

    I've been working a little here and there on a good car paint material and it's not too bad. The metallic flakes aren't 100% and I'm actually doing some emissive boost to get them to pop however it doesn't look natural once you get close to it. I stepped away from it but want to come back to it shortly. Are you planning on distributing the material with the textures publically? I personally would love to see the normal maps you are using and how you go about composing the metallic flakes and getting them to pop based on the normal of a given flake and/or using the camera vector node.

    A guy did this for Siggraph 2014 (http://www.youtube.com/watch?v=KHT82-KYhRw) and I want to try and dig a little further in his paper and try to see if this is possible for real-time. Anyways, great progress and hope you are enjoying the weekend! Take it easy bud.

    Edit: Looks like you already did release the tutorial! Great work Stimpanzee and I'll need to link with you and get you an updated version of my Joystick Plugin to nail out the remaining issues but glad to see you got it up, going to read it now!

    Comment


      #32
      Rebuilding the Normals

      After seeing the video linked by MC Stryker, I was inspired to rebuild my normal maps for the flake. I am using a new normal map and included a new parameter within my material to enable "full flake" The parameter overrides the flake mask, which then boosts the glint effect from the new normal map.

      It has massively improved the look of the shader! Thanks for the link MC Stryker!

      You will have to excuse the crappy gif, because it certainly doesn't do it justice!

      Attached Files

      Comment


        #33
        Originally posted by DotCam View Post
        Looking really good Stimpanzee!! It's been a while since I have been able to work on the shader I created from your tutorial, however clearly you have made some great progress! The glass & carbon fiber additions looks really good man, nice work.

        I think I recognize the emblem (and the shape of the car fits the model)... Is that a Pontiac Firebird I see?
        Thanks DotCam! I keep getting caught up in the improvements and variations. I think I might have inadvertently become a shader artist. haha

        And you are right about the Firebird! I found the model online, and it's been fun for testing. I am looking forward to wrapping up the shaders and getting back to my motorcycle game, though. It feels like I've been working on these materials for a long time!

        Comment


          #34
          Really interesting tutorial man. I followed all steps in your tutorial and get some nice results. Awesome. How do you made the carbon fiber material? I am trying the carbon fiber shading reusing some of your shading network but not getting so good results as yours. I guess it is cuestion of time tweaking some parameters and a good texture.

          You are a talented shader material man!

          Thank you!

          Comment


            #35
            Originally posted by iparra View Post
            Really interesting tutorial man. I followed all steps in your tutorial and get some nice results. Awesome. How do you made the carbon fiber material? I am trying the carbon fiber shading reusing some of your shading network but not getting so good results as yours. I guess it is cuestion of time tweaking some parameters and a good texture.

            You are a talented shader material man!

            Thank you!
            Thanks iparra! I'm glad you are getting good results from the tutorial!

            The carbon fiber material is very simple. The only complex portion of the shader are the reflections and reflection masking system. The rest of the material can be extremely simple. For the image on this post, I was using a 0,0,0 vector for diffuse, a solid 1 for metallic, and a .3 for roughness. The material relies heavily on the normal map.

            I crafted the normal map in Maya, modeling individual strands, and texturing the filaments. I used transfer mapping to produce the normals map and also a mask texture for something special, which I haven't shown off yet. I thought it was important to do a normal map from scratch. I learned a lot about carbon fiber construction in the process, which is a plus!

            Click image for larger version

Name:	CarbonFiber.jpg
Views:	1
Size:	720.1 KB
ID:	1057574

            Comment


              #36
              Alright, another day - another update!

              I finished adding a new feature to the shader. Rust!

              The rust is being driven by vertex colors, so you can paint exactly where you want the rust to form. Then, there are a few parameters to fine tune the look rust.

              Click image for larger version

Name:	xrkB6vi.jpg
Views:	1
Size:	667.7 KB
ID:	1057607

              And with a few shifted parameters...

              Click image for larger version

Name:	CDd7kWc.jpg
Views:	1
Size:	706.8 KB
ID:	1057608

              The shader itself, is getting a little more difficult to work on - because of how large it has become!

              Click image for larger version

Name:	9hcqxvJ.jpg
Views:	1
Size:	437.8 KB
ID:	1057609
              Attached Files

              Comment


                #37
                Thank you Stimpanzee! I will give a try to your advice.

                Comment


                  #38
                  Took a bit of time to dial in the standard values for the dynamic rust system. Ended up playing around with an instance until I was happy with the results. Take a look!

                  Click image for larger version

Name:	Hq4rhsE.jpg
Views:	1
Size:	696.9 KB
ID:	1057676


                  This is a good example of how adaptable the system is. The best part is that it can all be controlled through instance parameters, so not only can you dramatically change the look of the paint at runtime, it's also easy to dial in the right look!

                  And of course the system is still running real time reflections based on a scene capture actor!

                  Comment


                    #39
                    Video Update

                    Back again, with a video this time!

                    I have been running the shader in real time with the standard vehicle physics template. (I just fliped the visibility of the standard car mesh, and inserted a static car mesh into the blueprint.)

                    The results are promising! Thanks to the shader, it is possible to run car paint and chrome with high quality reflections on dynamic objects!

                    Take a look:

                    Last edited by Stimpanzee; 10-20-2014, 11:38 PM.

                    Comment


                      #40
                      It's amazing to see how much you've improved this shader.
                      FREE VR Drum Kit Project
                      FREE Color LUT Collection
                      FREE Physics Driven Spacecraft Project
                      FREE GTA Style Vehicle Interaction
                      Dynamic DoF(Depth of Field)
                      Camera Crossfade

                      Comment


                        #41
                        Looks great Stimpanzee, the reflections look awesome!

                        Are you still using the render target approach? I heard they fixed some issues with clear coat recently but have not had time to try it out yet.
                        Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

                        Comment


                          #42
                          Originally posted by Jacky View Post
                          It's amazing to see how much you've improved this shader.
                          Thanks Jacky! It's interesting to look back at the process, and what I've learned. It all started with some crazy ideas we had!

                          Comment


                            #43
                            Originally posted by DotCam View Post
                            Looks great Stimpanzee, the reflections look awesome!

                            Are you still using the render target approach? I heard they fixed some issues with clear coat recently but have not had time to try it out yet.
                            The Clear Coat shading model is handling SSR now, which greatly improves the look of the car paint shaders which take advantage of this method. Unfortunately, I have had bad luck using SSR on dynamic objects. Using a low roughness value material, with SSR enabled, causes a lot of weird ghosting artifacts when applied to moving objects. I have been having similar issues with distance field ambient occlusion, but that's another story.

                            The shaders in the video are using the same scene capture cube texture. There are actually two shaders on the Mustang: the main car paint shader, and a version which uses transparency. The car paint shader is capable of simulating car paint and chrome, so there are two instances handling that, and then one instance of the glass shader with a little extra tint added. At first, I didn't like the way the chrome looked on the car. In the Mustang video, the chrome is a little too bright. I ended up using the material sphere as a simulated light probe, to dial in better values.

                            For one of my motorcycle assets, I use AO maps for the chromed geometry. All I have to do is enable a switch in the material instance, then drag/drop in the AO into a texture parameter which appears. At that point, the AO texture becomes a reflection mask. Using this approach, you get better tones and values from the chrome which would be reflecting other parts of the asset. It's a good approach while we wait for ray tracing. lol

                            I submitted my materials to the marketplace so I'm crossing my fingers that they pass through. If they do, I will put together a detailed instructional video on how to fully benefit from the materials functions. In that video, I'll do a comparison of the chrome using an AO texture as a reflection map v.s. standard values. Perhaps it could be done dynamically one day, by adopting the engine's own AO. We will have to wait and see. =)

                            For now, here is another video of the shader being used practically. In this video, the chrome is using an AO texture as a reflection mask.

                            Comment


                              #44
                              I agree that DFAO is messing things up with moving objects. I've finally had a chance to play with it in 4.5 and now my car is a blurry mess when you drive in an exterior view. :\ Your chrome technique looks promising though. I was already thinking of baking some details and textures to reduce poly count and this gives me more reason to do that.
                              FREE VR Drum Kit Project
                              FREE Color LUT Collection
                              FREE Physics Driven Spacecraft Project
                              FREE GTA Style Vehicle Interaction
                              Dynamic DoF(Depth of Field)
                              Camera Crossfade

                              Comment


                                #45
                                And now something a little different.

                                One of the reasons I originally crafted this material system was so I could incorporate flaked motorcycle helmets in my game. Here is a look at the material doing its thing on a helmet prop I put together today.

                                Click image for larger version

Name:	X6oGzYg.jpg
Views:	1
Size:	576.1 KB
ID:	1060207
                                Attached Files

                                Comment

                                Working...
                                X