Q1. What is this asset for?
Q2. Is this asset helpful for my project?
Q3. Can this asset work on any mobile devices?
Q4. Can I use this asset with a script language other than C#?
Q5. Can this asset generate dynamic shadows, i.e. shadows for skinned characters?
Q6. I got flickering shadows. How can I fix it?
Q7. Can this asset cast shadows on dynamic objects?
Q8. Is it possible to use Mesh Tree without Mesh Shadow Receiver?
Q9. How can I use Fast Shadow Receiver with Dynamic Shadow Projector?
Q1. What is this asset for?
A1. Fast Shadow Receiver is an asset for optimizing shadow rendering performance. It works with Unity’s standard shadows, i.e. shadow-map and blob shadow projectors, Fast Shadow Receiver does not provide any new techniques which can generate some fantastic shadows. What you can do for shadows with this asset is same as what you can do with Unity’s standard shadows. It just improves the rendering speed.

Unity’s projector is not only for the shadows, it is also available for projecting lights and bullet marks, and Fast Shadow Receiver can be used for optimizing these projections as well. Additionally, Fast Shadow Receiver provides a shader which can project light and shadows at the same time. As a result, you can have spot light shadows like this demo.

Fast Shadow Receiver asset also includes a good example of bullet marks projection. It is really effective and fast. See also Q8. Is it possible to use Mesh Tree without Mesh Shadow Receiver?

Q2. Is this asset helpful for my project?
A2. If you are seeking for a new technique of shadows other than Unity’s standard shadows, Fast Shadow Receiver might not be helpful (see also Q1. What is this asset for?).

If you are already using Unity’s standard shadows (especially, blob shadow projectors), and you want to improve frame rate of your application, Fast Shadow Receiver can be helpful. However, if the bottleneck of the performance is CPU, Fast Shadow Receiver cannot alleviate it. You can check if the bottleneck is CPU or GPU by using Profiler which is now available even on Unity 5 Personal edition.
profilerscrrenshot
As in the above screenshot, if the time spent for Graphics.PresentAndSync is not small, GPU is the bottleneck. Also it is better to check if the bottleneck is caused by the shadow rendering. If frame rate is improved by disabling shadows and the bottleneck is GPU, Fast Shadow Receiver must be helpful for your project.

Q3. Can this asset work on any mobile devices?
A3. Yes. Fast Shadow Receiver itself can work on any devices. However, shadow-map is not available on some mobile devices. If you are seeking for good shadows available on mobile devices, I recommend you to use blob shadow projector. You can try it without Fast Shadow Receiver asset, and if you are satisfied with the quality of the shadow, try our asset. Fast Shadow Receiver can improve the performance without changing the quality (see also Q1. What is this asset for?).
If you are not familiar with blob shadow projector, please refer to Unity Manual.
Q4. Can I use this asset with a script language other than C#?
A4. Yes, but you might need to put Fast Shadow Receiver scripts in a special folder, that is, ‘Plugins’ folder or ‘Standard Assets’ folder (see also Unity Manual).

In Unity 5, you can put the root folder of Fast Shadow Receiver into a special folder. However, it will cause a compiler error in Unity 4.6. If you got a compiler error, just move the folders in FastShadowReceiver/Scripts folder except FastShadowReceiver/Scripts/Editor.

Q5. Can this asset generate dynamic shadows, i.e. shadows for skinned characters?
A5. Fast Shadow Receiver does not provide new technique for generating shadows. It just work with Unity’s standard shadows (see also Q1. What is this asset for?). So, if you use shadow-map, you can generate dynamic shadows with this asset.

If you are targeting mobile platform, you might not want to use shadow-map. In this case, please try Dynamic Shadow Projector. It can work with Fast Shadow Receiver.

Q6. I got flickering shadows. How can I fix it?
A6. From version 1.4.0, Mesh Tree has 2 parameters for the flickering problem, ‘Scaled Offset’ and ‘Fixed Offset’. You can try ‘Scaled Offset’=1, ‘Fixed Offset’=0 first, and if you still have flickering, increase the values of these parameters. For more details, please refer to Create a Mesh Tree.

Also, you can adjust Offset parameters in shader files used by projector materials. Usually, projector shader has ‘Offset -1, -1’. You can change this parameter like ‘Offset -1, -10’. Only the second parameter has to be changed. From version 1.4.1, Offset parameters in the shaders provided with Fast Shadow Receiver can be adjusted in material editor.

Q7. Can this asset cast shadows on dynamic objects?
A7. Yes, Fast Shadow Receiver just replaces the large environment objects (supposed to be static) with shadow receivers. You can still cast shadows on other objects as usual. If those objects are not so big, they will not make a large impact on shadow rendering performance.

However, what if the large environment objects are dynamic? Well, it is difficult for Fast Shadow Receiver asset to handle these objects. One possible solution is, build a mesh tree for the dynamic object at runtime. Because it takes long time to build a mesh tree, this solution is applicable only for dynamically created objects which are never changed after the creation. For more details, see Create a Mesh Tree.

If the environment objects are dynamically loaded, you can use multiple Mesh Shadow Receivers. Create a mesh tree for each part of the environment, and when the part is loaded, use the mesh tree with a Mesh Shadow Receiver. You can use Projector Manager to handle the multiple Mesh Shadow Receivers. Please refer to Setup Projector Manager.

Q8. Is it possible to use Mesh Tree without Mesh Shadow Receiver?
A8. Yes, Mesh Tree can work without Mesh Shadow Receivers. It can be used for picking up polygons which intersect with a region enclosed by planes(e.g. view frustum).
Bullet Marks is a good example of this usage. You can find the source code in FastShadowReceiver/Demo/Scripts/BulletMarkReceiver.cs.
Q9. How can I use Fast Shadow Receiver with Dynamic Shadow Projector?

A9. If you are already using Dynamic Shadow Projector, you have projectors in your scene. So, you just need to follow the steps in Setup Projector Manager.

Links

6 thoughts on “FAQ

  • 2016/08/30 at 9:00 PM
    Permalink

    Hi, I’m trying to use Fast Shadow Receiver.

    I have to use ‘Sprite Default’ materials and ‘Sorting Layer’ .

    and I have to use ‘Projector’ Too.

    but there’s problem. The Image( is Projected on the surface) cannot be controlled by Sorting Layer or Sorting Order. because there’s no renderer on Projector.

    Can you help me what Can I do?

    Reply
    • 2016/08/31 at 8:05 AM
      Permalink

      Basically, Projector cannot cast shadows on transparent objects because projector material cannot refer to the textures of the transparent objects. However, if the sprite is just like a decal on a flat opaque object, you can cast shadows on it. In this case, the transparent objects must be rendered before projector shadows. Usually, render queue value of a projector material is 2999, so you need to set less than 2999 value to the sprite material.
      You might need to create a new material with Sprite/Default shader, and show it in Inspector view. Then, click a small button with 3 horizontal lines at the top right corner of the Inspector, and select “Debug”. You can edit “Custom Render Queue” value.

      Reply
  • 2017/08/02 at 2:57 PM
    Permalink

    Can u make video with setting and comparing (unity shadow and Fast Shadow Receiver) ?

    Reply
  • 2018/11/22 at 6:25 AM
    Permalink

    If i have a platform above another platform and i project a shadow onto the top platform, will it go through it and project onto the bottom platform as well?

    Reply
    • 2018/11/22 at 3:45 PM
      Permalink

      Yes, but you can prevent it by controlling the far clip plane of the projector (if you know the distances from the projector to the platforms).

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Anti Spam Code *