Jump to content


Photo

Can't shake the "jaggies"


Best Answer DPRoberts , 11 November 2016 - 09:58 PM

Jaggies Solved! (at least for me) and what I believe is occurring and how to fix it...
Test #1 - So, I went to a clean build and planted "grass_1" by itself - No jaggies (shorthand - NJ) . I replaced "grass_1" with "grass_2" - NJ. I did this for the remainder of grasses.
Conclusion #1 - each grass, by themselves, ie. the only grass swatch on the build, DO NOT produce jaggies

Test #2 - I planted "grass_1" - NJ, added "grass_2" - NJ, added "grass_3" - Jaggies to "grass_1", added "grass_4" - Jaggies to "grass_2"
Conclusion #2 - a grass texture added 2 swatches down may influence the presence of jaggies on said grass texture. In other words, Grass 1 will show Jaggies if there is an issue with Grass3

Test #3 - changing the grass texture 2 swatches down by shrinking the entire RGB image and alpha layer by 10% and doing nothing else will cure the jaggies on the grass texture showing issues.
Conclusion #3 - the grass texture images should not approximate the borders of the image. There should be at least a 20px border around the grass textures. I am accomplishing this by opening the texture in photoshop and selecting the background layer, choosing SELECT ALL and Transform>Scale and changing W and H to 90%. Then choosing the Channels tab and selecting ALL on the "Alfa 1" layer and doing the same and resaving. You may want to choose a different name if you want to maintain the original file. Inspect and set to Clamp instead of Repeat (not sure if this matters but it won't hurt). Then, replace in your planting swatches and watch the jaggies from the planting 2 swatches up disappear. I may post a quick video on my Photoshop process as I also select the main background color when scaling the background layer so not to get an odd colored border. (no idea if it would really impact or not but is cleaner)
Planting #1 and #2 - NO JAGGIES
MQP6hMm.jpg
Added Grasses #3 and #4 and Grass #1 and #2 start to show Jaggies (Grass #1 not in this image, just believe me)
kw5sSLL.jpg
Added Grass #5 and Grass #3 starts to show Jaggies
xsH2fO9.jpg
FIX Grass #5 as I stated above and Grass #3 no longer shows Jaggies - Boom! Obviously, fixing grass #4 will do the same for grass #2 and so on.
TnmbdwN.jpg

Thanks for suggestions. As usual, K11s intuition was correct and this was not an Alpha issue. Hopefully, Mike may notice this as it is an easy solution and could be added to the next CF update for the grass textures. I have done this on all of them and could provide that for now as a .zip if it is not frowned upon by Mike. Go to the full post


  • Please log in to reply
24 replies to this topic

#1 DPRoberts

DPRoberts

    Advanced Member

  • Members
  • PipPipPip
  • 1,610 posts

Posted 11 November 2016 - 04:36 AM

I have a terrain plant "jaggy" issue that I can't seem to shake. I have one planting "grass20a" (may have originally been grass20?) that has the horizontal floater. I've added a 50px region of space below all the plantings that I am using and have decreased my alpha layers to 1-2 px smaller than the RGB image without success. Dilated a plenty as well. I've read that the images get combined into an atlas and the grass that shows the issue may be the one above it. Any ideas if the atlas can be viewed so as to flush out the rogue planting? (It's a more obvious annoyance with animation than in the stills)

rW6FJ6Z.jpg

Plant with the issue

55i8keo.jpg



#2 Kablammo11

Kablammo11

    Obscure Person

  • Members
  • PipPipPip
  • 3,953 posts

Posted 11 November 2016 - 08:55 AM

I take it you use ps files with an alpha layer? What worked for me in the past was to delete and re-create the alpha layer in the original file. And to set the Wrap Mode from Repeat to Clamp in the inspector. It's probably not a defective alpha, but some inner Unity mystery, as you suspect...

I still don't know why this happens, nor how exactly to deal with this, but I'm quite certain it can be gotten rid off. 


