Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Relief Terrain Pack (RTP) v3 on AssetStore

Discussion in 'Assets and Asset Store' started by tomaszek, Oct 22, 2013.

  1. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    Well, this is so great. Well, CG is always like "quality or performance". So - it's up to you. But having eye catching features for 3-4 extra ms is dramatic I believe ;)

    Tom
     
    akareactor likes this.
  2. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    512
    The UI for rtp is messed up in unity 2019.3 and .7. Also when you add the rtp engine - terrain or mesh script to the terrain its not overiding the material slot so nothing is updating or changing. Normally it does this automatically and have never seen this problem or at least in 2018 or before that just now seeing this in 2019. Not sure if you know about these issues in 2019 or working on the fixes but really need these fixed up so I can keep working with rtp.
     

    Attached Files:

  3. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    Yes, I need to make some maintenance works for Unity2019. Will let you know as soon as hotfix is ready.
     
  4. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    RTP3.3q maintained for 2019.3 has been submitted. I believe it should appear soon on UAS.
     
  5. FlounderBox

    FlounderBox

    Joined:
    May 5, 2015
    Posts:
    2
    I upgraded to RTP 3.3q from RTP 3.3n in 2019.3.2 today, and I'm experiencing strange issues.

    In the first image, you can see my terrain textures are missing from my existing terrain.
    upload_2020-4-7_19-59-53.png
    Below, you can see the terrain displays correctly. However, I can't paint any textures on it. No matter which layer I select.
    upload_2020-4-7_20-3-9.png

    Sometimes after I fidget with other terrains, or reload the scene file containing the terrain, the texture just get's replaced with a single layer. Haven't been able to find a reliable repro yet. Even after this happens, I still can't paint.
    upload_2020-4-7_20-7-42.png
    Sometimes it'll return to normal after I fidget with some other terrains. Sometimes it just stays like this forever, and I have to revert my files to get it back to being correctly textured.

    I'm using "Relief Pack/ReliefTerrain-FistPass" with 8 layers in a multi-scene setup with multiple terrains loaded into different scenes at the same time.

    Anyone else having similar issues?
     
  6. SkymapJosh

    SkymapJosh

    Joined:
    Nov 21, 2019
    Posts:
    7
    Hello, we are currently using RTP3.3p with no tessellation, but when we enable gpu instancing the terrain becomes invisible with no errors. Any idea on what would be causing this?
     
  7. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    Surface shaders used for RTP rendering + unity terrain instancing mode is not working pair. Fortunately in most cases Unity terrain instancing is not necessary to keep low CPU load (i.e. it doesn't save that much, sometimes it can be even the opposite - saving a tiny bit on CPU it pushes GPU more).
     
  8. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    Upgrade scenarios can be sometimes problematic.

    Although I've been messing around how to immune RTP when upgrading from "classical" terrain (below U2018.3 Unity had no "terrain layers") to new, it can sometimes give problems depending on user specific context.

    To fix it, please create terrain layers asset first (4/8 like RTP can handle), assign to terrain, then apply RTP component. Should work. You could also reassign terrain layers manually in the case you mentioned (missing terrain layer so you're unable to paint on terrain) for each layer in unity layer/paint settings edit it and assign proper (created previously) terrain layer. Mostly - Unity terrain layers are not used for rendering in RTP - that's why terrain can look fine while you can't paint using Unity tools. RTP can attempt to sync them though (keeping the same RTP's internal layer state together with Unity's layer references)

    Tom
     
  9. FlounderBox

    FlounderBox

    Joined:
    May 5, 2015
    Posts:
    2
    Thanks for the response!

    When I reapply the layers in the terrain component, it works for a while. But often after reloading the scene, the layers are gone again and I have to reapply them again. Tried doing "Save Project" just to cover all my bases, but it's still happening.
     
  10. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    This behaviour depends on context. You can drop me a line on priv so we can identify the problem interactively.
     
  11. R041

    R041

    Joined:
    Nov 24, 2012
    Posts:
    6
    Hi Tom, I have 400 scenes connected to a Parent scene with World Streamer and most of these were roughly 100-200Kb before adding RTP, now they're all pushing 100Mb easy. I've saved all of the 'Combined Textures' and replaced them, but now I'm down to about 50Mb.. It's turned my environment from 50Mb TOTAL, to 20Gb. Any idea how I can crunch this further? I've even tried reducing all of these textures down, and it's still just as bloated.

    I can't even load the full map in the Editor anymore without crashing.
     
  12. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    Make sure all resources (textures) referenced in RTP are project assets that are shared between scenes. In combined textures section - make sure references are all correct (to reused/shared assets). Also - global colormaps, global normalmaps are needed per terrain tile, so there's no chance to reuse them. I'm wondering how previously your scenes could be 100kb. Unity uses 16 bit heightmaps that are uncompressed. Let's say 513x513x2 bytes gives 0.5MB alone. Then 4 layer splatmap which is also ARGB uncompressed - yet another 1.0MB. With 8 layers it's 2.0MB at least. Are you sure your scenes beofre were 100-200KB? (you don't mean Kb - kilo bits I guess). Anyway - you would need to inspect each of your scene with RTP and take a look which textures takes most. You can even visually inspect it swtiching to scene serialization with text (scene file can take a ton then, because textures are also stored in JSONish style) then look for tex references/names using simply VS or notepad++ tools. I even believe that pretty quite some storage is needed for other scene objects, not only terrain.

    I'm concerned about how to represent large scale terrain environments better way, but that will be introduced in my next releases later-on.

    Tom
     
  13. R041

    R041

    Joined:
    Nov 24, 2012
    Posts:
    6
    Thanks for the quick response!

    Most of these Scenes don't hold assets, they're 2 Splat, 8 Layer. Foliage and objects are instantiated on scene load.
    The Terrain files sit at roughly 1MB, scenes at 20-50KB on average, up to 1-2MB if I have separate assets in them.

    I removed RTP from a few scenes to show as an example:

    upload_2020-4-30_8-36-11.png


    So I opened one of these in Notepad++ and there are 2 sections that have massive '_typelessdata' taking up the scene space, are these the Atlases? The 2 Atlas files I saved are only about 3MB each, sitting at 2048x2048, and I didn't think they would even save in the scene itself.

    upload_2020-4-30_8-42-49.png



    upload_2020-4-30_8-43-21.png


    I've changed the Asset Serialization from Text to Forced Binary, which now brings these Scenes down to 24MB, but it's still massive..

    And am I blind, or is there no way to disable the Global Normal? I don't actually use it, because the view is top down perspective, I'm mostly using RTP for the texture blending and hole cutting. So if there are maps sitting in the Scene that I don't need, I'd prefer to just remove it.





    Edit:
    OK - So, I managed to get these back down to the KBs. Roughly 50KB a piece by removing the FTP Preset assigned to each Terrain, and then assigning a small pure black image to the Global Map for Terrain that won't be using The 'Preset' never helped me anyway, it only ever overwrote my Splatmaps and messed up the Terrain forcing me to pull old files.

    The 'Water Settings' map, without saving this also explodes the size of the Scene.

    Perlin is also apparently not referencing properly, and is saving directly to the Scene no matter what. So I have to use a super tiny image for that.
     
    Last edited: May 1, 2020
  14. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    At least Perlin reference you see in editor is not used for rendering - it's combined into texture that's seen in "Special" tab of combined textures. You can easily save and reuse it.Not sure why you had presets for each terrain tile refencing some textures that are not longer used (as you said you saved/reused atlases), but I don't know how world streamer deal with it actually.

    Tom
     
  15. DustMap

    DustMap

    Joined:
    Apr 28, 2020
    Posts:
    2
    Hey hey. I'm using this package in conjunction with MapMagic and am having trouble getting the material to span all of the combined terrains. I have a feeling it's something rather simple and I don't *think* it's being influenced by MM, but any information would be greatly appreciated. I used the same setup and configuration that I'm using here in a previous project so I'm wondering if something has changed between versions. Here's how it looks right now:
    https://imgur.com/muStAGu
     
  16. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    I'm not much into MM (not a user). Combined terrains - what does it mean? When you require all terrains to share the same settings (i.e. the same layer setup) you need to check they are placed in the same hierarchy level, have Relief Terrain script assigned and terrain settings for them has custom shader / material assigned. In the newest Unity releases you might need to select none as material so than when you relesect the terrain tile RTP will assign material again and update. Do you use newest RTP from AssetStore - I fixed this issues as far as I remember. Also which Unity version you're on?
     
  17. horse

    horse

    Joined:
    Jun 17, 2009
    Posts:
    19
    hey tom

    upload_2020-5-10_0-7-10.png

    Why are my presets grayed out on this terrain?

    Really need to be able to bring a preset file in but i cant activate it. I have recompiled the LOD manager

    Thanks

    Glenn
     
  18. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    Hmmm, seems like you broke it ;). Since quite unusual situation happened on your side. Although array of presets held in terrain object is not null, it has 8 null preset elements (because none of them are shown on the list) above grayed out buttons). That's the only possibility to have inspector in such state. It doesn't explain why all preset references broke (went null) so that RTP preset interface got stucked...

    The reason it's grayed out is that you've reached limit of 8 presets to be quickly accessed. You have them 8, but empty/null. The only way to remove the problem would be to clear the array of shown presets as far as it stores null references anyway. Accordingly to newest RTP version (3.3q) open ReliefTerrainEditor.cs and look for line #2943. It should store this content:

    Code (csharp):
    1. EditorGUI.EndDisabledGroup();
    Move this line above line #2936 which has such content:

    Code (csharp):
    1. if (GUILayout.Button("Clear all presets"))
    Save/recompile. It should help in such way that "Clear all presets" will be now uncondicionally active - you can then clear screwed/nullified preset list (that's not even shown above buttons) and load any valid preset from disk - if you have some saved previously. If not - your presets are invalid anyway (references stored in ReliefTerrain script component are null as I said).

    Tom
     
  19. horse

    horse

    Joined:
    Jun 17, 2009
    Posts:
    19
    Would deleting the terrain and rebuiding it work to?
    Im not a coder. :D
     
  20. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    912
    Hi @tomaszek i'm having an issue with the inspector view on RTP (latest version Q). I cannot move to the far right to select the height map texture. There is no option and the tab even maximised only covers half the texture and the select option is on far right side out of view. Is there another way to select height map texture or a fix to the UI bug? Screenshot (137).png
     
  21. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    What's the resolution of your monitor?
     
  22. sharpshifter

    sharpshifter

    Joined:
    May 24, 2015
    Posts:
    8
    Hello @tomaszek

    I've come across an issue that only seems to happen in Unity 2019 when RTP is used alongside Terrain Composer. It seems that changing any RTP settings has no effect on the terrain textures. This works fine in Unity 2018.

    I am a noob so excuse me for talking above my skill level here :) Could it be something to do with the recent fix in 3.3q as the changelog mentions a fix to Unity 2019 re: terrain material?

    Anyway here are the steps to get an example of what I'm on about. (I did this separately targeting each version of Unity rather than upgrading a project)..
    1. In Unity Hub, create a new project using the "3D with Extras" template
    2. Import RTP (version 3.3q at time of writing)
    3. Import Terrain Composer (version 2.7 at time of writing)
    4. Start a new TC2 project using the Window menu > Power of Nature Software > TerrainComposer2 (it will ask to create a new project)
    5. On the "Terrain Area" gameobject use the "Create Terrain" section to create a terrain
    6. Further down under "RTP Detected", click "Enable RTP"
    7. Select the terrain itself (should be a child of Terrain Area in the hierarchy)
    8. In the inspector, "Engine - Terrain or Mesh" options, change any RTP values that should make obvious differences such as Layer Brightness, or even Settings > Tile Size.
    On step 8, if using Unity 2018, you will see the changes to the terrain texture happen in Scene view. But in Unity 2019, nothing will happen, and no errors or warnings appear in the console either (when I tested it anyway).

    I know these screenshots are of TC2's properties and this is the RTP thread but the only difference I can see between the two editor versions is the terrain material, hence why I'm thinking it's related to the fix in 3.3q.

    Unity 2018:




    Unity 2019:



    Looking forward to hearing from you, even if it is to say "not my problem", in which case I'll hop over to the TC2 thread

    Thanks
    Adrian
     
  23. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    There's a change Unity 2019 works with terrain materials - they are always "custom", hence RTP does not replace material/shader on terrain when detecting there is custom material already set on it. Simply set terrain material in Unity terrain settings to null (clear the slot) and allow reselect terrain - RTP will reassign materal with proper shader.
     
    hopeful likes this.
  24. sharpshifter

    sharpshifter

    Joined:
    May 24, 2015
    Posts:
    8
    Thanks for the explanation! Your instructions worked - after setting the material to None, once I'd de-selected and re-selected the terrain, I could see the different material had been assigned and RTP's options started having an effect on the terrain textures.

    With that in mind I delved a bit deeper into what's going on under the hood and made two tweaks to the Terrain Composer code around where it sets the default material and what happens when "Enable RTP" is clicked. So far the results are good - I'll give it a bit more testing and post info in the relevant thread, in the hope a proper fix can be implemented (rather than my lucky guesswork!).

    Back onto RTP, a little issue I have noticed is that after generating a new terrain, when I load an RTP preset, the Perlin normal system doesn't seem to initialise properly. The preset's setting is loaded but the normal effect is not visible on the terrain itself, and changing the Perlin normal settings thereafter has no effect. As far as I can tell all the other settings load in fine.

    My current workaround is after adding RTP to a new terrain, simply click on the Settings > Perlin normal button/tab before loading a preset. Then when the preset has been loaded, the saved Perlin settings take effect and continue to work properly if changed afterwards.
     
  25. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    Visiting perlin tab ensures combined "special" texture (with perlin) is being handled and attached to terrain, but more optinal, as perlin combined can be reused in most cases would be to simply assign it at once when adding RTP to terrain. That's could improve your workflow indeed.
     
  26. horse

    horse

    Joined:
    Jun 17, 2009
    Posts:
    19

    hi Tom.

    I looked at this, but it doesn't line up with my version details below,

    RTP3.3n for U5.5 & U5.6 & U2017 (U2018.1.0f2 checked)

    Can you provide instruction on this version please? We are releasing an update in 4 days so i dont want to risk and update.

    RTP3.3n for U5.5 & U5.6 & U2017 (U2018.1.0f2 checked)

    We are on unity 5.6
     
  27. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,794
    Simply open ReliefTerrainEditor.cs and Ctrl+F for code ("Clear all presets") bit - it's only a single place in code you can find it. The other line of code (which starts disabling UI) is placed a few lines below relative to it.
     
unityunity