Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Exporting terrain texture

Discussion in 'General Discussion' started by naemihan, May 30, 2020.

  1. naemihan

    naemihan

    Joined:
    Mar 28, 2020
    Posts:
    28
    I'm still new the Unity and I'm trying to export my splatmap (including the snow layer added with CTS) to a flat HD image. I need this texture map for use in blender.
    There's an export for the height map and that's working great, but no export for the spatmap because as I understand it, it's not one thing but a number of things working together. Is there no way to compile it all into one HD image ? Or maybe an HD render from top view could work ?

    Thanks
     
  2. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
  3. naemihan

    naemihan

    Joined:
    Mar 28, 2020
    Posts:
    28
    Hey thanks !
     
  4. naemihan

    naemihan

    Joined:
    Mar 28, 2020
    Posts:
    28
    Hmm, I tired that and it only exports 100x100 tga or png and doesn't seem to include any textures.





    I guess maybe I'm not asking for the right thing. Could I take a high def (same as the terrain) screenshot from above, in orthogonal perspective ?
     
  5. naemihan

    naemihan

    Joined:
    Mar 28, 2020
    Posts:
    28
    The orthogonal screenshot is looking pretty nice. I pushed it to 7000x7000 resolution, anything higher and Unity crashes.
    Although I get some slightly wide angle with the orthogonal camera, any reason for that ?
     
  6. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,553
    You know.... in my signature there's a link for a conversion project for scene transfer from unity to unreal.
    That's not what you're trying to do, BUT in the process of transfer this tool also rips terrain splatmaps and saves them both RAW and PNG images. Grayscale.

    So you could try that.

    If you want to go this route, download the project, copy "ExodusExport" into your assets, load the scene, rightclick in hierarchy window select "export to unreal" and enter file location. Then wait. Then go into a folder with the same name as yoru file, and look for "!terrain!" folders and find png splatmaps there.

    If you want this to work faster, duplicate scene first, and kill anything that's not a terrain in it.

    That's definitely not the intended use for this tool, but I don't know any other ready made solution.
     
  7. naemihan

    naemihan

    Joined:
    Mar 28, 2020
    Posts:
    28
    Thanks, I'll give it a try.
    So far all that worked was to take an orthogonal screenshot and then tweek it to match the heightmap in photoshop. Not ideal, but it could be enough for my use of it.
     
  8. jvetulani

    jvetulani

    Joined:
    Dec 20, 2016
    Posts:
    55
    Hi!

    The tool works wonders with terrains and all the individual splat maps, way better than the inbuilt terrain tools.
    Can it also export meshes, and stuff made from unity primitives? I tried exporting a building and it seems to have exported all the textures and materials but no mesh.

    EDIT:
    Oh, I see the model is in a json file, can this be somehow changed to fbx or obj?
    EDIT2:
    Nvm, will just use the unity FBX Exporter, but this was really useful for terrain splatmaps!
     
    Last edited: Oct 9, 2020
  9. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,553
    It could be done, I suppose, but unity stores extra data in models, and obj files does not support that. And fbx is not the best format for geometry transfer in general (due to being tied to autodesk sdk).

    So it is highly unlikely that I'll implement that.
     
  10. MallNinjaMax

    MallNinjaMax

    Joined:
    Apr 17, 2017
    Posts:
    25
    Export splatmap in the terrain tools is broken. It applies the last layer as an alpha map. If you delete that layer, it just makes the whole map invisible. And as usual, Unity appears to have abandoned these tools. They haven't been updated in almost a year. This system was probably designed to work perfectly with Photoshop, because Unity always assumes everyone uses Photoshop.

    I found a non-Shop workaround. What you need to do in your image editor, is separate the alpha channel from the image into a mask.

    For GIMP: Right-click the layer and click "Add Layer Mask". Select "Transfer layer's alpha channel". Click "Add". You can then delete the mask.

    For Krita: Right-click the layer, navigate to "Split Alpha", and click "Alpha into Mask". You can then delete the mask.
     
    Last edited: Nov 9, 2020
  11. Chris_Payne_QS

    Chris_Payne_QS

    Joined:
    Jul 16, 2016
    Posts:
    84
    It's not broken.
    Splatmaps aren't coloured images, they're up to four greyscale intensity maps packed into the RGBA channels of a texture for efficiency. If you separate each channel into a greyscale image, those are your splat weights for the first four layers on your terrain. This is why going above four layers costs you an extra texture...and above 8 costs another one.