>>>>>>> Ka-Boom!





• Mulligan Municipal • Willow Heath • Pommeroy • Karen • Five Sisters • Xaxnax Borealis • Aroha • Prison Puttˆ

• The Upchuck   The Shogun  • Black Swan (•)

 

<<<<<


#3 Crow357

Crow357

    Advanced Member

  • Administrators
  • 4,670 posts

Posted 11 November 2016 - 11:51 AM

I see this all the time.  I thought it was just my graphics card.  I too use psd files with an alpha channel.


Win 10, i7-7700 @4.2 ghz, 16GB DDR4, EVGA GTX 1080
Swing Type: Tour Pro Wireless XBox 360 Controller.

#4 DPRoberts

DPRoberts

    Advanced Member

  • Members
  • PipPipPip
  • 1,610 posts

Posted 11 November 2016 - 01:44 PM

I take it you use ps files with an alpha layer? What worked for me in the past was to delete and re-create the alpha layer in the original file. And to set the Wrap Mode from Repeat to Clamp in the inspector. It's probably not a defective alpha, but some inner Unity mystery, as you suspect...
I still don't know why this happens, nor how exactly to deal with this, but I'm quite certain it can be gotten rid off.


Thanks. Yes, ps files with alpha. I somehow had 3 of my 15 plantings on repeat and so I changed to clamp, applied and reloaded in the planting swatch. Didn't fix so I'm guessing something in the Alphas. I tried a new alpha on the one I thought might be the culprit to no avail. I will just go systematically in a clean build loading the swatches one at a time and see if I can learn something. Eventually, it may be a bit of pixie dust and voodoo but I'm encouraged that it can be "cured". Was just hoping a round of Penicillin might be the simple solution.

#5 Kablammo11

Kablammo11

    Obscure Person

  • Members
  • PipPipPip
  • 3,953 posts

Posted 11 November 2016 - 01:54 PM

Try a png or a tga version? Perhaps rename the billboards.

If you feel experimental, switch one of your billboards out with one of the defective ones. Just open Edit, drag a new one into the box, replace the new one with the one you just overwrote. Takes seconds and I'm almost certain you should see a change.

Most likely, your alpha layer is not the issue - my money is still on a Unity gremlin like z-fighting. I did a tremendous lot of things back when and the occurrence disappeared without me understanding what was going on and why it went away.


>>>>>>> Ka-Boom!





• Mulligan Municipal • Willow Heath • Pommeroy • Karen • Five Sisters • Xaxnax Borealis • Aroha • Prison Puttˆ

• The Upchuck   The Shogun  • Black Swan (•)

 

<<<<<


#6 Acrilix

Acrilix

    Advanced Member

  • Members
  • PipPipPip
  • 1,832 posts
  • LocationBedford, UK

Posted 11 November 2016 - 03:23 PM

There are a lot of courses released that have this issue, so I'm guessing that at least one or more of the stock grasses in CF have this problem.


life ................... don't talk to me about life ................

#7 highfade

highfade

    Advanced Member

  • Members
  • PipPipPip
  • 1,749 posts
  • LocationSouth Africa

Posted 11 November 2016 - 03:27 PM

I also have that problem on Aloe Ridge, googled it, tried to fix it, gave up and just except it. Would be cool to have an easy fix though.

 

Reminds me a bit of spider webs that you get sometime


Intel Core i5-6600 CPU 3.3 GHz       Geforce GTX 1060        16GB  RAM       Windows 10 64 bit

Hazyview  (600m above sea level)    --   Nautilus Bay  (Revamp done)  --  Cape Fear  (TGC  adaptation)  --  Aloe Ridge  --  Nahoon Reef GC  --  Chambers Bay 

Abel's Crossing  --  Solitude Links GC


#8 Kablammo11

Kablammo11

    Obscure Person

  • Members
  • PipPipPip
  • 3,953 posts

Posted 11 November 2016 - 03:56 PM

There are a lot of courses released that have this issue, so I'm guessing that at least one or more of the stock grasses in CF have this problem.

 

