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 EmmetOT · Jul 26, 2016 at 08:31 AM · 2dtexturepixelefficiency

Cheapest/Easiest way to just draw a bunch of pixels right to the screen

Hey! I'm making a simple pixelly world map creator and I'd like to know what's the most efficient way to draw individual pixels. I need to maintain individual control over each pixel, as each directly corresponds to a 'cell' which will have map values such as height, habitability, temperature, etc.

I've tried two approaches.

The first was having a simple square quad prefab which I could then instantiate a bunch of and custom colour. This had the advantage that each pixel could store its own values.

I thought it'd be cheaper to simply have one large, screen-filling quad and change its texture directly, but surprisingly I found it to be more demanding. (Though it occurs to me now that maybe I could make the camera view really small so that each pixel corresponds to an actual texel.) Is there an extremely obvious approach I'm missing? Still pretty new to Unity. Thanks!

Anyway, this is an idea of the kind of view I want. (This is just a bunch of randomly generated map regions, each randomly coloured.)

alt text

map.png (43.0 kB)
Comment
Add comment · Show 2
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 leoncioufpr · Aug 26, 2020 at 10:54 PM 0
Share

Hey $$anonymous$$an, did you solve this problem? Because i want to draw exactly 1280x720 pixels and manage each one. If I instantiate each pixel as a gameobject that doesnt work fine (very heavy). Thanks

avatar image ShadyProductions leoncioufpr · Aug 27, 2020 at 08:33 AM 1
Share

Just draw to a sprite's Texture2D using GetPixels and SetPixels?

https://docs.unity3d.com/ScriptReference/Texture2D.GetPixels.html

https://docs.unity3d.com/ScriptReference/Texture2D.SetPixels.html

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Perfect 2d image 1 Answer

Rotated Pixel Textures 1 Answer

Clear, Crisp pixel textures for a 2D RPG 2 Answers

Anti aliasing with sprites 0 Answers

2D: Irregular shaped window to another world? 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