Unity: Using Projectors for Character Shadows

What you’ll learn

We are going to get introduced to projectors in Unity. Projectors can be used for a variety of things. From blob character shadows, simulating a character walking under a light, graphitti on walls, or weapon damage.

In this tutorial Justin is going to walk you through the uses for character shadows without a dynamic light.

 

Leave Comment

Discussion

12 Responses to “Unity: Using Projectors for Character Shadows”
  1. Posts: 35

    Justin, an interesting tutorial about something I knew nothing about :)

    But I have a couple of questions. Could I not attach a plane (an imported one) to the avatar and texture it with a “shadow” that would be more than the round blobby look?

    Would that be less efficient? To me the blobby look says that the light source is directly above the avatar – in scenes where this is not the case would it look odd ?

    gryff :)

  2. Posts: 4

    Thanks! It was my first Unity Cookie so I appreciate it.

    As far as your question, of course you can import a new plane and texture. The tutorial is meant to demonstrate the process and how projectors can be used to simulate shadows as well as highlights in this demo.

    Using that same process you can import a more defined shadow blob if desired.
    We will be having a tutorial soon on projectors describing more uses.

    Hope this helps!

    Justin-

  3. Posts: 1
    Tadd Mencer says:

    This was actually something I was learning about on my own recently and honestly, is perfect. It’s exactly what I wanted to learn.

    Also, I watched a tutorial from Design3 where they used baked on textures to fake basically the same thing .. so this was 10x better than what they were doing. Less work and more dynamic.

    Thanks a ton! CG Cookie continues to be an invaluable source!

    • Posts: 4

      That is great to hear!

      Yes the baking method can work at times but for quick shadows and effects, using projectors is key.

      The blob is just the start of what can be done with shadows. Stay tuned for more on this topic!

  4. Posts: 35

    “We will be having a tutorial soon on projectors describing more uses.”

    Justin, I’m looking forward to further uses and examples.

    Going through the tutorial again the one immediate benefit I see over a simple plane & texture, is at 7.28 – fitting to both the wall and floor surfaces. I imagine that is useful if going up gradients or rough terrain.

    gryff :)

    • Posts: 4

      Exactly! Yes sir, you got the hang of it. Yes new tutorials regarding this topic will roll out soon and your idea can easyily work. The great thing about engines like “Unity” is that they are so simple to execute simple procedures [projectors for example]that you are then left with more freedom on how to apply that very task.

      Good Stuff!

  5. Posts: 2
    Jorge Aguiar says:

    One thing to take into consideration though, is that projectors do make the engine rerender the meshes they project through. And because they do not stop when they hit a surface, they can actually create performance issues if used without caution…

    In the project my company was working on we had to take all the blob shadows from our characters and create our one system because they were increasing our vertex count quite a lot…

    I’m not saying that they are not good, just pointing out the drawbacks, something to be aware of.

    Great tutorial, keep up the good work!

    • Posts: 4

      This is true but I do believe you can control how much that projector overdraws. I could be wrong, but as always its always good to use all geo/materials/textures in a memory efficient manner. Thanks for the heads up much appreciated!

      Justin-

  6. Posts: 1
    barbeaulex says:

    While the blob projector is an insteresting alternative as opposed to having dynamic shadows (which requires Unity Pro), it is important to note that the projector ‘duplicates’ any geometry is touches. For instance, if you have a scene with 10 000 triangles containing a terrain with 5 000 triangles, and your projector only affects the terrain layer, your scene will end up having 15 000 tirangles. This is very important to consider when working on limited platforms such as web, flash or mobile devices.

  7. Posts: 1
    Alex says:

    Hi and thanks for the explanation.
    I am using this in a prototype I am making and I was having an issue with the projector creating some shadow lines in 4 directions around the model.
    I’ve noticed the same thing in your video and I was wondering how can I get rid of that.
    In my case, being a sort of strategy game, the player sees the units from further away and then it becomes more noticeable.

  8. Posts: 1
    StefanRafa says:

    ok i want to ask how u puting items from other program to unity
    exsample i want to put object from 3d max… how to do it ? :D

Leave a Comment

You must be logged in to post a comment.