Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by KnC_Studios · Sep 02, 2013 at 03:40 PM · fpsshadowsinvisible4.2

Invisible object cast shadows.

Hi, I have recently upgraded to the FREE version of unity 4.2. I have a fps with the standard controller and want to implement shadows. Everything works fine except I want to layer a soldier on top of my regular capsule. It cast shadows but it gets in the way of the camera. Can I make invisible to the camera AND still cast shadows? Thanks.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image KnC_Studios · Sep 02, 2013 at 07:07 PM 0
Share

Bump, help me please.

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by CHPedersen · Sep 02, 2013 at 07:15 PM

How you're able to cast shadows with the free version of Unity, I don't know. It isn't supposed to be supported in Unity Free, but maybe I've misunderstood something in your question. ;)

Anyway, to have an invisible object cast shadows, you need a custom shader. I did a quick google and managed to dig one out here. Have a look at this:

http://answers.unity3d.com/questions/269292/having-an-invisible-object-that-casts-shadows.html

It looks like that does pretty much exactly what you need.

Comment
Add comment · Show 7 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image KnC_Studios · Sep 02, 2013 at 08:36 PM 0
Share

I cannot do shaders in unity free. BTW in unity 4.2 the free version can do shadows with directional lights.

avatar image CHPedersen · Sep 02, 2013 at 08:39 PM 0
Share

Nonsense. :) Shaders are perfectly supported in both Free and Pro. See license comparison under Graphics:

http://unity3d.com/unity/licenses

avatar image KnC_Studios · Sep 02, 2013 at 08:40 PM 0
Share

Wonderful! But I can't seem to add one to the object.

avatar image CHPedersen · Sep 02, 2013 at 08:46 PM 0
Share

Have you created the custom shader yet? If not, follow these steps:

Right-Click the project pane, select "Create" and "Shader". You will get a new shader file that has a shader stub in it. Open this file, and delete the shader stub. Copy-paste the short shadow-casting shader from manutoo's answer in that Unity Answers post I linked to. Save the file.

Next, create a new $$anonymous$$aterial, then choose the shader you've just created to render this material. It will be under the Transparent group. Put this new material on your first person (and make sure it's the only material on the character). It should now render invisibly, yet cast shadows, provided they work with the directional lights as you mention.

avatar image KnC_Studios · Sep 02, 2013 at 08:53 PM 0
Share

Thank you so much! Works like a charm.

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

18 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

how can i render an object (like a gun in a fps game) on top of everything (like showing it even if i went into a wall) with recieving shadows on it? 0 Answers

Make a mesh invisible but still cast shadows 1 Answer

newbie here [NEED HELP] 2 Answers

Casting shadow, without rendering the light itself??? 2 Answers

do you know what version of unity was released in the end of 2012? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges