Download

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

Looks great Stimpanzee, the reflections look awesome! :slight_smile:

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.

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!

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.

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.

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.

Car Materials on the Marketplace Trello!

It has finally happened! The materials spoken about in this post could have the chance to be sold on the Marketplace. If you are interested in using my material system to simulate: car paint, carbon fiber, chrome, and glass in your game - head over to the trello and give my submission a vote. I would love to see what everyone could do with the full materials!


Voted! They look great! :smiley:

Here is a direct link to your submission so it shows up when you click the link:

Glad to hear that you finally made it to Trello. :slight_smile: Voted!

Thanks guys! I’m stoked to see the votes coming in! I’m all over the place right now and can only check in a couple times a day. My class is near the end of the semester and my students are putting together their final projects in UE4. Crunch time!

So i’ve been lucky to get my hands on those materials and here are some screenshots:

And i must say i dont think the Marketplace will see a better car paint pack than this one until UE5 whenever that may be. :slight_smile:

@Stimpanzee
Hi, unfortunately I’m still in the process of picking up pieces of my jaw after I saw your car paint :wink:
Had to go to forest for couple of days and scream at the moon and stones. Had to learn how to read and write from scratch.
Voted! Will buy! Will live again!!! Material looks simply amazing!!!

Hahaha, thanks! It was passed on the trello! Now I’m just waiting to hear back from Epic on instructions for what’s next. Hopefully it should be for sale in the next month or so!

Massive Performance Gains

It’s been a little quite around here over the holidays, but I do have some great news to report! In the 4.6 update, scene capture actors gained parameters governing rendering features. Meaning it is now possible to fine tune the quality level of the scene captures. With a little bit of testing, I have determined the best option for visual quality and performance.

The biggest hit to performance with the captures are from lighting. The scene capture is rendering in six directions, each of which has it’s own unique render tree. With deferred lighting enabled, there is a considerable decrease in performance. This is the main reason most developers have avoided using this technique. But now there is a function to disable deferred rendering. The result is nearly identical visual quality and an average increase of 25% FPS! The use of the capture is now so small, that it could be added to nearly every scene.

With deferred rendering disabled, the capture is only capturing light from textures with emission and skylights. The technique for gaining the proper highlights is to assign emissive textures to your light sources. This way, not only is there a light to cast on the base coats, but the clear coat also has values which it can render. This is all a little hard to explain, but I will be going over it in the video documentation for the materials when they are for sale on the marketplace. For now, here is a little demonstration video of the performance gains.

Oh and I want to personally thank the person at Epic who implemented the new scene capture parameters! Thank you, whoever you are!

Awesome news @Stimpanzee! :smiley:

I might give this a try for my ocean shader, currently trying to redo and optimize it and is in desperate need of some reflectivity. That is a huge performance increase, I have been avoiding a capture cube for that exact reason but will give it another try after seeing your results. It looks like it is working correctly on the Glass material you have, which gives me hope I might be able to pull this off.

ps. Congrats on getting to the Marketplace! I am sure you will get a lot of sales, it is an incredible shader!! :slight_smile:

I think it could work with an entire ocean, although I’m not sure what the best approach would be. Man, thinking about how difficult an ocean shader would be in the first place makes my head spin. Your shader uses translucency, which is why SSR is not an option, right?

I think the two hardest obstacles using the scene capture actors would be resolution and orientation. You’ve probably seen why the scene capture actors make terrible flat mirrors, I think you might run across the same problem with a large body of water, but it depends on the player location. If you are up close to the water an it is reasonably choppy water, you might t get away with it. Although, you would have no way of capturing local reflections. Stuff like ships on water. The capture would really only render the sky and very large assets in the distance. The more I think about it, the more difficult I think it might be.

You could try parenting the scene capture to your player pawn. Then the reflections would be more localized, but you might run into a whole host of other problems. Hopefully Epic will eventually add SSR to translucent materials, or a scene capture reflect actor, like in the old days of UDK. It is entirely possible that all the necessary tools already exist, but we are just unaware of how to uncover them. Usually the case in my experience. lol

Scalable Performance with Scene Capture Actors

Things seem to keep getting better and better. I have had a closer look into the new scene capture parameters an I put together a demo illustrating how the new parameters can be used to scale performance/quality. Because I’m sure everyone is bored with my scenes by now, I included my materials into Epic’s racing game demo. In the first video, I work my way up from best performance, to higher quality reflections.

I am also adding a second video demonstrating the low performance hit of the standard reflection materials. In this demo, a racing game where the camera is typically 3rd person and far away from the car, the standard materials might be your best bet. For the absolute best looking car paint material, with sub surface glint and flake, you will have to take the performance hit with the scene capture actors. In my own game players will be controlling classic motorcycles in 1st person. I will be going with scene capture actor. Classic motorcycle manufactures were big fans of chrome and nickle platting. =)

View on youtube for fullscreen!

Scaling Performance

Standard Reflections

It seems like youtube has really degraded the video quality this time. I’m going to re-upload to vimeo for better quality to replace these.

I forgot that Vimeo requires a premium subscription for higher quality videos. Does anyone have a preferred free video hosting site which handles hit bitrate videos?

I’m sorry i can’t help you with that.

I just came by to say nice work! Looks amazing.

I gotta ask, how do you get a scene capture to interact with the material? I have been wondering how to get the reflection from a scene capture onto translucent objects for awhile now. Would be very useful for small bodies of water, like a lake or pond.

I setup on this material and here is the results, :slight_smile: I just think to improved this by adding a AO MAP into material layer,maybe it’s will be better,but my car have no UV mapping:( but thanks Tim Hobson and Stimpanzee,great job!