Simul Support ExchangeCategory: WaterInconsistency of Water Masking
Alexander Alikin asked 4 years ago

I am trying to use a water mask component with a custom mesh. I got two issues.

Minor issue: Once I set everything up in Blueprint I see the changes in the world viewport. Once I hit ‘compile’ mask disappears. Okay, maybe it should work only after ‘Play’, not sure about that.
Major issue: Once I hit ‘Play’ – water is masked out, everything’s fine. ‘Stop’ — ‘Play’ (again) — water is back, mask doesn’t work. Next time — it works again. Next — it doesn’t. After that is starts not working every time and to force it to work again I have to make any minor changes to mask settings, save them and then restore the settings back (since I don’t really need to change anything).
Blueprint setup
Mesh for masking

Alexander Alikin replied 4 years ago

Also I can not edit the post and images doesn’t show up for some reason.

Links to the images:

Alexander Alikin replied 4 years ago

After a while my project started crashing on loading (I haven’t changed anything about the mask or its settings since I posted here). I figured out that there’s a nullptr issue in TrueSkyWaterMaskComponent.cpp. Not sure if that explains the original issue on my post cuz when I was posting it there was no crash, just mask didn’t work properly.

The problematic line is about to be executed (despite the custom mesh pointer is fine RenderData is nullptr and LODResources is nullptr):

Line executed (crash):

Alexander Alikin replied 4 years ago

More detailed explanation on the Slack channel:

1 Answers
Lily Szuplewski Staff answered 4 years ago

Apologies for the late reply, but for a more permanent record, this issue occurs when the option ‘Allow CPU Access’ in the mesh properties isn’t turned on. This applies also to any use of custom buoyancy meshes, as for both these features to function correctly the pugin needs to access the vertices of the meshes.