Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Relief Terrain Pack (RTP) v3 on AssetStore

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

  1. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    Mouth watering :)

    Yeah, what did i wrote above? Mouth watering :D

    Thanks for helping to showcase RTP, i really want to see Tom on the Asset Store frontpage, i can't think of many that deserve it this much!
     
  2. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Tom's been working so hard on this he really does deserve a boost, its like the ocean, suimono guy is really putting in his best so being able to bump his work along with scrawk who has been making AMAZING brdf driven 3D oceans for free available in the wip thread, its nice seeing lots of genuine hard work come together

    Tom the lighting ideas are great, and you cant really complain with more options can you! Its quite true I did deliberately go for that look as i'm very inspired by walk-em-up games like Dear Esther, Gone Home and Outlast and suchlike so I went for Dear Esther style contrasty lighting, a bit of tonemapping helped. Id actually find the IBL integration very useful to at least play with because i'm ignorant to it but got that Jove thing so I could initiate myself, it would be great to have it all integrated - while a terrain might not benefit from IBL hugely, water does and although I 'artistically decoupled' the physical realism of the ocean (You can make it realistic as you want or pick and choose now), its driven by a brdf lighting model based on atmospheric scattering so again, integration is nice and sells everything together.

    And you know, its the buzzword of the moment hey haha

    I'll keep folk updated, and go post in that thread
     
  3. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    Tom, the issue I wrote about earlier showed up again.

    What happened this time:

    Everything was fine until I tested some bugfix I got for a different Asset Store Package. I have a separate Test scene for this Asset Store Package (Mesh Baker) were I test if I can get it to work on a rather complicated mesh. After overwriting some mesh baker sources with the bugfixed ones, I got some compilation errors in Unity (which I got fixed thanks to some help from the dev later on)... the important part is the shading of the terrain went white. After I fixed the compilation errors thanks to the mesh baker dev, I went to the special scene, I tested there.

    When I reopened my main scene, I found again that the perlin normal was invisible again and the combined normal textures were missing from their spot.
    I had again to remove the RTP Terrain script and re-assign everything from scratch to get it to work again.


    Maybe that helps with finding the root cause of the problem? It is kinda annoying even though its non-critical(re-assigning and retweaking is only taking 20 minutes or so)... just wanted to give you the information.


    Cheers

    Gian-Reto
     
  4. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Ahh yep I ran into that too, the combined textures arent in slots cept the perlin one, im assuming they should be filled even if im using addpass for the 8 textures rather than the 8 in one pass
     
  5. sixto1972

    sixto1972

    Joined:
    May 16, 2013
    Posts:
    30
    This may be a dumb question... but i really like a dynamic light in my scene.... but i dont like the way shadows fade in. I know this is for performance reasons so i can basically set my shadow distance really high.... or bake my lights to lightmaps. Question is... if i bake my lights to shadow maps... and use a dynamic light for my character and other non static meshes,... can i still use normal maps ? And do i lose the ability to use any RTP features?
     
  6. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Missing texture reference. Can't tell at which stage it happens because textures and whole ReliefTerrain script state is stored in "serializable" (attribute) objects in scene file. Switching between scenes should affect this, but apparently does... Have you tried to save your combined bumpmaps and other derived textures (like combined heightmaps, combined perlin normal) first ? I believe that this might solve the problem. The question is - if your combined normalmaps are missing, isn't it possible to rebuild them quickly by reassigning any normalmap int layer settigns (select none as normalmap per layer and reassign it again - in RTP3 I put button "refresh" to do this quicker).

    Tom
     
  7. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Working with lightmaps. It's tricky.

    In single lightmap mode you basically loose normalmapping info. Can be restored a bit as diffuse using a slider appearing in RTP main settings. Works only for one light.

    In dual mode you (deferred) you get indirect lighting upclose and baked shadows at distance. Close to camera you got normalmaps, but at higher distance you loose it (i.e. perlin normalmaps for more detail or global normalmap) as far as I remember.

    Directional lightmaps - best solution, but they still don't work with RTP the way we could expect. Look a few pages before where botumys posted lightmap test screenshots.

    If you really like dynamic lights in your scene - you can't bake shadows... Other than that I'd recommend current solution with shadows baked in alpha channel of pixel trees/shadow global map (refer to LOD manager) and settings/global maps. In RTP3.1 you've got fully working baking lights solution - you can bake static lighting (and indirect) in a texture which will be composed in the scene like this:

    pixel color from shader (albedo component) * ambient emissive global map color -> emission (like IBL shaders use to do).

    as emission is added at the end of all lighting pipeline in Unity surface shader this will work like lightmap.

    in alpha channel of this global map we can store baked shadows. You'll adjust their distance to fit realtime shadows distance. Of course - you can't modify your main directional light then (baked shadows won't fit), but you don't loose any normalmapping info which will be still used. So - in case of RTP this "lightmap" is actually used to simplify shading (to make it faster) but to make to look better.

    Tom
     
    Last edited: Dec 5, 2013
  8. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Some teasers I suppose!




    Whole scene could be considered procedural, its all world machine generated maps, textures from gametextures, and shaders and code from rtp, suimono and scrawks ocean projects, no baked lighting whatsoever, all rtp features and one directional light. Still need to do some things with the ocean shader (actually a lot of things but some of it i can look over for now) Really, really, looking forwards to dressing this thing up with some painting/meshes, vegetation and maybe even some gameplay

    Video coming in a bit which will show it a bit more intimately along with some of the really unique features of this package, you can see the dark waterline there and the snow, water also runs down slopes where the waves mostly break, its neat
     
    Last edited: Dec 4, 2013
  9. sixto1972

    sixto1972

    Joined:
    May 16, 2013
    Posts:
    30
    Thank you Tom. I did not realize you had created a solution for this. I will give it a try. Thank you so much.
     
  10. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Here's your video anyways!

     
  11. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Yep, the bar has been raised...
     
  12. TRIAX GAME STUDIOS

    TRIAX GAME STUDIOS

    Joined:
    Nov 27, 2013
    Posts:
    49
    Whow That looks quite good. It just lacks Some Global Illumination now : - )

    Kinda reminds-me Livenda Ocean Simulatton
    http://www.livenda.com/livenda_blog.html

    But i like to see Relief Terrain in Extreme detail Action there xD

    I would like to see also some more foam in the interaction betwen terrain and water ...
    And some Particles driven with collisions based on the Foam creation as well ^^

    Congrats.
     
  13. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    The ocean's in its very formative days, LOTS of work to be done on it, its a mix of suimono and scrawks ocean work (in the wip thread), ill be giving what it ends up as to the suimono creator to do what he wants with. The livenda ocean is very nice but i did feel i wanted to add to the whole thing rather than everyone get caught up in that (and i wanted an ocean right now, not waiting forever on showboat teasers). Its mostly the work of suimono and scrawk though, im just splicing it. But yeah expect more development there, and RTP is EXCELLENT, really outdid my expectations and the random unique and very useful features (dark shoreline!) just put it a million miles ahead of everything going at the moment. The pom has the visual effect of making everything look like its made of many many millions of polygons and blends beautifully, every surface ends up having so many different height/colour/shading permutations. Very impressed
     
  14. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Oh and the sea has 'global illumination', it has art-based non realistic shading and sky based illumination (a brdf shading, sun radiance, sky irradiance) which you can mix all together as you wish. Both the sky and ocean are generated on the gpu and are as physically accurate as you wish to make them.

    edit: i should add also that the sun and sky are also physically modelled with mie and rayleigh scattering
     
    Last edited: Dec 5, 2013
  15. BuildABurgerBurg

    BuildABurgerBurg

    Joined:
    Nov 5, 2012
    Posts:
    566
    lazygunn!! remove the Lazy from your name right NOW!! no Lazyman can have those sort of mad skills!! :)

    That's the closest I've seen to AAA quality terrain in Unity. Thanks to tomaszek for tools like this and with your talents, we can see the awesomeness that can be created within Unity. I think many will flock from other game engines to Unity in future if we keep getting awesome tools likes this, combined with artistic talent.

    The main thing letting down Unity is shadows and lighting, but GI is coming along well by Unity asset developers.

    Have you purchased Shadow Softener from the asset store?
    I'm wondering if it would help a lot or little.

    Keep up the great work!!
     
  16. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    I've seen shadow softener about but not looked at it properly, i'll go and look now, but im out of money for purchases at the moment i think so i'll have to see. That terrain is only lit by a single light anyways, which is the sun, all the other shadows are from RTPs self shadowing/fakeAO and any bits left in darkness after RTPs reflex lighting has been dialed up so i dont know if it will help atm, ill check though! It might come very much in handy when i start detailing the landscape, im really looking forwards to that bit

    I'm just thinking there's no point doing it without making a game of it (real application test rather than tech demo) so i'm trying to consider how to go about a simple adventure game that involves driving, so a theme and a plot to drive the art, trying to get my partner to think something up as shes rather clever with that stuff but she has a headache, how annoying.

    The driving/adventure thing comes from a messing-around video i made a few months ago whch super ironically used the previous RTP with the first Suimono, so you could say it was destiny, and the model was an absolute headache to model and animate so i finally want to use it for something and give it a decent texture/shaders:



    I wasnt exactly pushing RTP in that video but the stuff RTP is generating now is out of this world.

    I CANNOT EMPHASISE MORE however the importance of decent textures, go to www.gametextures.com, get a medium account, thank me forevermore, each texture they do has all the maps you need for each section of the process.

    Which brings me to one final note - Tom one of the maps that comes with a games textures texture is a gloss/roughness map (depending on how you see it), along with a specular map, which i guess classically is used in ibl lighting - I do however see it as maybe the final element in whch individual textures used for the pom could be lacking. It's not going to stop RTP being amazing if they arent/cant be implemented, but in say, a theoretical position where you use a BRDF based shader for your surface shading (for simplicity), or any other lighting model based on that paradigm, thats pretty much where this terrain shader explodes into next gen, AAA bla bla. I wouldnt consider it a priority and for simplicity's sake, it could be thought about with purely and only a dx11 target in mind, and it should come with the express LODmanager comment that only mess with it if you know what youre doing aha, but that would really be something.

    A great example of a unity implementation of a cook-torrance model is from the endlessly talented Farfarer here: http://forum.unity3d.com/threads/158589-Cook-Torrance (its clever because it uses a beckman lookup texture rather than calculating it on the fly, big speed boost), but i suppose a website i find very useful at the moment is http://content.gpwiki.org/index.php/D3DBook:(Lighting)_Strauss as it covers the main BRDF lighting models with some practical implementation. None of them demand an environmental input (iirc) other than light itself, and if its feasible to fit another texture in, or even a single further channel, or replace a channel, or well, im no expert and it might all be unfeasible in which case no worries, but a BRDF model based on practicality like Strauss (I cant think of a use for anisotropy in a terrain exactly so Ward etc models dont seem relevant, but differences between rock and mud are obvious and not well expressed by a blinnphong or lambertian specular term). Having a choice of others however, particularly cook-torrance or oren-nayar brings in massive implications as to the art style for a terrain (Artists could now use your terrain for completely non-realistic shading with an oren nayar model (I think of games like Journey using this kind of thing) with none of that cheesy toon stuff being the only non-real shading people think of), and even what the terrain shader is used for

    It could be impossible (I wouldnt know), or it might mean more work than youd like atm when you have so much planned, but you'd make me a very happy camper indeed to have that sort of thing going on. A cliff of obsidian blending perfectly into rough grass and mud, i get all excited thinking about it haha. Like I say though, you could have it only as a dx11 option to focus the implementation and it really does make sense to cater for things that will be coming up as dx11 becomes the standard. I suppose you'll probably be facing tesselation as an alternative to POM at some point but I dont see that as a huge departure from your vision for this product - the workflow and the features are so exceptional that the actual lighting model or extrusion method becomes just a tiny part in something that is a complete answer to a terrain modellers needs. When i got the water stuff working i just wasnt expecting that at all, i wouldnt expect a terrain programmer to add that, its you raising the bar
     
  17. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Oh i see where shadow softener could help actually! Where smaller rocks are shadowed they tend to get artifacts because of the resolution, good call, but it will have to wait for a little while sadly, i have no money and im still supposed to buy people christmas cards! Anyone feeling generous? (Although tbh there are other assets id rather buy atm, even given that im going to be trying to make my own rather than buy things in future)
     
  18. sixto1972

    sixto1972

    Joined:
    May 16, 2013
    Posts:
    30
    I bought it a while back when it went on sale, but have yet to use it. Trying to get RTP and Terrain Composer fully learned.
     
  19. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    I bought shadow softener and used in my current project. I can only say wow!

    As I have a night scene I rely on shadows for added realism, at least for my main lights. Because I have more than one light casting shadows, I had to turn down the shadow settings (so the shadows started to look blocky even with 50m range and the lowlight scene I have)...

    Bought shadow softener when it was half price, imported it and bam! my shadows were supersoft, no sign of the blockiness anymore... I even could up the range to 150 meters without loss in fidelity (well, besides shadows that got even softer)...


    Sorry for the ad, but I think for anyone using realtime shadows this is a must!


    @ Tom: I'll keep your recommendations in mind if it happens again. I actually haven't tried to completly re-assign the layer normalmaps before removing the complete RTP Script, so that might really solve it.
     
  20. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Shadow softener - it's good (tested myself) and works with RTP (it deals with shadowing passes).

    Better lighting functions. I'm currently looking into BRDF microfact model. It's experimental part of work for me now, but when I'll get some OKish results I'll try to comeup with some screenshots. Diffuse IBL is already implemented. For better specular terms - I believe then unless we're talking about water on the surface or ice - we don't need to deal with mirror cubemaps. Cubemaps for terrain are problematic as this is pretty huge object and we'll need to use many of them localised and similar to lightprobes. Also - I know think they are that necessary for terrains.

    DX11 features - generaly we don't need them to introduce more sophisticated lighting functions. At some point, however I can think about introducing DX11 tesellation version of RTP, but ti will take time and for now isn't justified with market being large enough.

    Tom
     
  21. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Well, no worries on the reflection cubes, i have zero interest in them, and I only suggested the dx11 direction as a vague hint that brdf lighting models are a bit more costly than more regular models, so if you were to switch, or offer the switch, then the cost probably should be mentioned

    Dx11 push, mostly entirely down to personal selfishness, to be honest, althought definitely see it being useful on a-typical terrain setups (terravol as we've discussed but maybe also terrains that have been decimated into regular meshes that then want to selectively/adaptively improve surface detail in a mucgh better way than unity terrain managed currenrtly. Im not nagging though, i'll wait as long as it takes

    BRDF lighting models - it seems sooner or later i'll be using a proper (as in accurate) atmospheric scattering model which should involve the terrain as well as everything else, in which case that extra lighting starts coming into its own if i can define rough and glossy areas. I'm very enthused that youre looking into it though and i'll google the model you mentioned

    I'm going to continue further talk in private in one subject cause its a little crass in here but ill let you know
     
  22. sixto1972

    sixto1972

    Joined:
    May 16, 2013
    Posts:
    30
    Thats good too know. I wondered how well it worked and the performance hit over unity shadows. They also make Shine.... which includes light scattering effects. I may get that. Ill try and test shadow softener tonight.
     
  23. TRIAX GAME STUDIOS

    TRIAX GAME STUDIOS

    Joined:
    Nov 27, 2013
    Posts:
    49
    I bet this Whole thing Of cubemaps is not Necessary almost obsolete At all if one uses a Advanced Screen Space Ray-Traced Glossy Reflections Plugin for Unity like http://www.livenda.com/candela_ssrr.html
    Doesnt that does the same as Cubemaps ? But better and realtime ? it says we can adjust reflectivity per surface, and as is Screen Space based, dont afect Terrain DrawCalls At All ! Also the Both 2 or 3 Globall Illumination Solutions as Jove http://goo.gl/anU4X9 DynamicGi http://goo.gl/GNjuUP or Realtme Gi http://goo.gl/bK8nYm im sure they make Cubemaps something of the pass ...
     
  24. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    No there's a clue in 'screen space' you only get reflection information from things that are on-screen, cubemaps represent a crude but existant reflection in 6 directions in a spatial location

    The cubemaps are being used to provide environmental detail and lighting to shaders that rely on reflections, a bunch of the time reflections of things that arent on the screen, so no

    You can experiment getting glossy reflections by lowering mip levels (bit crappy in my experience) or blurring the cubemap

    You adjust reflectivity per surface in a shader that uses these methods with a gloss/roughness map which approximates how much a surface roughness diffuses light or reflects it

    You need to stop using buzzwords and actually read up on what they mean mr triax
     
  25. argosy_ops

    argosy_ops

    Joined:
    Dec 27, 2012
    Posts:
    49
    A colleague just pointed me at RTP today and I'm highly impressed!
    One thing I'd like to ask though before making the purchase:

    We've been messing around with height blending for a while, but always found that the unity terrain painting tools prevented us from achieving our desired results. Imagine you have the following layer setup:

    - Layer 1: Sand
    - Layer 2: rock
    - Layer 3: grass

    Now if I'm height-blending these three layers, I can achieve nice, hard-edged grass patches instead of softly alpha-blending ones. I would however like to use these grass patches both on top of the sand and on top of the rock layer. Our problem so far was: We were multiplying the alpha value with the layer's height map, which gave us some control over how far the heights would stick out. Unfortunately, Unity wants the splat layers to add up to an opacity of 1. As a result, when I start painting grass over rock, the rock layer disappears and I have grass over sand instead.

    Does RTP provide a solution for this problem or will we have to live with it?
     
  26. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Tom will give a better answer but I havent tried painting yet, ive been creating coverage maps with world machine - when you add your textures to rtp you can choose 'layered mode'. Each layer is added and you can specify its contribution with a value, which gives a good idea on how much it will contribute against any other layer it 'competes' with, if a layer lower is 'competeing with a higher layer too closely, the lower layer will 'win', so you get a very good idea about which layer isgoing to come put strongest and where

    If you have a very good idea of your order of layering then layering them starting from your bottom layer going up tp the top is a start, then changing their contribution values can give finer control, when two or more layers cover the same space. One thing to bear in mind is that its not automatic for layers to blend naturally aross passes, you need to set crosspass blending on for your addpass (if youre using addpass for your second 4 textures) which works great although you might have to sacrifice some other feature, which is okay reallly! All the features are cool but many are special-case and can be disable in most uses
     
  27. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    Without going into detail, RTP does not have a problm with it at all. I was able to achieve all the blending i wanted, if you think about how heightblending and the splat controlmaps work together you can achieve any possible combination.


    @Lazygunn, hey i am really happy that i am not the only one who is so enthusiastic about RTP. I really love to see what you achieve with it!!
    Cant wait to play with RTP 3.1
     
  28. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    grass patches over rocks - you'll need to make your heightmap for grass layer having these "patches". If you'd like to set grass over rocks - no problem - draw rocks and then draw grass on it using lower painting opacity until you get satisfying results.

    Tom
     
  29. OneShotGG

    OneShotGG

    Joined:
    Nov 16, 2012
    Posts:
    225
    Working on a third person game and I am gonna need anisotropic filtering. I remember reading that it is turned off for RTP 3. Any way to turn it back on?

    AF is like mandatory for PC games these days so we need it. :)
     
  30. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    True, but i have to say that i have not seen any artifacts that you would expect from it. I think Tom does something clever about it...
    I tested the upcoming demoscene we are working on, in first and third person as well as in flightsim perspectives, everything perfectly smooth ;)
     
  31. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Mister terrain composer is talking to me. By the time i'm done with this it will be considered madness not to be using it. Definitely going to nag Tom about lighting models though, having a cook-torrance/oyen-nayar/strauss option to play with, oh lala

    I pmed tom and he welcomed me to fool with the scripts so i will try a bunch of lighting models and try and hack my way into understanding it all but since he said he was playing with adding a brdf shader as an option anyways in 3.1 i should probs just wait. Then fool with his code and jam in as many lighting models as possible (with high hopes for an oren nayar one)

    oh yeah, anisotropy, i think tom's answer is mip bias in the main settings
     
  32. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Aniso - it's impossible to hold it together with parallax features (PM/POM/refraction of water) and most probably it's undoable for triplanar. The reason is that we need RTP using conditionals (anybody want to make it 3-4 times slower ? I know the answer as this is expensive enough now and with incoming lighting fancy stuff...). What I'd like to test is using aniso with cancellation of parallax effects - then we can use tex2D calls (instead of tex2Dlod) in conditionals as long as we not manipulate tex uv coords from vertex shader (which is the case for PM). I can't promise we can hold it with triplanar, too (maybe with some limitations and lowered performance). Terrain with aniso will look like in RTP LOD "SIMPLE" mode.

    We should also consider that with the number of tex fetches RTP makes per pixel using aniso can drop down framerate, but on hi-end machines this could be acceptable (as we resign from PM).

    MIP bias - it works to some extent but at grazing view angles (almost parallel to surface) we see the problem. Anyway - I believe that 3rd person controller camera is placed not that close to the ground so results are quite acceptable w/o aniso. I miss it too (believe me), but this is good compromise - RTP gives so many nice features in reward that your game players might not focus on lack of aniso :).

    Tom
     
  33. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    That is so insanely humble, its not funny :p
    Results are fantastic... Like i said i haven't noticed a problem with it, camera must be really close to the ground and the surface must be perfectly flat then you can see it but that case almost never occures and its still not very noticable... and if you really can see it very occasionally its still the best trade off for the countless features.

    You are way to humble Tom :D
     
  34. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    I have to admit i think im becoming a fanboy, hes well funny when he gets so anal about such things

    Tom! stop staring at the terrain so long! noone will care if something starts looking slightly different at grazing angles

    That also translates as stop thinking about anisotropic filtering and gimme those sexy lighting models (i'm making a vague guess you can put extra maps needed for particular models in with the height texture since it has 3 free channels? right?) - the BRDF models do introduce some specific settings that need an interface for, in general, and on that point im going to now go look up the brdf model you told me you were looking at
     
  35. OneShotGG

    OneShotGG

    Joined:
    Nov 16, 2012
    Posts:
    225
    Is this a unity engine problem or a problem with Parallax mapping? Can you do height map blending without the parallax effect?

    I think I can hide the blurriness with terrain decoration and setting the mip bias a little lower (if you go too low you get the shimmering effect). Plus I can always use aniso on EasyRoads which is where the lack of it is most noticible (pathways, roads, etc).

    I think I have gotten the hang of using your great plugin save for lightmapping. I did a lightmap in gamma space using deferred rendering, directional light and dual mode only to come out with all near textures being overexposed (very bright).

    Maybe I should have set things up in linear space?
     
  36. tomaszek

    tomaszek

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

    To remove overexposition for close distance turn down additional slider that appears in settings main for this - look at "lightmapping your terrain" section in pdf docs. This can be also disabled completely in shader code (removeing a define for this). It works reasonably fine for single/forward only.

    Tom
     
  37. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    If there is no specific reason you have to work in gamma, you should always use linear space, there are many reasons why linear is better and i think i read somehere that unity would have dropped gamma already if there would not be some cases where linear is unusable(some phones for example?). Linear solves almost all overexposure problems, works very well for image effects like bloom that need overbright highlights(for example shiny metal), especially with hdr on but also without hdr. Linear space also gives correct shading(light falloff on surfaces) while gamma does not...


    Something else, yesterday i played a little bit assassins creed 4 and i have to say, while its a very beautiful game overall, the terrains can not even closely compete with RTP. With proper setdressing and RTP for the basis i think unseen quality is possible. With tools like that its just a matter of time when the first indie teams compete with the big players out there, at least visually.
     
  38. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    With my island scene i found neither a need for a colormap or a lightmap, which to be honest really surprised me, i think with shadow softener it could be an even more emphatic sign that you neednt think too hard about things like what amounts to a global bake of values to fill in distance. I think if i used a colormap, for example, the sudden explosion of detail provided by the pom would be jarring. Still, im intending to test the lightmapping soon hopefully, it will crop up as needing tackling eventually, but if you can preserve normal details with it then thats a pretty great success right there, was it you couldnt do directional lightmaps cause terrains dont have tangents?

    Another thing im keen to try soon is the whole process of using something like terrain2mobile to make a mesh of the terrain and how to go about migrating the shader over (I think regular use of the system is going to have to instill an education in when and when not to rely on addpass) - but im also curious as to how a terrain looks with constant detail all over while working with the POM and if the decimation process brings up any issues that need addressing. Stuff to think about
     
  39. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    To be fair, i think RTP is very performance intensive when a bunch of pom textures are in and blended and wotnot where AC would have been very much optimised for performance over a large number of platforms, not exactly a fair comparison. I do share the the opinion that this things really top notch stuff however, the most well featured and best looking, and most well designed/considered terrain solution ive had the pleasure of working with. I'm looking forwards to seeing what can be done as my experience with it grows - two mini tasks ive given myself regarding it is to try and learn a general set of rules that can give a good, pleasing coverage to almost any given terrain that doesnt require any baking/painting process, because thats not just generally handy but pretty golden knowledge if youre going to be using world composer to knock out huge areas of land, and the other is taking a shot at terravol with rtp, although i'm a little hesitant to buy the asset while i dont know any way to add geometric bumpy detail to surfaces, because i basically dont want to disappoint with a sub par result because i couldnt recreate enough surface variation to take best advantage of the shader

    It's still very exciting a prospect giving terravol a terrain grade surface, it'd look bloody great
     
  40. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Oh, and gamma space versus linear space - linear space is an accurate representation of the colour, gamma space is an adapted version of the colour for specific viewing devices, in the classic case, monitors, with a gamma of 2.2

    Gamma isnt applied as a constant though, so it actually really distorts the colour output of your creation, which in term means all further post processes are going to be whack and your lightings going to be overpowered with a premature falloff cause the contrast's cuckoo

    A current approach (One I use and like) is linear space, render cameras in hdr, use a tonemapper image effect to get your hdr range modifyable sensibly and then some colour adjustment with curves

    Just like any professional photog always edits his photos be it in photoshop or a darkroom, no professional game is going to look its best without some well judged colour correction, and in this regard it's just catching up with more film-like processes, after eventually discarding years old legacy processes that have taken way too long to become on the edge of deprecation
     
  41. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    Well, yes and no, if you crank up all features at the same time, yes it becomes perfomance intensive, but it really depends what you are trying to achieve. even with a minimum of features, RTP still looks a lot better than terrains in most actual AAA titles. Then the performance is really great and its very fair to compare imho. RTP on simple mode looks still mindblowing thanks to the heightblend feature... also if you use PM instead of POM its still lightning fast.

    I think the best workflow still have to be discovered but i did a lot of research on what is possible with WorldMachine, Terrain Composer and RTP. I can do terrains now in a few hours that are really well detailed, thanks to a very procedural approach. I spent weeks on tweaking the terrains before and never came up with anything close to what i can do now in a few hours.

    About the voxel stuff, yeah its nice in some cases but most of the time you want a regular terrain for performance and some other reasons. I think in a few years voxel terrains will become very interesting and probably the way to go but i dont feel like its already there yet. In some cases yes its great but for massive terrains, dont bother with it.
     
  42. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Tom and the terravol guy have been communicating about rtp integration for terravol. I've decided to be test pilot, i think some great results could be gotten, with enough rules set for coverage on the surfaces - quite looking forwards to it, gets both technical and art attention

    As nathaniel was incredibly generous yesterday i think i want to attempt almos Dear Esther, a walk em up, but spread over an enormous distance and involving some strange locations - and for a performance check id like to see how terravol and reg terrain played with each other
     
  43. sixto1972

    sixto1972

    Joined:
    May 16, 2013
    Posts:
    30
    So on top of HDR and linear mode.... what rendering mode do most of you use in regards to RTP? Forward, Deferred? or Lightmapping? We lose antiailiasing in deferred mode i believe. In forward we take a hit on many lights... Deferred... we can use many lights but giveup AA and who knows what else. What are your professional ideas on this?
     
  44. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    Lightmapped - fine but static and best results you'll have using directional lightmaps (I'm not sure if they can be simply baked for terrains now, you can export terrain as mesh and lightmap it for use on terrain back).

    Forward - one pass if you've got one light. In presence of many lights I'd recomment ticking "no froward add" in LOD manager. One directional will be rendered (set to important) to get normalmapping and proper pixel shading. Rest lights will be computed using spherical harmonics. As terrains are made of mesh chunks I believe that in presence of more lights not all terrain is rendered twice for 2 lights, but only chuinks that are actually affected by these 2 lights (that's obvoius for me, but haven't tested it in profiler for tris count).

    Deferred - 2 passes regardless of number of lights. 2nd pass done in screen space as far as I understand this (so we probably get perfect "culling" for this pass). In deferred you can use postFX AA - they worked quite fine for me.

    So - for best performance - use forward and take care of number of lights. For best flexibility in lighting - use deferred. Remember that complementary lights works only in forward in RTP. Use more lights there to get similar results (set lights on scene that would work similar way as my complementary).

    Also in RTP3.1 w/o complementary lighting you can use global ambient emission map that can vary depending on surface normals, so it could look fine for unlit areas. Also - you can use diffuse IBL there to not loose all normal mapping in unlit areas, too.

    ATB, Tom
     
    Last edited: Dec 7, 2013
  45. lmtm

    lmtm

    Joined:
    Sep 9, 2013
    Posts:
    32
    Hi Tom,

    I'm still no successful with my problem (start Your shaders after loading terrain as assetbundle to my project.)

    Can You be so very kind to make some very easy terrain (only with 4 textures nothing else) and add Your RTP there
    and try to load it inside project as assetbundle ?

    I think You are most competent person to test it and tell me/us, if this way is walkable.

    For preparing assetbundle I used script ExportAssetBundles (https://github.com/lite/DthUpdate/blob/master/Assets/Editor/ExportAssetBundles.cs)
    working fine.

    For loading it to another project I used script like this :





    using UnityEngine;
    using System.Collections;

    public class asset_load : MonoBehaviour {

    Terrain AT;
    private WWW w1;

    void Start ()

    {
    string FilePath = "file://c:/aaa.unity3d";
    w1 = new WWW(FilePath);
    Instantiate(w1.assetBundle.mainAsset);

    AT=Terrain.activeTerrain;

    ReliefTerrain rt=AT.GetComponent(typeof(ReliefTerrain)) as ReliefTerrain;

    rt.globalSettingsHolder.RefreshAll();

    }


    Everything working fine but no shaders.

    Can You try it and let know to me, maybe also for other customers what it best way to use RTP with assetbundle ?


    Thank You,

    Milos.
     
  46. argosy_ops

    argosy_ops

    Joined:
    Dec 27, 2012
    Posts:
    49
    We've created the heightmap in a way that it will produce these patches. Our problem so far was that the Unity texture painting tools would then automatically reduce the opacity of the rocks once we start painting over them. As a result, we'd never have grass over rocks, but always grass over sand (the lowest layer).

    So as I gather from the answers, your system won't automatically reduce the opacity of other layers when painting?
     
  47. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    That got me thinking. There's an asset on the first page called shrubbery er.. thing.. and i bought it cause it looked neat and ive been asking the creator if they could add a feature to apply whatever you're applying via a texture for coverage, not just the coverage but using 2 channels for lean direction, a channel for height, and the final channel for the actual distribution with some range of pixels (or maybe the value of a single pixel) to choose what object or plantlife to place. Would that work alongside this or would it be straightforward to implement that? Should i have to use unity's tools for this? I dont think ive used unity's vegetation or detail mesh placement tools in over 2 years. Can you specify the parameters i mentioned in a texture for unity terrains placement?

    I'd find it quite annoying if i have to stick with unity's tools especially if i can't define some kind of leaning direction, because i think a lot of realism in stuff like grass on a terrain can be in wether it looks trodden on or flattened by other means or direction is scattered or somethings flattened it in a particular path, basically quite a distinctive and attractive variation, i wont assume it's a typical game engine terrain feature but i used it a bunch with vray fur back when if you wanted fur in max with vray you had to use vray fur. If this isnt in yet, someone put it in! particularly stuff like grass looks a ton more realistic this way. If that kinda thing is already in and i should just read the documentation, ill shoosh. I figure it wouldnt be a typical feature because you'd have to create your grass billboards so their top vertices can be displaced for the tilting, vertex colour i guess.

    And being able to set what you want to place all in the same texture would be extremely convenient, if the value of a pixel in the coverage channel corresponded to density (You wouldnt end up with odd patches of a particular detail/vegetation mesh popping out, it should be nicely mixed in in a dense area)

    Am I being dumb or is this an idea that someone should look at? It would definitely make grass look a load better and hugely improve the sense of variety and uniqueness than i've typically seen on game terrains, where the grass can tend to be really stale, just sticks straight up at different heights and looks very scrappy as the density thins out

    I was guessing terrain composer could create the maps, maybe i should harrangue nathaniel
     
  48. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,862
    We have to clear what does it mean "painting" coverage. In fact - order of layers doesn't matter. RTP doesn't have it's own painting system, but is visualising what it took from Unity's coverage / splat textures. I can only say what haapens when you paint in Unity.

    If you've got 4 layers with covered like in your previous example (1/3, 1/3, 1/3, 0) you have the same coverage in classical shading. When you start painting a layer coverage texture adds a value for its color channel in control texture and the same time reduce the rest to the level result is normalised (all components sum is 1).

    On the top of this texture controlmap value blending I put heightmap blending which first multiplies every control component by associated detail heightmap and normalize it back. So now the winner is layer with highest controlmap*heightmap value.

    If for example you've got 1-sand, 2-rocks, 3-grass with the same controlmap contribution (1/3, 1/3, 1/3, 0) and you want grass to appear over rock. Paint rocks to the level it covers the rest (resulting in 0,1,0,0 RGBA value in controlmap) and then start painting grass so it gradually takes control over rock via it's heightmap. I'm talking about hand painting. If you'd like to achieve the same effect procedurally (using for example my coverage compositioning tool) you have to take care of right values in your grayscale masks used together with their multiplier values. If you'd like to get grass over rocks - it's doable. For example in ordered mode of my tool - manage layer order the way rocks are on the 3rd place and grass is on the 4th place (on the top of underlying layers). You can then set even the same grayscale input for rocks and grass but for grass use lower mutiplier to the point it appears on rocks but only in places where multiplication of grass coverage by its heightmap wins resulting in patches of grass visible over rocks.

    Tom
     
  49. tomaszek

    tomaszek

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

    Talking about placing grass or details - yes nag Nat for this :). In RTP I focus on terrain surface this moment. Also larsbertram could put mor light on the problem. Using Unity's grass for example you don't have any access to distribution or coverage maps in grass shaders. They are populated by Unity engine on CPU. You could, however think about modifying grass look locally if you'd incorporate texture lookup in vertex shader. This would work for single terrain probably because such texture would be global only (we don't have access to actual grass material to change it's params depending on terrain object).
     
  50. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Had a good chat with the fellow, he gave me a good idea about the maps and suchlike, although i had little doubt tc wouldnt be up to it, it seems like to get particularly what i'd like regarding all the 'tilt' or flattening would mean getting a bit involved! I think lars foliage shader is first stop then getting some education about how all the coverage and placement stuff works. Seems it could end up a bit of an adventure. If i end up without a success well it's always good to learn stuff, cheers!