Search Unity

Question Seeking Assistance: Converting Polygon Geodata to 2D Sprite Texture

Discussion in 'Scripting' started by dmmce2018, Feb 20, 2024.

  1. dmmce2018

    dmmce2018

    Joined:
    Jul 22, 2023
    Posts:
    1
    Hello everyone,
    I hope this email finds you well. I am currently immersed in a project that requires extracting a specific 2D sprite texture from polygon geodata obtained through Mapbox. Despite exploring various approaches, I find myself encountering challenges in efficiently extracting the precise sprite required for texturing building ceilings in our project.
    To provide some context, I possess the capability to display maps from different providers such as Google, Mapbox, and Cesium through our project infrastructure. However, the crux of the matter lies in extracting the desired texture from a defined polygon region.
    Here's where I am seeking your invaluable assistance and expertise:
    Converting to 2D Sprite: I aim to convert the geodata defining a particular polygon into a 2D sprite format suitable for texturing building ceilings. The challenge lies in achieving this conversion efficiently and accurately.
    I am particularly interested in any insights, tips, or resources you may have regarding this task. Whether you have experience with Mapbox or any other relevant tools or APIs, your guidance would be immensely beneficial to our project.
    If you've encountered similar challenges or have suggestions on how to streamline this process, I would greatly appreciate hearing from you.
    Thank you all in advance for your assistance and support.
    Best regards,

    Charbel Khoury
    Senior Unity developer
     
    Last edited: Feb 20, 2024
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,403
    Does it need to be realtime?
    If yes,what are the slowest parts, when looking at profiler?

    Is there problem with accuracy or want to improve it?

    And attach some images to get better understanding of those issues.
     
  3. Nad_B

    Nad_B

    Joined:
    Aug 1, 2021
    Posts:
    712
    Is this a job offer? or a bot?
     
  4. Charbel_Globalistic

    Charbel_Globalistic

    Joined:
    Jan 18, 2023
    Posts:
    6
    Please refer to the screenshots provided. The map is being displayed using Mapbox tiles, and the building is represented by coordinates forming a polygon. The building is constructed using LibDotNet for creating walls. Currently, the ceiling opacity is set to 0.1 out of 1.0, allowing the floor material to be visible. However, I aim to assign the same material displayed on the ceiling to the entire building.


    Thank you Screenshot 2024-01-23 121741.png Screenshot 2024-01-23 121828.png Screenshot 2024-01-23 121847.png