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. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
    Do you have a timeframe of when you will be adding other imagery? Especially Open Street Map imagery?
     
    Last edited: Oct 4, 2015
  2. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    Hi Nathaniel,

    I contacted you a few moths ago about the image editing, which is a great approach and gives great results if used appropriately, but I personally think it's not very fleshed out. There could be great improvements and additionaly filters that would help improve the quality of the imagery.

    I proposed you an idea of using the heightmap and sun user input to calculate where the shadow lies to remove them. It's a way that may help the one or another get better results from WC;)
    The current algorithm relies too much on the color calues, which are disturbed by different cameras/satellites taking the imagery and/or different shades of shadows on different colors (like snow and forest).

    I have some other ideas, too. I don't want you to be stressed but I want the image editor to reach it's full potential;) Here are a few additional points:

    Fog removal. Slight, but important eventually. Currently, you'll often see colors fade in valleys. Using height and a little slider this could be easily adjusted, I think. How about that?

    Approach to remove color differences in areas captured by different cameras/sattelites (seen in post above by ksam2). It can really destroy the imagery and make it unusable. My idea was to adjust the colorpalette and saturation in those areas. Those areas could either be defined by the users or be caught by an algorithm. Expand to see my approach I would take.
    (Assuming the areas are of box shape, which I observed them to be):
    1. Take a point to start from (0,0).
    2. Cast a ray in each direction, with each pixel the ray passes, a color palette gets expanded to include this new color.
    3. When suddenly, the colors get changed drastically (has to be confirmed with multiple pixels), a new color palette is created from these pixels and a mark is set. Along the seam that got detected, two additional rays get casted, next to each other, each inside one of the neighboured color palette.
    AreaAlgorithm.jpg
    Of the marks and seems being recorded by the rays, you can generate the areas. There has to be a limit value when to record a new color palette, so when passing clouds or snow peaks it should not generate a new one.

    That's it from my side, I hope you take these suggestions by heart and, if you find them appropriate, could implement them.

    Finally, is there any plan on the C# version of both TC and WC? I'm really interested in a cleaner, rewritten version. Sorry, but currently it consists of huge scripts barely readable. A piece of awesomeness that is solely to be decrypted by the creator ;)

    Seneral
     
  3. viciousesque

    viciousesque

    Joined:
    Oct 4, 2014
    Posts:
    34
    Hi eagle555! Thanks for the great tool. You helped me a bit earlier this year and I was able to get very good results for something VERY similar to what I'm trying to do now, but I am having anomalous results.

    Here is an image of my WC settings and one image of the results as seen back in the scene.

    Any suggestions would be great. Thank you!

    wc_panel.png

    wc_terrain.png
     
  4. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    I first have TC2 planned. For openstreet maps you can use Map-ity, it's compatible with WorldComposer:
    https://www.assetstore.unity3d.com/en/#!/content/11779

    You have really great idea's. The shadow removal algorithm could be an external Unity application by itself. I barely do you time though that's the issue. I'm working on TC2, and I have both TC/WC converted to C#. And then for TC2 I actually started from scratch as I had some awesome idea's for it. But I have to weigh my time, as I'm also having a game studio with a team of 5 people and we are working on AAA game titles made with Unity5.

    About the blockery heightmap you can read here:
    http://www.terraincomposer.com/troubleshooting/
    The heightmap of the created terrain is looking blockery.

    If you have RTP in your project. It might be that it's not active. If you click on a terrain in terrain script on settings have to set 'Material' -> 'Custom'.

    Nathaniel
     
  5. viciousesque

    viciousesque

    Joined:
    Oct 4, 2014
    Posts:
    34
    Thanks!

    And, one more question, please. Can I export the terrains I create with WC for use in another project? I tried using "Export" button in TC, but it produced just meshes. I'd like to produce something like that, but with the materials also in tact.

    Thank you, again!
     
    Last edited: Oct 8, 2015
  6. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Hi Nathaniel,
    using the last version (1.470) the height map is vertically flipped compared to the areal photo.

    Some info:
    - Unity 5.2.1 (last official release)
    - Empty project + WC

    Could you check? Thanks

    Max
     

    Attached Files:

    Last edited: Oct 9, 2015
  7. eagle555

    eagle555

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

    Thanks a lot for telling. Yes indeed it is flipped, I made a fix for it. I will upload the my server and the Asset Store today.

    Nathaniel
     

    Attached Files:

  8. eagle555

    eagle555

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

    Yes you can do that. You create an Unity package out of the files (right click in project window in Unity). You need the TerrainData's in your project and all the textures/trees/etc used. Unity find these if you enable include dependencies and only select the terraindata's (although it might include files that are not needed). Another way would be to export the TerrainComposer folder with the folder where you store the images and heightmap from WC. And create the terrain from the other project with WC.

    Nathaniel
     
  9. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Thanks Nathaniel!
     
  10. eagle555

    eagle555

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

    I uploaded (and submitted to Asset Store) a new TerrainComposer and WorldComposer version with fixes. You can update:
    TerrainComposer 1.96 -> TC Menu -> Help -> Update
    WorldComposer 1.48 -> Update tab.

    In TerrainComposer I fixed warnings in the runtime script, and terrain tiles were giving a seam in runtime/editor.
    For WorldComposer I fixed the flipped heightmap.

    Nathaniel
     
  11. cj31387

    cj31387

    Joined:
    May 23, 2012
    Posts:
    143
    What would be the preferred method of exporting to 3ds max and then back into unity correctly? When I use random terrain exporters they all seem to make the terrain uvs with the terrain image inverted really weird and I cant seem to figure out which direction it is making the image flip yet, because It might be flipping again when i export as fbx out of 3ds max.

    What would you recommend to export to 3ds max and back into unity exactly back how it is in unity? I am trying to make buildings in 3ds max and export back to unity where it all lines up again.
     
  12. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    Only one guy in our team is using 3dsmax and we also had a lot of problems with max' importing/exporting... Unfortunately Nathaniel wont be able to help you on this either as he does not use max. For the FBX format you have to use the "Autodesk Media & Entertainment Preset" but most likely you'll get the .obj format when exporting from unity. Hopefully an experienced Max user will chime in.
     
  13. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Did you try to Wiki terrain to obj exporter?
    http://wiki.unity3d.com/index.php?title=TerrainObjExporter

    Nathaniel
     
  14. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    999
    Is there a way to erase all of the predefined locations and associated settings. I would like to just have a clean slate to begin with. Thanks.

    Edit: I was able to remove them one at a time from the Areas section.
     
    Last edited: Oct 27, 2015
  15. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    999
    Is there a way to assign a custom material to the terrains while they are being created? Since terrains don't support multi-object editing, it ends up being a lot of work to go back and assign a custom material.

    Also, what causes the terrains to end up with a terrassed look. I get it when I increase the hightmap resolution. I'm increasing the heightmap resolution because I want more detail. Thanks.
     
  16. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Yes you can erase all the regions by shift clicking '-'. To reset to default you can delete the global_settings.prefab in TerrainComposer/Templates folder.

    It's not possible at the moment, but I will add this feature for the next update. Yes that happens when you increase the heightmap resolution, you just need to smooth it then. There's a smooth button you can press multiple times after you create the terrains.

    Nathaniel
     
  17. bluemoon

    bluemoon

    Joined:
    Dec 14, 2012
    Posts:
    85
    I just picked up world composer and I'm having problems exporting the hightmap or perhaps opening them in photoshop.
    Photoshop will only open them as 8bit raw and it looks as if the second 8bit level is being over written into to lower 8bits.
    Basically when the altitude hits a certain height on hills etc the images goes back to black and starts the height values over again. I hope that makes sense.

    I'm using Unity5.2.2f1 and world composer 1.48. Photoshop version 2015.0.1
    Here are some screen shots.
    BLuemoons_WorldComposerErrror.jpg
    This is actually an area buy my house. the red circled area should be a continuous hill and you can see the 8 bit stair stepping awfulness.

    Thanks for any help
    Travis.
     
  18. eagle555

    eagle555

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

    They should be opened as 16 bit. These are the settings in photoshop to open a raw heightmap.
    - Channels Count -> 1
    - Depth -> 16 bits
    - Byte Order -> IBM PC

    Nathaniel

    Photoshop_RawHeightmap.jpg
     
  19. bluemoon

    bluemoon

    Joined:
    Dec 14, 2012
    Posts:
    85
    I tried that at first but I kept getting a "Specified image is larger than file" error
    But I just noticed I had the channel count set to 2. When I fixed that it seams to open the file ok.

    Thanks
    Travis
     
  20. Tony-Lovell

    Tony-Lovell

    Joined:
    Jul 14, 2014
    Posts:
    127
    How do you remove bodies of water from the terrain output? I want Ceto Ocean to fill these places, with an approximate drop-off into the ocean being acceptable, and a "depth map" perhaps being ideal.

    This article on Bing Maps seems to imply that they offer seafloor elevations

    Thanks in advance.

    tone
     
    Last edited: Dec 1, 2015
    hopeful likes this.
  21. imunity02

    imunity02

    Joined:
    Sep 10, 2015
    Posts:
    4
    Hey, nice tool. However, I'm getting 403 Forbidden from Bing Maps today when doing a F5 refresh. Same Bing Key worked last night. Any idea?
     
  22. gameDevi

    gameDevi

    Joined:
    Oct 14, 2015
    Posts:
    155
    World composer to terrain composer issues with Unity 5.3.

    After I click "Create Terrain"

    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)TerrainComposer.OnGUI () (at Assets/TerrainComposer/Editor/TerrainComposer.js:398)System.Collections.Generic.List`1[terrain_class].get_Item (Int32 index) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:633)Parameter name: indexArgumentOutOfRangeException: Argument is out of range.

    The terrain composer window is blank, and it wont move or close. I have to exit unity.
     
  23. gameDevi

    gameDevi

    Joined:
    Oct 14, 2015
    Posts:
    155
    instead of waiting for a reply. Did you try to use a new key? it only takes a second.
     
  24. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    The post is from almost 3 years ago:
    https://blogs.bing.com/maps/2013/02/28/new-top-of-the-world-and-high-resolution-satellite-imagery/
    Since then a lot changed. As far as I know bing doesn't offer ocean floor data.

    My keys still work fine after 2 years. Maybe you exceeded the download 24 hour limit. They have a limit on 50.000 transaction you can do in this time period.

    Nathaniel
     
  25. gameDevi

    gameDevi

    Joined:
    Oct 14, 2015
    Posts:
    155
    Hi Nathan,

    feature request: can you add the option to save to greyscale image instead of heightmap?
     
  26. imunity02

    imunity02

    Joined:
    Sep 10, 2015
    Posts:
    4
    I guess that was it.
     
  27. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    The heightmap WC exports is a 16 bit greyscale image. 16 bit gives much better precision. If you want to convert it to 8 bit png or something you can do in programs like photoshop. There also many free image editors that open raw files.

    I tested here in Unity 5.3 and TC/WC work fine here. If you still have the issue, can you show screenshot of your TC/WC setup?

    Nathaniel
     
  28. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    If I may correct something (out of my experience) - there are not many free editors out there that can open raw files. Most eiher cannot handle such large files, or they had not export option. Both issues are because these programs usually are designed to open, postprocess and export smaller raw files as other image formats.
    If you have a program or way to properly perform the steps (like described in the 24-hour-doc), not using Photoshop, please tell us:)
     
    Tinjaw likes this.
  29. imunity02

    imunity02

    Joined:
    Sep 10, 2015
    Posts:
    4
    Hey, I got a nice terrain and all works fine in Unity Play mode, but when I try to deploy it to a WSA (Windows 10 Store App) I get a bunch of errors. Only after deleting some scripts I can build and deploy It for WSA. The reason is you are using some APIs which are not supported with WSA like System.Threading.
    You should move those scripts which are only needed for the WC tool in Editor mode all to the Editor subfolder so they won't get deployed to WSA. I tried to move some scripts like rtp_functions to the Editor folder but got an error from map_tc script that rtp_functions can't be found. Please help. I think it will help in general since all Editor-only code should not be deployed to the target platform anyway. It just bloats the package and can even lead to loopholes.

    All deploys well if those files are deleted

    http://imgur.com/KVRaawc



    But of course the WC Editor tool can't be used. Please help and lmk how to make both work. I think it's just modifying some hardcoded paths in a few scripts.
     
    Last edited: Dec 17, 2015
  30. steveh2112

    steveh2112

    Joined:
    Aug 30, 2015
    Posts:
    314
    hi, i'm looking at WC and it looks like a very cool asset but i'm wondering, if i want a huge area, say 100km*100km and max detail, that's a huge amount of data.

    does the terrain created by WC load up the entire thing at startup or can it be loaded and unloaded dynamically as you get closer to a terrain tile area?

    sorry if this has been asked before, there are a lot of posts in this thread and they are hard to search.

    steve
     
  31. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    You can take a look here:
    http://www.popphoto.com/gear/2013/10/free-photography-software-guide

    The threading is for JPG encoding script.

    I won't be able to change file/folder locations without updating getting broken, as Unity import will sometimes create double scripts, so everybody that does an update will get a bunch of errors.

    What you can do is move the entire scripts folder to the editor folder (if you still want to use WorldComposer after creating the terrains) or even move the entire WorldComposer folder outside your Unity project. Since you don't need WorldComposer for the created standard Unity terrains.

    This is not included but you can use a the World Streamer asset for it:
    https://www.assetstore.unity3d.com/en/#!/content/36486

    Nathaniel
     
  32. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    Only two of these ten are marked to support Raw files, Picasa and UFRaw. First one does not, as I found out after further searching. Second one I already tried, can't export Raw files again... Probably the most common problem, as usually you don't want to export as raw after shooting with the camera.
    Anyway, I'll need to search for an alternative, but currently it does not seem to be looking to good. Maybe you can add some simple per pixel color adjustements in WC directly?
    Actually, I'd be ok with doing that myself xD
     
  33. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    I thought you wanted to convert the heightmap to a jpg or png to be able for Unity to use it. Can you explain what you want to do with the heightmap in an image editor? The satellite images WC exports there's is actually simple pixel color adjustments that you can do in the image editor tab.

    Nathaniel
     
  34. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    Sorry for not being clear... I was referring to page 5 and 10 in the 24 hour tutorial document. Basically I want to export the Raw heightmaps to an external application so I can adjust it, then bring it back into Únity to use in TC. In the document Photoshop is used (Well - you do export as PNG again, but I think the WorldMachine step converts it back to raw). Anyway, I've yet found no workflow or program with which I can modify and export raws back to unity...
     
  35. blip553

    blip553

    Joined:
    Dec 29, 2015
    Posts:
    1
    Hey Nathaniel,

    I love this plugin! I've used this code to get the real world latitude and longitude of an object in my world, but I also want the real height (altitude) of my object and the elevation of a point in my terrain, given a coordinate. I looked to see if there is a method for this, but I could not find one. Is there an easy way to get the real elevation of the terrain at a specific longitude/latitude in the terrain and the altitude of an object?

    Thanks!

    Afterthoughts: It seems the lowest Y point on a generated world is 0. Since my terrain scaling is set to 1, does that mean 1 unity unit = 1 meter? If these assumptions is correct, does that mean the difference between the Y value of the terrain and the object directly above it equals the objects altitude (object Y value - Point on terrain directly below object = altitude in meters)? Any easy way to do this?

    Afterthoughts #2: If 1 unity unit = 1 meter in regards to Y, then that means I can cast a ray down from my object to find altitude (unless I start adding obstructing objects like trees.) Just thinking out loud here.
     
    Last edited: Dec 30, 2015
  36. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    90
    Hi everybody

    I am a newbie in Unity5 and just bought World composer, great plugin ! But I have a problem when playing a scene, there are parallel black strips, here are 2 images :
    Here what is displayed in the scene (not playing)

    If I press the play button I get this :


    Any idea welcome !

    Best regards, Phil
     
  37. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    Maybe check your baked lightmap...
    What is your exact Unity version, do you have 5.3?
    The images on this thread look quite similar, and the bug mentioned there may be the same as yours, perhaps;)
     
  38. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    90
    Hi Seneral, thanks for helping !
    I don't really understand what you mean by "checking the baked lightmap", please tell me more.
    I think my problem is different, it seems on the thread you mentionned there are gaps between the bands.
    I have modified several parameters without success. I have this issue only with directionnal light, no problem with ambient (skybox) lighting, but of course I don't have anymore shadows... So it seems it is really a lighting issue.
    As you can see, it's only at the limit of the tiles, only in one direction.

    Should I have forgotten something in world composer ?
    I have Unity 5.3.1.f.1, the last version.
    Very strange problem...

    Phil
     
  39. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    You can check your baked lightmaps in the Lighting window, third tab, or in the folder next to your scene, if you have any. It's just an assumption though...
    I don't know of anthing else that could have caused this, I don't think it's WCs fault
     
  40. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    As for adjusting raw heightmaps we didn't use photoshop. Only for raw satellite images. All the adjustment for a raw heightmap you can actually do in TerrainComposer. As the raw file is not a usual format it's 16 bit raw grey scale. So 1 pixel has a precision of 65536, instead of 256 with alpha 8. WorldMachine can import a raw but you need to rename the raw extension to .r16

    If you want the real height it's maybe easier to disable normalizing heightmaps in WC (In the 'Create Terrain' tab), as then all elevation would be at correct Unity unitys. With the LatLong_Conversion script in the folder TerrainComposer/Scripts you can convert latlong to world position. The easiest is to do a Physics.Raycast down to the terraincollider to get the height at a position. If you need help with coding that let me know.
    http://docs.unity3d.com/ScriptReference/Physics.Raycast.html

    As Seneral says I don't think it has to do with WC, might be an Unity5.3 bug. I tested on 5.3.0f4 and it works fine. The thread Seneral mentioned the reply from Unity is to download the latest patch.
    http://unity3d.com/unity/qa/patch-releases

    If that doesn't help, let me know...

    Nathaniel
     
  41. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    I found this is a bug in the neighbors assigning. It has to be done on multi terrain tiles.The y was flipped. It only is flipped when creating the terrains from WorldComposer, not when exporting them to TerrainComposer, as then TerrainComposer handles the creation of terrains and does it correctly.

    I have a fix for this:


    Nathaniel
     

    Attached Files:

  42. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    90
    Thanks a lot Nathaniel ! I didn't try to export to TC (which I bought too :))

    I have downloaded the package, containing map_tc.js

    Just one question : how do I use it ? (remember I am a newbie...)
    Philippe
     
  43. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    90
    I confirm, using Terrain Composer solves the issue.:)
    Another question : is there any simple way to give this aspect to a terrain (filling under with a solid) ?
    (I made this image in Photoshop)
     
  44. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    No simple way I know of... Setting the outer terrain rim height to zero and coloring it would be a way, but probably way to hacky. I'd imagine a simple script generating such a mesh for the terrain. Wait a minute;)

    Edit:
    I attached the package, the design may not be the best, it lacks automatic update, mesh saving, a nice GUI, etc. , but it atleast shows a way to do it;) It supports resolutions and scale of the terrain, but scale of the transform breaks it as the terrain itself doesn't get scaled, but the mesh does. If you find bugs, just tell me and I'll try to solve them:)
     

    Attached Files:

    Last edited: Jan 12, 2016
    hopeful and John-G like this.
  45. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    90
    Wow
    WOW ! You are GREAT ! works fine, excepted a (really minor) issu at the junction of 2 terrains as you can see in the right of this capture. If too complicated to solve, doesn't matter...
    Lot of thanks agin, Seneral :) Philippe
     
    hopeful likes this.
  46. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    Cool that it works:) I actually didn't tried on multiple tiles, I'll add that. Actually isn't that much work using the Neighbour script;) I'll also add UVs for textures...
     
    hopeful likes this.
  47. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    90
    Yes, would be great, because I noticed some small artefacts between tiles. So if it is possible to fill only the contour of a group of tiles, would be perfect...
     
  48. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,206
    No problem. Those artifacts mainly appear because of the terrain lods though:(
     
  49. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    90
    Me again :rolleyes:

    I am working on a WC map displaying points of interest of an touristic area, and have 2 questions (maybe more coming soon...)

    1. It is easy to find x - z coordinates from latitude longitude, but is there a simple way to retrieve the altitude of the terrain with x z coordinates ?

    2. We already have a database for our map (on this link) and it would be very interesting to add points of interest from this database. Many tools allow to do this, and I would like to know if someone has already connected maps to databases ? Example, tutorial, extension ? Any idea welcome :)
     
  50. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Great works Senaral :). Only yes, terrain lods create gaps when blending with meshes.Doing with a terrain and setting outer pixel to black on heightmap and desired color on satellite images would also work. You can do this in photoshop. If you use multiple terrain tiles in WC you can combine the satellite images to 1 big raw image, so it's easy to edit, and then split it up again with WC to jpg's. I explain this in the WC manual. If you need more help with this let me know...

    1). Yes you can right click in WC map and it gives you the altitude.
    2). WC comes with a latlong to meters (and vice versa) script, so with some coding it could work.

    Nathaniel