I never use stock grasses and have had this issue way back at Willow Heath with my self-made grasses. Again: I think we can rule out something being wrong with the grass billboards themselves... If it were, all of them would be affected, not just some of them.


>>>>>>> Ka-Boom!





• Mulligan Municipal • Willow Heath • Pommeroy • Karen • Five Sisters • Xaxnax Borealis • Aroha • Prison Puttˆ

• The Upchuck   The Shogun  • Black Swan (•)

 

<<<<<


#9 DPRoberts

DPRoberts

    Advanced Member

  • Members
  • PipPipPip
  • 1,610 posts

Posted 11 November 2016 - 05:50 PM

That's why I would like to see the atlas that is generated (or I believe is generated). It sounds like they are all stacked onto one texture. If so, does the quantity impact it? Are they all crammed onto a single 1024x1024 and scaled to fit? Meaning 10 billboards could have higher resolution than 20. Would pixel spacing be more of an issue with more billboards? I will play with it later today but am guessing I may resolve it without any grand conclusion. And if I do, what works for me, may not work for the next situation. The joys of Unity problem solving.

#10 DPRoberts

DPRoberts

    Advanced Member

  • Members
  • PipPipPip
  • 1,610 posts

Posted 11 November 2016 - 09:58 PM   Best Answer

Jaggies Solved! (at least for me) and what I believe is occurring and how to fix it...
Test #1 - So, I went to a clean build and planted "grass_1" by itself - No jaggies (shorthand - NJ) . I replaced "grass_1" with "grass_2" - NJ. I did this for the remainder of grasses.
Conclusion #1 - each grass, by themselves, ie. the only grass swatch on the build, DO NOT produce jaggies

Test #2 - I planted "grass_1" - NJ, added "grass_2" - NJ, added "grass_3" - Jaggies to "grass_1", added "grass_4" - Jaggies to "grass_2"
Conclusion #2 - a grass texture added 2 swatches down may influence the presence of jaggies on said grass texture. In other words, Grass 1 will show Jaggies if there is an issue with Grass3

Test #3 - changing the grass texture 2 swatches down by shrinking the entire RGB image and alpha layer by 10% and doing nothing else will cure the jaggies on the grass texture showing issues.
Conclusion #3 - the grass texture images should not approximate the borders of the image. There should be at least a 20px border around the grass textures. I am accomplishing this by opening the texture in photoshop and selecting the background layer, choosing SELECT ALL and Transform>Scale and changing W and H to 90%. Then choosing the Channels tab and selecting ALL on the "Alfa 1" layer and doing the same and resaving. You may want to choose a different name if you want to maintain the original file. Inspect and set to Clamp instead of Repeat (not sure if this matters but it won't hurt). Then, replace in your planting swatches and watch the jaggies from the planting 2 swatches up disappear. I may post a quick video on my Photoshop process as I also select the main background color when scaling the background layer so not to get an odd colored border. (no idea if it would really impact or not but is cleaner)
Planting #1 and #2 - NO JAGGIES
MQP6hMm.jpg
Added Grasses #3 and #4 and Grass #1 and #2 start to show Jaggies (Grass #1 not in this image, just believe me)
kw5sSLL.jpg
Added Grass #5 and Grass #3 starts to show Jaggies
xsH2fO9.jpg
FIX Grass #5 as I stated above and Grass #3 no longer shows Jaggies - Boom! Obviously, fixing grass #4 will do the same for grass #2 and so on.
TnmbdwN.jpg

Thanks for suggestions. As usual, K11s intuition was correct and this was not an Alpha issue. Hopefully, Mike may notice this as it is an easy solution and could be added to the next CF update for the grass textures. I have done this on all of them and could provide that for now as a .zip if it is not frowned upon by Mike.
  • Kablammo11 likes this

#11 Armand

Armand

    Advanced Member

  • Members
  • PipPipPip
  • 1,387 posts
  • LocationCalgary

