I tried to make the landscape material from the “Stylized” game work on my mobile. First I had to delete the shore and wave parts of the material in order to make the material appear at all, because it had to many texture sampler node in it.
Then it showed up but the texture resolution is completly different on my Galaxy S4 than it is inside the mobile previewer. Is this because there is math on the UV Nodes. The docs say this should be avoided. Even tough many off the sample content materials have math on the UV nodes and they still seem to show up correctly on Galaxy S4.
How to improve this material, so that it shows up correctly?
Here is the mobile preview version:
And here its how it looks on galaxy S4:
Landscapes on mobile:
Component sizes larger than 128x128 vertices are not supported, for example 127x127 quads with 2x2 subsections. Larger component sizes would require more than 65536 vertices in a vertex buffer, which will overflow the 16-bit index values. Attempting to use a larger size will cause rendering corruption. In this situation, setting MobileLodBias=1 will solve the problem as it reduces the number of vertices in the component.
That was causing the disruption
Maybe this “disruption” should be visible in the mobile previewer as well?
Edit2: Maybe it has also do with scaling of the texture coordinates. Not sure if this max component thing is still valid.
This problem keeps popping up randomely. For example also when I use splines on the landscape it keeps screwing up the textures like on the picture.
Thank you for reporting this issue. Would you be able to provide your project log files and your Dxdiag for this project? Also, is there a simple way that I may be able to reproduce this issue on my end?
Any additional information would be greatly appreciated.
Thanks and have a great day!
I think this issue came up by not using custom uv’s for the landscape material. Basically its the landscape material from the stylized project. I could get rid of it for now by using custom uv’s, but not sure if the issue will pop up again.
You may be able to fix this issue by using this approach. Take all of the UV math an place it into one of the custom UV slots. these can be added by going into the material attributes and setting custom UV’s and set the number pending on how many custom UV’s you would need.
Let me know if this helps you with the issue that you have been seeing.
I wrote in the comment before that I used custom uv’s to get rid of the problem :). Altough I am not sure how to use custom uv’s when there are several different Landscape coordinates with different math like in the stylized project.
How can I assure that I plug in the wires correctly into the custom uv’s so that the correct math is applied on the related sample?
Here is an image that may clear up a bit of confusion about the material:
In the LandscapeCoords of the material, be sure to have the CustomUVtype set to LCCT none or LCCT 0. The Customized UV’s at the bottom of the material are used to pass math into the base color. When using custom UV’s they are vertex shader based and there may be differences between the pixel version of the math and the vertex version of the math. You should be able to adjust that math accordingly but without seeing the exact math, it is hard to tell you what to adjust.
If the error is still occurring, would you be able to share the .uasset material with me?
Thanks and have a great day!
No, the error isnt occuring when using custom uvs. Thanks for the infos about the custom uvs !!
This solution fixed the issue I was having with the pixelated landscape texture, but now I have another issue: The landscape texture shifts as the player moves around.
This is due to the fact that I scale up the texture using the TextureCoordinate node, either by using the UV tiling option or by using a multiply, either way the effects are the same, the texture shifts as the player moves around.
Is there any way to scale up the texture in the material editor while using Custom UVs without incurring this problem?
It turns out that there is a scaling option in the LandcapeCoordinate node. That worked.