Jump to content


Photo

3D Grass Tutorial


116 replies to this topic

#81 jspirate

jspirate

    Advanced Member

  • Members
  • PipPipPip
  • 487 posts

Posted 22 September 2019 - 11:16 PM

Just trying to figure out that one blade that has textures stretched on it.

Is it assigned to a certain texture slot? Make all of one bright green, one bright magenta and one bright blue.

Although, it seems like you're using the same texture for all 3... Set the texture to "Clamp" maybe in the inspector instead of repeat

Yes, I am using the same for all 3.  I will try that in a min... rendering with less dense grass ATM


i7-8700K
GIGABYTE Z390 AORUS Pro
64 GB DDR4 3200
MSI GeForce GTX 1080 Ti Gaming X
LG 32GK850G
Win 10 Home Premium on 1TB SSD

 

Courses:

Bradford Links - released

Ironwood - released

Cypress Landing - released (also available in a 3DG version)

Crow's Nest - released


#82 DPRoberts

DPRoberts

    Advanced Member

  • Members
  • PipPipPip
  • 1,610 posts

Posted 22 September 2019 - 11:29 PM

The other thing that could be causing issues is the proximity of that right blade to the edge. With most textures being used as billboards in this instance, you need to give some border room around the texture.

 

Easiest way to do that is take into Photoshop or Gimp and choose the background color as same as your background here (white). Then, change canvas size to increase and either do a percentage or add like 25 pixels in both dimensions.



#83 jspirate

jspirate

    Advanced Member

  • Members
  • PipPipPip
  • 487 posts

Posted 22 September 2019 - 11:37 PM

The other thing that could be causing issues is the proximity of that right blade to the edge. With most textures being used as billboards in this instance, you need to give some border room around the texture.

 

Easiest way to do that is take into Photoshop or Gimp and choose the background color as same as your background here (white). Then, change canvas size to increase and either do a percentage or add like 25 pixels in both dimensions.

Oh! The right blade is up against the right edge, so maybe thats it...  I am in another render loop *sigh*


i7-8700K
GIGABYTE Z390 AORUS Pro
64 GB DDR4 3200
MSI GeForce GTX 1080 Ti Gaming X
LG 32GK850G
Win 10 Home Premium on 1TB SSD

 

Courses:

Bradford Links - released

Ironwood - released

Cypress Landing - released (also available in a 3DG version)

Crow's Nest - released


#84 jspirate

jspirate

    Advanced Member

  • Members
  • PipPipPip
  • 487 posts

Posted 23 September 2019 - 12:11 AM

I tried less dense grass and that didn't work.  Then, I resized to provide some border space for the blades of grass, but that didn't work either. Grrrr...


i7-8700K
GIGABYTE Z390 AORUS Pro
64 GB DDR4 3200
MSI GeForce GTX 1080 Ti Gaming X
LG 32GK850G
Win 10 Home Premium on 1TB SSD

 

Courses:

Bradford Links - released

Ironwood - released

Cypress Landing - released (also available in a 3DG version)

Crow's Nest - released


#85 DPRoberts

DPRoberts

    Advanced Member

  • Members
  • PipPipPip
  • 1,610 posts

Posted 23 September 2019 - 12:28 AM

Post the image for the grass. I want to see if it does the same on my end and then will give me a chance to experiment.

#86 jspirate

jspirate

    Advanced Member

  • Members
  • PipPipPip
  • 487 posts

Posted 23 September 2019 - 12:42 AM

i-v4cLWhv-L.jpg

 

Thanks for the help DPR!


i7-8700K
GIGABYTE Z390 AORUS Pro
64 GB DDR4 3200
MSI GeForce GTX 1080 Ti Gaming X
LG 32GK850G
Win 10 Home Premium on 1TB SSD

 

Courses:

Bradford Links - released

Ironwood - released

Cypress Landing - released (also available in a 3DG version)

Crow's Nest - released


#87 DPRoberts

DPRoberts

    Advanced Member

  • Members
  • PipPipPip
  • 1,610 posts

Posted 23 September 2019 - 02:40 AM

Ok, sorry for the delay...

I used your texture and copied your settings. I am getting the same flickering that you are seeing. I think it has to do with you using a wide billboard. Because of this, you have a ton of overlapping of planes and I think it is leading to issues. The flickering is likely a Z-fighting issue. I would recommend using individual blades of grass or a less dense planting of your billboards or a decrease in width of your billboards. Honestly, I don't see how a wide billboard like yours will work for this shader.

 

Images below showing the mesh outlines for the grasses in the 2 scenarios.

Your wide billboard and your settings

0JeEYD2.png

 

My grass settings in the 3D grass observations thread from a few days ago

PYg3h2W.png



#88 shimonko

shimonko

    Advanced Member

  • Members
  • PipPipPip
  • 1,718 posts

Posted 23 September 2019 - 06:44 AM

Do you get it with this? (right click save image as png)

9CxxmWR.png

 

I don't have the 3d grass asset installed, but this shows it painted on with the terrain grass tool, and shows no flicker. It's a bit different but let's rule out mipmap and fringing issues, as I couldn't tell from your posted jpg.

IlqQaCi.jpg



#89 DPRoberts

DPRoberts

    Advanced Member

  • Members
  • PipPipPip
  • 1,610 posts

Posted 23 September 2019 - 01:04 PM

Shimonko, beyond adding some "empty" pixels around the periphery of the image, what else would you suggest to explore this?

I know that I had the same issue with a semi roughv using this grass shader. I was making billboards that were "squarish". The shader instances billboards based on vertex density. So, since our CF meshes aren't uniform, around bunkers and along edges of meshes, there is often too dense of planting that occurs. It doesn't seem to matter when the billboard is taller than wide such as a single blade of grass.

Obviously, I hope it's just a texture issue and more easily solvable.

#90 jspirate

jspirate

    Advanced Member

  • Members
  • PipPipPip
  • 487 posts

Posted 23 September 2019 - 09:03 PM

Do you get it with this? (right click save image as png)

9CxxmWR.png

 


 

 

Yes it still occurred with the png file.  I actually think that it occurred a little bit more.


i7-8700K
GIGABYTE Z390 AORUS Pro
64 GB DDR4 3200
MSI GeForce GTX 1080 Ti Gaming X
LG 32GK850G
Win 10 Home Premium on 1TB SSD

 

Courses:

Bradford Links - released

Ironwood - released

Cypress Landing - released (also available in a 3DG version)

Crow's Nest - released


#91 DPRoberts

DPRoberts

    Advanced Member

  • Members
  • PipPipPip
  • 1,610 posts

Posted 23 September 2019 - 09:09 PM

Jspirate, run a test build where the billboards are 1/2 the width in relation to height. If you don't see it, then, I think it's the way the billboards get planted.

Make all the widths 0.03 and see what happens.

#92 jspirate

jspirate

    Advanced Member

  • Members
  • PipPipPip
  • 487 posts

Posted 23 September 2019 - 09:11 PM

Jspirate, run a test build where the billboards are 1/2 the width in relation to height. If you don't see it, then, I think it's the way the billboards get planted.

Make all the widths 0.03 and see what happens.

Holy cow! I was ahead of you for once lol

Its rendering now...

 

EDIT:  nevermind, I misread your post.  I cut the blade in equal halves and I am trying that.  So, its not exactly the same.


i7-8700K
GIGABYTE Z390 AORUS Pro
64 GB DDR4 3200
MSI GeForce GTX 1080 Ti Gaming X
LG 32GK850G
Win 10 Home Premium on 1TB SSD

 

Courses:

Bradford Links - released

Ironwood - released

Cypress Landing - released (also available in a 3DG version)

Crow's Nest - released


#93 jspirate

jspirate

    Advanced Member

  • Members
  • PipPipPip
  • 487 posts

Posted 23 September 2019 - 09:43 PM

Both attempts at changing the aspect ratio were unsuccessful.