Posted 11 November 2016 - 11:01 PM

Yeah, I thought this was related to pushing my system a bit too hard as well.



#12 Mike Jones

Mike Jones

    Advanced Member

  • Administrators
  • 6,159 posts

Posted 11 November 2016 - 11:05 PM

Jaggies Solved! (at least for me) and what I believe is occurring and how to fix it...
Test #1 - So, I went to a clean build and planted "grass_1" by itself - No jaggies (shorthand - NJ) . I replaced "grass_1" with "grass_2" - NJ. I did this for the remainder of grasses.
Conclusion #1 - each grass, by themselves, ie. the only grass swatch on the build, DO NOT produce jaggies

Test #2 - I planted "grass_1" - NJ, added "grass_2" - NJ, added "grass_3" - Jaggies to "grass_1", added "grass_4" - Jaggies to "grass_2"
Conclusion #2 - a grass texture added 2 swatches down may influence the presence of jaggies on said grass texture. In other words, Grass 1 will show Jaggies if there is an issue with Grass3

Test #3 - changing the grass texture 2 swatches down by shrinking the entire RGB image and alpha layer by 10% and doing nothing else will cure the jaggies on the grass texture showing issues.
Conclusion #3 - the grass texture images should not approximate the borders of the image. There should be at least a 20px border around the grass textures. I am accomplishing this by opening the texture in photoshop and selecting the background layer, choosing SELECT ALL and Transform>Scale and changing W and H to 90%. Then choosing the Channels tab and selecting ALL on the "Alfa 1" layer and doing the same and resaving. You may want to choose a different name if you want to maintain the original file. Inspect and set to Clamp instead of Repeat (not sure if this matters but it won't hurt). Then, replace in your planting swatches and watch the jaggies from the planting 2 swatches up disappear. I may post a quick video on my Photoshop process as I also select the main background color when scaling the background layer so not to get an odd colored border. (no idea if it would really impact or not but is cleaner)
Planting #1 and #2 - NO JAGGIES
MQP6hMm.jpg
Added Grasses #3 and #4 and Grass #1 and #2 start to show Jaggies (Grass #1 not in this image, just believe me)
kw5sSLL.jpg
Added Grass #5 and Grass #3 starts to show Jaggies
xsH2fO9.jpg
FIX Grass #5 as I stated above and Grass #3 no longer shows Jaggies - Boom! Obviously, fixing grass #4 will do the same for grass #2 and so on.
TnmbdwN.jpg

Thanks for suggestions. As usual, K11s intuition was correct and this was not an Alpha issue. Hopefully, Mike may notice this as it is an easy solution and could be added to the next CF update for the grass textures. I have done this on all of them and could provide that for now as a .zip if it is not frowned upon by Mike.

 

As it's a unity issue and not a CF issue it's one of those things where it's best left to the CF community base rather than us.



#13 DPRoberts

DPRoberts

    Advanced Member

  • Members
  • PipPipPip
  • 1,610 posts

Posted 11 November 2016 - 11:11 PM

If I'm understanding you, then you are saying it is ok to post the improved textures? It is actually just an issue with the textures you are providing with CF so I would think it is somewhat connected. It's annoying but the answer is for any grass planting texture, make sure there is a sufficient border.

#14 Kablammo11

Kablammo11

    Obscure Person

  • Members
  • PipPipPip
  • 3,953 posts

Posted 12 November 2016 - 11:43 AM

As usual, stellar and comprehensive work from you DPR. 

Your findings explain why I did not have that issue as of late: I have started to leave a generous border of invisibility around my billboards anyway. Not to avoid your jaggies, but to be able to plant them on top of meshes 15cm above the terrain they are attached to. They need a noticeable gap too look good sticking through the meshes.

 

