Tuesday 11 February 2014

FMP: Vegetation

It seems like I haven't posted in ages although it's been just a week. I had to take weekend off because of the flu and an absolute inability to think or concentrate.
 I am still working on terrain but I got some nice progress I think. I decided to set the scale as small as possible while keeping a good quality. I ended importing a 1024 x 1024 height map, which I thought would be a considerate scale for a medium sized terrain. In reality it was very very big. Although I love all the paths and mountains that I have created in World Machine, I will only have to use about a quarter of the imported level (at least for the first scene). I cannot drag the player through the entire level of repeated environment for 15 minutes. I blocked it off to about 1-2 minutes of walking through woods - enough to show off the environment and keep the player interested.

I really hoped that layer painting on terrain would improve since last year's version. It did not. It still doesn't blend good enough. I made some tests but it's clearly visible where one texture ends and the other starts. What I've decided was to cover the entire surface with a single ground texture and let the vegetation do the job.

I made 8 bunches of smaller vegetation which I previously baked in 3Ds Max.









I will also put decals and rocks and other assets that would fill out the environment. Since it's all about the vegetation during the first trip through the level, I let myself fiddle with it for a few days. Apart from having a few types of grass and weeds, I wanted them to interact with the player. It seems quite important considering I will have a third person protagonist. The smaller vegetation will respond to wind and to players touch - it will bend underneath his feet when he moves about. To do that I had to apply both detail bending (which gives more natural movements while receiving wind) and touch bending (responds to player).

Setting up detail bending meant I had to vertex paint all the grass, weeds and fern. It always sounded so scary but once you know how to do it, it's fairly easy.


I put three Vertex Paint modifiers onto my rendermesh in 3Ds Max - each of them responsible for a different RGB colour (blue, red and green). Each of them determined a different aspect of animation.







For the touch bending I had to specify how the leaves would bend. Fortunately there was an example scene on Crydev website.


 I had to insert a little dummy for each bending point. It worked as a UV instance. If I put 4 dummies on one leaf, every other leaf that shares the same texture space would follow the same settings. In order for Cryengine to detect this 'skeleton' the dummies have to be named properly.
Touch bending also requires two special proxies. One that would define bending range and the other to obstruct AI's view. I am not going to have any AI in my level but for some reason the bending will not work without that proxy.

It took me all day to set up both touch and detail bending but it did work in the end.






I doubt you can see any of the bending on these screenshots above. I need to get a recording software real soon.



No comments:

Post a Comment