Custom Lighting On Mobile Devices
Is there a way to do this?
I'm trying to do something like the team fortress shading style on a mobile device. I've been told that unreal 4 uses deferred lighting and therefore all lighting is basically post processed and therefore the only way to have custom lighting is to do it with post processing.
Does the mobile rendered also use deferred lighting and if so, is there any way to get anything except for the regular lighting style?
asked Nov 25 '14 at 03:36 PM in Rendering
Hey Feanix, another approuch to do custom lighting is to fake forward rendering, since deferred rendering can be quite costly for mobiles.
To do this first disable the G-Buffer with the command 'r.GBuffer 0'. This disables all postprocessing buffers UE generates for deferred rendering.
Now you could create a material parameter collection where you store your sundirection, suncolor etc. You can easily access your sunlight and get the forward vector (that is the sundirection) per level blueprint.
Using this you can create an unlit material and create a dot product between the sundirection and the PixelNormalWS (or VertexNormalWS, per pixel is more precise).
Finally this should be sufficiant as a start and you could convert this shader code into a shader graph http://wiki.unity3d.com/index.php/TeamFortress2Shader. The interesting part is the function LightingTF2.
Hope it helps.
answered Aug 22 '15 at 08:27 PM
There is definitely a way to get the custom lighting style you wish to acheive through mobile. Keep in mind mobile is a bit limited due to hardware specs, so have a read of the documentation on how to develop for mobile devices. It is broken up into sections so you can find the information you are looking for really quickly.
Mobile Game Development
answered Nov 25 '14 at 08:52 PM
Hey again Feanix,
The information provided is the extent of the knowledge I know currently for developing game for mobile. I would suggest going onto the Forums as well as the Wiki to gain further knowledge and find some good places to start.
Unreal Engine Forums https://forums.unrealengine.com/
Unreal Engine Wiki https://wiki.unrealengine.com/Main_Page
I hope this helps as well.
answered Dec 01 '14 at 03:11 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here