- Home /
trouble when rendering shadow on android
Hello eveyone,
I'm stuck for days searching a solution to my shadow trouble without any success.
In my project (for android platform), I'm using the vuforia SDK (3.0.9) to show some 3D model using framemarker.
I have several directional light and only one is set to show hard shadow (the other one doesn't display any shadow). In the PlayerSettings, the rendering path is set to forward.
When I launch the application through the editor with a webcam, I can see clearly my shadow and the model without any issue however, when I launch it to my android device the shadow is displaying correctly but at the same time my model "partially disappear".
Following the point of view I'm looking at the model, even If I'm not moving the camera, the model only shows part of it "randomly".
So far I've tried to change the Quality setting from "simple" to "fantastic", changed the shadow distance but nothing change.
The is not a clipping plane trouble because the near is set to 0.3 and far was set to 1000, 2000, 3000 and 5000. The "bug" of display in my model only appear when the shadow is rendering. If my distance is higher than the shadow distance my model is displaying correctly (and the shadow isn't display of course) but when my distance is lower than the shadow distance, my shadow is displaying correctly but my model is no more displaying correctly (I've tried a shadow distance of 20,40,200,400 and 1000).
I've also set the render mode to "important" for the directional light but no effect here too.
Concerning Unity I'm using the version 4.6.3f1 Pro with the addon Android Pro.
The android device is a Toshiba harman/kardon REGZA Tablet AT703 (android version 4.2.1).
At the beginning I thought the trouble was because this is an Android Tegra 4 base device but the previous company succeeded to show correctly the 3d model and the shadow on the same device (I cannot contact this company) so I guess my trouble come from something else but I don't understand this error. (I'm recreating from scratch an existing application of my client)
I'm attaching a screenshot to show you the actual result. As you can see in this screenshot, only the front of the model is displaying and there is a display bug between the bottom red point and the shadow.
Could you please tell me what I'm doing wrong/
I really thank you for your help.
Answer by ludo_ics · Mar 10, 2015 at 09:20 AM
Finally found the solution myself.
I don't know the exact reason of this bug but it was due to ARCamera prefab. Just had to create another camera for rendering only 3d model and make some setting adjustment for the ARCamera, now everything works fine.
Your answer
![](https://koobas.hobune.stream/wayback/20220613185545im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Realtime Shadow Slicing Mesh on Android 0 Answers
how to hang a 3d model hanging seamlessly from a camera 1 Answer
Wrong shadow 1 Answer
How to make my character's shadow circle only? 2 Answers
Shadows problem with mobile. 1 Answer