Search Unity

Relief Terrain Pack (RTP) v3 on AssetStore

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

  1. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I'm stumped. I just tried the TerrainScene demo and it works fine. The sand area seems a bit blown out lighting wise, but everything else works in that scene. I can even set the tiling and it updates in real time. So, my shaders are compiled right. I have not idea what is wrong with my scene. This is so weird.
     
  2. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I noticed that for my terrain the Custom Material is shown as _terrain. Underneath it, it says the following:

    Can't use materials with shaders which need tangent geometry on terrain. use shaders in Nature/Terrain instead.

    When I look at this _terrain material in the inspector, it just shows a white material with the shader set to Nature/Terrain/Specular. In the sample scene that I can see working, it shows the Custom Material as "Terrain material" but I'm at a loss when trying to located this material. Does this point to what may be wrong?

    I also notice that the Color Atlases section is just empty. There is a button for preparing atlases from detail textures, but it is grayed out. I think I missed a step somewhere, but I don't see anything in the PDF document that I missed.
     
  3. DallasOnFire

    DallasOnFire

    Joined:
    Oct 22, 2013
    Posts:
    23
    tomaszek does it work with Gaia? Thank you!
     
  4. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    379
    Hi, has anybody tried RTP3 with Time of Day? I am getting a horrible flash of light maybe once or twice a second, and the RTP3 shader seems to switch off during this time and so the terrain flickers between states
    thanks!
     
  5. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    Yes it does - I am setting up a scene with RTP and Gaia today :)
     
    S4G4N, BackwoodsGaming and John-G like this.
  6. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    I am getting rtp terrain flickering as well using dx11, hdr, linear, deferred and tenkoku for the lighting. Anyone have some suggestions on how to stop this ?
     
  7. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    379
    With TOD I changed a FixedUpdate routine to Update which solved nearly all of the flickering, only noticeable when night turns to day or day turns to night at the extremes but this is a cludge rather than a solution
     
  8. DallasOnFire

    DallasOnFire

    Joined:
    Oct 22, 2013
    Posts:
    23
    Great! Thank you for your great support! Keep it up :D
     
  9. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    379
    Additional info, I started in a new project with just RTP3 and TOD and still get the issue so it's not Gaia at play at least!
     
    AdamGoodrich likes this.
  10. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    379
    How do you prevent the white distance colouring in a night scene please?
     

    Attached Files:

  11. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Is it in deferred on forward ? In deferred it is the most probably problem of conplementary lighting. Turn it off in LOD manager or don't allow the light to go below 0.01 intensity.

    Give me your setup, please. First check fog color. Fog desn't react to light, it's just a color. You might need to turn it to black or very dark grey at nighttime.
     
  12. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    That's probably what I suspected. Your terrain doesn't actually use material with RTP shader. The problem is when you've got ready working terrain with your custom material then add ReliefTerrain.cs component. RTP checks if custom material is present. If so - it does nothing (that's our problem). But when it's null it will be automaticaly filled with material object and RTP shader. So - remove material in Unity terrain settings and user refresh all button in RTP (or simply unselect/select RTP terrain object).

    Atlases are used only when you use 8 layers rendered in first pass or explicitly ask for atlases in LOD manager (useful when you'd like to use a lot of RTP features that requires textures while we always go at the edge of available resources - atlas use 1 detail texture instead of 4 separate detail textures).

    Also for your scene recompile shaders in LOD manager. Depending on your setup it might be necessary. I mean that RTP comes with shaders precompiled to work fine with eample scene (that is single terrai object, 8 layers with 4+4 setup in forward lighting path).

    Tom
     
  13. Elzean

    Elzean

    Joined:
    Nov 25, 2011
    Posts:
    584
    Hi, im having some troubles with the geometry blend.

    - I am in deferred rendering but i also tried in forward
    - I use the "standard - RTPGeomBlend (specular setup)"

    here with the underlying object :
    upload_2015-11-2_21-30-20.png
    i can see the intersection with the terrain


    here without :
    upload_2015-11-2_21-29-53.png
    Much better but i can see some stuff through


    In deferred i tried to remove the "Fallback" at the end of the shader but didnt see much difference. Do you know how i could fix this ?





    I am also wondering if i should use deferred or not, for some reason i have better visual and even performance in deferred even though i just have a directional light in my scene and couldn't find an explanation about this. Anyway i also saw the zip "Internal-DeferredShadingRTPU5", should i use it and unpack it somewhere ?

    Thanks!
     
  14. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Thank you. That did the trick.
     
  15. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    379
    Hi, thanks I was looking at the Fog settings in RTP rather than Unity Lighting, working well now. Also I reimported UFPS which updated the project settings, and the flashing when Time of Day was running disappeared as well so everything working well now :)
     
  16. kilju

    kilju

    Joined:
    Nov 4, 2013
    Posts:
    127
    might be if u got big world that floating point origin is problem. i use this script to get it not to flicker
    http://wiki.unity3d.com/index.php?title=Floating_Origin

    i had some flicker when using unistorm and when day change to night it disabled all my light sources and made it flick. fixed it by just added some more time to keep light on.
     
  17. ZenMicro

    ZenMicro

    Joined:
    Aug 9, 2015
    Posts:
    206
    With 'Stickied Meshes' in relation to Cliff faces, I found your video back which covers that issue but was disappointed when i realized It required some external modelling software (which i have no experience)



    Is this something you can or will be able to do in future releases that is all done with Unity/RTP? currently i can't use that method to resolve cliff stretch so i am hoping you plan to make RTP do this itself.
     
  18. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Blender is free modelling software. Simply import obj model exported from RTP. Use UV unwrap, save back to obj and re-import to RTP like shown on my video. I don't plan to code own UV unwrapping routines.

    Future release will rather focus on new, more effective triplanar rendering rather than on the issue you've got.

    Tom
     
    Tethys likes this.
  19. camel82106

    camel82106

    Joined:
    Jul 2, 2013
    Posts:
    304
    Hello,
    while I'm using only directional light all is ok. Deffered 8 in one pass. But when I want to simulate night with headlamp on player. (spot light + directional light but nearly disabled) I get this blinking of terrain every time that ToD recalculated reflection cubemap.

    P.S.:
    I have tried to disable ambience complementary light but this didn't help, because it was looking to similar problem as above.

    You can see it on this video:
    https://virtualo.org/Virtual-O_blinking.avi

    Thanks
    Peter
     
  20. ZenMicro

    ZenMicro

    Joined:
    Aug 9, 2015
    Posts:
    206
    OK no worries, thanks, Will have to learn Blender a little :)

    Another question, i am using GAIA and RTP, but the rock wall texture seems to be resetting to scale 1, i want to make it 25 is this RTP resetting it? I tried changing the scale in Unity Texture adder.. but it seems to not apply and also it returns to 1 when i go back to it.
     
  21. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    RTP use own tiling set in RTP/Settings/Main tab. Refer to my pdf docs.
     
  22. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    When your rock walls are orthogonal to the terrain surface where they touch the terrain you might get it hard to blend without seams. Removing underlying object is no good because you render rock as transparent object (think - "particle like rock" without proper shadows, z-test, etc.)

    included deferred shader you can use in Unity menu/edit/project settings/graphics - deferred shader set to custom. You get RTP's PBR implementation over the scene and possibility to have self-shadowing from POM.
     
  23. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Complementary lighting causes problem only with one directional light set to very low intensity. It's not issue in your case. I'm wondering what get updated with this 1 frame delay due to ambient reflection map recalculation by ToD. The only parameter I'm updating every frame is in fog update script attached to LOD manager object. I don't have a copy of ToD for tests though. I'll ask a friend who has ToD and RTP to check this later together.
     
  24. camel82106

    camel82106

    Joined:
    Jul 2, 2013
    Posts:
    304
    Please note that when I change time of day to day so directional light is much stronger. Flickering is gone. So it looks like what you are describing with complementary lighting but it's disabling doesn't helped... I have deffered RTP script only on that directional light. And RTP Fog Update on LOD manager is disabled in my project.
     
  25. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    If the problem is not present daytime, that would mean directional light state does actually matter. Maybe something goes wrong with POM self shadowing which script on the light is used for. Does ToD disable directional light in night time ? Maybe you could try to prevent disabling this light (if that's the case) and prevent it from going below 0.01 intensity ? That's would be the request for ToD author though if you couldn't do it yourself.

    Tom
     
  26. camel82106

    camel82106

    Joined:
    Jul 2, 2013
    Posts:
    304
    Yes ToD it's making directional light weaker in night till full disabling it's intensity. (and it changes it's color) But I can simulate it with sunrise at 5am. Still intensity of directional light is on full value. But light/sun is very low on horizont. And I get flickering artifacts.

    P.S.:
    I have tried to set LOD level to simple or PM and flickering was gone. After reverting it to POM it's there again.
     
    Last edited: Nov 4, 2015
  27. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    It might be related to self-shadowing then. I'd recommend to disable it then in LOD manager and using POM only, also as self-shadowing is not used use built-in deferred lighting instead of RTP's lighting PBER shader. Would require some tweaking of PBR parameters of terrain, but you should be able to sort it out.
     
  28. camel82106

    camel82106

    Joined:
    Jul 2, 2013
    Posts:
    304
    With using of build-in deferred lighting you mean to disable flag PBL fit for legacy deferred? If yes I have already disabled it.
    Thanks
    Peter
     
  29. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    I meant Unity menu/Edit/Project Settings/Graphics - deferred shader. Don't use RTP's (it's this zipped file). Only when you selected it of course. You might be not even aware that something like this exist :).

    Tom
     
  30. camel82106

    camel82106

    Joined:
    Jul 2, 2013
    Posts:
    304
    It looks like I'm using it (Internal-DeferredShadingRTPU5). So I was aware of it long time ago bot not now :) I have changed it to build in shader. Thank you very much I'll try to play with it.
     
  31. zmaxz

    zmaxz

    Joined:
    Sep 26, 2012
    Posts:
    143
    Hi!
    I don`t want to use "Combined bumpmaps",
    how do i close this option CB.jpg
     
  32. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Do you mean you don't like combined normalmaps or normalmaps at all ? Both of them are necessary for RTP. You just can't disable it using one switch without tweaking a shader code.

    Tom
     
  33. Gorasul

    Gorasul

    Joined:
    Apr 11, 2013
    Posts:
    2
    I'm sure this is a simple problem and the mistake is mine, but I wasn't able to find the answer with some searching. My problem is that all of my terrain vanishes from view whenever I put the Relief terrain script on some terrain that we have been working on before attempting to use RTP. Is there a setting that i'm missing in the LoD manager?
     
  34. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Hi, all RTP users. Thanks in part to tomaszek's awesome asset, we've just launched a small, short-term funding drive for a fantasy rpg game that uses RTP for terrain. Check out the campaign video and if you can help us out with a donation or even just sharing the link around then we'd be very grateful. Currently, the only scene in the video using RTP is the ruins area, but I'll be updating all other game areas soon. RTP is working really well for us now and I look forward to showing off more of our game using Tom's amazing technology.

    http://igg.me/at/scions/x/317751
     
    tomaszek likes this.
  35. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    When you use dx11 tessellation with displacement you need to produce first the height&normals texture then put it into settings/global maps/displacement texture slot as on my tessellation video:



    Tom
     
  36. Gorasul

    Gorasul

    Joined:
    Apr 11, 2013
    Posts:
    2
    That was it 100%, i'm now having a problem where the textures are all black in any scene until I click on the terrain object in the hierachy then it seems to rebuild them. Is this the normal process? or is there another thing i'm missing again?
     
  37. kilju

    kilju

    Joined:
    Nov 4, 2013
    Posts:
    127
    is there anyway to rise basemap distance? if i change it by hand it will restore to its orginal state.
    really need to rise its value.
     

    Attached Files:

  38. Lelon

    Lelon

    Joined:
    May 24, 2015
    Posts:
    79
    @tomaszek I'm using relief terrain with a voxel terrain where the chuck meshes are generated during runtime. Do I have to add the relief terrain script(.cs) to all the generated chunks during runtime? is there an alternative way?
    PS: I have about 20k meshes that make up the terrain.
     
  39. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    It's known issue, but I'm not able to fix it. It might be a bit annoying, but generally is not breaker. It's only editor issue.

    RTP uses base distance map its own way. Basemap distance has now different meaning, so don't modify it by hand. If you'd like to use simple shader at far distance use global colormap and feature "no detail color at far distance" on LOD manager. Only global colormap value will be used far away.

    For voxel terrains you don't use RTP script component, but only material with triplanar mapping. Look at my "asteroid" example scene. That mesh use a material with RTP shader.

    Tom
     
    Lelon likes this.
  40. ZenMicro

    ZenMicro

    Joined:
    Aug 9, 2015
    Posts:
    206
    Hi Tomaszek,

    Love your work, have to tell you :) and I found the 'Vertical Texturing' feature which pretty much resolved my issue of having to use a mesh i think. Looks pretty good to me, a bit blurry and some places where the normals I guess are too different there is a noticeable break in the effect (top right of picture), any thoughts on that? i tried smoothing the terrain a little more there.

    anyway here is a pic of my rock face;

    RTP_Vert_Tex_Wet_Look_Q.JPG

    And now another question, in that middle part I'd like to have a wet look running down the cliff like in one of your demo videos and a body of water at the bottom, is that possible in RTP or does that now require Uber?

    EDIT: from what i read in the RTP PDF it can be.. cool, I thought maybe that feature had been moved to Uber.
     
    Last edited: Nov 6, 2015
  41. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Use sticked geom blend object there and use one of the geom blend water shaders. It won't look like waterfall though. It will be sticked to the terrain for quite steep cliff you've got I even think it might be not looking that good, so for illusion of water running down maybe other water soluion available could be used (that which can simulate waterfall). For RTP sticked geometry you'd need to export sticked object mesh to obj and unwarp it because of stretching issues. For the pond at the bottom it the very shallow water is fine you can still use the same technique (like in my example scene), but for deeper you need dedicated geometry there with some water shader used.
     
  42. Lelon

    Lelon

    Joined:
    May 24, 2015
    Posts:
    79
    @tomaszek After upgrading to unity5.2, I can't seem to be able to change the tile size in ReliefTerrainVertexBlendTriplanar.mat anymore. I have my textures set to layers 0 to 3, however changing the tiling x and y from 1 to anything else does not do any changes. I'm not sure if this problem is because of unity5.2 or I'm missing something. Thank you.
     
  43. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Like in case of RTP there is uniform, shared tiling factor - tiling from textures is not used. Lookm at the very first parameter in material inspector "Triplanar tile size". This is the place you change it.

    Tom
     
  44. Misciagno

    Misciagno

    Joined:
    Jul 27, 2013
    Posts:
    88
    When I use Time of Day with RTP3 it seems to break the perlin normals. Has anyone had or fixed this issue?
     
  45. Lelon

    Lelon

    Joined:
    May 24, 2015
    Posts:
    79
    Hmm, that's weird, because I remember I was able to change the individual tile sizes of each texture from the tiling x and y options.
     
  46. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    In other RTP shaders (like geom blend or 2 layers bonuses) it is possible, but not in this particular shader.
     
  47. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,782
    @tapticc had a weird issue - that may or may not be RTP related - wondering if anyone has come across it.

    A terrain has 4 textures and RTP is setup and running. We added a 5th texture, and whenever we selected another object in the scene and then went back to the terrain the 5th texture had been removed.

    Is this RTP and if so is there a work around ?
     
  48. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    RTP is supposed to work with either 4 or 8 layers (for performance reason using 5 is useless as cost of rendering 8 is actually almost the same).

    ATB, Tom
     
  49. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    I've been having a problem with sticked geometry for a while now and decided to figure out why it was happening.

    Basically I can't blend sticked geometry

    Basically this is what I want


    And this is what I have


    upload_2015-11-8_19-47-6.png


    Now, there's also an oddity with the actual light level being inconsistent, but I intend to bake lightmaps at some point so hopefully that won't be a problem at that point.

    At any rate, I've discovered that it apparently happens when I load in some other packages, I've seen it happen with UFPS but I suspect I've seen it happen with UFS as well, though I haven't checked, the result would be identical though so what ever is messing up is probably the same.

    Basically what I did was:
    Create new terrain
    Create sticked mesh (in this case just a plane)
    Auto blend
    Create new scene (not sure this step is required)
    Import UFPS
    Load terrain scene
    Shader is messed up.

    I checked the log, but I'm not sure it's related to the problem
    upload_2015-11-8_19-53-8.png

    It all has to do with lightmap snapshots that are included in the UFPS example project.

    Is this a known issue? Is there a fix? Can I do more to help?
     
  50. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Most probably you're in deferred. Go to geom blend shader code and comment out fallback directive aat the very end of shader code. Recompile shader.

    Tom