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
1
Question by Jessespike · Sep 02, 2012 at 07:42 PM · playerfpsmodelshadowshide

FPS Game: How to hide player model but still have shadows

I'm trying to make a simple FPS and having a little trouble with aesthetics. I have a Player GameObject that contains a Camera and a Model. When I play, the model casts a shadow on the ground, and I can also see the model from my camera. I want to hide the model but I still want the shadow on the ground. How would I do that?

I tried a few things that I thought would work, but haven't had any luck yet.

  • I tried setting the model to a new layer and instructing the camera to cull the layer the model is on, but the shadows disappear. I even made sure the light isn't culling the new layer. I thought this would work... (I can see the model and shadow in the Editor window, but my camera ignores both)

  • I then tried to write script that would hide the model on PreRender and show on PostRender, hoping the lighting effect would happen, but it didn't..

My next idea is to write a shader that renders the model invisible-like, but I think I'm over thinking it. What is the general approach to achieve this effect in Unity?

Comment
Add comment · Show 3
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 reptilebeats · Sep 02, 2012 at 10:16 PM 0
Share

u could try one of the built in shaders to make the model transparent, but i dont have realtime shadows so i cant test anything to help

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

Would like this answered. I have the same problem.

avatar image reptilebeats · Sep 02, 2013 at 10:06 PM 0
Share

i use strump to simply cut out the alpha and it still projects the shadow

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by DESTRUKTORR · Sep 02, 2013 at 08:45 PM

Google is pretty awesome, eh? XD This answer should answer your question.

http://answers.unity3d.com/questions/285847/transparency-shader-that-allows-shadows.html

Comment
Add comment · 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

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

10 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

Related Questions

FPS - Full body player model 1 Answer

FBX models move along with the fps character when played 0 Answers

Blender animation into unity problems 1 Answer

Creating a 3rd Person Character (Not a modeling question) 1 Answer

Problem with camera and animations in making a Unity FPS 2 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