(I honestly, though, can't stand the look of these vast area of billboard grasses anymore. Their sight causes a visceral antipathy within me by now. I've planted too many of them myself in the past, they severely diminish performance and they look and feel a bit too much like a thing of yesterday best overcome and forgotten. I can see using this ancient tech for bushes, flowers and shrubs, but not for those gently swaying fields of grassland we all crave to adorn our golf courses with. So how's that TE thing going, btw?)


>>>>>>> Ka-Boom!





• Mulligan Municipal • Willow Heath • Pommeroy • Karen • Five Sisters • Xaxnax Borealis • Aroha • Prison Puttˆ

• The Upchuck   The Shogun  • Black Swan (•)

 

<<<<<


#15 Crow357

Crow357

    Advanced Member

  • Administrators
  • 4,670 posts

Posted 12 November 2016 - 01:00 PM

So, basically, the image and alpha have to be 90% the size of the canvas?  Did I read that right?  Also, I don't know what "Clamp" is.  I don't see an example in your images.  Oh, and thirdly, is a "Swatch" your term for the image?


Win 10, i7-7700 @4.2 ghz, 16GB DDR4, EVGA GTX 1080
Swing Type: Tour Pro Wireless XBox 360 Controller.

#16 DPRoberts

DPRoberts

    Advanced Member

  • Members
  • PipPipPip
  • 1,610 posts

Posted 12 November 2016 - 01:19 PM

...

(I honestly, though, can't stand the look of these vast area of billboard grasses anymore. Their sight causes a visceral antipathy within me by now. I've planted too many of them myself in the past, they severely diminish performance and they look and feel a bit too much like a thing of yesterday best overcome and forgotten. I can see using this ancient tech for bushes, flowers and shrubs, but not for those gently swaying fields of grassland we all crave to adorn our golf courses with. So how's that TE thing going, btw?)

As I am sometimes oblivious to the obvious, I am not entirely sure on your "TE" reference. As you have previously recommended, I always head to Google so as not to add confusion on something straightforward or readily answered previously. That, of course, led me to this page. 

So, if you are asking about my Throat Erosion?, since starting my Therapeutic E​xercises, I'd say it's terrific. However, knowing you, it would likely not be a personal question. So, I thought you may be asking about my Tissue Engineering project which we have reached Total Expenditures on and although it has been quite the Team Effort toward our goal the Terminal Equipment we are working with may lead us to a Tunnel Endpoint. Understanding this, I have debated Tactical Exploration in search of Tiberian Euphoria which may be more enjoyable anyhow.
​Now, if you were curious to my Tree Editing? I would say it's improving but not there yet. As a compliment to you, I would say the biggest thing one can do with their tree editing is to give them a proper name that reflects their personality. It gives you a goal for their outcome rather than tweaking a branch or frond here or there to produce "Palmetto_short_2". My trees are coming to life and when finished, my taller Palms will be Dean, Lorelai and Rory. My vertically challenged Palms will be Jess, Mrs. Kim and Lane. My majestic cypresses are Jackson and Suki. My scraggly short and wide bushes will be Miss Patty and Babbett. There will be others to flesh out the family. I live in a boring world so the references are from a show that plays while I sit on the couch with my laptop next to my wife. The plus of the show is the personalities are enjoyable and very distinct which makes for great trees.
​Thanks for asking. The End.



#17 Kablammo11

Kablammo11

    Obscure Person

  • Members
  • PipPipPip
  • 3,953 posts

Posted 12 November 2016 - 01:45 PM

So, basically, the image and alpha have to be 90% the size of the canvas?  Did I read that right?  Also, I don't know what "Clamp" is.  I don't see an example in your images.  Oh, and thirdly, is a "Swatch" your term for the image?

 

Make that between 95 and 80 percent - just don't go too near the edges with your alpha and texture layer.

If you bring up any of your billboards in the inspector, notice the setting "Wrap Mode" - it can be set to Repeat (Tiling endlessly) or Clamp (Sticking to the edge of image and unmovable, better for billboards or 6-sided Skyboxes)

Swatch, and I'm guessing from context, refers to the thumbnail inside your grass terrain gallery and the instance of grass type allocated to it that it represents. 

 

As I am sometimes oblivious to the obvious, I am not entirely sure on your "TE" reference. 

 

 

TE? Sorry about the confusion, pal. None of your suggestions, though technically correct, encapsulates my intent. But I am surprised you had to ask. Mike used this once in conversation with me, though, and I too needed a bit of delay to piece it together... 

 

TE: Turf Effects (by Ndivida). Basically, this:

 

Note how this looks a bit better than a billboard grassland? It will be customisable once it hits, it will be attachable to a mesh layer in the layers library, 12 grasses maximum, and it will happen soon or soonish or "on the late, very distant end of a generous and patient interpretation of the adverb soon, way beyond any notion of immediacy that might be wrongly attributed to the term soon". 


>>>>>>> Ka-Boom!





• Mulligan Municipal • Willow Heath • Pommeroy • Karen • Five Sisters • Xaxnax Borealis • Aroha • Prison Puttˆ

• The Upchuck   The Shogun  • Black Swan (•)

 

<<<<<


#18 DPRoberts

DPRoberts

    Advanced Member

  • Members
  • PipPipPip
  • 1,610 posts

Posted 12 November 2016 - 01:56 PM

So, basically, the image and alpha have to be 90% the size of the canvas?  Did I read that right?  Also, I don't know what "Clamp" is.  I don't see an example in your images.  Oh, and thirdly, is a "Swatch" your term for the image?

 

Crow,

#1 - I will actually recommend an easier method than what I suggested yesterday. Open the image you would like to edit. Use the dropper tool to select a background (not foreground) color that is the main color of your image. Then, Choose Image>Canvas Size. Change the pixels to percent for both Height and Width and make them 110%. For a 512x512 image, it will roughly give you a 50 pixel border. Maybe do 105% for a 1024x1024 image. This will adjust the RGB image and alpha together because it is simply expanding the periphery of the canvas. Then, to make things clean, I choose Image>Image Size and scale it back to either 512x512 or 1024x1024 (probably unnecessary but I like to do what Unity requests). Then Save your new image.
​#2 - Clamp will be in the Inspector when you import the Image into Unity. There is a box that says "Wrap Mode" and change it from "Repeat" to "Clamp"
​#3 - I use swatch to refer to squares of images in many senses so I understand confusion. In Adobe, the bar on the left that contains all the tools has 2 colors at the bottom, I call those the foreground and background swatches. For your question, in the planting tab in Unity - my swatch reference is referring to the image in the Details section and when you choose Edit Details you are either adding or editing an object planting swatch.
​Each of the plants in this image are a "swatch" to me

eNUKwVP.jpg
 



#19 DPRoberts

DPRoberts

    Advanced Member

  • Members
  • PipPipPip
  • 1,610 posts

Posted 12 November 2016 - 02:05 PM

 

TE? Sorry about the confusion, pal. None of your suggestions, though technically correct, encapsulates my intent. But I am surprised you had to ask. Mike used this once in conversation with me, though, and I too needed a bit of delay to piece it together... 

 

TE: Turf Effects (by Ndivida). Basically, this:

 

Note how this looks a bit better than a billboard grassland? It will be customisable once it hits, it will be attachable to a mesh layer in the layers library, 12 grasses maximum, and it will happen soon or soonish or "on the late, very distant end of a generous and patient interpretation of the adverb soon, way beyond any notion of immediacy that might be wrongly attributed to the term soon". 

Very cool indeed. I have heard the rumblings of 3D grasses but actually had not investigated it at all. The implementation of it obviously eludes me without knowing any specifics. How will it be less processor/GPU intensive than the billboards?



#20 Crow357

Crow357

    Advanced Member

  • Administrators
  • 4,670 posts

Posted 12 November 2016 - 02:10 PM

Thanks DPR and K11!
Win 10, i7-7700 @4.2 ghz, 16GB DDR4, EVGA GTX 1080
Swing Type: Tour Pro Wireless XBox 360 Controller.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users