x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Android Shadows Acting Strangely

Lights in my scene: Single Directional Light (Movable)

In the editor everything works as expected.

On Android devices (S5, S6 and Sony Xperia) I have a banana which drops from a tree but it's shadow incorrectly starts at the ground and goes up to the canopy (like the coordinate system for the shadows is inverted). The monkey which collects the banana doesn't cast a shadow for some reason.

I've tried creating physics assets for both the tree and the monkey (they're both skinned meshes). I'm using Moveable; though I'd rather set the light to Stationary (for performance reasons) but this makes all the shadows (on Android) disappear.

Product Version: UE 4.9
Tags:
more ▼

asked Oct 30 '15 at 12:27 PM in Using UE4

avatar image

Pixeldamage
128 8 11 15

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

So I think my issue has been a combination of factors. Restarting in Mobile HDR doesn't seem to make me lose viewport ES2 shadows; but it does lose shadows on ES2 devices. It would be nice if the viewport settings were saved between sessions so you don't suddenly think viewport shadows are back (until you realise it's really just defaulted back to a D3D viewport)

Setting a project up as Mobile doesn't enable Cast Modulated Shadows (svv3dUDN thanks for pointing this out) nor does it enable the ES2 viewport. Whilst I'd done this on my own project; when comparing with a vanilla TP project; I also noticed I couldn't disable MobileHDR (every time I restarted UE4 - it was back on again). I'd be interested to know why shadows rely on HDR (just out of curiosity/not related to my Q - but I couldn't find any docs on it).

more ▼

answered Nov 03 '15 at 04:46 PM

avatar image

Pixeldamage
128 8 11 15

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hi!

In UE 4.9 have new feature - Modulated Shadow, like in UE3/UDK. This is old stile shadows for movable object for mobile platform. In current implementation this features has same limitation like in UE3/UDK. Maybe you will need rebuild light, if shadow not appear after activating.

alt text

modushad.png (62.5 kB)
more ▼

answered Oct 30 '15 at 02:27 PM

avatar image

svv3dUDN
8.4k 254 42 399

avatar image Pixeldamage Oct 30 '15 at 02:53 PM

Thanks for your reply. I've tried Stationary+Modulated already but I just tried it again (and rebuilding lighting / everything). I get viewport shadows but nothing on device

avatar image Pixeldamage Oct 30 '15 at 03:38 PM

I also tried UE4.10 rev3 and am having the same issue

avatar image svv3dUDN Oct 30 '15 at 04:09 PM

Try package project created from template.

This is screenshot from my Galaxy S2. UE 4.10.0 P3. I create TPS from template and enable Cast Modulated Shadows

alt text

avatar image Pixeldamage Oct 30 '15 at 08:35 PM

Thanks. That project works for me on device. I've tried copying the values as well as making a blueprint from the light and migrating it. Still no shadows in my own project when launching to the S6

avatar image Pixeldamage Oct 30 '15 at 08:42 PM

So I've noticed in that project Mobile HDR is on. However when I try and enable that in my project it crashes on startup

avatar image Pixeldamage Oct 30 '15 at 09:59 PM

Not sure if it helps debug it but if I enable ES2 for the editor viewport - the shadows look fine. But as soon as I hit play (in editor) the shadows disappear (and it still says Feature Level: ES2 in the bottom RHS).

avatar image Pixeldamage Nov 03 '15 at 02:19 PM

OK so this is not working with the Third Person Project if you start the project as a Mobile Project. That causes the shadows to disappear. For my previous test, I created a default TP Proj (defaults to desktop platform) which I built to my S6. This allowed shadows to work on S6. So now I need to find what those presets are actually changing

avatar image svv3dUDN Nov 03 '15 at 03:02 PM

Modulated Shadows required Mobile HDR. If you create project with mobile optimization, you must enable Mobile HDR. I create previous example on my Samsung Galaxy S2. Project was created for Desktop/Console Maximum Quality. I create new test with new TPS proj with mobile optimization. Enable Mobile HDR. Package and run. All works normal.

avatar image Pixeldamage Nov 03 '15 at 04:06 PM

You know what... you may have just hit the nail on the head! If so thank you! I actually tried toggling Mobile HDR before; but I don't think it affects anything- until an editor restart (I didn't realise this coming from a Unity bg that some of these settings don't have immediate effect). But booting up the project just now ... shadows are working! and yes Mobile HDR is on from a previous session.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question