Search Unity

RTP - Relief Terrain Pack with geometry blend on AssetStore

Discussion in 'Assets and Asset Store' started by tomaszek, Dec 4, 2012.

  1. FlorianSchmoldt

    FlorianSchmoldt

    Joined:
    Jul 2, 2012
    Posts:
    334
    I've bought, tested it and I'm amazed by the quality. Thanks a lot for the great contribution and the fair price.

    Just a couple of things...
    If I add the fifth texture, I'm offered to bake an atlas but the button actually does nothing on my machine. I was using 2048x2048 textures

    Maybe its not even related to your package but I fail at building a webplayer. The terrain stays black, even if I try more simple versions. I've used fresh compiled dx9 shaders

    Fog doesn't care about your shader.

    It would be nice to increase the detail blend size of the POM beyond 20. I'm doing a racing game, so everything is happening on a bit larger scale and I would like to have a bit of POM on my cliffs as well :)
     
  2. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I'd rather don't use 2048x2048 textures, they will probably never be displayed using MIP level 0 anyway (unless you're using larger tilling sizes). And yes - atlasing 2048 texutres needs 4096x4096 texture to be done. It's not available in webplayer. Try to use 1024x1024 when atlasing (2048x2048 atlas as result). I've tested this size and it works fine. Instead of making such big detail textures, use maybe smaller (I use only 512x512 which are fine) and use superdetail fetaure maybe to get detail at close ups.

    If you use 4layers per firstpass mode you don't use atlasing. you could use it if you really need 2048x2048 detailmaps, but this way you'll be rendering 2 passes (4+4 = 8 layers maximum in sum).

    Fog with shadows in Unity 3 works bad often. I described issue in shader code in comment at the beggining, but when you export it and watch in Unity4 webplayer fog seem to work fine.

    Blend size of POM beyond 20. I don't get what are you refering to. Could you clarify the issue ? POM/PM at cliffs don't work if you're using triplanar (enabled only in 4layers mode). More - parallax effect at very steep areas won't look much good. To model better cliffs you might consider using my blend mesh feautre. Make cliffs/hangovers as separate objects, use my RSP shaders to get POM effect and blend it into terrain.

    ATB, Tom
     
  3. D_Sum

    D_Sum

    Joined:
    Mar 11, 2013
    Posts:
    1
    Perhaps I missed something.

    Can you clarify, is RTP supports applying of *.png heightmap to terrain / using without unity terrain?
    (we saw heinght.png bw-map in package contents)

    Thanks and sorry for grammar.
     
  4. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    In RTP "heightmap" notion is used in 2 meanings:

    1. heightmap used as source for shaping terrain
    2. heightmap used on every layer to use it for extruding (parallax shading) and for blending between layers

    What do you see in package contents is heightmap aquired in script - it's 8bit png so we can use it for splat composition. It's only example.

    I don't understand quite well how do you intend to use heightmap w/o Unity terrain. Yes - we can use my shaders on arbitrary mesh, not necesarilly Unity terrain object (which is virtual/dynamic mesh). But RTP doesn't generate any mesh out of heighmaps. It's basically new shader replacement system with a few other goodies.

    ATB, Tom
     
    Last edited: Mar 12, 2013
  5. FlorianSchmoldt

    FlorianSchmoldt

    Joined:
    Jul 2, 2012
    Posts:
    334
    Thanks a lot for the feedback.
    After some days of testing, I'm able to do get some pretty nice results. I've sticked to 1024detail maps with larger tiling.

    It's a 2000x2000 4096 heightmap terrain with 4x1024 selfshadowing POM layers
    I'm even using tons of post but with a bit of tweaking, its still around 70fps. Awesome work tomaszek !

    My fog problem is still not perfectly solved. There's a clearly vissible border and sometimes, changes in the fog density doesn't show up at all ...but since I'm just using a soft distance fog, I'm totally willing to blame unity itself :)

    The not working atlas creator was my mistake. There was a wrong sized texture in my detail slots.

    Sorry about confusing you about the "Pom beyond 20" question. It's not really an technical issue. I've got a very strong normal map structure on my rocks. On close distance, the light seperates it in strong bright an shadowed sides but its loosing all it details beyond 20. ...which is still pretty close as a maximum. It doesn't necessarily have to be POM but a slider that keeps the normal map over a bigger distance, would help
    Maybe I can solve it, by baking a global color map, that keeps some of the normal map detail. There's a nice option that renders the steepness of the terrain. Would it be possible, to render the terrain, or maybe just the color itself ?
    That could be a great help to render a map outside of unity. I know, it could be reconstructed with the used splats but its pretty hard, if different masks, orders and intensities were used.

    Unfortunatly I'm still not able to build webplayer and its the same with standalone versions. I have no idea, how to solve it. Everything looks perfect in editor and play mode but all my compiled shaders turned out black or white.
    I've got my reliefterrain script set up. Disabled all unused features in the LOD manager. Just used 4 detail layers and tried almost every combination.
    It works perfectly on the example terrain but once, I've created my own and changed the settings and recompiled them, I get this error message and a white terrain.

    PHP:
    Shader error in 'Hidden/TerrainEngine/Splatmap/Lightmap-AddPass'GLSL vertex shader514ERROR'mip_selector' undeclared identifier  at line 19
     
    (FilenameReliefTerrain-AddPass Line19)

    Shader error in 'Hidden/TerrainEngine/Splatmap/Lightmap-AddPass'Program 'frag_surf'undefined variable "mip_selector" at line 477
    Thanks in advance ! :)
    Florian

    UPDATE !
    8 atlased detail maps instead of 4 separate textures, made my webplayer working. Weird but okay for me :D
     

    Attached Files:

    • $RTP.jpg
      $RTP.jpg
      File size:
      1.5 MB
      Views:
      1,376
    • $RTP.jpg
      $RTP.jpg
      File size:
      148.9 KB
      Views:
      1,264
    Last edited: Mar 13, 2013
  6. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Florian,

    Could you give me specs - which features do you use in 4layers mode (w/o atlases) that causes "mip_selector" error in GLSL shader ? I looks like a bug that I'd like to fix for incoming update of RTP2.

    In regards to holding normal mapping far - you can tweak this distance in script settings. Take into account that making this distance too big might drop down performance a bit (closeto the camera we use complex calculations in shader).
     
  7. FlorianSchmoldt

    FlorianSchmoldt

    Joined:
    Jul 2, 2012
    Posts:
    334
    My specs should be nothing special. GeForce GTX 460 with up to date drivers.
    I've started a fresh project with nothing than your pack and my heightmap/textures. It looks like there is no combination that works for me with just 4textures but once, I atlased them, everything works perfectly with all features. Snow/Superdetail etc...

    here's a very quick webplayer with lightmaps. Solved pretty much my problem with the vissible difference of detailed foreground and non normal mapped background...since the lightmap blurres pretty much everything :D But might look cool, once I have some more props in.
    http://dl.dropbox.com/u/36367206/Terrain/Terrain/Terrain.html
    I've also found out that forward rendering caused the fog problem.

    Once again, thanks a lot for those fantastic shaders !
     
  8. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Florian,

    I asked specifically about whith settings has you turn on/off in my RTP_LODmanager object then recompiled script and get GLSL shader compilation error. I'd like people to not get problems with any configuration of features set.

    Tom
     
  9. FlorianSchmoldt

    FlorianSchmoldt

    Joined:
    Jul 2, 2012
    Posts:
    334
    Yeah. I've meant the LOD_Manager. There was no combination of settings that worked for me but I had "UV blend" always turned on. Tried it with and without Snow/Superdetail. Compiled mostly only d3d9. With and without 4Layers per pass. Nearly never tried Triplanar. Didn't need features in classic fallback and never used debug overlapping.

    I'm sorry if this is not a big help for you but since I had no idea myself, I've enabled/disabled already pretty much everything.
    Wouldn't it be faster, to offer atlasing already at 4detail maps anyway ?
     
  10. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Depending on situation atlasing is more expensive than regular texture access. Although it's faster if we push 8 layers in one pass instead of splitting it into two 4 layer passes.

    I'll look into the compilation issue.
     
    Last edited: Mar 14, 2013
  11. deckard

    deckard

    Joined:
    Sep 15, 2009
    Posts:
    158
    Hi Tomaszek,

    I have been experiencing a series of crashes recently, Apparently due to memory allocation errors.

    Here is the error I get:

    $Unity RTP error.jpg

    the profiler does not indicate any abnormal memory usage though: roughly 1Gb of texture memory and 500Mb of RAM.

    My PC has 32Gb of RAM and the graphic card is a GTX680 with 2Gb of VRAM.

    Do you happen to know where the problem could come from?

    Thanks a lot.

    btw I haven't downloaded the version 2.0 of the RTP yet. This may fix the problem.
     
  12. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I'm not sure if your problems are RTP related.

    With your hardware my shaders should work very fast - I think over 200fps in 1280x1024 resolution and all setting on. RTP2 is tested on DX11. I'm just about releasing some fixes, so you might look at AssetStore in a few days to get the newest update.

    Meantime - You can test my RTP2 standalone players - they were built under Unity4 DX11 mode, so you should be able o get best out of it on your machine.
     
  13. BigB

    BigB

    Joined:
    Oct 16, 2008
    Posts:
    672
    Hi tomaszek,

    I'm having another issue here, with the snow :)
    So, I added the ReliefTerrain2Geometry script to a mesh, and I got the snow to show up in the preview window and render window.
    The thing is, everytime I press play, the snow is gone.
    To get the snow back, I need to disable and re-enable the script on the Inspector.
    Any clue on what's going on ?

    Below, the scene in edit mode (with snow), and then after we click play (no snow).

    $with_snow.jpg

    $no_snow.jpg


    Thanks,
     
    Last edited: Mar 15, 2013
  14. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    @BigB: Do you use the snow functionality alone ? Because I see no "terrain" like object in your scene. If so you probably attached Terrain2Geometry script to any object and use it to control snow. I think it's overshoot solution. About snow disappearing, I think you could move the script to more than one gameObject so they "fight" as script execution order might be unpredictible. To use snow alone the best solution would be to setup global shader params yourself in any script which is easy to write. This is part of my Refresh() function which is responsible for snow apperance on any object (that uses my bonus snow shaders):

    SetShaderParam("rtp_snow_strength", _snow_strength, mat, true); // force global
    SetShaderParam("rtp_global_color_brightness_to_snow", _global_color_brightness_to_snow, mat, true);
    SetShaderParam("rtp_snow_slope_factor", _snow_slope_factor, mat, true);
    SetShaderParam("rtp_snow_edge_definition", _snow_edge_definition, mat, true);
    SetShaderParam("rtp_snow_height_treshold", _snow_height_treshold, mat, true);
    SetShaderParam("rtp_snow_height_transition", _snow_height_transition, mat, true);
    SetShaderParam("rtp_snow_color", _snow_color, mat, true);
    SetShaderParam("rtp_snow_specular", _snow_specular, mat, true);
    SetShaderParam("rtp_snow_gloss", _snow_gloss, mat, true);
    SetShaderParam("rtp_snow_deep_factor", _snow_deep_factor, mat, true);

    These are all params that my dynamic snow uses. SetShaderParam is overloaded function to invoke Shader.SetGlobalFloat or SetGlobalVector or SetGlobalColor unity functions. You might look into Terrain2Geometry script to get idea how does it work. Anyway these global params should be set by Shader.SetGlobal... functions and you might do it in Start() handler in any MonoBehaiour script.

    ATB, Tom
     
  15. BigB

    BigB

    Joined:
    Oct 16, 2008
    Posts:
    672
    Thanks tomaszek, got it to work as I wanted, the snow shader is really awesome !
     
  16. Arcanor

    Arcanor

    Joined:
    Nov 4, 2009
    Posts:
    283
    I've recently purchased both the RTP and RSP. I'm seeing very long times when I first import one of the packages. For example, I have a new project with almost nothing in it (just some substances) and then I import the RTP. It takes over 25 minutes before I can do anything in Unity! I have a pretty good system with i7-3610QM CPU@2.3GHz, 16GB RAM, plenty of disk, and a GeForce GTX 675M with 4GB graphics memory.

    Is this normal behavior?
     
  17. Arcanor

    Arcanor

    Joined:
    Nov 4, 2009
    Posts:
    283
    I have a couple of other small questions regarding the RTP TerrainScene demo as I'm going through it.

    1. The Terrain object shows up as Missing in the Inspector, and is colored bright red in the Hierarchy panel. However I can still select the Terrain in the Scene view. How is this possible?

    2. The Stone1 object seems to be having some flickering problems with rendering, although Stone2 (and all other objects) seem fine. Is this a known bug, or a problem somehow with my configuration? Should I create a sample video to see what I mean, or have you seen this before?
    **edit - I can solve the flickering problem on Stone1 by setting the child RTP_blend_underlying object as Static. Unchecking Static causes the RTP_blend_underlying to flicker.

    3. I've tried placing additional copies of the Stone1 and Stone2 objects into the scene, but apparently they are not actually meant to be used as prefabs. They seem to be more complicated than ordinary prefabs. Is there any usage/setup guidance somewhere?
    ** edit - nevermind question 3. :) It wasn't the Stone1 object that was confusing me, it was the Stone1 Material, which is not actually meant to drop directly onto the Stone1 object in the scene. It's the material meant for the new geometry blending. So I can use the Stone1 object just fine with the Stones_d and Stones_nmp textures on a simple Bumped Diffuse material. Then I can play with the scripts for the geometry blending after that.

    Thanks.
     
    Last edited: Mar 17, 2013
  18. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Hi Arcanor,

    Long compilation times. Yes - it's issue of openGL HLSL2GLSL Unity compiler. It can take horribly long time. When you work on PC you can use only d3d9 (or d3d11 in DX11 mode under Unity4) when adjusting features - look at target platforms in RTP_LODmanager. Unchecking unnecessary platforms speeds up compilation much.

    1. Red object missing. I've never though about how it's possible. I just used prefabs, then get mesh out of prefab while prefab itself was removed from project.

    2. Flickering issue - its Z-fighting. I described it here:

    http://forum.unity3d.com/threads/171394-RTP-Relief-Terrain-Pack-v-2-features-tour/page3

    ATB, Tom
     
  19. Zelxen

    Zelxen

    Joined:
    Mar 9, 2013
    Posts:
    9
    Hey Tom,

    I'm getting the same memory error that deckard mentioned. When the crash occurred, I had 64 tiles in the scene and I was applying the following files to each of them. Three 1024x1024 detail maps, three 1024x1024 normal maps, a 512x512 splat map for the three detail maps and a 512x512 global normal map.

    The first time the crash happened when I dropped a normal map on the 61st tile.
    The second time it happened when I hit the play button after I got all the tiles set up.

    Also, when I build my project, all the textures disappear. Everything looks fine in the editor though.

    I'm only using 3 layers and I got the message at the top of the main settings tab that says to replace the content of the shaders folder with the content of _4LAYERS.zip but I cant seem to find that file.

    If you need more information feel free to ask and I will post it as soon as humanly possible.

    Great work and support, keep it up!
     
  20. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    You're using RTP1 while there is RTP2 since last month with tons of bug fixes. Still I'm tweaking it here and there so You could probably wait until RTP2.0b version is available on AssetStore. I'll try to put update today, so it should be ready&approved by the end of this week.

    Referring to your issue. In fact I haven't tested my shader system on that vast environment (64 sticked terrains). In regards to memory issues I could suggest that you may tweak my system a bit. Shader uses these textures:

    1. each 4 layer uses one heightmap encoded RGBA. In RTP2 it's done automatically, but if you use the same detail textures on different tiles you may prepare 1 heightmap and reuse it on different tiles.

    2. each layer pair has one normalmap. I combine normalmaps (in RTP2 they're all in one place where layer settings are - it's much more user friendly). So layers 0-1 are encoded into one combined normalmap (RG+BA), the same layers 2-3. The reuse situation arises when you would use the same detail textures across different tiles. The only problem is that normalmap is generated dynamically. It's done OnAwake in ReliefTerrain script and when you assign new normal map to a layer. You could, however modify this functionality to make it work static. So - generate combined normalmaps, save as RGBA png files and share them across tiles. This way you could save much memory.

    3. RTP2 uses global normalmap which encodes it together with superdetail (RG - globalnormal, BA - superdetail mult channels). It's also done dynamically. You'd just have to make it static. In case you don't use superdetail mult channels making global normalmap that could be reused would be simple - put XY component on RG channels (just copy right channels from regular normalmap to RG channels of reused global normalmap texture). You might use my tool to combine channels of 4 textures to 1 which was used int RTP1 to make heightmaps. It's still present in RTP2.

    4. In case of using 8 layers in first pass you should also reuse atlases generated. If you use only 4 layers per tile you won't use atlas textures.

    Concluding - redo all normalmaps to work statically (you may also have to edit ReliefTerrainEditor script so you'd be able to store your static reusable normal textures in ReliefTerrain script). I believe in case of many tiles reuses normal height maps you wuld save a lot on RAM. I guess disapearing issue is caused by memory issues as well. RTP2 uses shaders that work much better that RTP1 and are able to perfectly handle 4 layers mode (with its optional extra features like triplanar). Just wait till RTP2.0b is available. Tweak it and your troubles should be gone.

    ATB, Tom
     
    Last edited: Mar 20, 2013
  21. Zelxen

    Zelxen

    Joined:
    Mar 9, 2013
    Posts:
    9
    Thank you very much for the quick answer!

    However, I am using RTP2, but I can't wait for RTP 2.0b!

    I'll wait for the release and then see how everything goes after some tweaking and tell you how it went :D

    Thanks again!
     
  22. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Unzipping _4LAYERS.zip instruction where did I forget to remove it ? :) Anyway using 4 or 8 layers in first pass mode is set using RTP_LODmanager object / script. If you're using only 4 (orr less) layers - check "4 LAYERS per pass" mode.

    ATB, Tom
     
    Last edited: Mar 20, 2013
  23. Zelxen

    Zelxen

    Joined:
    Mar 9, 2013
    Posts:
    9
    Awesome I was just making sure there wasn't something I forgot to do.

    Thanks!
     
  24. VicToMeyeZR

    VicToMeyeZR

    Joined:
    Jun 3, 2012
    Posts:
    427
    I am curious what I am doing wrong? The splat maps are the same resolution as the heightmap? Should it not work?

    Can you provide some direction on how to get this work properly?

    $splats.png
     
  25. VicToMeyeZR

    VicToMeyeZR

    Joined:
    Jun 3, 2012
    Posts:
    427
    hmmm, It appears like the splat map is processed upside down from the terrain data. I hate to flip the splat map for it work line up properly.

    EDIT:

    SO it appears that with World Machine, I have to "Flip the height map vertically" but the splat maps stay normal for output. Does that seem right to you?
     
    Last edited: Mar 27, 2013
  26. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Masks used in my composition tool have to be of "Detail Resolution" size (it has nothing to do with heightmap resolution).

    When you've got ready made splatmap (in form Unity stores it internally) you can just put it into controlmap slot - you don't have to compose it, but of course you can to get more control over the process. In RTP you can also save readymade controlsplats so you'reable to port them between terrains. Of course - readymade control map applied has to reflect the size of terrain "Detail Resolution", too.

    Yes - WM got kind of issue and it exports heightmaps flipped (that's why I put flipper in my example worldmachine project to fix it - you may refer to this - it's part of RTP2 release).

    ATB, Tom
     
  27. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    RTP2.1 release is waiting for AssetStore staff approvement. It introduces new substance to terrain layer texture export and a few additional bugs detected&fixed. In Unity 4.1 substance textures export works in both Indie and Pro. In lower Unity versions user need to have Pro license to get the feature working. With substance texture exporter you can simply attach ProceduralMaterial to layer and get its outputs (diffuse+spec, normal, height) by single mouse click. Exported textures are saved as png files in location of diffuse texture folder.

    $RTP2_1_substance_export_textures.jpg
     
    Last edited: Mar 28, 2013
  28. VicToMeyeZR

    VicToMeyeZR

    Joined:
    Jun 3, 2012
    Posts:
    427
    using the new 2.1 RTP and unity 4.1.2
    I am not sure where the problem lies.

    When I am working inside the editor for a while, placing assets, and then I go back to the terrain editor to paint some textures and it only will paint the 1st texture and the brush size is set to a number(not sure what that number is but its big) and I can not change the size, opacity or strength..
     
  29. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Hmmm, for me it sounds like Unity's terrain bug as RTP has nothing to do with painting itself. RTP is basically shader replacement system. Have you tried to replicate the same bug when not using my package ?
     
  30. VicToMeyeZR

    VicToMeyeZR

    Joined:
    Jun 3, 2012
    Posts:
    427
    I have not yet, but that is my next to-do list
     
  31. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,166
    does this package work with easy roads?
     
  32. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    EasyRoads doesn't affect terrain shading pipeline, it only deals with terrain height where road is placed, so the answer is - yes it should work. I'm not aware about any terrain replacement shader present in EasyRoads (maybe as a bonus, I know Raoul worked on something recently), but if there is any, you can simply not use it (just don't import, or remove shaders not needed).

    Tom
     
  33. raoul

    raoul

    Joined:
    Jul 14, 2007
    Posts:
    6,735
    Yes, no problems between RTP and EasyRoads3D. I am working on something that will require custom terrain shaders but they will probably not be in the package itself.

    The only thing that you might want to double check is the option to embed the road shape in the terrain splat maps. Not sure if or how that will affect the RTP shader. In anyway the road shape is also stored in png format on disk so you can manually add it to your custom RTP splatmaps if that is what you want to do.

    @Tomaszek, last week I updated to v2. Really easy to get into this and excellent quality, great work!
     
    Last edited: Apr 10, 2013
  34. Drifter Games

    Drifter Games

    Joined:
    Mar 27, 2013
    Posts:
    9
    Wondering what the best way to use RTP with multiple LOD'd meshes instead of unity terrain... should I add a mesh renderer to the LOD group somehow or attach an instance of ReliefTerrain2Geometry to each LOD model inside the group? Thanks,

    Edit: Even when I attach ReliefTerrain2Geometry material and script to the meshrenderer component of the LOD group, the textures won't show up, the global normalmap does, but no textures. I know I'm missing something here...
     
    Last edited: Apr 17, 2013
  35. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    In fact I haven't tested mesh LODs already. With a bit of effort you should be able to do it remembereing to provide actual mesh LOD level handled (its material) with necessary material / shader properties. How it's done you can find in my scripts (ReliefTerrain2Geometry - look what's initialized in Awake, Refresh function).

    Also, you'll probably run into issue of seams between terrain sectors which are of different LOD levels :/
     
  36. Deleted User

    Deleted User

    Guest

    Hi,

    does this shader works in linear space? Are there any known issues in that space?
     
  37. foosart

    foosart

    Joined:
    Jun 6, 2012
    Posts:
    66
    I am seeing some artifacts, almost appears to be z-fighting, between RTP mapped terrain and other geometry. I am not using geometry blending, just relief mapping. Any thoughts on what might be causing this issues circled in the image below?

    $RTP-issue.jpg
     
  38. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    As far as I'm aware it's independent. Basically RTP are (replacement) surface shaders, so it will just work.
     
  39. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Yep, I know the issue and has been resolved in RTP2, but I'm not sure if upgrading to this version is suitable for you at this stage of your project. Anyway - I'd recommend to make the upgrade, because it solves many more issues, too. If you don't like to do it you might get RTP2 and compare shader code. The reason you see "z-fight" is Offset function. You could commnet this in your shaders of RTP1 the way it's done in RTP2.

    ATB, Tom
     
  40. foosart

    foosart

    Joined:
    Jun 6, 2012
    Posts:
    66
    Yes, at this point we do not want to update to RTP2. I think it will be to risky this close to release. We will upgrade for our next project.

    If possible, could you be more specific about which portion of the offset function we would need to change or comment out?

    Thank you.
     
  41. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    @foosart

    You don't use geometry blend nor shader on mesh, so you can goto addpass shader and comment out all "Offset" directives (search for this in shader code). This should work, BUT might be a bit risky for OpenGL (there is a bug in Unity that causes _real_ z-fight between FirstPass and AddPass in terrain replacement shader even though they are the same mesh).

    ATB, Tom
     
  42. Deleted User

    Deleted User

    Guest

    Any idea why the GUI is missing some layers? I imported the package in a new project.

    Unity 4.1.2f1 - Mac OS X 10.8.3 Mountain Lion



     
    Last edited by a moderator: Apr 22, 2013
  43. foosart

    foosart

    Joined:
    Jun 6, 2012
    Posts:
    66
    I only found one instance of the "offset" directive in the addpass shader. Commenting this out had no effect, the problem still exists. I'm going to try making a copy of our project and upgrading RTP. I'll let you know what happens!
     
  44. caldrin

    caldrin

    Joined:
    Dec 4, 2011
    Posts:
    127
    ignore this. for some reason the post above this did not show for me.
     
    Last edited: Apr 22, 2013
  45. foosart

    foosart

    Joined:
    Jun 6, 2012
    Posts:
    66
    I am seeing the exact same issue. I have 8 texture layers set (using RTP 1). After importing RTP 2 only the details for layer 1, and part of layer 2 display in the UI. The textures draw on the terrain OK, but no relief mapping is being rendered.

    $RTP-2-Issue.jpg
     
  46. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I'll see what causes out of array error and will back to you.

    Tom

    EDIT: I'll send you private message with fixed script to test. It should resolve the issue.
     
    Last edited: Apr 22, 2013
  47. foosart

    foosart

    Joined:
    Jun 6, 2012
    Posts:
    66
    I found that if I removed the RTP script from the terrain re-attach it (after upgrading to 2.0), the UI features display correctly. No more array errors.

    But, I am seeing very little POM extrusion compared to 1.0. The POM detail in my sand textures is hardly visible compared to what I saw in 1.0, even if I bump the settings way up.
     
  48. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Hmmm, I assume you've tried to tweak POM height in general settings ? Parallax effects are cancelled when we use triplanar or when global colormap alpha channel is 1 or at areas where FirstPass and AddPass are blended.

    Tom
     
    Last edited: Apr 22, 2013
  49. foosart

    foosart

    Joined:
    Jun 6, 2012
    Posts:
    66
    I guess the POM is rendering, but just more subtle and controlled than before.

    My last question is for scenes that use the LOD manager to switch to classic mode. How do I get my lightmaps to render on the terrain?
     
  50. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Lightmapping in classic mode is fully controlled by surface shader output, so they should just work. Don't they ?