i7-8700K
GIGABYTE Z390 AORUS Pro
64 GB DDR4 3200
MSI GeForce GTX 1080 Ti Gaming X
LG 32GK850G
Win 10 Home Premium on 1TB SSD

 

Courses:

Bradford Links - released

Ironwood - released

Cypress Landing - released (also available in a 3DG version)

Crow's Nest - released


#94 DPRoberts

DPRoberts

    Advanced Member

  • Members
  • PipPipPip
  • 1,610 posts

Posted 23 September 2019 - 10:19 PM

I'm running a build at the moment. I took your texture and added a proper alpha and added fringe coloring to prevent mipmap issues.

I'll report back in like 10 minutes...

#95 DPRoberts

DPRoberts

    Advanced Member

  • Members
  • PipPipPip
  • 1,610 posts

Posted 23 September 2019 - 10:29 PM

🤔
That isn't it either...
one more build...

#96 shimonko

shimonko

    Advanced Member

  • Members
  • PipPipPip
  • 1,718 posts

Posted 23 September 2019 - 10:40 PM

Shimonko, beyond adding some "empty" pixels around the periphery of the image, what else would you suggest to explore this?

I know that I had the same issue with a semi roughv using this grass shader. I was making billboards that were "squarish". The shader instances billboards based on vertex density. So, since our CF meshes aren't uniform, around bunkers and along edges of meshes, there is often too dense of planting that occurs. It doesn't seem to matter when the billboard is taller than wide such as a single blade of grass.

Obviously, I hope it's just a texture issue and more easily solvable.

 

Just what I did above, which sounds like the same you just did - defringing the edge ensuring pixels on it have transparency rather than the background color actually in them, then bleeding the texture and having the alpha. Plus you mentioned you tried clamping. There's also a mipmap option somewhere (on the texture properties from memory) but I haven't played with it.



#97 shimonko

shimonko

    Advanced Member

  • Members
  • PipPipPip
  • 1,718 posts

Posted 23 September 2019 - 11:34 PM

btw when I tried it above (terrain grass detail painting), also I saw no flicker when billboarding - just the non-randomness of the planes made it look even more CG. 

I see when you tried jspirate's image, it looks mostly billboarded by the overall swirl look of the plane edges, but I see other edges in there not perpendicular to the camera. I don't know what they are. Can the 3d grass shader totally randomise the direction of the planes? That will make the grass look less dense of course, but the image could take care of that by representing a clump of grass rather than just two blades.



#98 DPRoberts

DPRoberts

    Advanced Member

  • Members
  • PipPipPip
  • 1,610 posts

Posted 24 September 2019 - 12:15 AM

Yes, you can select to "Randomize grass orientation" which improves the appearance of the style jspirate is attempting. Doesn't work as well for individual blades, as you noted, as the appearance is less dense.

However, in running a build with this, I left shadows "ON" and the flickering was significantly worse. It leads me to believe this is a JNPG issue. Does that shadow patch still exist? I wonder if it would "magically" disappear after running that patch.

#99 DPRoberts

DPRoberts

    Advanced Member

  • Members
  • PipPipPip
  • 1,610 posts

Posted 24 September 2019 - 12:18 AM

Although, in testing, I'm seeing it in Unity as well. I will take a small video of what is occurring and run it by the forum for the shader.
  • Birdie and jspirate like this

#100 jspirate

jspirate

    Advanced Member

  • Members
  • PipPipPip
  • 487 posts

Posted 28 September 2019 - 07:19 PM

What is the best option for handling bulkheads?  The edge of spline didn't show through the bulkhead until I put the grass on it.

 

Thanks in advance for any help.

 

i-L2qxkKw-X3.jpg


i7-8700K
GIGABYTE Z390 AORUS Pro
64 GB DDR4 3200
MSI GeForce GTX 1080 Ti Gaming X
LG 32GK850G
Win 10 Home Premium on 1TB SSD

 

Courses:

Bradford Links - released

Ironwood - released

Cypress Landing - released (also available in a 3DG version)

Crow's Nest - released




Reply to this topic



  


3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users