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 Biggerplay · Feb 07, 2016 at 06:55 PM · lightingpixel artbump map

2d normal mapping with pixel game issue

I'm having issues understanding how bump mapping works with my 2D pixel art game. I've created a simple sprite, which is an blue square image with 2 smaller squares inside it. I then created a white/black rectangle normal map, and applied that as a material to the sprite and it's giving me this weird pixel effect.

I thought normal mapping, just made pixels in the sprite that are in the normal map images area, lighter or darker according to how bright or dark the pixels are in the corresponding normal map area? But instead it's creating pixel artifacts. I've played around with the settings and these artifacts don't seem to go away.

Both the sprite image and the bump map image are the same size 128x128.

Below are a bunch of images showing the effect and the settings I'm using. Any advice appreciated!

Image with basic material.

alt text

Weird pixel effect alt text

weirdeffect.png (230.1 kB)
spriteimagebasicmaterial.png (163.9 kB)
Comment
Add comment · Show 5
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 · Feb 07, 2016 at 10:44 PM 0
Share
  1. Unity uses Normal mapping, not bump mapping. Bump mapping was widely used in the late 90s and early 2000's, but today pretty much every 3D game uses normal mapping ins$$anonymous$$d.

  2. The colors of a normal map define how the shader reads the topography of the texture and thus, how bright a pixel should be depending on income lighting.

  3. A normal map has to be imported as a normal map in Unity.

  4. There is a free normal map filter plugin available for Photoshop.

  5. I suggest reading an introduction to normal maps, even the wikipedia page should be enough.

avatar image Biggerplay Cherno · Feb 08, 2016 at 12:05 PM 0
Share

I guess I'm a bit old school which is why I used the term bump mapping :)

The normal map was imported correctly, and is just a rectangle, divided into a white section on the left and a black section on the right. So it just has 2 colours, which I thought would just give me a very bright section of my image on the left and conversely a darkened area on my image on the right, but as you can see it's not doing that.

avatar image Cherno Biggerplay · Feb 08, 2016 at 04:50 PM 1
Share

What you describe is a bump map, which works like a height map, with colors from black to white. A normal map doesn't use this spectrum because it not only defines height of a pixel, but also direction of the slope (if any) depending on it's neighbors. Ins$$anonymous$$d, a spectrum is used that includes red, yellow, blue and green.

https://upload.wikimedia.org/wikipedia/commons/3/3b/Normal_map_example_-_$$anonymous$$ap.png

Show more comments

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

38 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

Related Questions

Making a more blocky lighting shader 0 Answers

Is it possible to create a light like this in unity? 1 Answer

Help with lighting needed 1 Answer

Pixels per Unit / Pixel Perfect Shadows, possible? 1 Answer

Lighmapping artifacts, and problem? HELP! 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