I was aiming to make shadows by using a directional light. I mean drop shadows, not shadows on the object itself. When i ran the app on my smartphone it didn't show the drop shadow of the object. I read somewhere on the Unity site that shadows are not supported in Android. Is this true or is there another way to do it? :confused:
- Sort Posts
- 11 replies
- Last post
Shadows in unity
Shadows in unity
Hi, it seems like shadows are not supported on mobile (iOS), have a look here:
http://forum.unity3d.com/threads/165869-Realtime-shadows-on-iOS-with-Unity4-Pro
After tried a while, I have managed to att blob shadow to objects. But I couldn't add soft or hard shadows. Maybe that's what you are talking about, right?
Shadows in unity
Hi, it seems like shadows are not supported on mobile (iOS), have a look here:
http://forum.unity3d.com/threads/165869-Realtime-shadows-on-iOS-with-Unity4-Pro
Re: Shadows in unity
That material masks out any 3D objects rendered behind it. This is handy for AR applications, where you may want real world objects to occlude virtual ones. Simply model the real world objects and apply this material.
It works well in this case for shadows because you need a material that isn't rendered but also isn't transparent (Unity shadows don't play well with transparent materials). I'm sure there are other materials that would work as well, but this was the first one I came up with :)
- Kim
Re: Shadows in unity
I was able to get the standard Unity Blob Shadow Projector working with the ImageTargets sample, using these steps:
....
7) Drag the Qualcomm Augmented Reality/Materials/DepthMask material onto your plane (this is just one option, but it works well).- Kim
What does this material do?
Re: Shadows in unity
I was able to get the standard Unity Blob Shadow Projector working with the ImageTargets sample, using these steps:
1) Import the Projectors package provided by Unity.
2) Pick a teapot, lift it up off the target so it's floating.
3) Drag the Blob Shadow Projector prefab onto the teapot.
4) Increase the Far Clip Plane on the projector (e.g. to 500).
5) Rotate the projector to point down.
6) Now add a plane object to the target, we need something to project against at runtime (and the target plane is disabled at runtime).
7) Drag the Qualcomm Augmented Reality/Materials/DepthMask material onto your plane (this is just one option, but it works well).
8) Run your app!
- Kim
Re: Shadows in unity
Thanks for the reply i will try lightmapping then. As for my app, it's really just a test to see what is possible and to make myself familiar with Unity and QCAR. I have another problem with the shadows. I tried using a blob projector in the project, but i can't see the shadows. When i tried the same in a project in which i didn't import the QCAR packages the shadows did appear in the viewport. Any thoughts ?
This one is working for me. Please see the attatched image