Search Unity

Character Shadow in Gooball

Discussion in 'Editor & General Support' started by Jonathan Czeck, Jul 10, 2005.

  1. Jonathan Czeck

    Jonathan Czeck

    Joined:
    Mar 17, 2005
    Posts:
    1,713
    Would anyone care to share the generals on how the shadow on the Gooball character was done?

    Thanks,
    -Jon
     
  2. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    It looks like it's just a plane-mapped "fake" shadow.

    If that's the case, they have a plane set up to follow underneath the Goober, to which they've alpha-mapped an shadow-ish image. The perspective-offset of the shadow from the "sun" is calculated lens-flare style.

    Since we're talking shadows, I'm hoping Unity 2.0 gives us stencil shadow support.
     
  3. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    The gooball shadow is a simple projected texture with material.

    We were using the Projector class for this purpose.
    You can assign a Material to the Projector. This material gets projected onto all objects hit by the projector.

    We haven't had the time to make the Projector class user friendly yet.
    The shaders you have to write for it are rather hard. So we will provide premade shaders for use by the Projector and we will make it simpler to create custom shaders for the Projector. We will work on this for version 1.1.


    The projector class is really cool though. You can do a lot of nice effects with it.

    For example:
    Setup a camera to film one part of your scene and have a 3 line script to render it into a render texture instead of the screen.

    Then you use the projector to project it onto all objects in it's frustum. Well just like a real projector.

    And then you of course want to attach the camera to a rigid body so you can knock it over.
     
  4. guategeek_legacy

    guategeek_legacy

    Joined:
    Jun 22, 2005
    Posts:
    659
    So your saying with the render to texture thing we could say create a sniper rifle with a scope on it. have a camera conected to the end of the scope and have what that camera sees rendered to the texture for the eye pice of the scope so that when your running around with the sniperrifle not using the skope it would still actualy show what the scope would be seeing (sort of like in Far Cry) if so then thats sweet. Jeff
     
  5. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    You can do the sniper camera much simpler. Just create another camera.

    You can make cameras render only to a part of the screen. Just like the 3 cameras aarku did here:
    http://www.tc.umn.edu/~czec0035/unity/unityrobot/

    Using the depth property you can change which camera gets drawn first.
    And then you would just use a different field of view for that camera.


    What i meant was that you can film one part of your scene and then project it onto all objects with the projector.
    Just like the real thing. You film something with a camera and then use a projector to project it on a screen. Just that the screen can be arbitrary geometry.
     
  6. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    Wow, like a "gobo" but with a bitmapped texture - how cool!

    You guys crammed so much innovation into Unity - I can't wait to see what else is hiding in there!
     
  7. Jonathan Czeck

    Jonathan Czeck

    Joined:
    Mar 17, 2005
    Posts:
    1,713
    Yeah, you can tell it's more sophisticated than that in Gooball if you go up to a wall or are on a curved surface something you can see the shadow deforms just how it should.

    Looks like I'll be waiting to try the Projector out until some shaders are out for it. :)

    I'll start thinking of wacky things to do with it in the mean time.

    Cheers,
    -Jon
     
  8. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    Agreed.

    I was just looking at GooBall screenshots before, but after that post on the funky projector stuff, I booted up the game and watched the shadows - not a good high-score strategy, BTW.

    Anyway, WOW! They are amazing, aren't they! Way better than mapped, or even stenciled, shadows.

    I can't wait till' they get those ready-made shadow shaders done! I can't believe we'll get shadows that realistic just by using a shader! Viva la Unity!
     
  9. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Well. For around 2 years we thought working on the cool stuff is a lot more fun. So we did that. Then we thought, hey maybe we should make unity so not only we can use it.

    So once you get past the initial learning curve and know a bit about shaders. You will have an entire world to explore, you can abuse unity in so many ways we never imagined, its insane.