Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Unity 2022.2 is now available as the latest Tech release.
    Dismiss Notice
  3. We are making some changes to the DOTS forums.
    Dismiss Notice
  4. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

RTP - Relief Terrain Pack v. 2 - features tour

Discussion in 'Assets and Asset Store' started by tomaszek, Feb 21, 2013.

  1. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    I'm having the exact same issue, only happens to the smaller rock and not the one next to it too. Really weird.
    Also only happens in one of the 2 sample scenes.
     
  2. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Black jittering. I have to describe the background of the issue for people to better understand what we're dealing with.

    Every geom blend object is rendered as 2 separate objects. I managed\ it this way instead of trying to use one mesh and 2 passes because now we can blend mesh vs. mesh. To be able to select underlying child object - called "aux child object" in RTP2 you'll have to set checkbox inside geom blend script inspector (it's at the top of properties). Now you'll be able to select child object when you unfold hierarchy of main object.

    Child object is rendered with shader that mimic terrain - it has texture coords, normals and tangents borrowed from terrain laying just under child object vertices. I don't use normal/tangent blending via vertieces colors, only alpha of vertex color is used. Areas where blended terrain texutres are not visible are skipped (so they're black and that's what you see black jittering on small rocks). This optimizes much rendering. This way we're sure that this child object looks 100% the same as terrain it mimic. The only difference you might experience is that geom blend uses forward rendering path as I wasn't able to manage it right (blending normals which are no longer independently calculated per object but stored in offscreen buffer in deferred rendering path).

    Main object is just transparent (surface shader decal:blend directive) one applied on the surface of child described. Theoretically main and child are exactly the same meshes but 2 issues might arise:

    1. Sometimes child / main geom blend objects are merged in process of batching. After you run it - check if mesh of smaller rocks have been batched (merged togeter with another mesh) - it can be seen in MeshFilter inspector of an object. At this point child/parent object might be not exactly the same. Batching introduces some small differences in vertex positions in world space. To get rid of this - don't batch geom blend objects (might be set off in "static" property of gameObject) or make sure that child objects and geom blend objects are batched constituting exactly the same set of meshes.

    2. in open GL we've got (sometimes and I can't say whay and when it occurs) even bigger problem. Even exactly the same mesh rendered in 2 passes can be subject of such z-fight issue. To get rid of this in openGL you can offset a bit vertices positions so that we make sure main geom blend object is always rendered over underlying "aux child". This can be done inside shaders where I put "Offset " (search for this phrase with following space character) directives. As for now they're commented, but can be used but users who can't solve z-fight problems another way. Offseting meshes in shader just works, but has its cost. It might introduce another artifacts (not that dramatic like z-fighting) at steep angles and at the edges of objects.

    ATB, Tom
     
    Last edited: Feb 26, 2013
  3. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    You have to make sure you're using d3d11 on dx11. As far as I remember I put d3d11 in set of target platforms in shader code (might be set in RTP_LODmanager). Also, I'm not sure if RTP_LODmanager would appear when you just upgrage the package on existing project. It's should be automatically placed on scene when adding ReliefTerrain script to your terrain object. This is the way I'd suggest you for your scene - remove ReliefTerrain script from terrain, and put it again.

    RTP2 has shaders compiled with 4+4 layers option by default. So 4 layers are rendered in first pass, the other 4 layers using addpass. Heightblending between passes is not possible (only layers 0-3 and 4-7 can be height blended, but not 2 and 6 for example). Blending problem is also probably you don't have hiehgtmaps applied any longer. Just go to Details unfold and assign normals/height maps to detail textures again.

    DX11 - can't say what's wrong in your scene. Looks like DX11 version is not used, but "diffuse" fallback. As I said - I'm not sure if d3d11 was target platform for you. Remember, that maybe some old terrain replacement shader still exists in your project and interefere with new one. Anyway I've tested in DX11 mode and it worked fine (faster than DX9) on my laptop (Win7 GT540M).

    To make sure, maybe try to import the package on fresh project and check if d3d11 is set in RTP_LODmanager inspector.

    Tom
     
  4. caldrin

    caldrin

    Joined:
    Dec 4, 2011
    Posts:
    127
    Thanks for the reply, your probally in that its best for me o remove it from the terrain to start with then add the new version in. I did have it set to d3d11 but that didnt help.

    Anyway thanks for the suggestions I will have another play around when I get home tonight.
     
  5. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,317
    ok. Thanks for the answer. That solved it.
     
  6. caldrin

    caldrin

    Joined:
    Dec 4, 2011
    Posts:
    127
    Ok started from scratch and its working correctly.

    That was with a fresh map, still need to mess around with my origional map.. not that there was much done just using it for testing stuff.

    Tried removing it off the old map and readding, terrain has gone pink lol.. no big issues tho..
     
    Last edited: Feb 27, 2013
  7. BigB

    BigB

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

    I got the pack, and i'm trying out the snow.
    Works great in the example maps, but I'm having a hard time having it work outside the example maps.
    Is there anything special that I must do to get it working in other maps ?
    I simply created a mesh, and assigned the shader "BumpedSpecular&Snow" to it , but I get no snow at all.
    I also added the gameobject _RTP_LODmanager that you use to configure the scene, but again nothing.
    What am I missing ?

    Thanks,
    Bruno
     
  8. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Probably it's because you're not using my ReliefTerrain.cs script on terrain or Terlief2Geometry.cs. Are you ? These scripts allow to adjust snow parameters like global snow strength and so on. The mentioned snow shader is kind of bonus, not totally independent (from RTP) thing. You could, however handle snow with terrain, but should then manually set snow params by your script. Look at ReliefTerrain.cs and its Refresh() method. There are snow params set as shader global params (done via overloaded SetShaderParam calls). If you'd make it this way in your custom script you'd be able to control snow without my Terrain system.

    ATB, Tom
     
  9. negativecap

    negativecap

    Joined:
    Jan 27, 2013
    Posts:
    99
    Thanks for the response. Had a quick question re: RTP RSP, if I want to match shaders between objects and terrain while using geometry blend (which I believe one of these posts indicated I could if I had both packs) how would I go about it? I think I read something about it in the docs (As a bonus of RSP user can find subshaders code that can be just copy/pasted into my geometry blend shader), and there was a post that said:

     
    Last edited: Mar 5, 2013
  10. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Great work as ever, im sorry i didnt get back with a review cause i had very little chance to fiddle with it with a bunch of other stuff going on - seems i'll be able to have a proper go with it all very soon so can come back with some proper feedback
     
  11. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    RSP docs are right, but now you don't have to copy/paste anything. POM shader that can be blended with terrain is just ready in RSP package now. By default you can use bumped specular from RTP for meshes that are blended with terrain (that's default option).

    Bonus shader is POM _without_ silhouettes (if this is important for you).

    ATB, Tom
     
  12. negativecap

    negativecap

    Joined:
    Jan 27, 2013
    Posts:
    99
    Groovy, thanks!
     
  13. negativecap

    negativecap

    Joined:
    Jan 27, 2013
    Posts:
    99
    quick question, in Deferred Lighting rendering when using geometry vs terrain I get black instead of a nice blend, if I change the rendering path to forward it works fine, but is there any way to work with this in deferred lighting mode? Also, what is the best way to go about making superdetail maps? I searched and googled to no avail...
     
  14. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Look at page 3 of this thread. I described the issue and how to resolve it.

    Superdetais maps. I used sampler (texture) the same as global normalmap. In shader it works like this:

    RG are used for global normal map AND superdetail. I use just perlin noise as a base for this.
    BA are two additional grayscale channels.

    So, to add detail at closeups you can use:

    1. superdetail normal (the same as global normal with different tiling). Regular layer bumpmaps are blended with this superdetail normal map at very close distances. This way I enable additional bumpmap relief at big stones and rocks layers in my example scene. For sand I use it only a tiny bit (sand would look weird with strong superdetail).

    2. two additional grayscale channels which multiply with texture color. They use the same tiling as superdetail normal above. This way you can make layers being treat by darkening/brightening mask. The best way to get feel how does it work is just enabling the feature in my LOD manager - default superdetail additional channels feature is disabled in shaders (refer to _RTP_LODmanager gameObject), because they are not necessary to get nice look at close-ups in my example scene.

    Another (only mentioned in my helpboxes in ReliefTerrain inspector) feature of these 2 additional superdetail channels is that they can be used also in far distance as the same mask as global normalmap (with the same tiling as global normalmap is used). Using one of my grayscale superdetailmasks I was able to for example add more variety on rocks which can be darkened in some areas (they look like black volcano rocks then).

    So - there is no big deal about superdetail map. It's just highly tiled global normal + 2 additional multiplicative grayscale channels.

    ATB, Tom
     
  15. botumys

    botumys

    Joined:
    Apr 16, 2009
    Posts:
    707
    I bought this pack and it's great !

    My first question : I'm using triplanar projection and when I use UV blending,the projection for the blended detail map if vertically. It's possible to project the detail + blended detail map using projection?
    My second question is about Height maps, I don't understand how it's work :/
     
  16. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    1. UV blend / superdetail mapping can't be realised triplanar, only detail textures with their normal maps and heightmaps are realised triplanar. Technically - of course I was thinking about it but this is just technical constraint (getting proper MIP level). Can't tell now when (if ever) I'll overcome this issue as I would need to use in shader more interpolators we don't have :/

    2. Heightmaps - in regards to triplanar, heightmaps are used only for blending layers (we don't use them for making parallax effects). Refer to docs - layer with heightmap of brighter values (geometrically "higher") tend to pop over underlying/blended layer. In fact you don't have to use heightmaps (left them blank in script inspector), but I strongly encourage using them - results are much better. To get heightmap out of normalmap there are plenty of 3rd party tools - just google. Remember to encode heightmaps the way it has alpha channel available, for example as Alpha8 (using default conpression of jpgs causes its DXT1 compressed with alpha channel constant - equal to 1). For example scene I used B2M (AssetStore) to get normal/heightmaps out of free Unity textures.

    ATB, Tom
     
  17. botumys

    botumys

    Joined:
    Apr 16, 2009
    Posts:
    707
    Ok, thanks for your quick answer ! It's more clear now.
     
  18. botumys

    botumys

    Joined:
    Apr 16, 2009
    Posts:
    707
    Hi, it's me again,

    At home, the shader work perfectly, but here @ work on my workstation, when I use more than 4 textures, the shader turn purple. (see image in attach). I'm using
    4 layers per pass, first and add pass triplanar. As target I tested d3d9,opengl, gles and d3d11(in dx11 model).

    Graphical cart on this computer is a Quadro fx 4800.

    edit: when I compile the shader, unity give me error messages:

    Code (csharp):
    1.  
    2. Can't find Relief Pack/TerrainGeometryBlend_POMDetailSnow and it's asset .shader file
    3. UnityEngine.Debug:LogWarning(Object)
    4. RTP_LODmanagerEditor:RebuildFeaturesInFile(String, Boolean, Boolean, Boolean) (at Assets/ReliefPack/Editor/ReliefTerrain/RTP_LODmanagerEditor.cs:664)
    5. RTP_LODmanagerEditor:RefreshFeatures() (at Assets/ReliefPack/Editor/ReliefTerrain/RTP_LODmanagerEditor.cs:229)
    6. RTP_LODmanagerEditor:OnInspectorGUI() (at Assets/ReliefPack/Editor/ReliefTerrain/RTP_LODmanagerEditor.cs:214)
    7. UnityEditor.DockArea:OnGUI()
    8. Shader error in 'Hidden/TerrainEngine/Splatmap/Lightmap-FirstPass': Parse error: syntax error at line 16
    9. Shader warning in 'Hidden/TerrainEngine/Splatmap/Lightmap-FirstPass': Program 'vert_surf', 'vert': output parameter 'o' not completely initialized (compiling for d3d11) at line 46
    10. Shader warning in 'Hidden/TerrainEngine/Splatmap/Lightmap-FirstPass': Program 'vert_surf', 'vert': output parameter 'o' not completely initialized (compiling for d3d11_9x) at line 46
    11. Shader error in 'Hidden/TerrainEngine/Splatmap/Lightmap-AddPass': GLSL vertex shader: 567: ERROR: 'mip_selector' : undeclared identifier  at line 19
    12. Shader error in 'Hidden/TerrainEngine/Splatmap/Lightmap-AddPass': GLSL vertex shader: 571: ERROR: 'mip_selector' : undeclared identifier  at line 19
    13. Shader error in 'Hidden/TerrainEngine/Splatmap/Lightmap-AddPass': GLSL vertex shader: 574: ERROR: 'mip_selector' : undeclared identifier  at line 19
    14. Shader error in 'Hidden/TerrainEngine/Splatmap/Lightmap-AddPass': GLSL vertex shader: 578: ERROR: 'mip_selector' : undeclared identifier  at line 19
    15. Shader error in 'Hidden/TerrainEngine/Splatmap/Lightmap-AddPass': Program 'frag_surf', undefined variable "mip_selector" at line 477
    16.  
    17. Keywords: RTP_SIMPLE_SHADING, DIRECTIONAL, LIGHTMAP_OFF, DIRLIGHTMAP_OFF, SHADOWS_OFF
    18. Shader error in 'Relief Pack/Terrain2Geometry': Parse error: syntax error at line 296
    19.  
    20.  
     

    Attached Files:

    Last edited: Mar 13, 2013
  19. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Could you give here RTP_LOdmanager inspector screenshot with params set ? I'd like to know which configuration causes shaders compilation problem (I've heard about AddPass GLSL problem, but have checked it yet, FirstPass shader warning also shouldn't occur for DX11).

    I assume you imported my package into Unity4 in DX11 mode and tried to recompile shaders with given params set (or you have done anything, but shadrs haven't compile right by default on importing stage) ?

    Tom
     
  20. botumys

    botumys

    Joined:
    Apr 16, 2009
    Posts:
    707
    I tested with dx11 but the problem occur with simple d3d9.
    I'll try step by step to find when I get all error message.

    To begin, on a fresh project with the package imported :

    -I create a new terrain and attach Relief terrain script + App controler terrain script.
    -I change params like in the attach picture.
    -First error message :

    Can't find Relief Pack/TerrainGeometryBlend_POMDetailSnow and it's asset .shader file
    UnityEngine.Debug:LogWarning(Object)
    RTP_LODmanagerEditor:RebuildFeaturesInFile(String, Boolean, Boolean, Boolean) (at Assets/ReliefPack/Editor/ReliefTerrain/RTP_LODmanagerEditor.cs:664)
    RTP_LODmanagerEditor:RefreshFeatures() (at Assets/ReliefPack/Editor/ReliefTerrain/RTP_LODmanagerEditor.cs:229)
    RTP_LODmanagerEditor:OnInspectorGUI() (at Assets/ReliefPack/Editor/ReliefTerrain/RTP_LODmanagerEditor.cs:214)
    UnityEditor.DockArea:OnGUI()
     

    Attached Files:

    • $er1.jpg
      $er1.jpg
      File size:
      167.2 KB
      Views:
      1,141
  21. botumys

    botumys

    Joined:
    Apr 16, 2009
    Posts:
    707
    I had 4 textures on the terrain and except the error message, all is ok.

    I add a fifth texture and the terrain turn pink like in this picture.

    edit :
    I think I found the problem : dynamic snow.
    After the first recompile and pink terrain, I turned Dynamic snow ON and compiled again. When compilation finished, all the 5 textures appears on the terrain and all was fines.

    I tried to turn off again and recompile -> pink terrain and all error messages listed in my first post.

    Turn ON and except the "Can't find Relief Pack/TerrainGeometryBlend_POMDetailSnow and it's asset .shader file" warning, all the textures appeared.
     

    Attached Files:

    • $er2.jpg
      $er2.jpg
      File size:
      120 KB
      Views:
      1,130
    Last edited: Mar 13, 2013
  22. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Just wanted to say that your standalone demo worked fantastically better on my system than the webplayer. With some tuning it could perform decently in a game. I may consider this for a purchase now.
     
  23. botumys

    botumys

    Joined:
    Apr 16, 2009
    Posts:
    707
    New problem, the texture 5 bug on slopes.(but ok on plane surfaces like in this picture)
    It's like a problem with the add pass triplanar.
     

    Attached Files:

    • $er3.jpg
      $er3.jpg
      File size:
      224.2 KB
      Views:
      1,208
    Last edited: Mar 14, 2013
  24. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Thank you for specs. I'll look into the issue as dynamic snow isn't necessary for everyone and shaders without it should work faster. Do you use Unity4 ? (it has some differences in shader compiled code).

    Sorry I can't see your image attachment above :(
     
  25. botumys

    botumys

    Joined:
    Apr 16, 2009
    Posts:
    707
    Yes unity 4 Pro.
    For attach image I don't know what happens on this forum but sometimes it's work, and sometimes not.
    I try again.
     

    Attached Files:

    • $er3.jpg
      $er3.jpg
      File size:
      224.2 KB
      Views:
      1,081
  26. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Thank you for pointing out the bug. I'm glad shader now works for you. I'll add the fix in the near RTP update.
     
  27. botumys

    botumys

    Joined:
    Apr 16, 2009
    Posts:
    707
    Thx for the fast support ! Now all is ok :)
     
  28. mk1978

    mk1978

    Joined:
    Dec 27, 2009
    Posts:
    276
    I am having similar problems as earlier mentioned, terrain turning into purple color when adding the fifth texture. The fifth texture is not even painted into terrain. The terrain turns into purple as soon as I just add the fifth texture in terrain editor. Do you have any idea what could cause this? I am using Unity4. Here are screenshots with 4 and 5 textures and also LODManager settings.





     
  29. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    I'll try to put RTP2 update on AssetStore this week as these bugs have been identified (with help of botumys).

    ATB, Tom

    P.S. @mk1978 - you could also give me your invoice number via private message and could send you fixed scripts/shaders sooner.
     
  30. BigB

    BigB

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

    I'm unable to get proper textures on a terrain, all I get is a white terrain.
    If a change the material from "Terrain Material" on the terrain properties to a simple diffuse shader, then I get what it seems is the colormap on the terrain, but no detail textures.
    Take a look at the screenshot :


    What could be the problem ?

    Thanks,
     

    Attached Files:

  31. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Replacing material (in Unity4) with your own one - OK as far as you're using my shaders. Diffuse shader doesn't handle anything but one global colormap. The reason it doesn't show detail textures might be you're using my shaders in 8 layers per pass mode (more precisely - 8 layers in first pass). They need to be atlased. You can do this while changing detail textures in ReliefTerrain inspector (you'll be asked to make atlas) or manually by "repare atlases" button in detail layers unfold. Can't help more while I see no configuration of your scene, scripts, etc.

    ATB, Tom
     
  32. BigB

    BigB

    Joined:
    Oct 16, 2008
    Posts:
    669
  33. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Do you, by any chance, have another terrain first/add pass replacement terrain shaders in your project that might interfere with RTP ?
    Do you use one terrain, or multiple (don't copy terrain with my script, but put my script to all your tiles separately) ? I tested RTP2 on Unity4 with multiple terrains and it worked for me.

    The simpliest way to test shaders alone would be copying your project, then removing everything from it, except for (RTP contents):
    - terrain
    - textures used in RTP and RTP scripts
    - RTP shaders

    If you still don't have shader working, please, give me link to such simply not working zipped project and I'll look into this (send me email to "tomaszek at stobierski dot pl").

    ATB, Tom
     
  34. BigB

    BigB

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

    I'm only using one terrain, I will drop you an email.
    Thanks,
     
  35. LokiDavison

    LokiDavison

    Joined:
    Jan 13, 2013
    Posts:
    41
    Hi Tom,
    I've recently purchased your RTP package, and we're porting our terrain from using the color map ultra shader, as it has Dx11 / unity4 bugs. I'm wondering if you've got any ideas about porting. The colour map appears to have a lot less / different influence. Is there a way you'd recommend transforming our colour map and/or terrain? Here's a screenshot of our current terrain, including a rendering bug.. http://www.indiedb.com/games/wander/images/screenshots-from-the-alpha#imagebox

    Cheers,
    Loki
     
  36. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Don't quote me on this, but the color map shader and this shader I believe are supposed to serve different purposes. This shader creates "relief" in your terrain, such as bumps and such, versus the color map shader which is designed to enhance the appeal of your terrain by mixing the color of your terrain textures with the colors from a global "color map". They thus serve two different purposes and so the color map has a lesser effect because this is not the shader's primary purpose.

    I could be wrong, but this is what I have to come understand.
     
  37. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    @SevenBits - sorry, you're right about color map shader, but you're wrong about my shader. At least partially - RTP has both - relief functionalities and global colormap functionalities (not to mention many other) :)
     
  38. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    I must admit I know Lars' (frost) shader only from its advertising description, but I believe you can use its global colormap in my terrain without any troubles. Primarly it serves to enhance terrain look at far distances, so wide lanscapes should look good. Also, his shader has 6 layers that can be used, I can mix 8 in one pass + additional 4 in add pass (so - up to 12 relief / parallax occlusion mapped - layers). As I don't know how original shader is built nor what's the custom inspector, I can't give you guidelines. I believe that it's built on the top of original uUnity terrain system like RTP, so - when you've got terrain with 6 layers, just remove original rendering system (Unity's built in shader that use only color detail maps will be then used) and just import RTP then apply ReliefTerrain script to your terrain. Finally you can tweak textures used (they should have the same tiling and that may be the problem while porting), add global colormap, global normal map, normal maps for layers, hegihtmaps for layers. Adjust shader functionalities via RTP_LODmanager.

    Using heightmaps isn't necessary, but is strongly recommended (you can produce heightmap out of normal map, I guess there are solutions to do it - photoshop plugins or standalone tools - just google for that). Heightmaps are used to make parallax effects (relief) and to blend layers better - like 2 layers in original shader named "decal" where their blue channel has been used as "heightmap" for blending, but now in RTP there is no separate "decal layers" - every layer can be blended using its heightmap (brighter, "higher", areas of heightmap will pop over underlying layer - for example, rocks, bumps, etc.)

    I'm thinking about situation when you're using multiple terrains (sticked or not) in one scene - you'll have to adjust params of ReliefTerrain script separately for each tile then.

    ATB, Tom

    EDIT: you can adjust influence of global colormap in RTP using mixing values for near/far distances in inspector (look into global color map unfold). I'm blending color using multiplication, you could use interpolated blending if you tweak manually one #define in my shaders (files RTPBase.cginc and ReliefTerrain-AddPass.shader)
     
    Last edited: Mar 23, 2013
  39. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Incoming RTP 2.1 (already submitted to AssetStore) 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
     
  40. botumys

    botumys

    Joined:
    Apr 16, 2009
    Posts:
    707
    Great !
    A quick post to say that I enjoy to use RTP 2, it's easy, powerfull and user friendly. Impossible to go back and use original terrain shader again.
     
  41. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    Greetings Tomaszec,

    I have an interest in this pack for the Triplanar shaders as I use a procedural terrain system. Your pack seems more robust than my current triplanar shaders but I was curious about something.

    Is it possible to have parallax mapping or that relief cone step (not sure if I said that right) with a triplanar shader? I noticed you had parallax disabled in your package for triplanar and I was just wondering (after looking around a bit and not finding this option in any other tp shaders) - is this even possible? Is there a technical restraint or is it something more to do with the nature of the way triplanar shaders work? Either way going to pick this up this week in the Asset store - just wanted some clarification on this parallax or cone stepping method missing from Triplanar shaders issue. Thanks for your time!
     
  42. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Paralax effects are disabled for a reason in RTP when using Triplanar mode. Sorry. At this stage I see no way to overcome this (unless you'd like to write shader that would kill hi-end GPUs, solving this wouldn't be easy either).

    Tom
     
  43. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    Yeah Thomas, you had mentioned that (Parallax disabled) earlier, which is why I asked WHY (I see it missing in others shaders as well and was wondering why it's missing, not IF). I'm not a shader expert, hence the question. I'm just ignorant to this right now and was wondering if it was even possible, which would end my search for a product that doesn't exist. Thanks.
     
  44. DeadlyAccurate

    DeadlyAccurate

    Joined:
    Apr 2, 2013
    Posts:
    186
    I'm getting an error with the vertical texture map, and I don't know how to fix it. I'm using the latest (April 3) version.

    Steps to reproduce:

    1) Create a new terrain and add the ReliefTerrain script to it.
    2) Add 5 or more textures to the texture list.
    3) Enable the vertical texture map in the LODManager and recompile the shader.

    The terrain becomes solid bright pink, and I can't get it working again until I turn off the vertical texture map. Four textures works fine. Is there an option I should enable/disable in the LODManager to correct this?

    Thank you.
     
  45. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    In problematic shader (AddPass) change lines 262-265:

    #if defined(RTP_SNOW) || defined(RTP_TRIPLANAR_VERTICAL_TEXTURE)
    o._viewDir.zw = ( mul (rotation, float3(0,1,0)) ).xy; // teren jest nierotowalny
    o.lightDir.w = v.vertex.y;
    #endif

    this way:

    #if defined(RTP_SNOW) || defined(RTP_TRIPLANAR_VERTICAL_TEXTURE)
    #if defined(RTP_SNOW)
    o._viewDir.zw = ( mul (rotation, float3(0,1,0)) ).xy; // teren jest nierotowalny
    #endif
    o.lightDir.w = v.vertex.y;
    #endif

    Thank you for pointing the bug. I'll add this fix in next update. By now you can fix it manually.

    ATB, Tom
     
  46. DeadlyAccurate

    DeadlyAccurate

    Joined:
    Apr 2, 2013
    Posts:
    186
    Thanks so much! That worked.
     
  47. foosart

    foosart

    Joined:
    Jun 6, 2012
    Posts:
    66
    We now have RTP2 working very well in 2 of our environments, thank you very much for your help throughout this process.

    The last issue we have found only occurs in a build of our game, not in the editor. At certain locations in our environment, the lighting on the background terrain flashes quickly and erratically. Any idea what might cause this? Images below show the change in lighting. If I change the RTP LOD to classic, the problem goes away.

    $lagoon 5 - mountain in background flickers lighter than darker.jpg $lagoon 5 - mountain in background flickers lighter than darker2.jpg
     
  48. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    for unknown reason attachment doesn't show
     
  49. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    I bought this ages ago and im finally getting an oppotunity to use it now, exciting, cheers for the v2 improvements!
     
  50. foosart

    foosart

    Joined:
    Jun 6, 2012
    Posts:
    66