Grass with Parts, its it reliable?

Hey there! So recently i did a quick test with an Aparmtnet i made out of 6000 parts and spammed it 50 times without any lag issues (GTX 1050, I5)

So i thought what about making grass with parts for games, now that parts are more efficient, and since making Vegetation is kind of a trouble.

Have someone tried this already?

What do you mean?

Use meshes to make grass. If you use parts you’re legit asking to fry your users hardware.

Good example for frying their PC

4 Likes

I use particle emitters for a grass effects, certain elements make it sway. If you do it right, it looks great. On the other hand, it is very possible the grass comes out in an uncanny way.

I can actually handle it at 40constant FPS, i think its due to instancing?

I think meshes are a bit less optimized than parts due to instancing, i might be wrong.

Meshes are the best thing to use for building unless you’re going for collisions.

I think i see what you mean, look:

This mesh have 1920 Triangles

This scene have 5892 of each Mesh.

For a total of 11.312.640 Polygons and still no issues with Perfomance.

7 Likes

@Veov_Ekdosi see below, you replied quicker than I did :stuck_out_tongue:

OP, just to remove the confusion you have about instancing, you’re slightly correct with “parts are better than meshes because of instancing” but only instanced parts vs instanced meshes. Meshes are better to use if one mesh can replace “x” (undefined because there are variables in complexity and amounts) amount of parts and still serve the same purpose.

Collisions are usually better too, as Veov said - but they’re getting better. Currently if the player can collide with this grass (even with CanCollide = false a collision calculation is made), it’s usually best to make a large-ish grass mesh with CollisionFidelity set to Box and CanCollide = false. Obviously a single “box” is better to collide with than potentially dozens of grass parts.

With instancing, true this is what’s rendered, but it’s pretty minor when it’s the same mesh.


In conclusion - and I’ve said this before in many of my posts - the best and only way to know how your game performs under different methods is to test it. There are too many variables to account for for any single one answer. So test it out with a bunch, and see what works.

2 Likes

So this means with a greater amount of grash per mesh, Collision = False, and Collision Fidelity = Box we should be able to have grass for a kind of large scale map? x)

With a good LoD system handling the meshes, theoretically you could keep is pretty minor on performance. I wouldn’t suggest it without a lot of testing before dedicating an entire map though. If you do, I’d very much like to see your performance stats :stuck_out_tongue:

2 Likes

Im gonna give it a try in some minutes with a large scale map i have!

use a mixture of mesh, particles, and parts

Ok so i did a test with a grass of around 3k Polygons and 1299 of them sprayed around an area.

1 Like

Just tried it out - I have a toaster and it worked fine until I looked in the direction of the grass. I did mention including an LoD system, which would make this much more practical.

Is there a purpose you want to add this dense grass around anyways? It isn’t really necessary and also isn’t visually pleasing either unless you work to make it pleasing (which brings its own opportunity costs). In my experience, I’ve found that less is more when adding grass - you don’t need to include every blade haha.

2 Likes

Jaja, yeah but there are times when you want to make a really cool forest and the grass is the last thing that adds to immersion, specially considering there arent any new Materials which is kind of frustrating.

I think we must have to wait until they release the LoD system for Meshes later this year.

Disable your dedicated graphics card when you’re doing these tests. An i5 has on-board graphics, so use that to render the scene. This will be what 50% of your users experience.

5 Likes

I use beams with spring physics

Don’t make your grass semitransparent. Those can’t be instanced.

3 Likes

No,

Let me try to have it without transparency. just a sec