Forgive me if this is obvious, I’m still very new to UE4, and wasn’t able to find anything on the forums or Google…
Using lit materials seems to be a major judder source on the Gear VR. I figured it should be reasonably straightforward to just bake the lighting to unlit materials. I gather that to use an unlit material you have to run any desired color into the “Emissive Color” wire on the material, otherwise it shows up black. This all works fine but then of course it ignores lighting entirely for that material. Is there some way I can get the effect I want? Ideally I’d like it to bake the lighting to the textures in the editor (as automatically as possible), and then in-game treat it as unlit and just “paint” the baked lighting on.
Thanks so much for any pointers!
UPDATE 1: Ok, yes, it seems this is pretty easy. I found that by inserting a “Fuzzy Shading” node between my desired output color and the Emissive Color it does exactly what I wanted. Hah! Excellent. Hopefully this helps somebody else find it in the future.
I’ve been playing around with unlit materials in UE for VR but I made greyscale lightmaps inside 3DSMax and brought them in thinking it could give a performance boost over standard lightmapping, does this method give you any type of performance boost?
Would it be possible to show how this looks in a screenshot?
Ok I poked around a bit and it seems I have been somewhat mistaken. The judder did go away in my simple test, so that approach may be faster than “Default Lit”, but it appears that Fuzzy Shading is supposed to give kind of a velvety shading effect. Gah! Also it doesn’t capture shadows, just shading. So it seems my search continues.
Anyway for what it’s worth, here is a super cheesy test with unlit, no shading of any kind:
Now here it is with “Default Lit”, and the colors piped into the Base Color pin:
This is juddery in the Gear VR for me. There’s a hint of some specular shading going on (it’s more shiny), and of course shadows work. Now here it is with the colors going through a Fuzzy Shading node before going into Emissive on an Unlit material:
From this vantage point you can definitely tell that it’s got that velvet-like appearance. Maybe the “Fuzzy Shading Grass” node would be a bit better in this instance, but the difference is pretty subtle. I wonder if it’s still doing dynamic shading (even though it’s “Unlit”) but it’s a bit faster because we’re only feeding the Emissive channel so it doesn’t need to do specularity and shadows and such, so it has less to do in addition to shading?
So while it appears this approach can be faster than Default Lit and look better than Unlit (in some cases, YMMV, etc), and thus it could be useful, it would be nice if it was a more of a lambertian look, and it would be nice if there were a way to capture static shadows as well. Anybody got any tips for us?
Unlit does not capture and shadows at all - using a static light source is the only way I know of to create ‘real’ baked shadows from static objects. For the gearVR you should only use static lighting on one of two small objects that really need it (if at all) - everything else should be unlit and made to look better using other tricks - such as: Moving light sources on mobile? - Android Development - Unreal Engine Forums
Make sure to use the command “stat fps” to know the exact performance difference ;)- If you drop below 59-60FPS you’ll get your judder