Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
2 captures
13 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
1
Question by pepperedereppep · Mar 01, 2011 at 12:14 AM · iphoneperformanceshadow

fake shadow with least performance hit

Hello all, Looking for the best way to create a shadow effect without losing too much on the performance side, preferably nothing :). Here's what I'm doing:

This is a shadow for a square. That's it. the shadow should move with the square, but the quality is pretty much irrelevant as long as it has some falloff and it's a square shadow moving with the square mesh, so no realistic shadow effects needed. this is a 2d game so you will never see the shadow from any other angle.

Any help would be appreciated

EDIT: In response to people posting about the blob projector,would a blob projector be less memory intensive than just an image of a square that has an alpha?(since this is a 2d game, the shadows don't exactly have to project)

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

4 Replies

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

Answer by Eric5h5 · Mar 01, 2011 at 01:21 AM

Assuming the ground is flat, use a quad with a transparent texture for the shadow. Blob shadows can be expensive because they re-draw the entire object even if the shadow is projected just on a small part of it.

Comment
Add comment · Show 1 · 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 pepperedereppep · Mar 01, 2011 at 02:49 AM 0
Share

thanks for the answer!

avatar image
0

Answer by Rolo · Mar 01, 2011 at 12:22 AM

check the lerpz tutorial for blob shadow.

http://unity3d.com/support/resources/tutorials/3d-platform-game.html http://download.unity3d.com/support/resources/files/3DPlatformTutorial.pdf

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
avatar image
0

Answer by e-bonneville · Mar 01, 2011 at 12:23 AM

Use the Blob Shadow Projector if you just need a fake square shadow with nice falloff.

Comment
Add comment · Show 1 · 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 pepperedereppep · Mar 01, 2011 at 12:35 AM 0
Share

thanks for the response. please see the edited comments

avatar image
0

Answer by Bunny83 · Mar 01, 2011 at 01:23 AM

Well, i'm not 100% sure how the projector works internally, but i think he just add the projector material to all objects in his frustum and adjust the uv-coordinates accordingly.

Performance is relative. The projector may have more cpu usage, while a seperate plane can cause another draw call. If you develop for iPhone (I'm not an iPhone dev.) it's important to keep the draw calls low (very low: around 20 what i've heard). In the end it depends on the platform and hardware you develop for. Sorry but can't say much more on that.
Maybe Eric can enlighten us. ;D

Comment
Add comment · Show 1 · 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 Eric5h5 · Mar 01, 2011 at 03:12 AM 1
Share

"20 draw calls" was more or less appropriate in 2008; the iPhone has advanced several times since then, and there isn't just one model anymore. Also, that isn't really how projectors work, and using a projector adds another draw call for each object it touches.

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

No one has followed this question yet.

Related Questions

Low frame rate with only one texture on iPad 4 Answers

ex2D performance 1 Answer

Lagging on iphone 4 while worked well on iPhone 3GS and 4S 1 Answer

How expensive are coroutines on iPhone? 3 Answers

Which way of doing 2D collision is faster? 1 Answer


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