Search Unity

Terrain Composer2 a next generation GPU powered terrain tool.

Discussion in 'Assets and Asset Store' started by eagle555, Sep 16, 2012.

  1. bluemoon

    bluemoon

    Joined:
    Dec 14, 2012
    Posts:
    85
    With RTP there are several ways to use a global colormap the most basic is to speed up distance rendering buy replacing rendering of the splat textures with just the global color or you can use it to multiply over the splat maps to help reduce how obvious splat tiling is. I find that RTP's UV blending is more than enough to hide tiling so I use the former method.

    I've been thinking about doing a quick tutorial video to get in some practice screen capturing. I will put up a link here when its done.
     
  2. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    In case Nathaniel doesn't show up soon I can offer some quick answers that hopefully wouldn't contradict how he would explain David

    1) World Composer is generally meant for generating terrain from elevation data and satellite imagery (Using Bing's service) downloaded by it. It lets you govern how detailed the terrain and its imagery is and lets you make preset areas and organise them, as well as give you tools to overcome problems with satelite images such as unwanted shadows. It can import terrain it creates straight into Terrain Composer

    2) In RTP colourmaps generally refer to a texture that will cover an entire terrain, this is to not only cover tiling from the smaller textures you are controlling with your splatmaps but to provide nice imagery over distance. Using World Composer, the colormap would be the satelite imagery downloaded. You can set how far away the colormap blends into your detail textures and ideally your detail textures should correspond to the colour the colormap is at that point. You can set in the RTP lodmanager wether RTP will use the colormap as-is or it will multiply with the detail texture (creating a blend i think?). Where you create your global normalmap can depend on how you created your terrain, because you'll want to make it from the highest detailed version of the terrain you have, as it is there to provide detail for terrain as you lower its resolution.

    If it is created in World Composer, you would grab the highest zoom level terrain for the area you want, import it to Terrain Composer, go to the colour section, look down to the layer selection, add a layer, click the button saying 'layer', select 'file' then 'open' and in the load preset dialogue find normalmap in the 'Output Maps' directory. With 'act' selected on this layer, select 'Export' at the top and you can select it until you it says 'Export' + the file format you'd like at the bottom then if you click that button it will generate a normal map for you that you can use on lower detailed versions of the terrain. This method is fine for non World Machine terrains too i'd imagine as the normal map would help detail lost through distance and increasing the terrain's pixel error too.

    Other programs typically used for this would be what you may have your final terrain detailed in, such as World Machine or Mudbox, which have their own methods for generating normal maps.

    3) If you have imported RTP into your project, it will automatically be used as your terrain shader when using World Composer, i'm assuming this is the case when you create any terrain with terrain composer, but you have to go to RTP lodmanager in your heirarchy and enable Unity4 terrain shader in its options

    I think there are quite a few decent video tutorials on the terrain composer website now for things like this
     
  3. alln2themusic

    alln2themusic

    Joined:
    Feb 3, 2011
    Posts:
    46
    Thanks for the lengthy responses lazygunn. I think you might have mistaken all my references to World Machine as World Composer. I'm probably not really interested in World Composer (as I have Terrain Composer and currently don't feel the need to create real world terrains), but thank you for the detailed responses about it. If I end up getting it, I'm sure they will be useful.

    I'm mainly concerned with a few key things:

    The creation and use of global color maps for multi-tiled terrains.
    -I've been creating all my terrains from within Terrain Composer and I'm very happy with the results, however I'm unaware if there is a way to take the splatmap texture, that I'm using for my multi-tilted terrain, and create a global color-map texture from the splatmap textures all within terrain composer. I'm guessing there isn't, similar to how I'm guessing there isn't a way to export a global normal map from within Terrain Composer as well.

    Again all my terrains have been made from within Terrain Composer itself so I'm looking to find out what other applications are necessary to create these other maps that are used extensively with RTP, such as flow-maps, global color and normal maps, and things like that. I have 3ds Max, Zbrush, and lots of other applications, but I'm just unfamiliar with the pipeline and what application I could/should use to produce these maps quickly and efficiently while keeping the quality the best it can be.

    This is why I was curious about World Machine and it's capabilities to create all these maps together in addition to creating unique terrain. I did read that only the professional version allows for the ability to export tiled terrains similar to what Nathanial was using in the TC import tutorial video.

    I'm currently making a game that is going to have lots of different types of planets that the player can travel to and so being able to create various types of large terrains while being able to run efficiently in a game setting is what I am looking for and Terrain Composer definitely has shown me the light. haha Still learning and figuring out all these different terrain creation softwares and where I should use a piece of software in a certain part of the pipeline is always the time consuming part. Luckily, I think I've got Terrain Composer under my belt, RTP was interesting to learn about (not coming from a shader programming background) and use, and figuring out if World Machine is the missing link to allow me to create all the different maps that Tomasz uses in his RTP Shaders and thus in Terrain Composer as well is the last thing I'm trying to figure out. I'll probably use Crazy bump for the heightmap and normal map creation for all the parallax stuff using the splat textures.

    Anyways, this response got waaaaaaay to long. Sorry about that and thank you so much again for your detailed response. Definitely helped out.

    David
     
  4. alln2themusic

    alln2themusic

    Joined:
    Feb 3, 2011
    Posts:
    46
    Thanks for the reply bluemoon.

    Is there a way to export, within Terrain Composer, a single global color map from splat maps on a multi-tiled terrain? I'm also curious if this functionality exists for exporting a global normal map from a multi-tiled terrain from within Terrain Composer? My guess is there isn't. I would have to export all my tiled terrains to World Machine and produce the global maps there. Is that correct?
     
  5. bluemoon

    bluemoon

    Joined:
    Dec 14, 2012
    Posts:
    85
    Not dirrectly but RTP can. It will export a global color map for each terrain tile. look under each terrain tile's RTP script(Not lodManager) and under settings/Globalcolormap there is a button to create one from splatmaps. you have to make one for each terrain tile.
     
  6. bluemoon

    bluemoon

    Joined:
    Dec 14, 2012
    Posts:
    85
    Look up a game called Fuel. its a racing game with huge landscapes that uses this concept. The idea isn't to use the hightmaps on their own, but to use masking to mix several different hightmaps and add them as detail on to the main hightmap that spans the entirety of the terrain. it would be no different than using a tiling texture in a displacement modifier in most modeling programs.
     
  7. alln2themusic

    alln2themusic

    Joined:
    Feb 3, 2011
    Posts:
    46
    Sweet thanks, I'll give it a look.
     
  8. eagle555

    eagle555

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

    Thank you Lazygunn and bluemoon for answering most of the questions, I can add a little...

    A main advantage of WorldMachine is its erosion. You can create some very realistic heightmaps with stunning erosion in WM. Also from erosion you can create a flowmap, but there is no slot for it in RTP and most be mixed with the colormap, which can be done in photoshop or TC can also do it. Also can create splatmap in WM, and everything from WM can be imported with TC. The heightmaps/splatmaps/vegetation maps/ etc. Without TC you can import only heightmaps from WM and then assign colormap to RTP. Splatmaps and vegetation can only be done with TC. And without TC getting terrains from WM or any other terrain tools outside Unity is very tedious. TC can import multi tiles using auto search features, and only takes a few clicks to set it all up.

    As for the colormaps and normal maps you can all do that in TC and RTP. RTP can make the colormap based on splat texture color. However there's not much advantage of using a colormap this way. As it's actually the same thing Unity default terrain shader is doing with the basemap, this is a colormap that is shown in a distance to display only colors and no splat detail, giving slightly more performance.

    The best way to use a colormap is multiplicative in RTP Lod manager and then using colors that have a different color then your splat textures. Because normally the colors are limited to only your splat texture colors (and those overlapping each other, gives a little variation, but limited). With a colormap added, you can have much all color variation over your terain giving it a more unique and variating look with less repeatition. RTPv3.1 will have features that blends colormap and splat textures based on height texture and will boost the quality even more.

    For making normal maps and height texture to use in RTP you will need something like Crazybump. There's also a Nvidia plugin for photoshop for this.

    If you made your heightmap with TC you can make the colormap with TC also. This is done with the Color output and color layers. I show this in the first video I made for TC more then a year ago:


    Only the workflow has changed a little as now you can only export a colormap and even assign it automatically to RTP seeing your direct results, or if you don't have RTP assign it as a splat texture that spreads over the whole terrain. As for exporting a normal this can be also done with TC. I will make a video now how to export a normal map...

    Nathaniel
     
    Last edited: Jan 24, 2014
  9. alln2themusic

    alln2themusic

    Joined:
    Feb 3, 2011
    Posts:
    46
    Thanks for the great response Nathanial. Which map do I make the normal map from in Crazy bump? I made all the color maps using RTPv3 actually and it worked great. It plugged it right into TC like it should have. Do I use those color maps to create the normal maps in Crazy bump or should I use another map exported from TC? Thanks for all the amazing work you guys are doing. Really taking Unity to the next level.

    David
     
  10. alln2themusic

    alln2themusic

    Joined:
    Feb 3, 2011
    Posts:
    46
    I thought I saw where Tom used flowmaps using his Geometry Vs Terrain Blend script with the MaterialFlow Shader that he uses with the water? I also noticed a ton of other dirt maps and erosion maps and stuff in his scene example files that I couldn't tell if he was using them or not. It's funny I have posts up on both you all's threads trying to really get an understanding for the best pipeline to make the best looking terrain that performs the best (I think I used best too many times there, but oh well that's what these tools you guys have made are for Unity; THE BEST!!)

    Looking forward to the emissive global maps Tom is putting into RTPv3.1. Hoping the release is soon. I'll be posting some shots of my project soon as well. The Heightmap AO blending that RTP has just does a fantastic job on making distant terrain look really good.

    I almost forgot......can the multi-tiled terrains handle occlusion baking? During the optimization process, occlusion is a huge part of it and I'm trying to figure out what I can turn on as Occludee Static vs. Occluder Static. Can the terrains use both or will that make Unity crash if multi-tiled terrains at 2000x2000 are tried to have Occlusion baking done on them? Have you tried?

    Thanks again.

    David
     
    Last edited: Jan 24, 2014
  11. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    The Flowmaps from Worldmachine and the Flowmaps used for water are entirely different things, Flowmaps from worldmachine are basically just where the water would flow on the terrain and not the direction it would flow(this is what flowmaps for water shaders do). Easy to confuse because of the same name but good to know the difference :D

    Hope that makes it a little less confusing...
     
  12. alln2themusic

    alln2themusic

    Joined:
    Feb 3, 2011
    Posts:
    46
    It makes it tons less confusing, thank you!! So is the flowmaps for shaders something that is custom made by Tom and therefore I don't need to worry about it? I'm just wondering the process for creating the maps he used in that shader, such that if I want to change the rock texture for instance, that the water is flowing around, do I need to make a different flow map? or use the same one? I know teaching shaders can get really in depth and complicated so if you have a good reference for the creation process for making some of the textures for those shaders, I always love learning. :)

    Thanks for all your great work with Nathanial!! TC is going to save me tons of time on creating all the environments for my game. Have you played Planetside 2? Is it possible to create and manage at runtime terrains of that size with TC? I just started looking at the runtime version of TC, so forgive my ignorance if the answers are all in that documentation.

    David
     
  13. eagle555

    eagle555

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

    As for using Crazybump we are talking about the terrain splat textures, the ones you tile over the terrain, not the big global ones like the global colormap and global normal map.

    As for making the flow maps for Toms shader, it's best to ask Tom about it on the RTP3 thread.

    No I haven't played Planetside 2. A streamer would be needed to make huge terrains in runtime, even if memory allows having too many tiles in the Scene wouldn't be good for performance. I might release one after releasing TerrainComposer 2. I will make some more tutorial videos and after it will be working fulltime on finishing TC2.

    Nathaniel
     
  14. Deleted User

    Deleted User

    Guest

    Hi,

    I get this message after inserting the bing key and hitting F5:
    the world composer screen stays white

    "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:3439)
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions()"

    ?
     
  15. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    You are in Web Player build mode. In the WorldComposer manual in trouble shooting I explain what to do, to get it working in web player mode.

    Nathaniel
     
  16. eagle555

    eagle555

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

    Here's a video how to make normal maps with TC and assign them to RTP:



    Nathaniel
     
  17. alln2themusic

    alln2themusic

    Joined:
    Feb 3, 2011
    Posts:
    46
    Wow Nathanial that is absolutely BRILLIANT!! Super fast response and that helped out sooooooo much. I didn't even know those layer prefabs came with TC. I'll let you know if I have any other questions. Thank you so much again. This really completed the circle for me as far as getting everything to look absolutely fantastic in my scene. I still think I may get World Machine just because the erosion effects that you can produce just look spectacular and it'd be another piece of software I can add to my resume. hehe

    Cheers!

    David
     
  18. Deleted User

    Deleted User

    Guest

    Would love to see a tutorial on the workflow using mudbox/zbrush, especially heightmap resolution in depth - at the moment I am not able to load custom heightmaps into terrain composer, no matter which resolution I try

    I always get the message "heightmap loading because of selected resolution failed"

    edit: managed to import heightmaps by changing mode to greyscale in photoshop

    still unable to open raw files in photoshop, getting message "specified image is larger than file"
     
    Last edited by a moderator: Jan 25, 2014
  19. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    What tutorial you want with using mudbox/zbrush?

    If you want to know about heightmap and terrain resolutions, I recommend to watch the basic tutorial about Unity terrains on my site.
    Tutorials

    As for raw files...These are raw and contain only the heightmap data and no detail about its resolution or anything inside the file. TerrainComposer can import 16 bit raw grey scale images. A 16 bit raw file uses for every pixel 2 bytes, getting 65536 different height positions per pixel.

    To be able to open in Photoshop, you need to choose 16 bit, 1 channel and right resolution.

    Nathaniel
     
  20. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    The new sample scenes all crash Unity for me with their default settings because they're taking up more than 3GB of RAM after I click generate. I tried running the RandomPlateaus example with the settings it started with (2x2 terrain, 1024 resolution) and that crashed, 2x2 at 512 also crashed. Is it just me or are those settings unusable for everyone?
     
  21. alln2themusic

    alln2themusic

    Joined:
    Feb 3, 2011
    Posts:
    46
    Hey Nathanial,

    First off the Normal Map creation is a breeze now thanks to your video. I was trying to place tree's based on the color maps that the RTP shader produce (from clicking on a terrain, going to Settings, and then Global Maps and clicking on the "Construct colormap from detail color layers below") mainly cause I only want trees to appear over parts of the terrain that have a specific splat texture (grass). I watch the video on placing tree's on image colors, but I don't want to place them based on a color in the image. I want to place them based on the entire splat texture itself. Basically whereever there is a grass texture on my terrain I want to place tree's. Does that make sense? Sorry if it's confusing. Could explain the best way to do this? Thanks.
     
  22. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    That is really strange. I haven't got any mail with someone having this issue. 2x2 512/1024 should be way below the 3gb limit. On my system the 2x2 512 Unity Editor is at 600 mb, and 2x2 1024 it's at 1.171 mb.

    I wonder what happens on your end...At what part is Unity crashing? Heightmap/splatmap/tree/grass/objects?

    Nathaniel
     
  23. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    You don't need an image for this can directly do it in a mask in TC. You choose input on splatmap, then choose your splat texture, with output on 'Max'. You can use more splat textures by adding more masks with input on splatmap, also these outputs should be on max. And then should be in the top of the mask list. Futher down you can add masks with rules like height and steepness, with output on 'Min'.

    Nathaniel
     
  24. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    The memory usage spikes way up when it hits the tree part of generation. If tree colliders are on, I get a lot of messages about being unable to create so many colliders, but even with tree colliders off the memory usage is still around 3GB. Then the editor becomes super slow, and either crashes when I hit play or randomly when I do something else... for example, I got an out of memory error trying to open the console window. I made a new project with nothing but TerrainComposer and its examples imported and I still get this. Something is weird since I wasn't having these issues earlier... either the upgrade to Unity 4.3.3 or the TC update to 1.3.1 seems to have done something strange. FYI I'm using Unity Pro 4.3.3 on Windows 7 64-bit.
     
  25. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    After more poking around, it's definitely something with the trees. Profiler shows that all the memory is being taken up by unnamed meshes, and all the CPU is in RenderOpaqueGeometry calls on those meshes. There are several thousand meshes and over 10 thousand draw calls, 0 saved by batching, regardless of whether or not I marked the terrains static. Which makes me think that it's rendering all the trees as mesh trees and not billboarding most of them like it's supposed to. I found this post about how "Max Mesh Trees" doesn't do anything anymore in 4.3, which seems to be the case for me: http://forum.unity3d.com/threads/224212-Max-Mesh-Trees-setting-broken

    Messing with the billboard and fade distances didn't seem to help either, even with those really low it still showed thousand of meshes being drawn. Could this have something to do with Terrain Composer or is this just a Unity bug?
     
  26. alln2themusic

    alln2themusic

    Joined:
    Feb 3, 2011
    Posts:
    46
    Hey makeshift,

    I'm wondering if it's trying to put way too many tree's on your terrain at the start. Make sure you're strength slider, under your Layer-->Tree's section isn't set to 1. Try putting it to something really small like .02.

    $TC_treeStrength.JPG

    Having it at 1 could potentially crash Unity depending on the size of your terrain. If that's not the problem, then perhaps Nathanial can think of something else it might be. Sorry if this doesn't help.

    David
     
  27. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    This has nothing to do with TerrainComposer. As TerrainComposer uses standard Unity terrain. I tried the examples in the latest Unity 4.3.3 version and it works fine here. Billboard and tree distance should work, but I'm not sure how you change these settings (TC Menu -> Terrain List -> Settings...). Because in TC you can change them for the editor and for runtime. For runtime it's only called once on Start(), so changing runtime while in playmode doesn't change anything. So you have to adjust the runtime settings before pressing play...

    Maybe as David suggested you have too many trees in the Scene. Unity can do about 1-1.5 million.

    Nathaniel
     
  28. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    I'm finding my limit with this, the issue is without a doubt a 32bit editor, very frustrating. I'm getting the most out of mormal maps though and een the raw generation plus normal maps looks nice. Appealed to lars on vegetation, im really going to have to go NPR while retaining functionaly of the res of his shaders. PBR based cartooish trees are gonna be a trip haha

    Normal maps REALLY HELP, ill have to add, but anything over 100 terrains and theres some serious memory problems, need to try fit the rest of my game in!

    Hoping the frame rate issue isnt as dire as the stats view says

    Really looming forwards to getting into the meat of 1.3 and rt 3.1, already looking into lux as my pbr option, just needs the fancy cubemaps
     
    Last edited: Jan 26, 2014
  29. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    679
    Yep, we're long-overdue for a 64-bit executable. I just hope Unity implements this by the end of their v4.x cycle, instead of retaining it as a selling point for v5.x.
     
  30. sixto1972

    sixto1972

    Joined:
    May 16, 2013
    Posts:
    30
    Anybody noticed any periodic stuttering when moving through the mountains example scene? Im not saying it has anything to do with TC just wondering if anyone else has had this issue. Its annoying the heck out of me and even shows up in the build. Thanks.
     
  31. sixto1972

    sixto1972

    Joined:
    May 16, 2013
    Posts:
    30
    okay, it seems to be related to the grass layer. if i disable all the grass it stops. The tree layer i also tested and its fine.
     
  32. sixto1972

    sixto1972

    Joined:
    May 16, 2013
    Posts:
    30
    Guys.... i just had an idea... maybe its crap and wont work, but maybe it will? I was playing with the forest example and increased tree density to the max, to make that super thick forest with overgrowth. Yeah..... killed my frame rate. Expected. So... i started to dial back settings and got back to a good frame rate. Well that's when i got to thinking, i believe most of these parameters if not all are programmable at run time. Now maybe you all have thought of this already and if so forgive me for wasting your time. But here is what i found.
    In a really dense forest your visibility gets cut big time. You cant see anything through the trees past maybe 50 feet tops. So you can massively scale back tree distance without any discernible difference as long as your in a dense part of the forest. The same for billboards. You can draw them way in. And the same for Base Distance and to some degree even Pixel Error can raised significantly. Not too mention Detail Distance. So i'm thinking... you can setup concentric bounding boxes with triggers that don't render of course, and each time you cross one deeper you can programmatically scale back the above settings to some predefined thresholds. I guess you wouldn't want to make many as the overhead may get bad... but its a one time switch that can last for quite a time before your player exits..... meaning not a lot of code being executed constantly. And you could even drop render quality settings if you had to i would imagine. Like dropping one pixel light, reducing shadow complexity and such, and its all in discreet steps. And since its a bounding collision box it should be fast and even give you a ceiling so if your above the trees for example, your draw distance would then be greater if you were flying for example... or on top a mountain with a wide clear view that would otherwise leave no trees in the distance. And in that case... i would consider pulling in my BillBoard Start. Just a few thoughts i had. I will try them out when i get time. If you have any feed back on this as in it might work.. or is a total waste of time, i would love to know.
     
  33. sixto1972

    sixto1972

    Joined:
    May 16, 2013
    Posts:
    30
    Ok.. you might be getting tired of my post... but i just had another idea. Yeah... bear with me. This is for occlusion culling. We dont want to render trees that cant be seen, but i think just generating occlusion for a forest might not be very efficient. I think it will take care of mountains and such but not sure. But just in case it doesnt.... would it be possible to add very low poly proxies that dont render as occluder objects for moutains and such? And maybe even for groups of trees that are very dense and could not possibly be seen through? Let me know if you have any thoughts.
     
  34. sixto1972

    sixto1972

    Joined:
    May 16, 2013
    Posts:
    30
    Okay... its grass element zero causing the stutter. I deactivated all of them then added them back one at a time starting with element 7. When i got to element zero it started again. To rule out it wasnt the number of grass elements i deactivated number 7 again. It was still there. So i deactivated 0 and reactivated 7 and all was well.
     
  35. eagle555

    eagle555

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

    What density settings with trees and grass you can use depends very much on your hardware. That you scene is stuttering when moving is indeed because of the grass. You will need to reduce the detail resolution (grass resolution) manually then. You can do this in TC terrain list -> Resolutions -> Detail Resolution, then after changing shift click <Set All>.

    As for the forest draw distance, actually what you are talking about is occlusion culling. Unity has this build in since 3.x. So you can bake a cube grid for it.

    As you know I also created this request to get the terrain core improved, as that is what makes the grass and the trees slow:
    http://feedback.unity3d.com/suggestions/improved-unity-terrain-core-engine

    Nathaniel
     
  36. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Sixto - the "Max Mesh Trees" setting is supposed to help with that... if it's set to 40, and you're in a forest, only the closest 40 trees are mesh and all the rest are billboard. Unfortunately, like I posted a bit earlier, it seems that Unity broke this setting somewhere around 4.2 or 4.3 and it no longer does anything.

    alln2themusic - I checked that and it was at the default value of .005 so it isn't that.

    eagle555 - You're right that the editor/runtime separate settings were what was confusing me, I fixed that and now billboard start and draw distance work. However, I have to turn off trees in Editor mode to generate any of the example terrains since I hit the out of memory error otherwise. I think my problems will go away if Unity gets around to fixing Max Mesh Trees; I'm just still wondering why no one else seems to be hitting out of memory errors as often as I am if trees are left on in the scene view.
     
  37. sixto1972

    sixto1972

    Joined:
    May 16, 2013
    Posts:
    30
    It was only the grass in element 0. I tested it. It is a pretty flower, i dont know what about it cause the stuttering but if i remove it the stuttering disappears. As for occlusion culling, yes it is built in. What im talking about is dynamically changing the draw distances based on how deep a player is in a forest. And the best way i can see to do that is to create a cube that is a trigger that executes code to adjust the draw distances. This would allow a player to enter a forest and then trigger the code as they pass the cube boundary. Its merely a possible optimization to pack more trees in.
     
  38. alln2themusic

    alln2themusic

    Joined:
    Feb 3, 2011
    Posts:
    46
    Hey Nathanial or Becoming,

    Have you ever had issues with splat textures becoming null and getting replaced by your global normal texture along with your Perlin Normal Special texture when using RTP?

    $wrong_splats.JPG

    I'm gonna ask Tom about this as well, but thought I'd throw it by you and see if either of you have had this problem of Splats not really remaining stable when global normal and global color maps are used. When I do a Save Scene, the Perlin Normal control map like disappears from my scene view and I have to manually click on each terrain gameobject in the inspector and the perlin normal texture magically reappears in the scene view.

    David
     
    Last edited: Jan 27, 2014
  39. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    RTP uses the Unity terrain slots for different textures, since it doesn't use a material for each terrain. So this way different textures can be used for each terrain. So if RTP is there, you can ignore the Unity terrain splat textures as it might look a little confushing, but this is the only way for RTP to be able to use unique textures for each terrain.

    I already mentioned the terrain splat 0 to Tom, as far as I know he fixed it in RTPv3.1, and it happens because RTP is creating a texture in memory and assigning it to the Unity terrain splat slots, but because the textures aren't saved to disk, it looses the reference to the texture at some point, and Unity gives this warning, because 1 of the terrain textures in the terrainData are not assigned anymore then.

    Nathaniel
     
  40. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    For each grass texture assigned to the terrain, Unity uses another grass array control map. So with more grass textures it takes more performance and memory. So this is the reason it gets better if you disable a grass texture.

    Nathaniel
     
  41. sixto1972

    sixto1972

    Joined:
    May 16, 2013
    Posts:
    30
    ok, makes sense. i could have swore i added back one of the others. My mistake, Thank you for everything.
     
  42. GrumpyOldMan

    GrumpyOldMan

    Joined:
    Sep 29, 2011
    Posts:
    51
    Hi Nathaniel, thanks for answering my previous question. I just have two more quick things to ask.

    1) If i exit a scene that has been generated and then come back will it be the same terrain as the first time I was there, or will it generate new terrain? Basically is it possible to generate terrain at runtime and then save that terrain and return to it?

    2) Similarly, if I save my game while in a runtime generated area, and then load my save, will the area be re-generated or will it be the same area as when I saved?

    Thanks!
     
  43. eagle555

    eagle555

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

    1). I presume you are talking about generating terrain in a build at runtime. When it comes to saving states at runtime, thére's not much in Unity that makes this easy. However you can use TerrainComposer to generate terrains in runtime on the fly. So if you have a TerrainComposer project and give TC the command in runtime to generate it will always generate the same terrain. So you won't need to save the terrain, just generate it again.

    2). The terrain isn't saved at runtime, neither does Unity have a build in way as far as I know to save a scene at runtime. So you would need to re-generate the terrain upon loading.

    So if you want to generate terrain in runtime on the fly you need to command TerrainComposer by script, etc. The TerrainComposer runtime package documentation is needed for this:
    http://www.terraincomposer.com/runtime

    Nathaniel
     
  44. Deleted User

    Deleted User

    Guest

    Hi,

    I am trying to assign substance maps to terrain composer, using rtp shader

    I followed the manual step by step:

    If you have RTP you first have to assign with Set All, 4 or 8 splat textures and then shift click <RTP> to enable RTP in TerrainComposer. This will automatically assign the RTP script to each terrain. And you can setup the diffuce, normal and height texture in TerrainComposer. Also the global colormap and normal maps can be assigned with auto search in the Select window.
    (btw: Isn´t the step missing in this manual,where you have to recalculate rtp shaders ?)

    but I am not able to assign my substance maps to the splat textures maps, I get the error:

    InvalidCastException: Cannot cast from source type to destination type.
    TerrainComposer.draw_terrain (Int32 space) (at Assets/TerrainComposer/Editor/TerrainComposer.js:5601)


    edit: if I export the bitmaps only from substance, I am able to assign those

    any ideas?
     
    Last edited by a moderator: Jan 28, 2014
  45. eagle555

    eagle555

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

    For using substances, this can indeed be done with RTP, but you have to assign those in the RTP terrain script. You can check the RTP documentation how to do this:
    http://www.stobierski.pl/unity/RTP.pdf

    Nathaniel
     
  46. Deleted User

    Deleted User

    Guest

    the problem is: the wokflow described in the rtp manual just doesn´t work

    if I input a substance and hit the "get textures" button, I get all kinds of weird maps showing up, the blue "normal map", the diffuse map isn´t exchanged at all

    I posted my issues in the rtp thrad, just wanted to let you know, what´s going on

    thanks, michael
     
  47. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,705
    Ah ok thanks for telling :), lets see what Tom says about it.

    Nathaniel
     
  48. peter_rodrigues

    peter_rodrigues

    Joined:
    Jan 28, 2014
    Posts:
    39
    Hello, I just bought terrain composer and Im having a bit of trouble. I was trying to step by step one of the youtube video tutorials and when im creating terrain it generates but when I slide the scales like zoom and strength it doesnt auto generate like in the video. I have to click generate again for all the changes to take effect. Is there a setting or anything that I have to turn on for everything to autogenerate in realtime as Im playing with the sliders for the height map?

    Any help would be appreciated.

    Here is the video for reference, when he's playing with the sliders at the 3 minut mark, it doesnt do it in real time for me.

    https://www.youtube.com/watch?v=tuAFTYw4cQU

    Edit - Nevermind, I figured it out. Its Shift and generate. Please disregard this post.
     
    Last edited: Jan 28, 2014
  49. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Hi Eagle, could you perhaps add a gloss map to the alpha channels of the example textures for running in RTP mode? You've got the normal and height maps in there which is awesome, but with an all white alpha, everything is super shiny.
     
  50. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Not sure if it's been pointed out but in the RTP beta global normal map assignment, in the splats section of a terrain, no longer appears, so i cant automate adding them