Search Unity

WorldComposer a tool to create real World AAA quality terrain

Discussion in 'Assets and Asset Store' started by eagle555, Dec 6, 2013.

  1. maddabbo

    maddabbo

    Joined:
    Oct 4, 2014
    Posts:
    5
    I've tried everything I can think of

    I can't find a way to get it to download more than a single area.
    I also can't find a way to have it use the same center for two different areas.

    If you shift click set the area jumps to the center. if you resize it somewhere else it gets the new center based on teh resize. There is no way I see to have a center outsize of the area downloading.

    Obviously I am missing something?

    What does the export world file checkbox do?

    Thanks,
    -michael
     
  2. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    WorldComposer uses 1m = 1 Unity unity on default with scale set to 1 in the 'Create Terrains' tab.
    So I wonder what you mean with everything comes in too small, can you send a screenshot with a cube as a reference on your too small terrain? And also a screenshot of the area you used in WorldComposer map.

    Nathaniel

    scale.jpg
     
  3. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hello Michael,

    You can scale the physics down:
    http://answers.unity3d.com/questions/301659/how-to-scale-down-physics-engine.html

    I'm not sure what you mean with fit to view. Can you explain in more detail?

    Nathaniel
     
  4. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    If you look unto the previous page and scroll a little up, I describe how to do it. To be able to download more then 1 area you need to create more area's. To add an area click the '+' button in the 'Areas' tab. For each area you should choose a different folder where to save the heightmap/satellite images and terrainData's to. You can click on an Area label to select it, or use the popup field in 'Areas'. If you click 'Export Heightmap/Images' in 1 area, then select the second area and click 'Export Heightmap/Images' for that area, the area is put into the queue, and it will start downloading after the other area is done. You can even download an entire region by shift clicking the export buttons. You can stop all downloading by control clicking the export buttons. The current area that is exporting has a white border and the area's in queue have an orange border. Selected area is yellow and unselected area is green.

    You first need to put the area's to the correct size, then you can center them on each other.

    Export world file is for importing WC data into software like global mapper:
    http://en.wikipedia.org/wiki/World_file

    If you need more help, let me know...

    Nathaniel
     
  5. Machacator

    Machacator

    Joined:
    Oct 1, 2014
    Posts:
    6
    Hi eagle,
    I bought your tool a week ago, it is amazing!. However ...
    Im having some difficulties when using Worldcomposer and easyroads3D. The heightmap from the region i need (south Spain) is far from usable (16), making imposible for ER3D to anchor the spline to the terrain for the roads, rendering them above/under the terrain.
    Ive seen what you say above about importing external heighmap during the worldcomposer process.
    How do you do that?
    I mean, do you have to make a subset of an externally downloaded heightmap making the region correlate with the WC image, and click on "generate terrain" storing your heighmap when the usual WC composer heightmap is?
    How do you trick WC into taking my heightmap to generate the terrain?

    Crazy idea: Since what i really need are more anchor points for the road/spline, could i manually increase the resolution of the heightmap? same crappy altitudes but more polygons..

    Thank you very much!
     
    Last edited: Oct 8, 2014
  6. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hello,

    The heightmap in Spain is 90m per pixel, towards swiss/itality it's 45m per pixels. Yes you can replace the Raw file WC is using with your own.

    The other idea was already in WC but I removed the possibility because many users were using a much higher terrain resolution that was needed, and then mailed me about the terrain being blocky, which could be resolved with the smooth button, but still you don't want to use a higher heightmap resolution then needed for performance without any reason...But this is a good reason, I had someone asking in the previous forum page about it as well, and I posted this package that removes the restriction, you need to smooth the terrain afterwards (can do with the smooth button in WC 'Create Terrain' tab):


    Nathaniel
     

    Attached Files:

  7. petak_core

    petak_core

    Joined:
    Nov 19, 2012
    Posts:
    57
    Hello eagle555, thanks for great asset WC & TC.

    I have some questions before I buy your assets:
    *it's possible make whole planet looks like Earth with your asseets ?
    *it's optimized for mobile devices ?

    My goal is make some simple Google Earth - So you can zoom in to mountain, or recognize basic continent (America/Europe/Asia/Africa). So there is focus on real word (map-data) looks like.

    For example when I zoom to Nepal I would like find Mount Everest. :)

    Is that possible with your asset or the are some limitations ?

    Thank you for your answer.
     
    Last edited: Oct 9, 2014
  8. Machacator

    Machacator

    Joined:
    Oct 1, 2014
    Posts:
    6
    Thank you very much Nathaniel!
    im pretty sure my lack of resolution problem is much worse than the potential performance issues

    I will give it a try and get back with the result.
    I have seen other people having similar issues with other spline based apps.
    May be it could help others.
     
  9. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    I emailed you directly a few weeks ago. The area is Bodie, CA at 38.212109,-119.012207.
     
  10. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hello,

    It is possible to extract the whole earth and put it on a terrain. However WorldComposer uses standard Unity terrain, and Unity terrain is a flat grid, so you can't have a sphere like google earth. Unity terrain does work on mobile devices. If you want to make a simple mobile version of google earth, there's tera bytes of satellite images stored on google and bing server to be able to zoom in far. So zooming would be limited vs disk space. Also if you want to update the heightmap/satellite images you would need some kind of streaming system, this is not included with WC.

    Nathaniel
     
  11. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hello, I send you an email with an example from the Bodie area...

    Nathaniel
     
  12. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
  13. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    For some reason, I'm getting errors. I was able to make a map in the past, bt now nothing. Why?

    Error reading crossdomain policy: Expected element
    UnityEngine.WWW:get_isDone()
    Map_tc:Update() (at Assets/TerrainComposer/Editor/Map_tc.js:3578)
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

    You are trying to load data from a www stream which had the following error when downloading.
    Rejected because no crossdomain.xml policy file was found
    UnityEngine.WWW:LoadImageIntoTexture(Texture2D)
    Map_tc:Update() (at Assets/TerrainComposer/Editor/Map_tc.js:3601)
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
     
  14. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hello,

    It's because you are in webplayer build mode. Its descriped in the troubleshooting in the WorldComposer manual how to get it working in this mode...

    Trouble Shooting
    Webplayer Mode If you are in WebPlayer Mode you will get this error: You are trying to load data from a www stream which had the following error when downloading. Rejected because no crossdomain.xml policy file was found
    This is because of the protection level, to solve it do the following:
    Unity Menu -> Edit -> Project Settings -> Editor...Then in Inspector change 'Host URL' to http://dev.virtualearth.net

    Nathaniel
     
  15. scamg

    scamg

    Joined:
    Oct 16, 2014
    Posts:
    6
    Hi Nathaniel,

    I have read some shapefiles based on http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf

    PolylineZ is the one I have, it's the centreline of a train track.

    We have a fair amount of terrain data captured using world composer, from Australia.
    The central latlong is:
    latitude -20.6338
    longitude 147.893​

    I'm using this utilities script attempt to convert the lat/long from the shapefile to unity positions that align to the terrain made with world composer (specifically the latlongToMeters2 function, providing the lat/long read from the shapefile and the center coordinate as stated above which is the center of the region captured from world composer)

    Code (CSharp):
    1. using UnityEngine;
    2. using System;
    3. using System.Collections;
    4.  
    5. public class TerrainUtilities
    6. {
    7.     static readonly double metresPerDegree = 111319.49079327357264771338267056f;
    8.     static readonly double PI = Math.PI;
    9.     static readonly double piOn360 = PI / 360.0;
    10.     static readonly double piOn180 = PI / 180.0;
    11.  
    12.     static readonly double minLatitude = -85.05112878;
    13.     static readonly double maxLatitude = 85.05112878;
    14.     static readonly double minLongitude = -180;
    15.     static readonly double maxLongitude = 180;
    16.  
    17.     public static double toRadians(double degrees)
    18.     {
    19.         return piOn180 * degrees;
    20.     }
    21.  
    22.     public static double[] clipLatlong(double[] latlong)
    23.     {
    24.         double[] clippedLatLong = new double[2];
    25.         latlong.CopyTo(clippedLatLong, 0);
    26.  
    27.         if (clippedLatLong[0] > maxLatitude) { clippedLatLong[0] -= (maxLatitude*2); }
    28.         else if (clippedLatLong[0] < minLatitude) { clippedLatLong[0] += (maxLatitude*2); }
    29.  
    30.         if (clippedLatLong[1] > 180) { clippedLatLong[1] -= 360; }
    31.         else if (clippedLatLong[1] < -180) { clippedLatLong[1] += 360; }
    32.  
    33.         return clippedLatLong;
    34.     }
    35.  
    36.     public static double[] latlongToMercator (double latitude, double longitude)
    37.     {
    38.         double[] mercator = new double[2];
    39.  
    40.         mercator[0] = latitude * metresPerDegree;
    41.         mercator[1] = Math.Log ( Math.Tan ( toRadians ( (90 + longitude) * Math.PI / 360 ))) / (Math.PI / 180);
    42.         mercator[1] = mercator[1] * metresPerDegree;
    43.         return mercator;
    44.     }
    45.  
    46.     public static double latLongAreaResolution(double latitude)
    47.     {
    48.         return 156543.04*Math.Cos(latitude*piOn180)/(Math.Pow(2,17));
    49.     }
    50.  
    51.     public static double[] latlongToMeters(double latitude, double longitude)
    52.     {
    53. //        latLong = clipLatlong(latLong);
    54.  
    55.         double x = (longitude+180.0)/360.0;
    56.         double sinLatitude = Math.Sin(latitude*piOn180);
    57.         double y = 0.5 - Math.Log((1.0+sinLatitude)/(1.0-sinLatitude))/(4.0*PI);
    58.  
    59.         x *= 256.0 * Math.Pow(2.0, 17) * 1.1943;
    60.         y *= 256.0 * Math.Pow(2.0, 17) * 1.1943;
    61.  
    62.         double[] meters = new double[2];
    63.  
    64.         meters[0] = x;
    65.         meters[1] = y;
    66.  
    67.         return meters;
    68.     }
    69.  
    70.     public static double[] latlongToMeters2(double latitude, double longitude, double latCenter, double longCenter)
    71.     {
    72.         //        latLong = clipLatlong(latLong);
    73.  
    74.         double x = (longitude+180.0)/360.0;
    75.         double sinLatitude = Math.Sin(latitude*piOn180);
    76.         double y = Math.Log((1.0+sinLatitude)/(1.0-sinLatitude))/(4.0*PI);
    77.  
    78.         double[] meters1 = new double[2] { x, y };
    79.  
    80.         x = (longCenter+180.0)/360.0;
    81.         sinLatitude = Math.Sin(latCenter*piOn180);
    82.         y = Math.Log((1.0+sinLatitude)/(1.0-sinLatitude))/(4.0*PI);
    83.  
    84.         double[] meters2 = new double[2] { x, y };
    85.  
    86.         double[] meters3 = new double[2];
    87.         meters3[0] = meters1[0] - meters2[0];
    88.         meters3[1] = meters1[1] - meters2[1];
    89.  
    90.         double metersPerPixel = latLongAreaResolution(latCenter);
    91.  
    92.         meters3[0] *= 256.0 * Math.Pow(2.0, 17) * metersPerPixel;
    93.         meters3[1] *= 256.0 * Math.Pow(2.0, 17) * metersPerPixel;
    94.  
    95.         return meters3;
    96.     }
    97. }
    As shown in the attached photos, I can't get the shapefile to quite line up with the terrain, it's close though. I'm guessing it's because the area is large and therefore using a single coordinate for the center won't suffice and instead i need the center coordinate of the nearest tile to the relevant shapefile point. And as the resolution varies with lattitude, i'm guessing you would have to sum the length/width of each tile as you move away from the common center of all of the tiles.

    Can you walk me through the pseudo code of how you get the terrain heightmap data into unity space so I can figure out how to try and align other data to it.

    WholeTerrain.jpg

    CloseUp.jpg
     
  16. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hello,

    Here's the Bing map tile system and conversion numbers:
    http://msdn.microsoft.com/en-us/library/bb259689.aspx

    Here's a script for it for Bing which I posted on page 4 of this forum:

    Code (csharp):
    1. #pragma strict
    2.  
    3. var global_script: global_settings_tc;
    4. var latlong_center: latlong_class = new latlong_class();
    5. var latlong: latlong_class[];
    6. var offset: Vector2 = new Vector2(0,-27);
    7.  
    8. function Start(){
    9.    
    10.     var counter : int = 0;
    11.    
    12.     latlong[2].latitude = 49.34544372558594;
    13.     latlong[2].longitude = -119.579584441234;
    14.    
    15.     for(var p in latlong){
    16.        
    17.         var pos = calc_position(p.latitude, p.longitude);
    18.         var go = GameObject.CreatePrimitive(PrimitiveType.Cube);
    19.         go.transform.position = new Vector3(pos.x, 0, pos.y);
    20.        
    21.         Debug.Log(calc_latlong(go.transform.position).x+" : "+calc_latlong(go.transform.position).y);
    22.        
    23.         go.name = "Test point " + counter;
    24.        
    25.         counter ++;
    26.     }
    27. }
    28.  
    29. function calc_latlong(pos : Vector3) : Vector2
    30. {
    31.  
    32.     var map_pixel: map_pixel_class = new map_pixel_class();
    33.  
    34.     var map_pixel_center: map_pixel_class = global_script.latlong_to_pixel2(latlong_center,19);
    35.  
    36.     var map_resolution: double = global_script.calc_latlong_area_resolution(latlong_center,19);
    37.    
    38.     map_pixel.x = ((pos.x-offset.x)/map_resolution)+map_pixel_center.x;
    39.     map_pixel.y = (-(pos.z-offset.y)/map_resolution)+map_pixel_center.y;
    40.  
    41.     var returnVal : latlong_class = global_script.pixel_to_latlong2(map_pixel,19);
    42.  
    43.     return Vector2(returnVal.longitude, returnVal.latitude);
    44. }
    45.  
    46. function calc_position(lat : double, lon : double) : Vector2
    47. {
    48.     var latlong = new latlong_class(lat, lon);
    49.  
    50.     var returnVal : Vector2;
    51.  
    52.     var map_pixel: map_pixel_class = global_script.latlong_to_pixel2(latlong,19);
    53.     var map_pixel_center: map_pixel_class = global_script.latlong_to_pixel2(latlong_center,19);  
    54.  
    55.     var map_resolution: double = global_script.calc_latlong_area_resolution(latlong_center,19);
    56.    
    57.     returnVal.x = (map_pixel.x-map_pixel_center.x)*map_resolution;
    58.     returnVal.y = (-map_pixel.y+map_pixel_center.y)*map_resolution;
    59.    
    60.     returnVal += offset;
    61.    
    62.     return returnVal;
    63. }
    Nathaniel
     
    Last edited: Oct 19, 2014
  17. scamg

    scamg

    Joined:
    Oct 16, 2014
    Posts:
    6
    Hello,

    I have been to the bing map tile info page, and also did mangle the script you had posted already into the c# script that was part of my post.

    It converts the values to something quite close to a correct value, as you can see from the attached photos. But my feeling is that as the values get further from the "Center" lat long that they become more inaccurate.

    So for getting a lat/long position into the "World Composer" terrain space you in a unity scene:
    1. Know the center lat/longs of all the tiles you've grabbed from "WorldComposer"
    2. Find the nearest tile to the lat/long of the object you're trying to place
    3. Use that tile's center lat/long as the "latlong_center" value of the script Nathaniel provided
    4. Use that tile's bounds.center.xz as the "offset" value of the script Nathaniel provided
    Hope this makes it clearer to anyone who is doing a large area made of multiple tiles and needs to accurately place other types of geospatial data in the scene.
     
  18. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hello,

    Ah ok. Yes I also noticed there's some inaccuracy, I did look into my code many times to see if there was something wrong in my part, but couldn't find anything. So I think it's on Bings part. You can look into the code in Map_tc.js to see what I'm doing. If you click the image export button, the function start_image_pull is called. There I set the variable export_image_active to true. And then the image extracting is handled in the update function in line 3850.

    Code (csharp):
    1. global_script.map.texExt[count_texExt].latlong_center = global_script.calc_latlong_center_by_tile(global_script.map.export_image_area.latlong1,global_script.map.export_image.tile,global_script.map.export_image.subtile,global_script.map.export_image.subtiles,global_script.map.export_image_zoom,512,export_image_area.image_offset_e);
    2. global_script.map.texExt[count_texExt].latlong_area = global_script.calc_latlong_area_by_tile(global_script.map.export_image_area.latlong1,subtile,global_script.map.export_image_zoom,512,Vector2(512,512),export_image_area.image_offset_e);
    3.                    
    4. // Debug.Log("Load Tile :"+global_script.map.texExt[count_texExt].tile.x+","+global_script.map.texExt[count_texExt].tile.y+" Subtile :"+global_script.map.texExt[count_texExt].subtile.x+","+global_script.map.texExt[count_texExt].subtile.y);
    5.                    
    6. global_script.map.texExt[count_texExt].url = "http://dev.virtualearth.net/REST/v1/Imagery/Map/"+global_script.map.type.ToString()+"/"+global_script.map.texExt[count_texExt].latlong_center.latitude+","+global_script.map.texExt[count_texExt].latlong_center.longitude+"/"+global_script.map.export_image_zoom+"?&mapSize=512,544&key="+global_script.map.bingKey[global_script.map.bingKey_selected].key;
    7.                    
    8. pull_image(count_texExt);
    An area is split up in tiles, based on image resolution. Then for those tiles I grab images with resolution of 512,544. There's text in the bottom of each image, so I cut that out by copying 512,512 into the image resolution texture. So if image resolution is 2k, I copy 4x4 = 16, 512 resolution images into it and that is the texture that is saved as jpg, raw, etc. So there's tiles within tiles. I calculate the latitude/longitude for each 512 pixel width tile in line 3880 and 3881 calc_latlong_center_by_tile and calc_latlong_area_by_tile. I calculate the center of the tile with the first function, and the top,left and bottom,right lat/long for each 512 tile with the second function. These function can be found in global_settings_tc.js script (line 1108, and line 1023).

    global_script.map.texExt[count_texExt].latlong_center = global_script.calc_latlong_center_by_tile(global_script.map.export_image_area.latlong1,global_script.map.export_image.tile,global_script.map.export_image.subtile,global_script.map.export_image.subtiles,global_script.map.export_image_zoom,512,export_image_area.image_offset_e);

    What I feed in the calc_latlong_center_by_tile is the top,left (latlong1) of the area, the tile number, and subtile number, image zoom level and manually adjustable offset. Then this function converts the latlong1 into bing map pixels. Resolution is multiplied by factor (2^(19-zoom)), so for zoom level 18 factor = 2. Then I calculate pixel with top/left latlong1 with zoom level 19 (thought 19 would give more accuracy). Then I calculate the pixel center of the 512 image tile, by :

    pixel.x += (tile.x*subtiles.x*resolution)+(subtile.x*resolution);
    pixel.y += (tile.y*subtiles.y*resolution)+(subtile.y*resolution);
    Gives the top/left pixel coordinate

    pixel.x += (resolution/2)+offset.x;
    pixel.y += (resolution/2)+offset.y;
    This will give the center of the 512 image tile.

    convert this center pixel coordinate back to lat/long with latlong_center = pixel_to_latlong2(pixel,zoom);


    Code (csharp):
    1. function calc_latlong_center_by_tile(latlong: latlong_class,tile: tile_class,subtile: tile_class,subtiles: tile_class,zoom: double,resolution: int,offset: Vector2): latlong_class
    2. {
    3.     var factor: float = Mathf.Pow(2,19-zoom);
    4.     zoom = 19;
    5.     resolution *= factor;
    6.  
    7.     var latlong_center: latlong_class = new latlong_class();
    8.  
    9.  
    10.     var pixel: map_pixel_class = latlong_to_pixel2(latlong,zoom);
    11.  
    12.     pixel.x += (tile.x*subtiles.x*resolution)+(subtile.x*resolution);//-(tile.x*2);
    13.     pixel.y += (tile.y*subtiles.y*resolution)+(subtile.y*resolution);//-(tile.y*2);
    14.  
    15.     pixel.x += (resolution/2)+offset.x;
    16.     pixel.y += (resolution/2)+offset.y;
    17.  
    18.     latlong_center = pixel_to_latlong2(pixel,zoom);
    19.  
    20.     return latlong_center;
    21. }
    Then with the next line calculates the top,left and bottom,right lat/long for the 512 image tile.

    global_script.map.texExt[count_texExt].latlong_area = global_script.calc_latlong_area_by_tile(global_script.map.export_image_area.latlong1,subtile,global_script.map.export_image_zoom,512,Vector2(512,512),export_image_area.image_offset_e);

    The latlong_center is used to feed the lat/long to bing and this return the actual image, which is executed in the function pull_image (line 3978):

    global_script.map.texExt[count_texExt].url = "http://dev.virtualearth.net/REST/v1/Imagery/Map/"+global_script.map.type.ToString()+"/"+global_script.map.texExt[count_texExt].latlong_center.latitude+","+global_script.map.texExt[count_texExt].latlong_center.longitude+"/"+global_script.map.export_image_zoom+"?&mapSize=512,544&key="+global_script.map.bingKey[global_script.map.bingKey_selected].key;

    After downloading, the images are copied into the image resolution textures (I use 2 textures for this to get continues streaming, as WC will already move to the next tile while the first tile isn't completely downloaded) in the function texConvert (line 4455). So if there's something wrong on my part it must be in calculating lat/long center of each 512 image resolution sub tile. But they seem to fit exactly as I don't see any borders in for example a 4k exported texture (which consist of 8x8 512 textures). If you can find something let me know...

    Nathaniel
     
    Last edited: Oct 20, 2014
  19. levan1

    levan1

    Joined:
    Nov 16, 2013
    Posts:
    14
    worldcomposer creates several terrain objects, is it possible to unite them as one terrain?
     
  20. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    The terrains are split based on 'Image Resolution' in Image Export settings. You can set this to 4k (4096), as this is the highest resolution texture Unity can handle on 1 terrain. If your total image resolution is higher than 4k, there's no way arround then using more terrain tiles. There's another solution and that is to use texture streaming amplify texture2, http://amplify.pt/unity/amplify-texture-2/
    This is a very impressive tool that allows to use any size of texture on 1 terrain or 1 material, so you can go really crazy with the image resolution. I have some users using it.

    Nathaniel
     
    Last edited: Nov 10, 2014
  21. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    Are there any recommendations on how to use WC to create streaming scenes (techniques for the creation of the tiles, alignment, etc)? Our game is going to have some locations in 1:10 scale and will have to stream levels in order to show all areas.

    Also, is there a way to enable Bing bathythermal data? If I recall, Bing has the data available as of last year.
     
    John-G likes this.
  22. megisto

    megisto

    Joined:
    Dec 25, 2009
    Posts:
    127
    Hello, i am a new customer of your World and Terrain composer tool. I succesfully create my first terrain which is very good in terms of images resolution, but i cannot understand how to have more details on the mesh of the terrain itself. Is there a way to control how dense the polycount of the terrain can be?

    Also, in my setting of a 10x10 tiles of the zone of Rome i have a max heightmap zoom of 11. When i click export i only get an image of 160x160 pixels, and that's all. Which it means a raw image of 50 kb. Is that all the resolution i can have from that zone?
     
    Last edited: Nov 14, 2014
  23. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    In Unity 5 b13 the tiles don't work correctly when exporting to terrain. What we end up with is the last time repeated over and over. Is there a fix for this?

     
  24. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hello,

    For terrain streaming you can look into Dynamic Loading Kit:
    https://www.assetstore.unity3d.com/en/#!/content/5982

    I can't find any information about the bathythermal data, can't find anything about it in the Bing Api either.
    http://msdn.microsoft.com/en-us/library/ff701724.aspx
    You have more information about it?

    Nathaniel
     
  25. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hello,

    Heightmap zoom level 11 is 90m per pixel. If you right click in the map you can see what the maximum heightmap resolution is. It's depending per area, USA is all 14, which is 10 m per pixel, then comes France with 20m per pixel and most of the rest of the World is 90m per pixel. So you can't get a higher resolution from WorldComposer. What is possible though is using WorldMachine to add more erosion and detail to the heightmap. If you want to import the heightmap in WM's input node, you have to rename the raw file extension to r16.

    Nathaniel
     
  26. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    I tested it in Unity5 and this seems like a terrain shader issue you have. Do you have any additional terrain shaders in your project? As they might cause it...If you would look into the splat textures in each terrain in the Hierarchy and then in terrain script, it should be different images assigned to each terrain.

    Nathaniel
     
  27. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Can you send a screenshot of how it looks from first person? As WC uses Unity's default scale which is 1 Unity unit = 1 meter. So the scale should be correct, e.g. you can see 24 hour demo mount rainier is first person and made with WC.

    Nathaniel
     
  28. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hello Michael,

    You can use the ruler in photoshop to get the correct scales and offset,etc. Yes I think it is possible to scale physics, I found this thread:
    http://answers.unity3d.com/questions/301659/how-to-scale-down-physics-engine.html

    Oki I will make some adjustments to WC and make a clip to view and a tutorial video for multiple area resolutions. It's a quite cool feature and I think it's a good idea to show how to do it.

    Nathaniel
     
  29. megisto

    megisto

    Joined:
    Dec 25, 2009
    Posts:
    127
    This is the heightmap i get from a 10x10 km square zone (please see screenshot). A 160x160px image. The upper one is imported in PS using "interlaced", the the lower one without interlacing. They both looks somehow wrong. I mean how can it be so contrastated the area, in a place where should be only smooth cliifs?

    I cannot set channel count to 3 as shown in your 24h tutorial (although i don't know exactly what it means).

    I get very detailed heightmap once using google sketchup with google map and exporting it as obj, so i expected to have similar results with WC.
    Color map instead is highly detailed.

    Can u give me some good advice?

    Anyway your tools looks very cool at first glance. Very professional and clean. Interface still confuse me a bit, but i think is easier that it seems once mastered.
     

    Attached Files:

  30. megisto

    megisto

    Joined:
    Dec 25, 2009
    Posts:
    127
    Ok, i am lost :) I finally got a heightmap, i saved on Photoshop as raw, 16 bit, windows byte order, non interlaced.
    Then in TC under Filters i load the map, then i click Generate, it start do something and then nothing happens.

    Why i cannot see my heightmap on the terrains?
     
  31. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hello,

    Google heightmaps are more detailed, but unfortunately they cannot be downloaded as the Google Api restricts it to such small amount that you can download each day, that it would take a month to download a decent heightmap.

    The import settings from the 24 hour tutorial are for the satellite images which are exported as RAW RGB 3 channel. You want to import a 16 bit raw grey scale heightmap.

    Nathaniel

    photoshop_raw.jpg
     
  32. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Can you show a screenshot of your heightmap layer in TerrainComposer?

    Nathaniel
     
  33. megisto

    megisto

    Joined:
    Dec 25, 2009
    Posts:
    127
    Sure thing, here. Strangely it seems that the panel sees the image at 7097x7097, but it isn't. Also i get this error

    "ArgumentException: Getting control 7's position in a group with only 7 controls when doing Repaint
    Aborting"

    Don't know if it is related. Thank you for the help.

    EDIT

    It worked once, for no apparent reason. Then it stops working. Everytime i generate the heightmap i get this error:

    Prelayer0 -> Layer0 -> Filter0
    The Raw Heightmap file 'G:/Roma_3.0/Unity_4/RomaTest/Assets/Terrains/Roma/Roma_HeightMap.Raw' has a lower resolution than selected. Please check the File size. It should be X*Y*2 = 5016*5016*2 = 5.032051E+07 Bytes (5016*5016 resolution). But the File size is 50331648 Bytes (5017x5017 resolution).

    No matter how i set the resolution, the panel from TC keep see it with the wrong one, and doesn't work even if i set with the right resolution.
     

    Attached Files:

    Last edited: Nov 14, 2014
  34. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    Since Unity 5 has wonderful issues with Enlighten eating up processing, is there any way to make the terrain tile turn off the Lightmap Static option at the start? That would keep the scene from immediately going into enlighten processing and nearly locking up the whole thing.
     
  35. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hello,

    The error is not related, it's not serious just a repaint warning. There's something wrong with your heightmap, as the warning TC gives a heightmap has to be resolution x resolution x 2 = File size in bytes. Your size is 50331648 bytes, so if you devide it by 2 and then do square root you should get a rounded number which is the resolution. But the number with the file size isn't rounded. You have to use a 16 bit Raw image, if you upload your heightmap and send me a link to my email Nathaniel_Doldersum@hotmail.com, I will take a look at it.

    Nathaniel
     
  36. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hello,

    You can turn of Enlighten and only use it on demand, if you go to Unity menu -> Window -> Lighting:

    ondemand.jpg

    Nathaniel
     
  37. megisto

    megisto

    Joined:
    Dec 25, 2009
    Posts:
    127
    The problem is solved. I just turn the raw image as "greyscale" in Photoshop. So was a problem related to the Channels.

    Now i have a different problem. I was experimenting on the interface adding and subtracting layers. But i am not able anymore to see the layer 0 of my Splatmap. I only see barely blank texture. I don't know exactly what i did, but i cannot go back to the working version. Here's the screen. BTW if i add another layer of splatmap it work.
     

    Attached Files:

  38. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hello,

    Glad it works now :). Think you changed the view options, you can click on the view button and 'Only Selected' needs to be enabled. Then also enable 'Splat' again.

    P.s. you actually need to post here for TerrainComposer as this is the WorldComposer forum ;)
    http://forum.unity3d.com/threads/te...-unity-terrain-in-just-minutes.151365/page-34

    Nathaniel
     

    Attached Files:

    • view.jpg
      view.jpg
      File size:
      117.5 KB
      Views:
      947
    Last edited: Nov 16, 2014
  39. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    This appears to be an issue with a project that has WC, TC, and RTP all in one. When I made a new project and limited it to WC, it worked. When I added in TC, it still worked. When I added RTP, it broke it. I made clean projects for all three tests and the trifecta of packages was the problem. Thanks again for your help.

    Thanks. I had found that 'bake always' option under lighting a little after I posted, but I had to dig for the info on turning the Enlighten system off. I guess the size of the terrain has a massive impact on that system so it will get logged as a bug since it just cripples the engine to the point that it nearly locks up the computer. Hopefully Unity fixes that. As it stands, if you start a new project in U5 and make a new terrain, you nearly lock up and from external appearances it seems to be a WC problem instead of Unity.
     
  40. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    As far as I know RTP doesn't work in U5 yet. Tom is working on an update to make it U5 compatible, so for now you can't use it in Unity5 beta.

    Nathaniel
     
  41. megisto

    megisto

    Joined:
    Dec 25, 2009
    Posts:
    127
  42. jmoran567

    jmoran567

    Joined:
    Dec 11, 2013
    Posts:
    3
    Workflow question from Newbie:

    Hello, just purchased World Composer and Terrain Composer hoping they are the correct assets I need. I am trying to create a world for a first person adventure game based on approximately 500 x 500 meter unity terrain. I created a new project with build settings set to iOS. I imported World Composer asset, picked the area, with image zoom at 18 and image resolution at 1024. When I clicked on create terrain, it generated a 478 x 478 terrain with an image of the area I wanted. The area is relatively flat, right clicking displayed 8 meter elevation. So far, so good.

    When I navigate down to the terrain surface, everything is flat and is very blurry. I would like to take this flat terrain and add trees, grass, roads, and buildings where they are pictured. Would the following be the correct workflow or am I on the wrong track?

    • use Terrain Composer to add trees and grass where they are pictured on the flat terrain
    • use a road asset such as Easy Roads3d or Road Architect to add the roads on top of the roads on the terrain
    • place building models on top of where the buildings are located.

    The scenes others are creating with this asset are beautiful and have so much depth. I would appreciate any guidance to make sure I am using World Composer and Terrain Composer the correct way.
     
  43. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hello,

    Thank you for the purchases :). Check out my site for tutorials:
    http://www.terraincomposer.com/tutorials

    Do you want to produce for mobile or pc?

    With WorldComposer you have to pick a good area, image resolutions are best in USA and Europe. As for heightmap resolutions they are the best in USA and then France, rest is mostly zoom level 11, and some parts zoom level 8, so you proberly have to pick another area, best to do somewhere from the USA.

    Nathaniel
     
  44. jmoran567

    jmoran567

    Joined:
    Dec 11, 2013
    Posts:
    3
    I am producing for mobile, iOS. I checked out all the tutorials but I am not clear if I am using the assets correctly. Are the bullet points in my previous post a reasonable way to build my world?
     
  45. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    Hi,

    A) I'm interesting in some areas and for sure in the possible highest resolution.
    Is there any webinterface where i'm able to previously get some infos about the area I require?

    B) I there an option to export the terrain parts to OBJ to enhance in 3dMax or others?

    Thanks
     
  46. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    If you want to place trees I made a video for placing trees on color. For placing road and buildings you can use map-ity as it works together with WorldComposer:
    https://www.assetstore.unity3d.com/#!/search/map-ity

    If you produce for iOS, you need to keep in mind that these devices are limited in performance, so you can't go crazy with resolutions and details, etc.

    Nathaniel
     
  47. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Hello,

    A) In WorldComposer the USA has highest heightmap resolution which is 10 meter per pixel. Then comes France with 20 meter per pixel. WC uses Bing maps and you can check quality here:
    http://www.bing.com/maps/

    B) Yes you can export Unity terrain as OBJ with free terrain to obj exporter on Wiki.
    http://wiki.unity3d.com/index.php?title=TerrainObjExporter

    Nathaniel
     
  48. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    Thank you, is there any chance on bing.com to get the max highmap resolution as well?
    For example: 38°42'57.15"N - 9° 7'50.93"W
    Portugal, Lissboa
     
    Last edited: Nov 19, 2014
    metis_aerospace likes this.
  49. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Looks like its just a graphics update, no actual height information for the oceans. A real pity.

    http://blogs.bing.com/maps/tag/bathymetry/

    http://www.pocket-lint.com/news/119854-bing-maps-improved-with-high-resolution-satellite-imagery

    Anyway to incorporate the following Heightmaps and Bathymetry into worldcomposser which was updated in may of this year:
    http://topex.ucsd.edu/WWW_html/srtm30_plus.html

    for example here in a region around the UK. (Open for large image)
     
    Last edited: Nov 19, 2014
  50. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    As far as I know this is not possible, but from WC you can. For Lissboa in Portugal the heightmap resolution is 60 meter per pixel.

    Nathaniel