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
0
Question by Mr_Happy_Pixel · Oct 23, 2017 at 06:25 PM · camerarenderingcolorrgbrgba

rgb value detail

I have a silly question , how can i force a camera to olny display color to a certan detail. for example if i wanted to make a game that olny render n^3 colors this would require that rgb values be rounded to the nearest multipul of n.
My apoligys for incorect spelling.
thanks in advance

Comment
Add comment · Show 6
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 Bunny83 · Oct 23, 2017 at 08:16 PM 0
Share

Sorry but you have to ask your question in a way it's clear and understandable. That has nothing to do with bad spelling but simply bad explanation. "n^3" usually refers to "n to the power of three" or to the bitwise xor operator. I don't see how any of those two meaning would make sense here. What is "n"? If n should be the "number of shades" what does n^3 mean?

Please spend a little bit more time on explaining the question. You expect us to spend time to figure out what you actually want and to write an answer for you ... Feel free to edit your question.

avatar image Cherno · Oct 23, 2017 at 09:05 PM 0
Share

I'd say, use a replacement shader or image effect for the camera that that does what you need.

avatar image Mr_Happy_Pixel · Oct 26, 2017 at 04:23 PM 0
Share

@Bunny83 i feel im being clear.I want my game to round to the nearest of n^3(being n*n*n) colors, or example 64.If we olny want 64 colors the rgb values displayed by the screen would have to multaple of n ,n being the cube root of the number of colors you want to be able to render, i we want to have 64 colors n will be 4.

avatar image MacDx Mr_Happy_Pixel · Oct 26, 2017 at 04:59 PM 0
Share

Wat? Why would you want to programmatically force a camera to render less colors than it can?

avatar image Mr_Happy_Pixel · Oct 26, 2017 at 11:32 PM 0
Share

@$$anonymous$$acDx for stylistic reasons, you could use it to make you game look like it was made in the 16 bit era

avatar image MacDx Mr_Happy_Pixel · Oct 26, 2017 at 11:57 PM 0
Share

Ah I see

You don't override the camera's rendering capabilities to achieve that. Ins$$anonymous$$d, you use images for your sprites and textures that only contain 16 bit colors, use 16 bit format compression. Use pixel art with low resolution images, etc. Style mainly comes from shaders (making your own or using the ones unity provides), lighting and texturing .

With that being said if you still insist on doing it that way, what you could do create a script that has the OnRenderImage(RenderTexture src, RenderTexture dest) method and attach that to your camera. Then inside that method call Graphics.Blit(src,dest,mat); where mat is a material field that has a custom image effect shader. Such a shader will take each pixel in the image that the camera already rendered and then change it to whatever you want. The default image effect shader Unity gives you when you create a new one is a shader that inverts every color.

You would be implementing a post-processing effect.

0 Replies

· Add your reply
  • Sort: 

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

111 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 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 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 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 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

How do I have multiple cameras that have a black and white view in one while the other shows a color at a certain time on a certain object? 0 Answers

Efficient Way to Get Pure RGB Data toCSV 0 Answers

Convert RGB to RYB color scheme? 0 Answers

prefab rendering on top of its parent? 0 Answers

Randomly Transition Camera Background Color? 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