Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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
3
Question by qhhh · Apr 14, 2010 at 09:57 PM · renderinggraphicsoptimizationshadow

Is it possible to use a different mesh for shadow casting than for normal rendering of an object?

I'd like to use a less detailed mesh to approximate the shadow cast by a highly detailed mesh.

For example a character in the game would use a detailed mesh to render the character and a less detailed mesh to render the character's shadow. This approach would presumably speed up the shadow rendering pass.

Comment
Add comment · Show 2
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 cregox · Nov 06, 2012 at 05:14 PM 0
Share

maybe this helps: http://answers.unity3d.com/questions/31087/shadow-on-plane-for-iphone.html

avatar image Louis-N-D · Dec 19, 2014 at 08:16 PM 0
Share

I'm actually considering using a similar technique. But I want to use it mostly to break my characters up into solid shadow proxies that are parented to the character's joints. I figure, since skinned objects don't batch, this could allow all the shadow casting objects for the characters to get batched together during the shadow rendering. This would also give me the opportunity to simplify the shadow casters, of course.

2 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by Whimsical · Jul 24, 2010 at 06:51 AM

What I do in such a case is to add a low detail object as shadow proxy to my scenes and assign an alpha cutout shader to it and pull the cutoff value up to full. This makes the shadow proxy object invisible to the camera but is still casting a shadow. Of course, you have to switch off 'receive shadow' on the proxy and 'cast shadow' on your high poly object to make this work the way it should.

Comment
Add comment · Show 2 · 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 adkkda · Nov 14, 2011 at 11:55 PM 0
Share

Sorry to resurrect this but try as I might I can not get this to work as you describe Whimsical. When I apply a transparent>cutout>diffuse the shadows of the proxy always disappear as the cutoff is ramped up. I need one object to be visible (& not cast shadows) while another is invisible (& casts proxy shadows). Hopefully someone can give me a point in the right direction. Cheers

avatar image Ludeme Games · Jan 09, 2013 at 08:25 AM 0
Share

I also have trouble with this method but would quite like to be able to do this.

avatar image
1

Answer by Eric5h5 · Apr 14, 2010 at 11:20 PM

I think there would need to be something like a Camera.OnRenderShadow function for that to work, but unfortunately there isn't. However, the shadows are already rendered without lighting or anything, so it's just polygons, which isn't much of a speedup except on very low-end cards.

Comment
Add comment · Show 2 · 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 Jessy · Apr 15, 2010 at 10:17 AM 0
Share

I have no experience with dealing with this. However, I must say that I saw this technique being used a LOT on the last generation of consoles. Even the PS2's best-looking series, God of War (including the 720p version on PS3) used extremely blocky geometry for shadows, at least on the main character. So if those guys used it, I'll have to assume it's worth doing sometimes. Then again, the PlayStation 2 is ten years old, so as Eric says, we're probably talking very low-end there.

avatar image Whimsical · Jul 24, 2010 at 06:56 AM 0
Share

I really think that you are right with telling us that this will not speed up the shadow rendering process by a lot, but it does a bit. Filling polygons is still work, even though there's no light and anything rather complicated to do for the graphics hardware. But still, it has to fill those polys every frame. I had some high-poly-scenes where using this technique resulted in a 10% decrease of time taken to render each frame.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Graphics.DrawMesh receive shadows but not cast? 1 Answer

Why is the CPU usage so high? 1 Answer

Why does my game require so much rendering power? 1 Answer

Directional Light shining on invalid objects 0 Answers

Good Soft Shadows with HDRP 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