Waving grass

Waving grass

Re: Waving grass Posted by UK-Stryder on Tue Oct 16th 2007 at 7:31pm
UK-Stryder
2 posts
Posted 2007-10-16 7:31pm
2 posts 0 snarkmarks Registered: Oct 16th 2007 Occupation: Engineer Location: England
Hi there i need help creating a field of hay im not new to hammer but i am having great difficulty getting the effect i want i have created a set of brushes and changed it to Func_lod but when i create lots of them around 50-100 the map compiles but doesn't run.

It has been done because i found this on youtube.

http://www.youtube.com/watch?v=IkTB_5vkjyA

Please help
Re: Waving grass Posted by fishy on Tue Oct 16th 2007 at 9:21pm
fishy
2623 posts
Posted 2007-10-16 9:21pm
fishy
member
2623 posts 1476 snarkmarks Registered: Sep 7th 2003 Location: glasgow
It's done with detailsprites or models (my money's on detailsprites), so stop trying to do it with brushwork or you'll go mad.
i eat paint
Re: Waving grass Posted by UK-Stryder on Tue Oct 16th 2007 at 11:56pm
UK-Stryder
2 posts
Posted 2007-10-16 11:56pm
2 posts 0 snarkmarks Registered: Oct 16th 2007 Occupation: Engineer Location: England
yep most people use detail sprites on there ground textures(Which i will do but isnt what im after) but this only creates small patches of grass i want to create a wheat/Hay field and have the grass swaying maybe all following a tracked target im not sure.

Would greatly apreciate some help with this :-p
Re: Waving grass Posted by fishy on Wed Oct 17th 2007 at 2:40am
fishy
2623 posts
Posted 2007-10-17 2:40am
fishy
member
2623 posts 1476 snarkmarks Registered: Sep 7th 2003 Location: glasgow
the way that detailsprites work is something like this.

there's a single texture(.vtf), made up of little pictures of all the different types of grass that you want for your map. ( materials/detail/detailsprites.vtf, may need gcfscape to access it)

there's an accompanying text file (detail.vbsp, in the mods root folder. opens with notepad. again, may need gcfscape to access it) that uses a co-ordinate system to select which part of the .vtf has the particular little picture that you want to use. it also does stuff like;
  • governs the range in sizes the sprites will have
  • how dense to make them
  • whether they sway or not
  • other stuff I can't think of atm
i'm pretty rusty on the subject so i can't be much more help than that. if you have a google for hl2 custom detailsprites, you'll probably get a better idea of how it all works.
i eat paint
Re: Waving grass Posted by Naklajat on Wed Oct 17th 2007 at 4:52am
Naklajat
1137 posts
Posted 2007-10-17 4:52am
Naklajat
member
1137 posts 384 snarkmarks Registered: Nov 15th 2004 Occupation: Baron Location: Austin, Texas
I played with detail.vbsp a bit a while back, IIRC there's a way to specify an alternate or additional *.vbsp file in the advanced compile options so you can keep the default one intact. It's basically setting sprites and models to appear in different densities at different displacement alpha levels, simple to script and fairly flexible.

Here's a good place to start,
http://developer.valvesoftware.com/wiki/Detail_Props, and the default detail.vbsp should be in #\half life 2\hl2\ just open with a text editor like notepad or better yet notepad++.

The command you're looking for is "sway" legal values from 0.0 to 1.0. I believe it only works on detail sprites, not on detail models, and prop_detail doesn't animate so meshes are only really suited to inanimate stuff like rocks and whatnot.

Note however that while sprites are fairly cheap to render, you should keep an eye on performance using +showbudget, because a pretty map that has poor performance actually makes an ugly impression on many people. And ugly impressions are never good.

o