Search Unity

Assets [Outdated thread] Map Magic

Discussion in 'Works In Progress' started by Wright, Jul 29, 2015.

?

Vote for the plugin name:

Poll closed Feb 25, 2016.
  1. Map Magic

    5 vote(s)
    71.4%
  2. Map Magic Editor

    1 vote(s)
    14.3%
  3. Magic: Map Editor

    2 vote(s)
    28.6%
  4. Magic: Map Designer

    0 vote(s)
    0.0%
  5. Magic Editor

    0 vote(s)
    0.0%
  6. Magic: Land Editor

    1 vote(s)
    14.3%
  7. Land Magic

    1 vote(s)
    14.3%
  8. Terrain Magic

    0 vote(s)
    0.0%
  9. Level Magic

    0 vote(s)
    0.0%
  10. MagicLand

    1 vote(s)
    14.3%
Multiple votes are allowed.
Thread Status:
Not open for further replies.
  1. Richard-_K

    Richard-_K

    Joined:
    Sep 27, 2015
    Posts:
    17
    Thanks for the reply. It stopped happing once I updated the MapMagic asset. I was on version 1.7 but the asset store said there was an update (still v1.7???). It might have been a problem with the retina screen since I was on my laptop where it was happening (but it wasn't a problem on my desktop). Since the 1.7 release notes mentioned a retina display fix I am guessing that was the problem.

    cheers,
    Richard.
     
  2. punkbot

    punkbot

    Joined:
    Apr 18, 2014
    Posts:
    16
    Edit: never mind, it was an issue with my normal maps.
     

    Attached Files:

    Last edited: Nov 26, 2016
  3. punkbot

    punkbot

    Joined:
    Apr 18, 2014
    Posts:
    16
    In regards to RTP, is there anything special I need to do to make it work with 8 layers? I have it working totally fine with 4, but when I try and wire up more layers it doesn't seem to take (layers 5 - 8 just appear black).
     
  4. chargedneuron

    chargedneuron

    Joined:
    Jan 12, 2013
    Posts:
    20
    Just a heads up for anyone who has issues with Unity 5.5 and Map Magic 1.7;
    You may get some script errors referring to 'Profiler', Find/Replace this with 'UnityEngine.Profiling.Profiler'.
    The files affected should be; MapMagicWindow.cs, Generator.cs, and Chunk.cs

    Happy Coding!
     
  5. MikeyUchiha

    MikeyUchiha

    Joined:
    Jan 8, 2011
    Posts:
    107
    @Wright For some reason I'm having really long generation times. I have 16GB of RAM and it's running at 99% constantly while using Map Magic. Is there anything I can do to speed it up similar to how quickly you're generating terrain in your tutorial?
     
  6. Aubrey-Falconer

    Aubrey-Falconer

    Joined:
    Feb 13, 2008
    Posts:
    434
    @Wright Fantastic work, I'm jumping in for the first time (with Unity 5.5). I just encountered the same issue that ChargedNeuron did above - namely, https://unity3d.com/unity/whats-new/unity-5.5.0 "Profiler: Profiler class moved from UnityEngine namespace to UnityEngine.Profiling"

    Regardless of the questionable decision for Unity to introduce a breaking scripting change in a point upgrade, you'll save new customers some initial grief if you can get a new package submitted as soon as possible.

    Edit: NOTE TO ALL: Wright already has a new package awaiting review, and this thread is obsolete. Active discussion is in the Assets and Asset Store category: https://forum.unity3d.com/threads/m...ral-and-infinite-game-map-tool.390920/page-21
    Back to coding!
     
    Last edited: Dec 5, 2016
  7. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,596
    Well, the new package was already submitted last week, it's pending Unity review now. You can get the quick fix here.

    MikeyUchiha, the amount of RAM really doesn't matter. It's all about CPU performance. Try enabling Debug mode in general settings and take a look what generator is your bottleneck. Usually it's an erosion node.

    QuinnS, have you switched to 8-layered mode in RTP lod manager?
     
  8. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,257
    @Wright
    Why does Map Magic do not create a normal terrain data so i simply can use/copy it to other projects.
    The terrain data i found that MM create only give me the hightmap of the terrain.
    Will a new version have an easy exporting solution for that?
    How can i now export the whole terrain data so i can give it to someone else and it has all the splatmaps, textures, grass, trees and such included?
    Please do not go over me and my questions again.

    Edit1:
    So just read thrue the thread and found the link with the script.
    That script is working beside it does not export all the textures or other depending things together with the terrain assets like it does when i export a normal terrain data from Unity.
    The good thing is there is a solution that is working now.
    The bad thing is, that this is much work for projects like mine where i have many scenes with many different terrains and reassign all the things by hand again.

    Can you please add a real easy export function to map Map Magic?
     
    Last edited: Dec 9, 2016
  9. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,596
    RandAlThor, sorry, I've missed your post. Didn't mind to ignore it, just did not notice.

    I will add data export functionality in future versions since there's pretty much demand for that. Yet I'm not sure about the most user friendly way to do that. I guess it should be a button somewhere in settings that will save all currently pinned terrains to some particular folder. In that folder it will create several terrain asset files named like "Chunk 1 0" where 0 1 will be a terrain coordinates. I guess it's a bit clumsy way, so I'll gladly hear your ideas on the subject.

    Could you please clarify what things the script is missing on export?
     
  10. cookimage

    cookimage

    Joined:
    Sep 10, 2012
    Posts:
    727
    Is ReliefPack supported yet with MapMagic? I saw a video a few months ago but cant find it as a extension when you click on the Editor like in the video.
     
  11. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,596
    You'll have to download RTP plugin for that - it's not shipped with MMWG since it will not allow scripts to compile for users that have no RTP installed.
    This plugin could be found here.
     
  12. mr_blahblah

    mr_blahblah

    Joined:
    Jan 15, 2016
    Posts:
    25
    (EDITED

    FYI I managed to retrieve it with a bit of Voodoo. If anyone else has this problem (terrain appears to vanish & when you select the Terrain gameobject, it says 'terrain data missing', try:

    1. Grabbing an old copy of the scene (if you have one)
    2. Open up the (old) scene. Delete everything except the terrain gameobject.
    3. Open up your newer scene that has the terrain missing. Copy everything except the terrain.
    4. Open up the old scene which should just have the terrain object in it.
    5. Copy all the stuff from your (newer) scene into the old scene... Voila! Your old terrain should appear.

    Weird, but it worked for me.


    (Original)
    Hi there, I'm having issues with mapmagic terrain disappearing. I create a terrain, edit it by hand, build the scene and *woosh* my terrain's gone.

    Selecting the terrain yields a 'Terrain Asset missing' message displayed on the Terrain component...

    I'm desperately trying to find the terrain data, as I've got a few of hours of work not backed up to version control.

    Any ideas? Can you tell me where it is/should be/what file format etc?

    Or is it hidden/embedded in the scene file somehow? I noticed this message, which makes me worry....

     
    Last edited: Dec 14, 2016
  13. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,596
    mr_blahblah, how did you edit terrain - what actions did you take (i.e. brush sculpting, grass painting, etc). Were you using any custom scripts for that?
    Have you locked terrain before editing (it's not required, non-locked terrain will just reset on next generate, but no error should occur)?
     
  14. McNasty

    McNasty

    Joined:
    Dec 20, 2014
    Posts:
    4
    First of all, great work on both Map Magic and Voxeland. I absolutely love the direction you are going with merging these two excellent products. I am eagerly awaiting the new updates.

    Just a suggestion, you could just make a .unitypackage for only the RTP plugin and include it in a folder in the main package along with instructions. That way people who want to install it need only double click it in the Project window instead of search the forums or wasting your time asking you for support. I have plugins from other developers that nest the packages this way to avoid having to include unnecessary/conflicting code from being installed in the base package.

    Just my two cents, take it or leave it. Either way, keep up the awesome work!
     
  15. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,596
    Thanks!
    Since version 1.7 RTP Plugin is included as a zip archive. But since I don't know cookimage's version I decided to link it just in case.
     
  16. mr_blahblah

    mr_blahblah

    Joined:
    Jan 15, 2016
    Posts:
    25
    Brush sculpting and texturing. I originally had trees in the scene, but recently removed them. AFAIK no custom scripts were used. I don't think I had locked the terrain *but* I had moved the terrain out from being a child of the MapMagic object...
     
  17. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,596
    That's may be the reason. Re-parenting terrain will definitely cause MM error and probably will make it loose terrain data. In the next version I'm going to add a built-in functionality to export terrain data, so that it could be converted terrain asset just out of the box.
     
  18. RANUCE

    RANUCE

    Joined:
    Apr 28, 2013
    Posts:
    12
    Hello - I have a question please: Is MapMagic good for making LowPoly terrains , the trees and rocks?........thanks
     
  19. CodexofRome

    CodexofRome

    Joined:
    Oct 11, 2015
    Posts:
    22
    I'm not @Wright, but hopefully I'm not wrong about this either: A complete scene setup with a terrain and mesh objects doesn't sound like it would work. Even if you did convert the terrain itself to a mesh, it's not going to match or align to terrain created in Map Magic. If your level designer can provide you a prefab of all of the objects in place, except for the Unity terrain, you could just drop it in and adjust individual objects to conform to the existing terrain.
     
  20. CodexofRome

    CodexofRome

    Joined:
    Oct 11, 2015
    Posts:
    22
    The video tutorial is out of date on trees/forests. What is the proper way to set up trees/forests now?
     
  21. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,596
    Are you talking about this one?
    The Forest Generator has not changed, and all of the Scatter Generator properties are still here. The only difference is a Floor Generator that is simply not used in later versions, just ignore it and connect prior and subsequent generators directly.
    Is there's something else I'm missing?
     
  22. SkyeDragon

    SkyeDragon

    Joined:
    Jun 23, 2016
    Posts:
    12
    Hello!

    I've been using this tool and think it's fantastic. I have an idea on how to handle spawning enemies in an infinite procedural terrain, and have been writing a script to work with my game (an endless desert terrain). I figured once the asset is done I might share it for free to the asset store along with a strategy on how to implement AI enemies infinitely with MapMagic; would you mind if I do this?

    It would be an opportunity for me to build my portfolio, share some of the work in my game, and help out fellow map magic users and get feedback on my script! :)
     
    pixelsteam likes this.
  23. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    923
    I would be VERY interested in this.
     
  24. SkyeDragon

    SkyeDragon

    Joined:
    Jun 23, 2016
    Posts:
    12
    Glad to hear! I have the prototype working and spawning infinitely and randomly around the player, I just need to build it out to have more robust features. Here's what it can do right now:
    • You can choose as many prefabs as you like to be spawned via an array in the inspector. You can then use a second array to set the time interval that the prefab spawns at.
    • You can scale the area that the script covers around the player up easily by simply scaling up the plane that the script is attached to
    • You can set a terrain layer mask so that the spawn only uses the terrain layer you have set with MapMagic, and you can also set an obstacle layer where you don't want things to spawn (think rocks, inside tree's, etc.)
    • If its time to spawn something and the script can't find a good spot, it will hold out until a good spot becomes available- it uses Time.time and a difference calculation to use less CPU then incrementing every frame and you can lower or raise the number of times it calculates a random spot on the plane
    Here's what I want it to do in the future:
    • Return any tags and layers from the terrain it encounters (so that the developer can set 'Zones' and use different spawns for different zones) or even have a 'safe' area where the spawner stops
    • Get the normal of the terrain at the point so that we don't spawn on steep cliffsides
    • Figure out a way to handle AI pathfinding AFTER the spawn (this may be a little more complicated and beyond the scope of just spawning the prefab, but I need it for my game so I might look into the options)
    • Keep track of what has spawned and handle this to avoid overwhelming player. Or maybe even have options to set when spawns become more numerous or difficult based on situations or events in the game.
    • Have an adjustable boundary around the player to prevent spawns from occurring inches from the players nose.
    Here's a picture of the purple plane that handles spawning over the player. This is what you scale to increase/decrease the area that spawns occur, and the plane follows the player no matter where they go, maintaining a distance above the player. Those brown 'spikes' you see in the picture are things the script spawned (I used them for visibility).


    Sorry for the large post, I just wanted to detail what I meant before. :)
     
    pixelsteam likes this.
  25. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,596
    SkyeDragon, that sounds really great, I would love to see such an asset! Contact me if you need some changes in MM source code so I will include them for the next versions.
     
  26. SkyeDragon

    SkyeDragon

    Joined:
    Jun 23, 2016
    Posts:
    12
    Thanks Wright!

    Will do, at the moment there is quite a bit I can do from this side but I will let you know if there is a idea that requires source code adjustments for MM. If you like, I can let you know when a demo is ready.
     
  27. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,596
    Sure, I guess I'm not the only one who'd like to see the demo!
     
  28. Richard-_K

    Richard-_K

    Joined:
    Sep 27, 2015
    Posts:
    17
    Hi Denis,
    Is it possible to get and/or use neighbouring chunks (I assume the "chunk" is the height data associated with a given Unity. terrain?)?

    I ask because I am trying to write some of my own generators and the algorithms need to access the heightmap of neighbouring terrains so it works smoothly across the edges of the terrains.

    thanks,
    Richard.
     
  29. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,596
    It's one of MMWG's concepts: chunks are independent. Nor they get any data from a neighbor chunk, neither they send it. Otherwise each chunk will require all of the neighbor chunks to generate, and they will require all of their neighbors to be generated, and so on up to infinity.
     
  30. Richard-_K

    Richard-_K

    Joined:
    Sep 27, 2015
    Posts:
    17
    OK - thanks Denis.I was just trying to blur the hard edge voronoi shapes to use as masks for biomes. I'll maybe try modify your voronoi code to do the blurring.

    thanks,
    Richard.
     
    Last edited: Jan 3, 2017
  31. TheCandy

    TheCandy

    Joined:
    Dec 5, 2016
    Posts:
    19
    Hello, i would like to ask you all about a rather simple problem...

    I am creating a naval game with rather large map (1000kmx1000km, 1unit = 1meter).

    The map would be mainly deep sea, but I would like to make several large islands, so I think this tool is suitable.

    How to make details, POI and objects specific to certain location only (no scatter, etc.) without pinning down the specific chunk of terrain? Because pinning down terrain and objects with coordinates being something like 500000,500000 is obviously unacceptable.

    Is there some tool to spawn SINGLE object (prefab) at SPECIFIC coordinates only?

    P.S. Floating point error is solved simply by teleporting the player, terrain and all the objects in certain direction when the player crosses some coordinates = player moves around 0,0,0 in certainly large box and the terrain hops around him....

    Thank you all and especially Denis for this amazing tool
     
  32. Richard-_K

    Richard-_K

    Joined:
    Sep 27, 2015
    Posts:
    17
    Hi Denis,
    I am having a problem with MapMagic in that the scene keeps "loosing" the MapMagic generator graph (i.e. when I restart Unity the MM game object has lost the connection with the MM script (and graph data)). Is there a simple way to "reconnect" the MapMagic game object to the graph data used to generate the terrain? I know how to connect the MM script back with the game object but not how to recover the generator graph data.

    many thanks,
    Richard.

    PS I don't think the problem is with MapMagic just something wrong with my scene but it would be useful if I could manually reconnect things
     
  33. Richard-_K

    Richard-_K

    Joined:
    Sep 27, 2015
    Posts:
    17
    Mmm.. I seemed to have fixed it. It seems the problem was caused by another script (one of the Standard Assets) not compiling.

    Richard.
     
  34. Richard-_K

    Richard-_K

    Joined:
    Sep 27, 2015
    Posts:
    17
    Apologies for all the questions lately, but here is another:

    Does MapMagic with several biomes work with RTP? Ideally I would like several biomes each with at least 4 RTP texture laters. If I have 4 biomes each with 4 RTP layers does that mean the whole Unity terrain requires 4 RTP layers or 16? (which RTP can't handle?).

    Basically does MM work with biomes each having 4 different RTP texture layers?

    thanks,
    Richard.
     
  35. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,237
    @Richard-_K, have you been following the MegaSplat asset at all? It's basically a competitor to RTP that just came out. Still seems a bit rough around the edges, but the author appears to be quite committed to improving and expanding it.

    It uses a feature available in Unity 5.4+ that allows it to support up to 256 textures per terrain or mesh, but still with great performance. For one thing, you can mix many variants of grass, dirt, etc in the same area, which can get rid of the typical tiled look. Ideally we'll see some Map Magic integration at some point, since supporting that many textures would seem to be a great fit with multiple biomes and lots of texture variety.
     
  36. Richard-_K

    Richard-_K

    Joined:
    Sep 27, 2015
    Posts:
    17
    @Steve-Tack Thanks Steve MegaSplat sounds very intertesting I'll chase it up. "Rough around the edges" software is rather getting to me these days so hopefully not too rough.

    Richard.
     
  37. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,237
    I hear you.

    The techniques that MegaSplat use seem to pushing the envelope a tad, so there may be some time needed to sort out all of the weird things that can happen with so many combinations of GPU's, drivers, etc. out there.

    I wouldn't be surprised to see RTP or other assets start taking advantage of the texture array feature at some point too.
     
  38. SkyeDragon

    SkyeDragon

    Joined:
    Jun 23, 2016
    Posts:
    12
    For those interested in a rudimentary spawning system that can work with map magic (see my earlier post), I put together a free asset that you can find here. The unity package includes a demo scene that takes a quick moment to set up (instructions on the page), and if you scroll down there is a lot more documentation on how the code does what it does including picture diagrams. :)

    Was great practice for me, and I hope it helps some folks out!

    Note: I added tool tip descriptions of variables in the code too, so don't forget to hover your mouse over the variables to get an idea what they do in the Inspector view. The aiSpawnPlane is the object that the code is attached to.
     
    XPAction likes this.
  39. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,596
    I'd like to mention that Jason, author of MegaSplat asset, made it compatible with MapMagic (at least for pinned terrains):


    SkyeDragon, looks really great! I didn't get into details, but I like the way your asset is documented and the code is commented. Keep up the good work!
     
  40. Kusras

    Kusras

    Joined:
    Jul 9, 2015
    Posts:
    129
    Hi, I found a brutal bug... I saved project with errors in my other scripts to repair them later... and then I turned it on and repaired them. Immidiately I get every frame this your error(Log):

    MapMagic: Could not find the proper graph data. It the data file was changed externally reload the scene, otherwise create the new one in the General Settings tab.
    UnityEngine.Debug:Log(Object)
    MapMagic.MapMagic:Update() (at Assets/MapMagic/MapMagic.cs:179)
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

    This probably means... data could not be loaded because of error, but could be saved as errors disappeared, even thought they were not loaded... causing overwritting correct data and losing them... unfortunately I have only very old backup for mapmagic charts... :(
     
    Last edited: Jan 11, 2017
  41. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,596
    Just restart Unity to fix this.
    I thought that you may have saved your scene after the bug was fixed (i.e. both before and after fix), when MM was logging that no data found... But I've just checked it out and it seems that the scene is recovered anyways. Have you tried restarting?
     
  42. Frednaar

    Frednaar

    Joined:
    Apr 18, 2010
    Posts:
    147
    Hi, I am trying to have a deeper integration between Megasplat and MM, and I was wondering if someone is working on a MM Colormap output like WorldMachine has (basically a splatmap output with many more colors).

    This could then be used in Megasplat to automatically assign color arrays as explained in the Megasplat videos/docs.

    Or if someone is already working on this I can help...

    thanks
    Fred
     
    Steve-Tack likes this.
  43. Kusras

    Kusras

    Joined:
    Jul 9, 2015
    Posts:
    129
    I tried, thats why I am writting here. I write about more facts I discovered...; with MM failed also. 2 others scripts failed too - SunShafts in scene losts contact to its shader, one my script using setDirty() and also editor gui; and after loading all its properties (even hidden) was null... Other scripts seems OK and working. So the problem is that unity did something wrong what yours and mine script did not get and crashed.... very weird
     
  44. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,237
    Do you have any sense (or specific ideas) on how MegaSplat could be integrated with the infinite terrain generation feature of Map Magic? I'm wondering if it would be possible for a node type to be created that would map slope or whatever to a number of splat maps, but within those it could leverage the "Texture Cluster" feature of MegaSplat to generate multiple textures within each of those. In other words, you'd typically use a group of similar textures in groups for grass, dirt, rocks, etc.

    If not, what would the options be for doing a large Map Magic terrain that used MegaSplat? Pin every terrain and use World Streamer instead of the real time generation?
     
    Nateply likes this.
  45. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,237
    Not sure how I missed your post, but I just wanted to chime in and say that I'm interested in that too.
     
  46. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,596
    As far as I know, Jason, the author of MegaSplat, was going to look into writing MapMagic generator recently. I guess it could be something like RTP Output Generator, if I'm right than it should work with dynamic terrains.
     
  47. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,237
    He's already got a converter that works with any Unity terrain, and, in fact, he uses Map Magic to demo it in one of his main videos. But it's a one-shot deal; it wouldn't work as a realtime generator as far as I know.

    It's possible that he's working on a realtime generator Map Magic node and doesn't want to talk about it in case it doesn't pan out or something, but it's not something he's discussing on the MegaSplat foum. When I asked about it a couple of days ago, his response was:

    "I think we don't have quite enough MegaSplat users to get the authors of these packages to integrate MegaSplat directly yet. I've been talking to a few of them (Map Magic, Gaia, World Creator, but not TC yet) and they've all been very interested and helpful, but slow to get the wheels turning on a direct integration. That's why I switched over to writing the converter from standard Unity terrains, because it allows you to convert from these packages easily. "

    Anyway, it would be cool if a dynamic generator becomes a thing eventually.
     
  48. Frednaar

    Frednaar

    Joined:
    Apr 18, 2010
    Posts:
    147
    I agree, I believe Jason did a great package but the overall workflow is not that easy, regarding the colormap I believe it could be made modifying the existing splatmap generator code and adding more colors... this is an old video from terraincomposer that basically does that.


    I will try to replicate this in mapmagic ... Denis can I ask for your help in case I get stuck ?
     
    Last edited: Jan 14, 2017
  49. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    364
    Hi, I need to create 2 separated islands but we can't build 2 map magic editor! is there any reason for this? I think that would be a lot better if we could use 2 map magic instance.

    Thanks.
     
  50. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    287
    Hello,

    MapMagic Pin Terrain doesn't work for me on 5.5.0f3.

    Re-downloaded version from store, re-imported after deleted, also tried the fix in the previous page, still no luck.

    edit: Wright replied to me on my e-mail, so for anyone has the same problem, and has a dual monitor setup, just reset Unity's layout and everything works.
     
    Last edited: Jan 15, 2017
Thread Status:
Not open for further replies.