Author Topic: Shader difference in UE4 and SD  (Read 8388 times)

I've been seeing pretty large differences in the way a material is rendered in SD and UE4. The specularity of the material always comes in much higher in UE4. I'm working in PBR (Roughness, Metallic) in SD and the shader is set to physically based. But in UE4 the roughness is always to dark, causing to much gloss on the material. I've solved this on this particular mesh in UE by adding +.35 to the roughness map and putting it through a clamp of 0-1. The 2 pics below are the base material in SD and the same mat in UE4, unaltered. Not sure if the shader just works differently, but any advice on this would be great.

I should also mention the roughness image looks exactly the same in SD and UE, so I'm guessing it has to be a difference in the shader.
Last Edit: May 06, 2014, 09:49:28 pm

I've noticed the exact same thing. I've gotten my object to look perfect in SD, then realised it looks completely wrong in UE4. Maybe an Unreal 4 PBR preset would be an option in SD?

Be careful as UE4 will flag your roughness and metalness maps as srgb by default. Uncheck that option in the texture properties in UE4 to get the right values.

Great, thanks Jeremie

Aha, fantastic, thank you :)

I have another issue very similar, occasionally, diffuse textures will save to PNG without SRGB, meaning they are very washed out. They look fine inside windows, but inside both Marmoset Toolbag and Unreal 4 they are washed out - the SRGB flag does nothing for it in Unreal, both on and off, the image stays the same. The odd thing is, this is only occasionally. Sometimes I can make a small change in SD to the file, then resave out and boom - SRGB has gone.

Turns out the issue is using 16-bit. Saving as 8-bit solved the issue and used to correct gamma correction.

Last Edit: May 07, 2014, 02:24:23 pm

Thanks for reporting this.

Be careful as UE4 will flag your roughness and metalness maps as srgb by default. Uncheck that option in the texture properties in UE4 to get the right values.

Thanks for the info Jeremie :)

Wish I'd known this earlier. Spent ages last night trying to fix an issue that is hopefully the same as shown above on the chair (you can see the problem I'm having here - http://www.polycount.com/forum/showthread.php?t=134733 )

Will give it a try next time I'm at my PC.

I untagged sRGB on my textures but the results are still drastically different so I took what the OP suggested and used my roughness as the alpha/mask to lerp between 0.35 and 1.35 before plugging it into the roughness slot in UE4.

You can see the difference this made on the Polycount link I posted previously.

EDIT: Wanted to come back to this thread incase anyone else is suffering the same issues. I previously had managed to make a mess of my SD setup and wasn't using maps as I should have been for UE4 PBR. Once I'd sorted this and disabled sRGB on my mask texture (using rgb channels for AO/metallic/roughness) but leaving it on my diffuse, things have been looking much more like I'd expect them to, without having to modify the roughness as previously mentioned. Again, see the PC thread I posted for further results of SD > UE4.
Last Edit: May 29, 2014, 12:01:34 am