How does grass work?

General discussion about the games and the scene.

Moderator: Moporators

Post Reply
User avatar
kuchitsu
Kuski
Posts: 1423
Joined: 13 Aug 2010, 20:31

How does grass work?

Post by kuchitsu »

User avatar
FinMan
36mins club
Posts: 2038
Joined: 13 Feb 2007, 11:14
Team: dat
Location: Jyväskylä, Finland

Re: How does grass work?

Post by FinMan »

move the leftmost vertex to the left, so that it's horizontally left of the polygon. drawing: http://imgur.com/a/QUWQe

bad-colored vertical line is how the first grass piece's left border goes.
Image
User avatar
kuchitsu
Kuski
Posts: 1423
Joined: 13 Aug 2010, 20:31

Re: How does grass work?

Post by kuchitsu »

If I understand correctly...
I did this - http://i.imgur.com/dKWCmTx.png
And now it looks worse I'd say - http://i.imgur.com/8SBFlhL.png
But now I realize that this angle is probably too extreme for grass to work well. Unless there is some workaround for cases like this?
User avatar
FinMan
36mins club
Posts: 2038
Joined: 13 Feb 2007, 11:14
Team: dat
Location: Jyväskylä, Finland

Re: How does grass work?

Post by FinMan »

ye, there's a max angle there, just move the leftmost vertex up and you'll see magic happen. elma starts to create grass from the left side and adds pictures next to the previous things imo, and it can't go steeper than a certain angle really either, that's why it fucks up at too steep of a hill
Image
User avatar
Lee
37mins club
Posts: 2367
Joined: 22 Apr 2005, 05:12
Location: New Zealand

Re: How does grass work?

Post by Lee »

Yes, what FM said. It starts from the left, and because your angle is so steep it uses the steepest grass picture available and starts drawing that upwards until it meets with the grass line again, at which point it looks normal, but anything before is ugly.
User avatar
Lousku
Kuski
Posts: 2925
Joined: 5 Feb 2010, 00:25
Team: BAP
Location: expensive land of dads

Re: How does grass work?

Post by Lousku »

Also, in steep hills you sometimes need to hev the whole segment of grass closer to the ground, because the grass pieces don't connect to the nearest ground edge, but upwards.
Image
So the left connection thear is obv much bigger and less likely to actually reach the edge.
then again i don't know anything
maybe easier not to think abouut alöl things thought than not things thought ... or something..=?
User avatar
kuchitsu
Kuski
Posts: 1423
Joined: 13 Aug 2010, 20:31

Re: How does grass work?

Post by kuchitsu »

Thanks for that last pic, I understand it much better now I think.

Btw when you guys say that it starts drawing from the left... Does that mean that in a horizontally symmetrical polygon grass might not looks the same on two sides?
User avatar
FinMan
36mins club
Posts: 2038
Joined: 13 Feb 2007, 11:14
Team: dat
Location: Jyväskylä, Finland

Re: How does grass work?

Post by FinMan »

ye, it depends on how long the tiles are, which differs in different resolutions. Drawing for tiles: http://imgur.com/a/lp41M . drawed vertical redline there also to show difference osv

if you imagine all the boxes are the same size, you'll get how the tiles are placed. the last box to the right, as far as i know, stops being placed when one of the grass pieces goes over the last vertex horizontally, which makes it kinda tricky and grass errors easily happen in the right side, because the last grass piece can go some 10 pixels over the last vertex horizontally.
Image
User avatar
Mats
39mins club
Posts: 1183
Joined: 5 Apr 2007, 12:30
Location: Norway, Sandnes

Re: How does grass work?

Post by Mats »

The mistake is not using internal editor where grass is your friend
TT:39.59.86|| AvgTT:41.49.24 || Multi TT:27:43:82 || Team [TR]
User avatar
Ramone
50mins club
Posts: 1971
Joined: 20 May 2002, 15:42

Re: How does grass work?

Post by Ramone »

