Author Topic: Mask arrives at Unreal with artefacts  (Read 4899 times)

ZoltanE

  • Full Member
  • ***
  • Posts: 23
The attached image shows how there is a square area where the sand mask is missing/black even tho it looks fine in IT. It was much worse actually, several clusters of these squares were littered around the map. I kept re-exporting and now I only have this one, but I can't get rid of it...

Alexis Vaisse

  • Administrator
  • *****
  • Posts: 189
Hi,

Thanks for your feedback.

Unfortunately we are unable to reproduce this issue on our side.

What is the size of your terrain (number of vertices + quad size)?
Can you give us an estimate of the size of the artefact?

If you can send a project file which exhibits this bug to support@wysilab.com, that would be the best way for us to reproduce it.
Thanks.

ZoltanE

  • Full Member
  • ***
  • Posts: 23
The terrain is set up like this in IT:

Section size: 127x127
Section per component: 2x2
Number of components: 32x32
Quad size: 1.0

Size in meters: 8128x8128
Size in points: 8129x8129


The patch is 254x254m. Its position can be estimated by the attached image.

I'll ask permission to send the data.

ZoltanE

  • Full Member
  • ***
  • Posts: 23
Any update on this? On a flatter terrain it gets much much worse. I sent the reproduction terrain to support@wysilab.com a month ago.

Alexis Vaisse

  • Administrator
  • *****
  • Posts: 189
Hi,

We didn't receive anything at support@wysilab.com.
Can you check if you sent the data to the right email address?
Thanks.

ZoltanE

  • Full Member
  • ***
  • Posts: 23
It was sent to support@wysilab.com on 2021-11-17 at 16:12 CET.
At 16:13 I got an automated reply thanking for my message.

Alexis Vaisse

  • Administrator
  • *****
  • Posts: 189
We've just found your email. It was marked as spam. As a result it couldn't be forwarded from the generic address support@wysilab.com to the addresses of the people who usually receive the support requests.
I'm really sorry for that.
We're going to look at your project.

Alexis Vaisse

  • Administrator
  • *****
  • Posts: 189
Hi,

We were able to open your project but couldn't reproduce the issue. The terrain and the masks we get in Unreal are always correct.

Here are some questions that may help us to understand where the problem comes from:
- Does the problem happen all the time or just sometimes?
- Are the squares always at the same locations or at random locations?
- Are the squares always black?
- Do the squares always have the same size?
- Does it happen only for the Sand mask or also for other masks?
- Does the problem disappear if you decrease the size of the terrain?
- Does the problem disappear if you replace the "Flow simulation" node by a basic mask generator node (for instance a 'Profile curve' node)?
Thanks for your help.

ZoltanE

  • Full Member
  • ***
  • Posts: 23
- Since I noticed it's always been there, no matter how many times I exported it.

- On a given terrain it's always at the same place. If the topology changes it shows up elsewhere. Seem to appear on flat parts but since this is the sand mask, the problem might lurk hidden on steep cliffs where the sand mask is expected to be black. If I export a fully flat terrain then the issue covers everything, no sand anywhere, only rock.

- I don't remember seeing unexpectedly white or gray squares, only blacks, the missing sand is easy to see.

- A single square is always the same size but their numbers change. I attached the current state: I had to flatten the terrain and now it's really easy to spot the mask bugs.

- I only saw the issue with the sand mask. Even in the sand-mask-bug-squares the gravel layer is proper.

I'll get back to you on the last two things.

ZoltanE

  • Full Member
  • ***
  • Posts: 23
Fewer artifacts when I replace the flow simulation node with a profile curve.

Alexis Vaisse

  • Administrator
  • *****
  • Posts: 189
The size of the artefacts (254x254) is exactly the size of a landscape component in Unreal (127x127 quads per section and 2x2 sections per component).

If the artefacts are only visible in Unreal and not in Instant Terra, it may be caused by Unreal.

For one component, if all layers are black, strange things may happen in Unreal, depending on how your landscape material is built. Worst of all, results may vary each time you modify a layer.
This is the case whether the layer data comes from Instant Terra or from other sources.

To avoid this, it may be necessary to have a non-zero (i.e. not black) value in at least one layer for each vertex of the landscape.
In Instant Terra, you can create a mask whose values are one minus the sum of all other masks (use Add and Subtract nodes) and use it for one layer.
This ensures that at least one layer has a non-zero value for each vertex of the landscape.

ZoltanE

  • Full Member
  • ***
  • Posts: 23
Oh right, makes sense, I'll look into it, thanks for the tip!
By the way if I scale the terrain down to 63x63 then I don't see any artefacts.


EDIT: Setting the bottom most layer's mask to constant 1.0 seems to have fixed the problem! :D
« Last Edit: December 17, 2021, 03:51:28 PM by ZoltanE »