Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 JeffreyVentrella · Jun 22, 2016 at 05:07 AM · script.texturesambient lightquadsno lighting

Bright, flat-rendered textures with NO lighting (no shading) - in C# code

Hello!

I am developing a scene that has several quads with textures (images) on them. Everything is being generated entirely in C#.

I need the textures to be completely flat-shaded - with no lighting. I removed the light source from the scene, which made everything dark (not surprising :) But my question is: how can I make the textures clear and bright (as if there were overall, non-directional ambient lighting in the scene)? I suppose I could add a universal ambient white light source and turn off shadows, but isn't there be a simpler way if I just need flat textures that appear similar to their original colors?

Thanks!

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 Cherno · Jun 22, 2016 at 11:24 AM 0
Share

What could be simpler than using only ambient light?

avatar image JeffreyVentrella Cherno · Jun 22, 2016 at 04:39 PM 0
Share

That's a non-answer. $$anonymous$$y question was about how to do this in Unity as opposed to talking about it like a philosopher. I think this is a Unity-related web site if I'm not mistaken.

avatar image Cherno JeffreyVentrella · Jun 23, 2016 at 06:50 PM 1
Share

Of course it's a non-answer, that's why I posted it as a comment, not as an answer. The question was meant in earnest. I wanted to know why you regard the ambient light method as so relatively complicated that you search for other solutions. If it becomes apparent that you implement this feature in a way that is more complicated than neccessary, maybe we can help with that. So as you can hopefuly see, I was trying to help and had put more thought to it, I didn't want to be a wiseass.

Happy coding!

1 Reply

· Add your reply
  • Sort: 
avatar image
13

Answer by tanoshimi · Jun 22, 2016 at 07:27 PM

Assign the Unlit/Texture material to your quads.

Comment
Add comment · Show 4 · 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 JeffreyVentrella · Jun 22, 2016 at 08:18 PM 2
Share

I am looking into deleting my account on Unity Answers. Too many answers are lazy and unclear. I don't get a sense of $$anonymous$$cher's pride among the people spitting out their quick pseudo-answers. I spent extra time and attention trying to craft my question to be precise.

Either don't answer the question (please), or spend the time to respond in-kind. I am a big fan of code examples, because - at the very least - I can try the code snippets, and let the compiler help me get it right. However: vague, haiku poem-like answers are generally not useful in a program$$anonymous$$g environment...unless you and I already share the same knowledge-base and vocabulary. And I'm sure we don't. There are many assumptions in each word in your haiku poem. I love poetry, but we are dealing with a precise technical environment.

We could all make this knowledge-ecology better, simpler and clearer if we each put in a bit more effort, to strive for excellence.

I came across this page:

http://answers.unity3d.com/questions/432710/meta-unity-answers-is-degrading-.html

It gave me validation for why I am thinking of deleting my account. -j

avatar image tanoshimi JeffreyVentrella · Jun 22, 2016 at 10:51 PM 5
Share

I'm not sure how my answer is considered lazy, when it contained everything you need to know. You could also have found that by reading this manual page: https://docs.unity3d.com/$$anonymous$$anual/$$anonymous$$aterials.html

Seeing as you seem unwilling to research how to apply what I described, I'll just tell you:

 GetComponent<Renderer>.material.shader = Shader.Find("Unlit/Texture");

I can't show you where to put it since you've included no code in your question. Perhaps reading https://docs.unity3d.com/ScriptReference/Shader.Find.html would help.

avatar image MaxGuernseyIII JeffreyVentrella · Nov 03, 2017 at 05:51 AM 0
Share

This answer is hardly degrading although it does make some assumptions about the knowledge of the reader. If you check the FAQ (to the right), I think you'll see that those assumptions are more in line with the intent of this medium than they are in conflict with it.

avatar image rjeike · Nov 03, 2017 at 05:01 AM 2
Share

JeffreyVentrella, the value of this forum is the answers, so let's be nice to those that take the time to answer our questions even if you need more information to be able to heed their advice. Simply asking for more details in a comment is more effective than a rant about answer quality directed at someone trying to help you.

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

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Im changing textures on my materials for all the objects in the game, but not all the changes happen on runtime. 0 Answers

Two textures on a sphere depending on latitude 0 Answers

Quad texture showing in inspector, but not on object itself. 0 Answers

I can't use Rigidbody2D in my scripts, I can't find rigidbody2d in my script 3 Answers

Running animation not working and jumping isn't working. 0 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