Grass needs water to grow. And good soil.

Elasto Mania polygons are a great surface to grow grass.
Elasto Mania - ez better
User avatar
Ramone
50mins club
Posts: 1971
Joined: 20 May 2002, 15:42

Re: How does grass work?

Post by Ramone »

Autograss, you know those storebought rolls of grass you just roll out. They will never look the and feel the same as grass grown from seeds. Handmade grass.

Real grass.
Elasto Mania - ez better
User avatar
kuchitsu
Kuski
Posts: 1423
Joined: 13 Aug 2010, 20:31

Re: How does grass work?

Post by kuchitsu »

Something I've been wanting to ask for a while... What is THIS?

Image

Like why is a tiny line of grass visible between the tree and the bike? Does zoom/resolution have anything to do with this?
User avatar
Ruben
Kuski
Posts: 836
Joined: 31 Dec 2012, 18:07
Location: Oslo, Norway

Re: How does grass work?

Post by Ruben »

kuchitsu wrote:Something I've been wanting to ask for a while... What is THIS?

Image

Like why is a tiny line of grass visible between the tree and the bike? Does zoom/resolution have anything to do with this?
More importantly, why do you have pictures in front?
<veezay> antti also gonna get stabbed later this month
<nick-o-matic> niec

My fake plants died because I did not pretend to water them.
sunl
Kuski
Posts: 346
Joined: 27 Jul 2013, 16:23

Re: How does grass work?

Post by sunl »

My guess is that because of the tree, that pixel is in front of bike, and then due to rounding errors, 1 pixel-high of grass is drawn on the tree - like the line ground bugs

Not sure though
User avatar
AndrY
38mins club
Posts: 718
Joined: 14 Dec 2015, 17:41
Team: .lev
Location: Perm, Russia
Contact:

Re: How does grass work?

Post by AndrY »

kuchitsu wrote:Something I've been wanting to ask for a while... What is THIS?
Image
Like why is a tiny line of grass visible between the tree and the bike? Does zoom/resolution have anything to do with this?
What is very bad in it? imo, if it isnt this line, it would be seemed strange too.

because of it, i try to not draw foreground pics near corners))
Ruben wrote: More importantly, why do you have pictures in front?
its more realistically, and it doesn't interfere. As a last resort, u can only change high->low graphics


-------------------------
(oh, didn't see 2nd line of kuchitsu post, so bit out of topic :mrgreen: )
Image
My levs and other Elma things: sites.google.com/view/elma-andry + youtube
User avatar
kuchitsu
Kuski
Posts: 1423
Joined: 13 Aug 2010, 20:31

Re: How does grass work?

Post by kuchitsu »

Image

Yeah, I guess looks kinda weird in any case.
Ruben wrote:More importantly, why do you have pictures in front?
Because that's more romantic!
User avatar
pawq
38mins club
Posts: 6547
Joined: 24 Aug 2008, 19:56
Team: TR
Location: Southampton, UK

Re: How does grass work?

Post by pawq »

AndrY wrote:
Ruben wrote:More importantly, why do you have pictures in front?
it doesn't interfere
say what o,o
User avatar
AndrY
38mins club
Posts: 718
Joined: 14 Dec 2015, 17:41
Team: .lev
Location: Perm, Russia
Contact:

Re: How does grass work?

Post by AndrY »

I mean, foreground pictures aren't looks bad (imo good).

and if there are not very much of them, they haven't big influence to playing. bike is visible anyway
Image
My levs and other Elma things: sites.google.com/view/elma-andry + youtube
User avatar
kuchitsu
Kuski
Posts: 1423
Joined: 13 Aug 2010, 20:31

Re: How does grass work?

Post by kuchitsu »

They interfere a little bit (sometimes mo re if the author puts a lot of barrels or something in an important place), but they also add a lot of visual variety to the level, give it a bit of a 3D look, and also make the player feel like he is interacting with the objects. Imo it's a very useful tool for designers that care about visuals.
Post Reply