Issue with flowmap on large tiled landscape

The Setup:

  • Landscape material blending two materials using flow map image as an alpha for blending.
  • Large 16x16km tiled world [8 x 8 or 64 total landscape tiles] using world composition
  • Flow map image has 4 different flows merged into a single image at resolution of 2017
  • I am using landscape coordinates node with a mapping scale of 16,136 (2017 * 8). [Many tutorials show using the resolution value for mapping scale, but that results in the entire flow map being distributed across each single tile, so the flow map is replicated 64 times rather than spanning the entire landscape area.
  • When importing the tiled world, I included an offset value to allow the 0,0 world position to be in the center of the map so that my world could fit within the 20x20 default world extends in UE4. [the box in orange in world composition image].

The Issue(s):

  • The attached screenshot shows the flow map (left) and the world composition overview (right). It appears that the image is being tiled over the landscape in a mixed up way. The four sections should match but as you can see by the numbering I added to the screenshot that the landscape is applying them in an offset way.

Either the image is automatically flipped both upside down and vertically, or this is a result of the fact that I have used the offset option during landscape import to allow the landscape to have the 0,0 coordinate at the center of the world. I am going to duplicate the process without using the offset to see if that is in fact what is happening. This makes sense from the point of view that negative coordinates could be responsible for flipping things around.

I am placing this as a bug however because of the way in which UE4 world extends are seemingly centered with 0,0 located at the middle of the orange box as seen in the world composition screen image (right).

Please let me know if I need to somehow flip my image before using it, or if I am using the wrong nodes, landscape coords mapping scale value, or if I am just approaching this incorrectly. I am trying to procedurally add materials to my landscape using similar maps rather than painting a huge landscape by hand.

Hey NawTCar,

Firstly, was this tiled landscape created in World Machine?

There are some things you will need to pay attention to and follow when working with a tiled heightmap from world machine.

I would read over our documentation regarding World Origin Shifting as well as the import settings when setting up your tiled landscape. It could be as simple as flipping the Y-coordinate on import to fix the improper organization of your tiles within the world.

I would need a way to reproduce this on my end in order to effectively assist you further.

Thanks,

H

Thanks Andrew. I did have to flip the Y coordinate otherwise, the tiles will be arranged out of order. In this instance, the landscape itself did order properly but the application of the mask is out of order. The World Origin Shifting looks interesting. Honestly, I don’t quite understand the concept yet but will research it.

Okay, let me know if you find anything new. It sounds like your mask just needs a bit of math adjustment as well to match the correctly imported landscape tiles.

Thanks Andrew. As a test, I did reimport my tiled landscape without the offset so that origin position 0,0 is now in the lower left corner of the world. The mask works as expected. Of course, my 16km x 16km world well exceeds the UE4 “world extends” boundary and even though the mask would work, from what I have read I could end up with animation jitters and the other problems resulting from going out so far from the world origin point. As I research World Origin Shifting it seems to me that I may be opening up quite the can of worms.

My remaining questions for you are:

  • In your opinion does using World Origin Shifting cause more problems than it is worth?
  • Are there any additional docs that detail how to implement World Origin Shifting?
  • Is there a way to have a large world without using World Origin Shifting or some more simplified approach you are aware of?

It seems to me that a maximum world size of 2.5km x 2.5km is the limit without needing to apply world origin shifting. This would allow the landscape to fit within the upper right quadrant of the ue4 “world extends” boundary box and keep the 0,0 origin position in the lower left corner, which seems to make UE4 happy.

I am admittedly very unclear on how to implement shifting, but from what I have read so far it seems I would have to apply added logic to every single actor, and whenever using locations or vectors. The same apparently for landscape materials as well.

If there are additional documents that better describe implementing World Origin Shifting, or if there is any other way to simplify my understanding of this process please point me in the right direction - and thanks for your time and help!

Hi Andrew. Alternately, could you show me an example of the math I might do on the mask. I can figure out how to add an offset for each world actor, but I am not sure how to apply it to the mask, as each sector flips the image differently. Everything I have been trying has not been working.

Hey NawTCar,

To be honest, I have not used World Origin Shifting enough to be able to tell you for sure when making a design decision on your project. The research will just need to be done by yourself, which seems to be going just fine. When it comes to choices like these, I usually just give it a trial run first before deciding on it as a final solution. I will say, you can alternatively use the World Composition streaming system and never need to use World Origin Shifting.

Another piece of advice is to avoid over complication, and try to gauge how practical a particular tool might be for your project. If you know for sure it will help in the long run, then by all means use it, but if you are unsure of how it is going to work or affect the end result I would test the waters before diving in too deep.

Thanks,