Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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
6
Question by VIoletIlluser · Aug 26, 2010 at 03:56 PM · textureterraingrassline

Weird line in my grass textures?

Every time I make a grass texture and paint with it, a weird line keeps showing up on the left side of the image (it's yellow, sometimes black). I've checked to make sure there's nothing actually there in Photoshop, tried making multiple different files saved different ways... and nothing. It still gives me that stupid line. alt text

Anyone have any idea why this is happening? :/

UPDATE: I don't know if this is the cause or not, but I know a lot of times you have a background color under the foliage/grass/whatever that's similar in color to help prevent weird/glowing outlines around the foliage/grass/whatever. I wasn't thinking about that since the issue is so far from the subject of the texture, but I haven't been doing this. I've been having issues keeping the alpha intact when I add a background color on another layer. If anyone could help me with saving the file out of Photoshop properly (we're using .png), I can at least see if this helps.

While I wait to see if I get an answer to the above and see if it helps, I have found a temporary "fix." I just applied the texture to a poly plane with its UVs slightly smaller than max, so it cuts off the line, and I loaded it as a detail object instead of grass. From some angles you can still see a small line, and this isn't the most ideal solution, but it works well enough for now. I have other fish to fry and will just have to revisit the issue later.

Comment
Add comment
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

6 Replies

· Add your reply
  • Sort: 
avatar image
7
Wiki

Answer by Deicoon · Sep 25, 2010 at 02:45 AM

All the maps for grass and detail objects are compiled into one map. If you have detail textures without alphas or with all white alphas they'll bleed into your grass textures! If you don't need alphas in your detail textures just go into Photoshop and add a channel in the channels panel and make sure it's black. Turn on all of your channels including the alpha. Your texture should have a red tint to it but don't worry it wont look like that in Unity. Save it as a 32 bit alpha and make sure when you bring it into Unity it interprets it with an alpha. Replace the old texture with the new one in your detail mesh. Once all your detail meshes have alpha, edit one of your detail meshes or grass textures and it should update. Now the lines in the grass textures should be gone!

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 Dealzu-The-Wikid · May 13, 2013 at 03:57 PM 0
Share

Thanks Deicoon, it was one of the rock detail meshes I was using causing this issue in Unity 4.1.

avatar image maxmakesascene · Nov 18, 2016 at 03:03 PM 0
Share

Thanks so much for this response. Nothing else was working. As soon as I added an alpha channel to one of my other details, the weird artifacts went away. You rock!

avatar image DougRichardson · Nov 04, 2017 at 12:51 AM 0
Share

Le sigh. I only found @Deicoon's correct answer after figuring it out myself. In case anyone is interested, I made a video that visually demonstrates the problem: https://www.youtube.com/watch?v=77yxVxk9Udo

avatar image SomeGuy22 · Feb 02, 2020 at 08:19 PM 0
Share

10 years later and this still helped me out. I figured it was an atlasing issue but moving my UVs was not enough to fix it, so I did this channel trick. In case anyone stumbles across this when you save a png from photoshop for some reason it doesn't like actually giving you the alpha channel. So I created a blank channel using the "new" button, made sure it was black, then saved the whole thing as a .tif with default settings. It appears black in photo viewer but Unity interprets it correctly and shows the alpha channel. Use the refresh button on terrain after editing your material and the artifacts should be gone :)

avatar image
3

Answer by 3dDude · Aug 26, 2010 at 04:34 PM

you could try settings your wrap mode in the texture to clamp... and just playing around with the import settings

Comment
Add comment · Show 2 · 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 VIoletIlluser · Aug 26, 2010 at 04:58 PM 0
Share

I've messed with the import settings as well, but nothing changes. Thanks, anyway.

avatar image spinaljack · Sep 25, 2010 at 02:55 AM 0
Share

This is the correct answer

avatar image
1

Answer by jtbentley · Aug 29, 2010 at 02:36 AM

It's mipmapping.

Either turn off mip-mapping on the grass material, or pull the UV's in about 8 pixels from the side of the map.

Remember, mip-mapping halves in size per level, and obviously, as you blur a texture more, artefacts from that will become more noticable :)

Comment
Add comment · Show 1 · 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 VIoletIlluser · Aug 30, 2010 at 10:17 PM 1
Share

It's not mip-mapping. I've messed with it and turned it off many times and it doesn't do anything to fix it. The closest I've got to fixing it was pulling in the UVs/scaling them down a little, as I said in my update, and as you suggested. Even then, there's a small line at some angles, but it's not as noticeable. It's workable, at least.

avatar image
1

Answer by msgamedev · Feb 08, 2012 at 10:28 PM

My solution to that problem:

In photoshop (or the software u use) make sure, that the painted object e.g., grass, is lifted a few pixels upwards from the bottom, also make sure that theres enough room to the other edges.

now export it to Unity.

ATTENTION: U wont see any change in the editor for now, cause u first have to close Unity and reopen it. Voila, the line above ur grass should be gone (at least it worked for me this way)

Comment
Add comment · Show 1 · 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 Jaqal · Dec 30, 2014 at 04:37 AM 0
Share

This is what helped me after nothing else worked. Thanks!

avatar image
0

Answer by Thom Denick · Aug 26, 2010 at 08:25 PM

I've seen artifacts like this (just ran into one today) when the spacing in my Sprite map isn't large enough. If you are using SM2, you can set the distance between your sprites to 4 to see if that resolves it. If you're not using SM2, make sure you have a bit(4px) of trim on each side of your sprite before you import it.

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 VIoletIlluser · Aug 26, 2010 at 09:18 PM 0
Share

I guess I'm not using S$$anonymous$$2, because I honestly don't know what that is. ^^;

I did shrink the grass a little to make sure there was more room on the sides, but it didn't help, unfortunately. Thanks for the suggestions, though.

avatar image VIoletIlluser · Aug 27, 2010 at 02:08 AM 0
Share

Well, I feel stupid after that last answer. I'm not actually using a sprite sheet. I just made a basic texture.

avatar image Thom Denick · Aug 28, 2010 at 03:41 AM 0
Share

Sorry - S$$anonymous$$2 is Sprite $$anonymous$$anager 2. Thought I'd give it as hot, since I had just resolved a similar artifact problem with my sprites.

  • 1
  • 2
  • ›

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Can I use the original grass texture? 0 Answers

Terrain - m_PreloadTextureAtlasData.size () == m_DetailPrototypes.size () 2 Answers

Terrain Grass texture transparancy not working 0 Answers

my terrain details are rendering black when not having a back geometry in VR 2 Answers

Weird lines on the grass texture 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