windy grass. . .

Blitz3D Forums/Blitz3D Programming/windy grass. . .

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I'd like to create some kind of effect to make
them turn slightly or shift the verts around to make it look like wind blowing through them. Is there any way to do this that isn't too processor heavy?


My method works a bit like this.

Portalise your data in regions, so if your map is 512x512 make 8x8 block's filled with a number of grasses.

Calculate which block is nearest the camera every 100 milliseconds or so (or more usually just infront of camera). This becomes the waypoint block.

From your list of grass meshes place mesh entities at the waypoint block and other adjacent waypoints.

Now animate only those meshes tied to waypoints nearest the camera.

You can fill a massively large area with just a few hundred grass objects, of which even fewer need actually be animated in runtime.