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 noanoa · May 21, 2014 at 10:56 PM · shadermeshlightingmaterial

How to light back side of quad mesh same way as front side?

Normally, when lighting effect applied to quad/plane(or any paper) mesh, one side is bright and the other side becomes darker. But I want both sides of the mesh to be lit as if both sides are facing light source to make them brighter for some game scene.

I assume this is shader's work but I've never written one so have no idea where to start. Could anyone give me some hint? Thanks.

[Edit] When I tried Cull Off shader with quad/plane mesh, it did give both sides of the mesh same lighting but when the front-side is not lit, neither does the back-side.

alt text

culloff.jpg (62.1 kB)
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 Clet_ · May 22, 2014 at 12:20 AM 0
Share

Do you really need light? If not, you can go with an unlit shader that is built-in in Unity. If you do, then yes, shading is the way to go.

If you're new to shder code. I'd suggest taking a look into this tutorial

avatar image Kiwasi · May 22, 2014 at 12:21 AM 0
Share

To make everything light up evenly you can use to directional lights in opposition to each other

avatar image noanoa · May 22, 2014 at 02:57 AM 0
Share

Yes, light has a big role in my game. I can't use ambient color or directional lights because the scene takes place in night and it should be complete dark where lights are not lit.

1 Reply

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

Answer by Eric5h5 · May 22, 2014 at 12:38 AM

Just use a single-sided quad and put "cull off" in the shader. Then both sides will be rendered with the same lighting.

Comment
Add comment · Show 3 · 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 Clet_ · May 22, 2014 at 01:18 AM 0
Share

Didn't know that. Very useful tip

avatar image noanoa · May 22, 2014 at 03:04 AM 0
Share

It partially worked but when the active side doesn't receive light, same goes to the other side -.- I have uploaded a picture

avatar image noanoa · May 22, 2014 at 03:31 AM 0
Share

It seems setting dummy blank normal map with "cull off" fixed this problem. I have no idea why... I will accept and close the question after testing a little more

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

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

Related Questions

Odd shadow effect, help! 1 Answer

Lighting problem 0 Answers

How to create light like in minecraft? 1 Answer

Semitransparent shader not visible in front of objects 1 Answer

Custom Sprite Shader Ignore Light 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