Jump to content

Grass update based on landscape layer


photo

Recommended Posts

Hello,

We are using grass (ObjectGrass) that is generated based on a mask from landscape:

image.thumb.png.e5a8df6c3a2a8653c3691752635b10e7.png

We are also painting the landscape in real-time from C++ code, using Landscape::asyncTextureDraw (painting a top layer and clearing the other) to simulate burnt ground and call ObjectGrass::invalidate (region) to make the grass disappear from that burnt area. Unfortunately, since grass is using cells, it seems that update is a little bit erratic: some grass regions seem to update correctly right after they are touched by painting and in correct spots, some just stay that way and update much later, some just disappear as in this case:

image.png.546dd002428db3d946b99852b2423743.png

This is more obvious for far away trees (simulated once again with ObjectGrass which have even a bigger step and are used only in distance):

image.png.ca95a3a3a00246a5dffef795c15b47ea.png

In the above case in the middle the billboards are updated (they disappeared), but the outer with cells touched partially never go away..

So my question is, how is the grass decision to update done? Is the cell updated as soon as a landscape mask pixel covered by it is changed? Does it need to have a certain pixels threshold changed? Or is this actually a bug (I am using Unigine 2.13)?

Kind Regards
Adrian L.

 

 

Link to comment

Hello, Adrian!

The problem is that the ObjectGrass itself are complex object, exactly "invalidate" method you mention are contains some controversial solutions. The specified method like the object itself is in the queue for a complete refactoring soon.

The best that we can do is ask you to send us the source code to reproduce issue on our side and attach it is as a part of ticket on our internal bug tracker if a bug is found.

Or at least we can try to make a code review and point out the problem, but most likely this behavior will need to be fixed in the engine itself.

Thanks!

 

Link to comment

Ok, thanks. At least we know these are known issues. Currently we have a deadline and we can accept the issues as temporary. For the next version we also plan to update the engine version and will let you know if we experience the same thing.

  • Like 1
Link to comment
×
×
  • Create New...