Announcement

Collapse
No announcement yet.

what is the math between the Z position of landscape tiles??

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    what is the math between the Z position of landscape tiles??

    Heey there!

    I am trying to figure this one out...

    So far I have understand how to correctly math out the UE4 scale for a tiled landscape from WorldMachine tiles. (world machine max evolution / 0,1953125)
    But I can't figure out how to pixel perfect calculate the Z offset to match landscape tiles with different sizes.

    I want to do some complex stuff, matching small terrain tiles with a lot of detail with large low res details. It's a special case and would love to have some insights in what exactly the units in UE4. When UE4 is telling me, the landscape tile is positioned at -10000 in Z, what does that exactly mean? And how to I calculate the new offset in Z when I scale that tile by a certain number?
    Any hints are much appreciate!

    All the best! Tom

    #2
    So, landscape components are a bit weird - in so that they have different measures.

    First of, Are you working with individual tiles, or full maps?
    in either case both have a bounding box that gives you their size in the overall units.

    The z elevation of the landscape tiles (individualized components by getting the array of components (in bp, make a landscape variable, select the landscape, drag off from the var and use Get components By Class, select Landscape Component) is essentially driven by the bounding box.
    this makes a Per Tile z be in the middle of the bounding box size - essentially.

    You an try to see results of it by looping through the array and adding a static mesh component (of roughly the same size as the terrain so you can spot it) and setting it's world location to the location of the array element (the tile) without any filters.

    For the full landscape, it's similar but different. it's based on the z scale you import with, and there has to be some more precise math to it, I have never had to dig into it as of yet. though the process would be similar, loop through the loaded landscape tiles instead of the individualized components...

    Comment


      #3
      Originally posted by MostHost LA View Post
      So, landscape components are a bit weird - in so that they have different measures.

      First of, Are you working with individual tiles, or full maps?
      in either case both have a bounding box that gives you their size in the overall units.

      The z elevation of the landscape tiles (individualized components by getting the array of components (in bp, make a landscape variable, select the landscape, drag off from the var and use Get components By Class, select Landscape Component) is essentially driven by the bounding box.
      this makes a Per Tile z be in the middle of the bounding box size - essentially.

      You an try to see results of it by looping through the array and adding a static mesh component (of roughly the same size as the terrain so you can spot it) and setting it's world location to the location of the array element (the tile) without any filters.

      For the full landscape, it's similar but different. it's based on the z scale you import with, and there has to be some more precise math to it, I have never had to dig into it as of yet. though the process would be similar, loop through the loaded landscape tiles instead of the individualized components...
      heey, thnx again for the explanation.
      hm. hard to understand. So there is some magic involved and it's completely based upon Z scale. I am working with a tiled landscape btw. There also seems to be a different when importing a tiled landscape with 100% z scale and scale it afterwards or importing and setting the correct scale already.

      Comment


        #4
        Definitely. scaling after gives sort of unexpected results. Not that it can't be done.

        They have actual math to find the right scale
        https://wiki.unrealengine.com/Landsc...d_Height_Guide

        The wiki is old, so test if that still applies in a new blank map before moving on...

        Comment

        Working...
        X