Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Relief Terrain Pack (RTP) v3 on AssetStore

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

  1. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
    I am only now just starting to learn how to use RTP. I was watching this video and following along with my own terrain. At 5:30 you modify the perlin noise. When I do that I don't see any effects. Not on any of the four layers I am using. What might I be doing wrong? I move the slider and see no difference where you see great difference in the video.
     
  2. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Is there by chance a way to have, say, a cube that is above the terrain, and have the top of the cube splat with the RTP texture beneath it? Basically have it textured as if it were the terrain right below it. I've tried messing with the geometry blend shaders but I haven't been able to get it to work.
     
  3. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Unity 5 made it not working as soon as Unity rewrote terrain engine to pure C++ plugin code instead of C# dll linkage. Now things work fast, but blending in deferred is problematic.

    In Unity 5.2 - be aware that in deferred reflections are produced by separate Unity pass and work out of the box. Uncheck IBL spec if you used it or your reflections will be doubled.

    The reason I'm visiting perlin normal tab is that the step maks combined texture needed by shader. Check in combined textures tab if "special" texture is actually ready there. W/o it perlin won't work. Hard to say if it doesn't produce the combined texture on your side (if that's the case).

    That should work with geom blend. If you place some mesh over the terrain and use geom blend + clear the blending then whole underlying meash should look like terrain below (so overlying object might be turned off). The problem I see is that whole cube will mimic terrain with its side walls that might look wrong (stretghing). You might need to process this mesh yourself (managing alpha vertex component for it by some custom script).

    Tom
     
  4. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Ah, yeah that is pretty close to what I need. The stretched sides are fine since in my case since it's mostly just the top that will be visible. There are two things that make it weird:
    1) I'm getting weird shadow artifacts on some of them, like it will think the entire cube is in shadow when there isn't actually anything casting a shadow on it. This might be related to the weird shadow issues I'm getting from having Uber and RTP combined in Unity 5.2 though; I reported that in the Uber thread.

    2) Ideally I'd like to be able to instantiate the cubes at runtime, but it looks like that would be pretty complicated. I can't make a prefab of a geom-blended cube because it loses its reference to its mesh and material when turned into a prefab. And cloning an existing cube in the scene doesn't really work because the clones will contain the texture from the original cube's location rather than getting a new texture for wherever they're placed.

    What I really want is, I guess, a shader that just takes the world x,z position of vertices and maps to a u,v on the terrain, without needing to do the setup of rebuilding the material for each one. I'll look through the geom blend stuff and see if I can figure out a way to do it but if you have any hints I would greatly appreciate it. ;)
     
  5. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    (EDITED) I have a scene in which we instantiate two different terrains -- one for winter, another for spring. How do I prevent one terrain from switching to the splat textures of the other terrain? I thought I'd figured it out with "Use U4 terrain materials" and assigning a different material to each terrain prefab, but after doing some more work, the first terrain has now switched to have the second terrains splats. I'm only going to use one terrain at a time during gameplay, but how do I make them keep their own splats?

    thanks
    Dave
     
    Last edited: Sep 20, 2015
  6. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    OK, for instantiating cubes runtime - look at underlying mesh produced by my ReliefTerrainGeometryBlend.cs and it'e editor. You should find it not that difficult to follow.

    For glitches with UBER+RTP. That's actually fault of RTP alone and I found the thing overlooked in Unity5...

    For into RTP_Base.cginc and find such places:

    Code (csharp):
    1.  
    2. #ifdef UNITY_PASS_PREPASSFINAL
    3. uniform float4 _WorldSpaceLightPosCustom;
    4. #endif
    5.  
    tweak it into:
    Code (csharp):
    1.  
    2. #if defined(UNITY_PASS_PREPASSFINAL) || defined(UNITY_PASS_DEFERRED)
    3. uniform float4 _WorldSpaceLightPosCustom;
    4. #endif
    5.  
    and:
    Code (csharp):
    1.  
    2. inline float3 myObjSpaceLightDir( in float4 v )
    3. {
    4.    #ifdef UNITY_PASS_PREPASSFINAL
    5.      float4 lpos=_WorldSpaceLightPosCustom;
    6.    #else
    7.      float4 lpos=_WorldSpaceLightPos0;
    8.    #endif  
    9.    float3 objSpaceLightPos = mul(_World2Object, lpos).xyz;
    10.    #ifndef USING_LIGHT_MULTI_COMPILE
    11.      #ifdef UNITY_PASS_PREPASSFINAL
    12.        return objSpaceLightPos.xyz * 1.0 - v.xyz * lpos.w;
    13.      #else
    14.        return objSpaceLightPos.xyz * 1.0 - v.xyz * lpos.w;
    15.      #endif
    16.    #else
    17.      #ifndef USING_DIRECTIONAL_LIGHT
    18.      return objSpaceLightPos.xyz * 1.0 - v.xyz;
    19.      #else
    20.      return objSpaceLightPos.xyz;
    21.      #endif
    22.    #endif
    23. }
    24.  
    replace with:

    Code (csharp):
    1.  
    2. inline float3 myObjSpaceLightDir( in float4 v )
    3. {
    4.    #if defined(UNITY_PASS_PREPASSFINAL) || defined(UNITY_PASS_DEFERRED)
    5.      float4 lpos=_WorldSpaceLightPosCustom;
    6.    #else
    7.      float4 lpos=_WorldSpaceLightPos0;
    8.    #endif  
    9.    float3 objSpaceLightPos = mul(_World2Object, lpos).xyz;
    10.    #ifndef USING_LIGHT_MULTI_COMPILE
    11.      #if defined(UNITY_PASS_PREPASSFINAL) || defined(UNITY_PASS_DEFERRED)
    12.        return objSpaceLightPos.xyz * 1.0 - v.xyz * lpos.w;
    13.      #else
    14.        return objSpaceLightPos.xyz * 1.0 - v.xyz * lpos.w;
    15.      #endif
    16.    #else
    17.      #ifndef USING_DIRECTIONAL_LIGHT
    18.      return objSpaceLightPos.xyz * 1.0 - v.xyz;
    19.      #else
    20.      return objSpaceLightPos.xyz;
    21.      #endif
    22.    #endif
    23. }
    24.  
    Your problems should go away. I'll include the fix in the RTP update.

    ATB, Tom

    P.S. for DX11 nag warning about uninitialized _h variable you can also find float _h; occurence and make it float _h=1;
     
    makeshiftwings likes this.
  7. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    If you've got "use U4 material" switch in RTP LOD manager it means that either you've got Unity4 (which is not supported - sorry, I can't fix everything backward) or RTP version that's not the recent. In newest Unity and newest RTP there is no option available and everything is managed by materials. So - you can have both terrains available in your scene. RTO LOD manager setup will be the same for terrains, but if you put the terrains into different transform parent they will be pretty independent. You can set every parameter separate for both terrains. Then you can hide one terrain depending it's summer or winter.

    Tom
     
  8. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    Sorry, forgot to mention that I am using Unity 4.6.8 (my project is stuck on this version because 5.x doesn't support lightmapping tree shadows on terrain). Is there a way to make this (having two terrains with different splats) work in 4.6?

    thanks
    Dave
     
  9. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    yes, you have to use unity U4 materials option set. other than that grouping was available in U4 RTP package version as far as I remember (placing 2 terrains inside separate transform parents before adding RTP component).

    Tom
     
    Last edited: Sep 21, 2015
  10. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    Ah, putting each terrain in a separate GO did the trick. Thanks much!
     
  11. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    So now I'm trying to figure out if I can use dual lightmaps on the terrain, or need to set up the global ambient emissive map. Your video here http://forum.unity3d.com/threads/relief-terrain-pack-rtp-v3-on-assetstore.206516/page-38 has a segment about "bumpmap recovery" for dual lightmaps, and shows a "Shading strength for lightmaps" slider--but I don't see that in the latest version of RTP. Is that still available, or is there another way to bring out the bumpiness at far distance with dual lightmaps? (Again, I'm stuck on 4.6.8).

    thanks
    Dave
     
  12. Tom_Timothy

    Tom_Timothy

    Joined:
    Nov 21, 2013
    Posts:
    132
    Dear Tom having a problem and cant seem to put finger on it. On the left is playing the game in build on the right playing the game inside unity. I put a red circle around flowers so you could tell the area. I found it near impossible to line up shot the same but got as close as I could. I get these ugly missing texture Dark spots on the terrain it seems to happen the most on sides of hills and cliffs.

     
  13. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Give me your exact setup. Number of layer on terrain, LOD manager, RTP version, Unity version, lighting. Seems like certain layers doesn't get texture or their numerical props are somehow zeroed (brightness ?).

    If you're using atlases (default in 8 layers mode) check if they are saved as png to disks so references to these textures are less prone to be missing.

    Tom
     
  14. steveh2112

    steveh2112

    Joined:
    Aug 30, 2015
    Posts:
    314
    hi tom, i've looked at a few of your videos on the tube and i must confess, i still have no idea what RTP does.

    anyhow, i've have spent the last week trying to make a somewhat photo-realistic model of Yosemite valley. i have a high res lidar model i made into a height map and got that into unity as terrain, so the heights are good. i could either go mesh (plane, object, model, whatever you want to call it) or terrain but i decided to go terrain since i want to add a lot of trees and i think that's only an option of terrain right?

    but my problem is, texture mapping. Yosemite has some very steep cliffs and texturing mapping steep terrain in the standard unity tools doesn't seem to work will (because its only mapped top down i think). does your tool allow me to texture map near vertical terrain that or do i need to use a mesh for that, and terrain for low slope stuff (with trees)?

    also, i have some mega hi res images of Yosemite taken at mountain top level http://www.xrez.com/case-studies/national-parks/yosemite-extreme-panoramic-imaging-project/. this is way better data than sat data for the valley walls but again no use for terrain textures because they are too big and don't work on terrain slopes. i wonder if your tools will help me use the high res i can get from that link above? the total image size if you tiled it altogether would be something like 128k x 4k so its a lot of data, around 512GB so would need to be paged in and out of the GPU with lots of LOD stuff i guess

    thx steve
     
  15. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    RTP has triplanar mode which resolves stretching on cliffs. Also you can use cheap vertical texturing feature as well, but I'm not sure if this would fit to Yosemite valley. You refine it at far distance with global color/global normal/perlin normals (global colormap and global normal map is top planar though). Perlin normals that refines detail of rocks works in triplanar mapping though. I believe depending on the time you spend on it RTP can provide you with techniques that will help you reaching the goal.

    Tom
     
  16. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    Nevermind, I figured it out. Thanks again for such an awesome tool!
     
  17. steveh2112

    steveh2112

    Joined:
    Aug 30, 2015
    Posts:
    314
    thanks tom, so with 'RTP has triplanar mode ' does that mean i can paint textures on near vertical surfaces?
     
  18. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    That's correct.

    Tom
     
  19. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    I thought I'd solved this problem by refreshing the first splat in Layers, and then saving the combined texture again. But now I'm stuck in a nasty loop: I refresh that splat, which fixes the motion-blur effect. Then I apply changes to the terrain prefab (necessary since I instantiate different terrains at runtime). And then I save the scene to ensure that the prefab is updated...and then the problem returns. Fussing with the parallax settings has no effect, and in fact the problem persists even if I switch to SIMPLE mode (which has no parallax, right?).

    You said: "we've got blended aniso and non-aniso values of colors" but I don't know how to adjust those....

    thanks!
    Dave
     
  20. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    If refreshing of splat works it means that solution is ready somewhere over there, but is not "persistent". After saving RTP can loose some reference settings (I've been fighting this refreshing issue hard in the past but actually the solution was not possible to fix it 100%). Try to look at first-pass shader of RTP and if you've got material properties uncommented out. This will decrease performance though... More on this - if you're sure you've got correctly saved _all_ textures, try this trick. Use "U4 terrain material" switch in LOD manager. Make empty material and attach it to Unity terrain (in Unity terrain settings). Select RTP first pass shader there. Then in RTP use Settings/Main/Refresh All button. Save everything. This should make it more resistant for loosing any parameters, but if it still makes you trouble check if clicking again "Refresh All" fixes the motion blur effect. Then we know that you can solve this by scripting. After instantiating terrain in build you need to do

    Code (csharp):
    1. RTPcomponentFromThisTerrain.globalSettingsHolder.RefreshAll();
    call.

    That's all what I can do with the support here. I can't go back 2 years ago in terms of my package state and provide solutions for Unity4, sorry...

    Tom
     
  21. zmaxz

    zmaxz

    Joined:
    Sep 26, 2012
    Posts:
    143
    Hi
    How to fix this black edge ?
    Use GeometryBlend_WaterShader_FlowMap_HB.
    BlackEdge.jpg
     
  22. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    If you're in deferred lighting mode, go to the sahder code and comment out Fallback directive

    Tom
     
  23. Plutoman

    Plutoman

    Joined:
    May 24, 2013
    Posts:
    257
    I bought this a while back and haven't had a chance to truly play with it; will you be rewriting to a hull/domain at some point? RTP 4.0 I'm assuming? Just curious if that's a year off or 3 months away. The same basis as Uber, really.

    I render my terrain with up to 12 textures, using multi_compile switches to swap between sets, so terrains with 1-2 textures don't get the overhead of triplanar with 12 textures (that's pretty bad with height and normal maps). I've got a custom include file to grab the actual texture results from the texture samples, since I re-used it for multiples. It's generated on the fly, so I pick textures by the UV coordinates and vertex colors (8 UV channels + 4 vertex colors). I'd like a few of the enhancements you have, so I'm wondering how simple this type of conversion would be, or if I should just be trying to integrate the surface shader enhancements into my frag before the deferred output. Been super busy, so I really haven't looked at the project... just looking for the quick opinion before I delve in, so I don't spend a few hours one way or another that might be wrong.
     
    Last edited: Sep 24, 2015
  24. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I don't really get what do you mean by rewritting into hull/domain ? Would you like to p[roduce terrain mesh on the fly (purely inside the GPU) ? I don't plan it by now, because RTP can work with pretty small meshes that an be then tessellated and displaced by RGBA texture (RG encodes heights, BA - normals of terrain mesh after displacement)

    Tom
     
  25. Plutoman

    Plutoman

    Joined:
    May 24, 2013
    Posts:
    257
    Ah, I missed one of the important parts of what I meant - the tessellation. It required custom info to be passed from vertex => frag in my case, for the triplanar calculations, which meant that I could not use a surface shader.

    Let me not overthink this - all I need is up to 12 texture sets from vertex colors/UV's (in one deferred pass), assigned on the fly (ie, not atlasing, since it'll be dynamic combinations for each tiled area). Is that difficult to do with the existing setup, retaining the features? Lots of point lights everywhere, etc, terrain would be expensive in forward.
     
  26. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Your question is a bit too generic for RTP thread. If you ask if things are possible, yes they are depending on resources we've got and time spent, but RTP has its own implementation. Your question describes something like completely new/separate product.

    Tom
     
  27. Plutoman

    Plutoman

    Joined:
    May 24, 2013
    Posts:
    257
    Sure, yes - and I have mine. I suspect by your reply that it would be easier to integrate RTP's features into my own implementations, then, instead of trying to modify RTP to support that type of feature. That's the answer I needed, then!
     
  28. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    304
    Hi Tom,

    I am having the same problem as Tinjaw described above. I can open the sample scene and everything works as in your tutorial video but when attempting it on my own terrain adjusting any of the values (layer adjustment/uv/perlin) for each individual layer has no impact. I followed the steps you laid out in the video and all textures were properly generated and placed (perlin/special/normal) so I feel like I am missing something small. Any ideas? Thanks!
     
  29. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    OK, I'll follow the steps again on fresh project to check it out. Do you use U5.2.0 and newest RTP ?

    Tom
     
  30. kmoosmann

    kmoosmann

    Joined:
    Mar 1, 2014
    Posts:
    22
    Hey Tom, I got a quick question - even though I searched the forums, couldn't really find an answer and this thread is getting a little messy to work with :p

    Is Geometry Blend (Mesh 2 Terrain) not possible for 1st pass only in 8 layer-mode? (Unity5) Some of my textures are blending fine, while others just generate black blending seams on the meshes I want to blend. I figured out that it completely depends on the terrain texture I want to blend with the object - the first 4 seem to work, the last 4 just produce black seams.
     
  31. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Please, give your exact setup. You've got 8 layers rendered in one pass (atlased 8-layers mode) or 4+4. Is it on terrain or on mesh. Your geom blend, how does it look like? Disable renderer of actual geom blend object, leave only underlying "terrain like" then show it to me.
    Is it forward or deferred ?

    Tom
     
  32. kmoosmann

    kmoosmann

    Joined:
    Mar 1, 2014
    Posts:
    22
    Sorry Tom, let me get back to you later today, I'm not on my workstation right now - but I would prefer to give you some screenshots and a proper explanation of our setup of course. Thanks in advance.
     
  33. kmoosmann

    kmoosmann

    Joined:
    Mar 1, 2014
    Posts:
    22
    Alrighty, here's our setup:

    - Unity5 DX11 Deferred (new deferred)
    - 8 layers in atlased 8-layers mode (not 4+4)
    - Unity terrain
    - GeometryBlend_PM Shader

    Attached you'll find the requested screenshot (left = only underlying, right = how it appears once combined with parent - please note, this is a test setup to demonstrate the effect. I painted this mesh with your blend brush excessively at the front so you can see the issue)
    I also added our full RTP Lod Manager setup as a screenshot
     

    Attached Files:

  34. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    It looks like underlying object is just fine - we see leaves in the front of chopped tree trunk. The problem is only with overlying actual mesh rendered with GeometryBlend_PM Shader. I'd say it's classical problem of new deferred which I mentioned many times here. Of course with these almost 80 pages it's hard to catch it :). Simply open your problematic geom blend PM shader and comment out Fallback keyword at the end of this. The same issue you'd experience with my example scene when you turn camera to deferred, recompile shaders to work in 8 layers in one pass (otherwise we would have problems with specularity on add pass 5-8 layers). Then my streams edges will look bad - the same as yout trunk. Removing Fallback will help there - it ensures Unity won't look for shadow caster code pass in fallback - we need to completely get rid of it. I don't want to provide users with 2 sets of geom Blend shaders 9for forward and deferred) and I can't turn off fallback automatically.

    Tom
     
  35. kmoosmann

    kmoosmann

    Joined:
    Mar 1, 2014
    Posts:
    22
    You have my thanks Tom. I really tried finding some hints in this thread, but it's grown pretty big and the search function is pretty much useless sadly - especially when I don't really know what keywords to look for.

    Anyhow, thanks again!
     
  36. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    304
    Hey Tom thanks for the reply!

    I am using the latest version of Unity and may be a version or two behind on RTP I'll have to check when I get back. But before I left I noticed that the terrain material was not changing from "Built in Standard" for whatever reason. If I manually set it to custom and create a new material with the ReliefTerrain-FirstPass then things start working.
     
  37. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    So we know that your RTP version is not up to date. It had this kind of problem recently. newest RTP should be just fine.

    Tom
     
  38. GatorCSE

    GatorCSE

    Joined:
    Sep 10, 2015
    Posts:
    1
    Hey Tom, I have a question on lighting with RTP3. I'm trying to realistically model underwater light falloff and color shift. I want to be able to modify the RGP value of light hitting the terrain. I want to modify this value for all lights (heightmap for directional "sun", distance for other point lights and flashlights). Is this something I can modify via scripting, or do I need to dig into the RTP shader code to implement this? Is this even possible?
     
  39. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,212
    the OP on this thread says 45$ but the store says 60$?
    buyin' it anyway tho =3
    incoming questions no doubt! I am building pure runtime, no editor! Would really love to get mesh stamping and terrain holes procedural, that's a ways down the road though..
     
  40. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    Similar to XMachinaX (p.75), I am unable to lightmap bake *at all* using the most current version of RTP in Unity 5.1.2f1. Somehow, I am also getting stuck at the exact same stage in the GI clustering, "5/11 Clustering". I have let the bake run overnight for a single terrain, and was still incomplete.

    I am taking from these results that RTP just is not compatible with the lightmap baking options in Unity 5. I hope that my assumption is incorrect, and there is in fact a solution. I look forward to hearing from you soon. Thanks!
     
    Last edited: Sep 27, 2015
  41. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,212
    working great from script so far =D
    I'm adding a temporary terrain to the scene, populating it with textures and saving the combined maps to manually import via script. Assigning normal and heightmaps during runtime does not auto-produce the combined maps. Is there a command to do this via script that I'm not noticing?
     
  42. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    You'll rather need to go deep (into the water) with tweaks like this. Anyway - worldposition of pixel is accessible across the shader code, so together with light position or info about the distance from water surface to the pixel of terrain under the water you could try to modify vaules. I'm wondering, however, if your approach is not an overshoot. Maybe custom fog setting when the camera is under water would xbe suffiecient effect ?

    P.S. Sorry for $45 confusion. I removed the info from forum because I put RTP ack into final $60 price. I don't intend to change it until any new release is out. For your question about doing the stuff procedurally - you need to take care yourself about the input RTP shader needs. Dig into Refresh() and RefreshAll() functions to know what is passed into the shader. Combined textures are made in editor, so you'd need to grab this functionality from my scripts and put into yours.

    Well, I've been baking terrain in Unity5 with realtime GI (that's what you can see in my video


    Maybe at some stage Unity changed something which breaks it, but I'm not aware. Anyway, If clustering is the stage it hangs I believe it's rather on Unity side. Maybe it has something to do with RTP and numerous parameters it has, so easiest way would be to bake it using regular Unity terrain shader. Then switch to RTP rendering, which I believe gives correct results (in terms of GI output for light bounce as I've fixed such issue previously).

    Tom
     
  43. Gozdek

    Gozdek

    Joined:
    Jun 21, 2015
    Posts:
    356
  44. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    Thanks for getting back to me. Unfortunately, switching to the Unity Standard shader did not resolve the GI clustering issue. As you pointed out, the RTP video footage demonstrates *realtime* lighting, however, I am trying to bake the lighting information for performance reasons. I am unable to do this successfully using RTP with Unity 5.1.2f1.

    I should note that the lightmapping issue I've described is in addition to the "alphamapTexture error" that has been noted elsewhere. Despite confirming the BindingFlag is set to public (line 457 reliefterrain script), Unity is still throwing the alphamapTexture error...

    Fortunately, I have been successful in completing a lightmap bake in Unity 4.6, however, this is without static batching, (personal edition). Thus, I am either stuck with realtime lighting in Unity 5 with static batching, or baked lighting in Unity 4.6 without static batching. Although I am inclined to agree that the GI clustering issue could be a Unity-side problem, I hesitate to agree that RTP has nothing to do with it, particularly because I am ordinarily able to complete a lightmap bake using other high-end shaders.
     
  45. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I believe that newest RTP3.2i doesn't throw alphamapTexture exceptions. If you're unable to bake your terrain with Unity Standard Terrain Shader what's your premise to say RTP has something to do with clustering error ? Which hi-end shader you can bake your terrain with ? Baking process is more or less shader independent (as far as we don't use realtime GI). In U4 bug (missing tangents) you can't effectively bake directional lightmaps while in U5 you can (separate directional has approximated specularity). That's where U5 (w/o realtime GI) should be better. As far as it works, of course... So - can't you bake staticaly (w/o GI) your terrain with mentioned hi-end shaders and then add RTP component to render lightmapped terrain ?

    Tom
     
  46. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    Hi Tom, When I select the classic LOD level in my game the terrain in the distance turns red:



    Can you please tell me how to disable this? Thanks
     
  47. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I realise my reply might sound stupid, but in fact I don't plan to support "classic" POM level anymore. If you want users to disable RTP shading for whatever reason just replace Unity terrain material with Unity's default one and disable RTP script component (to not override it runtime).

    Is there any reason you'd like to support this mide ? It looks pretty different from legitimate RTP shading so I guess you should avoid it and require your users to deliver something about decent hardware.

    Tom
     
  48. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    Hi Tom, many of my players are not really gamers and use a supermarket bought laptop to try and play the game, so I was trying to give them the best performance I could, at the cost of visuals.
     
  49. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I see. You might now hate me for statement "classic is not supported", but for such casual gamers I believe you can just replace my shader with Unity's one. Effectively the only difference will be no global colormap applied to Unity shader.

    I'm rather on side to not spent unnecesarilly time any more on improving RTP in its current state. It's better for everybody to invest my developing time in brand new product for terrains. Let's start with just a simple solution for GLES2, yet providing most prominent RTP features like heightblending or global maps, but first I need to handle my current projects.

    Tom
     
  50. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    No problem, thanks for your reply. I'm looking forward to your upcoming projects. Keep up the great work.