So I've been thinking about this since noticing the grass in Red Dead Redemption 2. It struck me because of how natural it looked as the grass near roads gradually got longer and denser the further from the road you got.
Is there a typical technique games use for this? It would be great when we eventually add support for this for it to be easily integrated but also extendable to new textures and mods etc. I'm imagining a greyscale map that is paired with each terrain texture. This would dictate the height and/or density of the grass that gets generated. This would allow us to create sparse grass in the ashlands and lush grass in the grazelands while also tapering off at roads as the two textures get blended together. Is this a plausible way of doing it?
How would we account for different types of grass? Perhaps a color map to determine the average color and the density by an alpha channel?
If maps like this are the easiest way of doing this, it would also be cool to have maps for things like mud or puddles for when it rains. Thought I'd throw these out there and see what other people thought.
Procedural grass
Re: Procedural grass
Apparently that is basically how it would be done: viewtopic.php?f=6&t=5049&p=54084#p54084
My questions about using a color map to procedurally modify the color still stands though, as well as using a map for weather related things like rain puddles.
My questions about using a color map to procedurally modify the color still stands though, as well as using a map for weather related things like rain puddles.
- AnyOldName3
- Posts: 2667
- Joined: 26 Nov 2015, 03:25
Re: Procedural grass
I think in Fallout 4, wetness-from-rain stuff is done by a material swap, so provided you're okay with puddles being a texture rather than extra geometry, something similar could work in OpenMW.
Re: Procedural grass
Oh that’s absolutely how I expect it would be done. Extra geometry sounds like too much work, especially when puddles could work so easily in textures. Perhaps this would be a switch like light up windows, but instead of time of day, use weather. For that matter we could implement snow in much the same way. Is there a simple way to fade between textures? Having puddles pop-in would rather ruin the effect.
Another thought occurs, would it be possible to add the actual water shader to a map? That way any ripples and rain drop effects we add to the shaded would come for free.
Are there other texture maps that are common in games with interesting visual effects?
Another thought occurs, would it be possible to add the actual water shader to a map? That way any ripples and rain drop effects we add to the shaded would come for free.
Are there other texture maps that are common in games with interesting visual effects?
- silentthief
- Posts: 456
- Joined: 18 Apr 2013, 01:20
- Location: Currently traversing the Ascadian Isles
Re: Procedural grass
Has anyone checked out Morrowind Mesh Generator? It's a utility (kind of a misnomer - doesn't *make* meshes, it places them for you)
Bringing this up as this allows for placement of grass (or other plantlife) on predetermined textures
Thought it might be worth a look
ST
This allows you to put a texture down on the landscape, and the program will put meshes/objects there.readme help file wrote: This program allows you to place meshes over the Morrowind landscape
with specific meshes being placed on specific ground textures.
Bringing this up as this allows for placement of grass (or other plantlife) on predetermined textures
Thought it might be worth a look
ST
Re: Procedural grass
Interesting, never knew that's how it worked. What I meant to ask was is there a way of fading out one texture and fading in another in it's place (maybe that's what you mean too). This wouldn't necessarily look right, but seems the simplest way of implementing things like puddles. I still need to try out the glowing windows PR, so maybe this will answer my question.
Sounds like Oblivion's forest generating feature, which I honestly really liked. I understand it wasn't the best for making a really nice game world, but that's because the randomness of nature isn't actually something that's necessarily enjoyable to walk through. Although in terms of grass, as the linked thread states, there are more benefits to real-time batching than preplacing.silentthief wrote: ↑08 Feb 2019, 02:45 This allows you to put a texture down on the landscape, and the program will put meshes/objects there.
Bringing this up as this allows for placement of grass (or other plantlife) on predetermined textures
Thought it might be worth a look
- AnyOldName3
- Posts: 2667
- Joined: 26 Nov 2015, 03:25
Re: Procedural grass
Speedtree has been used to make some pretty good forests outside of Oblivion, just Oblivion didn't make use of its full potential (as that requires more human intervention and processing time).
Re: Procedural grass
I made a PR (that got merged) to change it to work that way because the previous method was very ugly and didn't look how vanilla looked.Ravenwing wrote: ↑08 Feb 2019, 17:01Interesting, never knew that's how it worked. What I meant to ask was is there a way of fading out one texture and fading in another in it's place (maybe that's what you mean too). This wouldn't necessarily look right, but seems the simplest way of implementing things like puddles. I still need to try out the glowing windows PR, so maybe this will answer my question.
> What I meant to ask was is there a way of fading out one texture and fading in another in it's place (maybe that's what you mean too).
This is what I mean should be possible to implement now that terrain textures are blended additively.
Re: Procedural grass
Hooray! Seems like this would be useful in other situations as well. Realized that Akortunov's window lighting is in a separate branch and not a PR so I won't be able to test it with an artifact. Can anyone report on this who has been able to test it out? It's not terrain, but I'd still be interested to know.
I had no idea that Speedtree did anything besides single trees at a time. Are there any reputable FOSS alternatives, even if they're not nearly as good?AnyOldName3 wrote: ↑08 Feb 2019, 17:58 Speedtree has been used to make some pretty good forests outside of Oblivion, just Oblivion didn't make use of its full potential (as that requires more human intervention and processing time).