Jump to content

#1
jen

jen
  • Members
  • 229 posts
http://http.developer.nvidia.com/GPUGems/gpugems_ch07.html

Anyone want to port this to LE as a posteffect? I'm willing to buy it off you if you sell it on the workshop.

One way of doing it would be to render grass on top of a particular texture that exist on a terrain. You can see below the shader at work is just rendering grass on top of the grass texture layer. The grass should only be rendered on that layer.
Posted Image

Helpful links:
http://outerra.blogspot.co.uk/2012/05/procedural-grass-rendering.html
http://www.mbsoftworks.sk/index.php?page=tutorials&series=1&tutorial=32

I'm not good with shaders so I can't do it on my own.

#2
Josh Klint

Josh Klint
  • Staff
  • 11,130 posts
Looks nice.

#3
martyj

martyj
  • Members
  • 327 posts
I'd be willing to pay as well. That way it would be easier to have changing grass types as you change areas of the map.

#4
jen

jen
  • Members
  • 229 posts
Will pay $15 dollars per license. Saw a SSAO shader sold for $15 somewhere so I think $15 per license is fair. Anyone?

#5
shadmar

shadmar
  • Members
  • 1,844 posts
is that raytraced or just a geometry shader, like Leadwerks?

#6
jen

jen
  • Members
  • 229 posts
It's Geometry Shader I think, according to the second tutorial link. I would assume so anyway because one of the sections is titled Geometry Grass Shader.

5th Section after Vertex Grass Shader here:
http://www.mbsoftworks.sk/index.php?page=tutorials&series=1&tutorial=32

#7
shadmar

shadmar
  • Members
  • 1,844 posts
That is a bit more than just a shader, besides isn't this what Josh already does?

#8
jen

jen
  • Members
  • 229 posts
I'm not sure, haven't heard any mention of it anywhere. If it's already possible though Josh would have probably mentioned it on his post in the first comment.

Quote

That is a bit more than just a shader,

I agree. I noticed there's additional code that came with the tutorial. Would love to have something that excludes the coding part.

I'm not sure if any of these are applicable:
https://www.shadertoy.com/results?query=tag%3Dgrass

#9
Rick

Rick
  • Members
  • 7,039 posts
You can manually add grass via veg system. I don't believe it'll be related to your textures in any way but you can place grass via the existing veg system.

#10
jen

jen
  • Members
  • 229 posts
I have done that yea. It's just too expensive for the GPU I thought. I needed something more efficient.

I'll give that a try again actually. I'll see if I can get it right this time.

#11
Josh Klint

Josh Klint
  • Staff
  • 11,130 posts
If you enable billboards and set the view range to a fairly low value (grass Is small) it should work.

#12
jen

jen
  • Members
  • 229 posts
This is the closest I can get the grass to distribute. Is it possible to clamp them up closer? Density is already at lowest level.

Posted Image

#13
jen

jen
  • Members
  • 229 posts
Made the patch larger, it's not following the curvature of terrain now.

Posted Image

#14
Genebris

Genebris
  • Members
  • 269 posts

View Postjen, on 15 February 2017 - 11:10 AM, said:

This is the closest I can get the grass to distribute. Is it possible to clamp them up closer? Density is already at lowest level.

Posted Image
Is this because of your modified scale? I'm pretty sure I was able to cover the whole ground with default grass models.

#15
jen

jen
  • Members
  • 229 posts
Yea, that's because the scale is decreased. I'm not sure if the map is 2048 or 4096 though, if it's 2048 I might be able to double the size of everything.

Edit
Yea it's 4096, just confirmed.

Found a workaround anyway.