Log in or register to post comments

Shadows in unity

May 18, 2011 - 5:22am #1

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:

Shadows in unity

February 10, 2015 - 12:14am #12

This one is working for me. Please see the attatched image
 

AttachmentSize
Image icon Quality Setting.png59.58 KB

Shadows in unity

May 26, 2013 - 10:49pm #11

Yes.

Shadows in unity

May 26, 2013 - 12:58pm #10

AlessandroB wrote:

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

May 25, 2013 - 9:12am #9

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

 

Shadows in unity

May 25, 2013 - 8:26am #8

This may be outdate question but I m stuck here. When I applied depthmask material it was still rendered. I couldn't managed to show shadow on the iPhone.

Re: Shadows in unity

May 20, 2011 - 10:02am #7

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

May 20, 2011 - 1:33am #6
ksiva wrote:

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

May 19, 2011 - 6:29am #5

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

May 19, 2011 - 3:07am #4

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 ?

Re: Shadows in unity

May 19, 2011 - 12:37am #3

hi,
i don't know what your game looks like but if you just want shadows for static objects you can also use the lightmapping implemented in unity. works pretty good on android.

stefan

Re: Shadows in unity

May 18, 2011 - 5:27am #2

I believe that's right, Unity does not support dynamic shadows for mobile. You'll have to write your own shaders, or simply use a blob shadow.

- Kim

Log in or register to post comments