• 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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



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

Lighting problem 0 Answers

Odd shadow effect, help! 1 Answer

Static+Real Time lighting in Angry Bots Demo 1 Answer

LWRP Lightmapping issue in 2019.1.11f1 when using emissive materials 0 Answers

Shader graph shader won't pick up lighting 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges