Search Unity

Blob Shadows

Discussion in 'Editor & General Support' started by marty, Jan 22, 2006.

  1. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    Do the new blob shadow prefabs use render-to-texture, thus requiring Pro?
     
  2. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    They can be used with Unity-Indie.
     
  3. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    Glad to hear it.

    Thanks, Joe!
     
  4. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    Heya Joe,

    I'm having toruble here. As I understand it, I make the blob shadow prefab a child of some mesh and it will have a blob shadow, right?

    The thing is, that's what I'm doing, but no shadow. I do get a noticable change in the overall scene lighting - lots of black everywhere, but no discernable blob shadow. Changing the shadow's parameters changes nothng. I can post a simple project file, if that will help.

    Better yet, could you maybe outline the steps to do a blob in detail? Or maybe provide a simple sample scene?

    Thanks!
     
  5. phoen

    phoen

    Joined:
    Oct 25, 2005
    Posts:
    94
    Hi. i had the same problem. connecting cookie and falloff to the right assets and using the Projector Multiply shader solved it.
     

    Attached Files:

  6. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    Thanks, Phoen.

    I'm still having trouble though. My Shadow_Material shader panel Shader entry shows "Hidden/Projector/Multiply". I can't seem to find a way to change it to "Projector". Any suggestions?

    BTW, do you know if the Blob Shadow prefab is actually documented anywhere?

    Thanks!
     
  7. phoen

    phoen

    Joined:
    Oct 25, 2005
    Posts:
    94
    You can edit your shaders by doubleclicking them. Just change "hidden" to something else. Save and it should appear in the menu. I dont think there is a documentation yet.
     
  8. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    Thanks for your continued help, Phoen.

    Unfortunately, I still can't get it to work. I've included a screenshot that shows how I have everything set up and was hopng you might be able to scan it quickly and catch my mistake.

    Basically, I've attached an instance of the BS prefab to a Unity cube mesh named "tracker_mesh" and wired all the parameters as shown. Unfortunately, no shadows seem to be being cast from the cube.

    Help me, Obi-Wan, you're my only hope ... ;-)
     
  9. phoen

    phoen

    Joined:
    Oct 25, 2005
    Posts:
    94
    Im sorry, cant find anything.
    Have you tried creating a new project or reimporting the standard assets?
     
  10. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    Yup. A couple of times, in fact.

    Oh well, maybe Joe or Nich will reply eventually. They seem to know Unity pretty well. ;-)

    Thanks for your help!
     
  11. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Try the following:

    1. Create a new project and select import the Standard Assets package
    2. Create a cube and give it a scale of 10, 1, 10
    3. Drag Drop the projector into the hierarchy view
    4. Select the instantiated prefab. In the scene view you will now see the yellow gizmo of the frustum of the projector. This gives you a hint where the blob shadow will be projected on.
    5. The easiest way to align it so it looks at the ground cube, is by placing the scene view camera so it looks at the ground. Then select the projector and use the menu Game Object -> Align With View .
    6. Make sure that the projector is not too far away from the ground. You can also modify the far clipping plane of course. The shadow is setup to fade out over distance, so towards the end of the frustum it's almost invisible.
     

    Attached Files:

  12. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    Thanks, Joe!

    This sounds pretty much like what I did and fgured out. I did do it all in an existing project though - maybe something in my scene is interfering with the blob in some way?

    I'll give you're steps a try later today and will post again to the forum with my results.

    Thanks a million for your help!
     
  13. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    Well, it worked.

    The only thing I did differently was starting with a new project instead of an old one. But, now it works. And, "Wow!", by the way!

    I guess just placing the "Standard Assets" folder in the project folder of an existing project doesn't bind the assets completely? That's the only thing different between the workflow that didn't work and the one that did.

    Anyway, to anyone watching this post who hasn't played wth blob shadows, give it a whirl. It's way better than "shadows on a plane" (i.e. it doesn't fail on sharp edges, no extra rayCasts)!
     
  14. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    There is one important rule in unity.

    NEVER copy files in a unity project around using the finder.

    Unity stores a lot of meta data with all it's assets. This can be import settings for a texture or maya mb file. Or simply references to other files in the same project. Eg. a material referencing a texture, a prefab referencing a material.

    References to other files are not based on path names in unity. This allows you to move files around arbitrarily and things still just work.

    This is extremely nice when you have a project which became very messy over time and it is time to clean up. You can rely on that moving files around will just work. And you don't have to wait until your next project to keep your project folders clean and easy to maintain.

    The only thing you have to do is, move files around in the unity GUI and not in the finder.


    The drawback is, you can't just copy&paste files in the finder from project to project.

    So if you want to copy files from one project to another use Assets -> export package and Assets -> import package.

    That will copy all the meta data and retain all references to other files.
     
    spresur likes this.
  15. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    Well then, I guess that explains it. ;-)

    Thanks for the important tip, Joe! Guess I need to read those docs one day.