Page 1 of 1

3D Grass

Posted: Mon Jun 27, 2016 11:52 pm
by kaadmy
I've implemented 3D grass into BZFlag 2.4.6, and while it might be messy and won't work on maps with fake floors, it's still a step, however small :)

download/file.php?mode=view&id=16733&si ... d43f0af1ef

download/file.php?mode=view&id=16734&si ... d43f0af1ef

Compiles and runs fine on Linux, but will NOT work on Mac, and probably won't work on Windows, as I don't have the resources to test those platforms.

Source is available here: https://github.com/kaadmy/bzflag-3dgrass

Edit: screenshots

Re: 3D Grass

Posted: Fri Jul 01, 2016 6:35 pm
by Zehra
Congratulations kaadmy

Nice work on the 3-D grass.
3-D grass would be nice to see implemented in BZFlag, but I have a minor suggestion for it.
Perhaps it would be better to add 3-D grass as a map option along so that it could be used for maps.
Maybe some options could be added to it such as.
-set _grass height 1.5
-set _grass density 5.0
-grass
green (options would be dark green, light green...etc)
-set_wind blow 5.0 (this would allow movement of grass as if wind is blowing it)
-set_grass effect 1.0 (this causes tanks to slow down as if they would be traveling cross-country)

Re: 3D Grass

Posted: Tue Jul 05, 2016 6:27 pm
by kaadmy
@Flak 18: Most of those options are easily addable, except for the grass effects and wind.
I don't see what you mean by grass "effects", what's that for? (Grass is ONLY visual, and client-side)

Re: 3D Grass

Posted: Tue Jul 05, 2016 7:33 pm
by Zehra
@Kaadmy: The grass is nice, but physics would be nice to have and add an element to game play.
Also it would be nice to be able to adjust grass height so certain aspects can be done with maps.
Depending on maps it would be nice to be able to chose between high and short grass as an effect.
Some interesting effects could be added to maps along with added details and appear more real.
It's nice visually to have grass, but would be nice to have more effects for available for usage.
I'm not sure if it's a good idea to have this implemented as a map feature, but it would be interesting to see.

-Zehra

Re: 3D Grass

Posted: Tue Jul 05, 2016 8:31 pm
by kaadmy
I'm not sure how physics would change anything, especially since the server can already change stuff, ie. friction and similar things.
My original idea was to place grass in grass "zones", defined by the map file.
I want to have grass completely optional, and client-side whenever possible, and while map-specific options are nice, I don't think they'll work out very well.

Re: 3D Grass

Posted: Tue Jul 05, 2016 9:15 pm
by Zehra
It was a thought on a concept :wink: .

Re: 3D Grass

Posted: Wed Jul 06, 2016 3:52 pm
by macsforme
Having it not poke through buildings and also having it bend down or at least disappear when a tank drives over it would be two physics "effects" that would make it more visually appealing. Also, having it fade out a little more gradually to the ground color/texture would probably improve the visual appearance a little.

Nice work, though. I'm not aware of anyone else who has ever tried something like this.

Re: 3D Grass

Posted: Wed Jul 06, 2016 5:45 pm
by kaadmy
Thanks @Constitution :)
Grass is currently a little ugly around edges of objects, ie. tanks and buildings, and I've also tried a few different ways to blend the grass near the ground, and the current method works pretty well.

Re: 3D Grass

Posted: Mon Aug 22, 2016 11:10 pm
by click click boom
nicest grass i have ever seen, needs to def. be implemented.

Re: 3D Grass

Posted: Fri Aug 26, 2016 7:05 pm
by kaadmy
Thanks @ccb :)
I've already made a PR a few months ago, never got merged though.