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

Unity terrain toolkit changes my control texture resolution

Discussion in 'Editor & General Support' started by cod, Apr 9, 2012.

  1. cod

    cod

    Joined:
    Nov 26, 2011
    Posts:
    267
    In the set resolution window, if I set control texture resolution to 1024 instead 512 and then I apply the procedural texture generator of the unity terrain toolkit it changes my value to 512 each time. Could someone help me ?
     
  2. cod

    cod

    Joined:
    Nov 26, 2011
    Posts:
    267
    anyone?
     
  3. cod

    cod

    Joined:
    Nov 26, 2011
    Posts:
    267
    help!!!!
     
  4. cod

    cod

    Joined:
    Nov 26, 2011
    Posts:
    267
    bump
     
  5. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,557
    I had the same problem. If your Terrain Toolkit splatmap is 512x512 it will reset the terrain control texture resolution to 512 when you apply it.

    I opened my 513x513 .png splatmap in Photoshop and resized it to 1025x1025. (1025 instead of 1024 since unity seems to need this extra pixel). Then i imported that into unity and used it as my splatmap in Terrain Toolkit.

    When i reapplied the splatmap my Terrain Control Texture resolution resized to 1024.

    Hope this helps.
     
  6. foosart

    foosart

    Joined:
    Jun 6, 2012
    Posts:
    66
    Would you mind telling me where I can find the splatmap texture, and how to import it into Unity? I'm having the same issue and would like to try increasing the size to 1025 x 1025.

    Thanks!
     
  7. Kragh

    Kragh

    Joined:
    Jan 22, 2008
    Posts:
    657
    Well, what you opened was not the splatmap then (if it were 513) but the heightmap. The splat maps are power of 2. The reason the heightmap needs this extra pixel, is because a terrain with 512*512 sets of quads (two triangles will be on each quadratic quad), will have 513*513 vertices. And the heightmap controls individual vertices, not quads or triangles :)

    Like this (note the 3*3 vertex positions, when having a 2*2 quad setup)
    ___
    |_|_|
    |_|_|
     
  8. foosart

    foosart

    Joined:
    Jun 6, 2012
    Posts:
    66
    I have the above problem (unable to change the control texture resolution), but ONLY when my terrain is based on a heightmap that I import.
    Importing a heightmap appears to lock out the ability to change any of the values in the "set heightmap resolution" window.

    If I create a terrain and sculpt it by hand in Unity, I'm able to set these values without a problem.

    I'd like to be able to import my own heightmap, then increase the size of the "control texture resolution". For some reason it is limiting me to 512x512.

    Any ideas?
     
  9. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    943
    Just in case someone has the same problem: in code you can see that the controlmap size is bound to the heightmap size.
    So the procedure is:
    export heightmap,
    scale heightmap to wanted control texture size,
    save as copy,
    import scaled heightmap,
    use terrain tool,
    import old heightmap.