Grass In top down? H

Hi there,

I wanted to know if anyone has ever had luck with a grass solution that works well with high isometric camera angles/near top down angles like Diablo.

Unity’s would work well if it didnt all go transparent at certain angles in both billboard and non-billboard.

Cheers cheers
~J

Can you show screenies of the approaches you’ve tried and the results you got?

If you’re using standard vertical grass planes then from top down you’re looking at an edge and there’s barely anything to see.

For short grass I’d consider:
a) doing it in a texture, or maybe a shader with some parallax
b) Having some transparent textured grass geometry sit horizontally above your ground plane to give it some patchy perspective (no idea how that’ll look, could be terrible), and
c) much like Diablo 3, mostly use textures but also have the occasional grass model scattered around for visual depth and variety. Design these to look good from your planned camera angle.

Diablo 3’s grass is good mostly because they had a very clear understanding of exactly how it would be viewed, and their artists did a great job of designing it for that. I suspect that if you moved the camera down to a first person perspective the whole game would look pretty odd.

4 Likes

Surprisingly Far Cry has implemented grass that works even at straight top-down angles. I posted videos here:
https://discussions.unity.com/t/739493/11

It seems it’s a matter of how to model the grass blades / planes that this perspective works.

5 Likes

Looking at Diablo again today I see that, although textures wont work too well in our style it might work out.

Ill take some screenshots a bit later when im back from my trip and post them \o/ thanks for the help.

(Quick edit, One thing I was thinking of trying is replacing the standard billboard shader for the terrain grass and seeing if I can find a way to limit the angle that it can tilt as if I could it would work great for our style.)

The catch with Far Cry is that it has to work reasonably well from any angle. Their solution works well, but is probably a bit more expensive than a solution tailor made for a specific viewing angle. So, it all comes down to the use case.

Sounds entirely reasonable. Another approach is to just make a bunch of grass models with just the faces you can see, and scatter them around. One of the neat things about top-down games is that you generally have a very limited field of view that only so much stuff fits on, so controlling the performance impact of visible things can be nice and straightforward.

Also, again depending on the game, with instanced rendering you could get this to be basically free. In my fully 3D game with huge environments adding thousands of “scatter” meshes (hundreds visible at a time) had zero measurable impact on performance with instanced rendering. Well worth looking into if a) you need a lot of them and b) you can get good mileage out of reusing a small number of assets lots of times each.

2 Likes

Thanks for more info, I hadnt actually taken into account how limited the view is when thinking about performance. I think today Im going to have a stab at making some custom grass models and configuring them to be the design I want. Ill post pics if I win! :slight_smile:

2 Likes

Don’t get too carried away with optimisation at this stage. Certainly focus first on getting the look you want. I tend to think (and talk) about it out of habit, but when it comes to building stuff starting by getting something that works is almost always a good move.

1 Like

I wouldn’t consider going with fully 3d and vertex lit grass meshes as opposed to unlit billboards an optimisation. It’s such a profound difference in the technique used for generating grass that it’s an architectural decision. There’s very little you can do at a later stage to optimise the former if you’ve used it all over your maps other than remove it completely.
I think the decision to use one or the other (or something else) needs to be a choice made earlier on in development.

1 Like

Have you tried giving the grass cards a minor bend? Two extra vertices per card should be enough. Make them have a slight wariness and should be problem solved.

I dont think small/solo dev should make big thinkings from stuff like this. Will eat away finite reservoir of energy and detract from more important areas, like design and play test.

Dumb no brainer solution is always good.

1 Like

I a grass texture with bumpmaps as my ground. This creates a nice short grass effect on its own. In places where I want to indicate longer grass I have another plane just above the ground I have the exact same texture but with an alpha blend and no bumpmapping. This produces a nice parallax and is very cheap on the graphics card. My camera tends to be about ten meters above the ground though so I’m not sure how good it would looks closer up. It’d be very easy for you to try though.

1 Like

Really? Change materials/shaders, swap out meshes, change lighting technique (including switching to unlit with custom tinting)… you could indeed swap to billboards. And you could automate the changes with an Editor script, so you don’t need to do them by hand.

Those changes won’t make that much difference compared to using billboards which be a massive difference and by then you’ve already committed. Swapping to billboards at a later stage would be a massive change, you’d have to re-do all of your work. Just one of my maps would take several hours to reproduce if I decided to swap methods. Thus my point being that picking one of the two methods earlier in development is a wise choice rather than later.

Obviously this is going to depend on your game to some degree, but… if you were using a tool to automate the change then why would it be so time consuming? The QA I can understand, but making the change itself?

That’s quite a conclusion to jump to!

I wonder if there’s a misunderstanding here? All I said was to “get the look you want” first, not “build your whole game and optimise it at the end”.

Yes, I agree that you shouldn’t build all of your content before doing performance testing and optimisation. That’s asking for trouble, and it seems to be how you’ve interpreted my comment. You can “get the look you want” in one scene / level / whatever, test its performance, optimise it as necessary, and then use that to inform your budgets and workflows for the remainder of your content.

Really what I was saying was to measure and optimise a real thing, rather than guessing in advance.

Sure if there’s a tool for that. Can you point me to where there’s one as I’d genuinely find it useful for my terrains. Source code even better as I many have many processes that need to iterate over terrain detail objects for various reasons.

Not really, changing lit to unlit for a mesh or custom tinting will make minimal differences in performance. Switching to billboards will be several orders of magnitude more. Unless of course you’re doing something crazy with shaders or some crippled mobile hardware.

Possibly. My point was to make a choice about using billboards or real meshes early in the game as replacing them later due to an optimisation process could very easily mean a lot of new work that can’t be automated. However If you can find that script/tool you mentioned to swap them out then it’s a non-issue.

That was my point, do that testing early. Not at some end stage optimisation. :slight_smile:

I make them myself on an as-needed basis. If you’re making a non-trivial game then investing a little time into tools will save you a lot of time in repetitive tasks. They’re no harder to write than game code, and can buy you a lot of time to do the things which really can’t be automated*.

I tend to design my stuff with potential for automation in mind. As a small team making a large game we straight up don’t have time to do all the busywork by hand. Human time is a precious commodity. If I can reasonably make a computer do the work then I will, and I consider ensuring that that’s possible to be a part of scope control.

On this we agree.

  • That is, the ones which require creativity and/or problem solving.