Search Unity

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

RTP - Relief Terrain Pack with geometry blend on AssetStore

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

  1. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Correct,

    After you setup your terrain as usual in Unity (new terrain + sizes/resolutions + heightmap + number of layers needed), you put my script on it and deal with script params. To get idea how setup params you may refer to example scene (pretty the same as in demo) attached in the package.

    I'm now working on RTP2.5 (it will be free upgrade for current users, not separate product). This will have UI restructured to make workflow faster. It's not that easy to deal with this amount of params and not be lost. Just when RTP2.5 (new cool features incoming, too !) is ready I'll try hard to make a few video tutorials as I realise people don't like to read PDFs at all... :). This will be also good advertising material which will bring clear idea of how default Unity's terrain becomes like as in AAA engines.

    So - stay tuned.

    Kindest regards, Tom
     
  2. LokiDavison

    LokiDavison

    Joined:
    Jan 13, 2013
    Posts:
    41
    Hi Tom,

    I'm getting an error: Material doesn't have a texture property '_MainTex' when I have more than 1 terrain with RTP shader enabled. Is there something special i should do to setup multiple terrains? The first terrain i setup is working fine. Others are pink. I have 8 textures, but running in 4 per pass mode with an add pass, as 8 per pass seems more limited, not sure if this is the case though. Latest Unity running in DX11 mode, on Windows 8.
     
  3. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    In Unity4 where we can setup multiple terrains, every terrain should use its own material (specified in Unity's terrain settings). The material should be associated automatically. Check if your pink terrains got material associated, if not, make one and assign firstpass shader to this. And yes - 2 passes on arbitrary material might cause the problems.

    8 layers per pass is not that bad and is better idea than two passes (4+4), unless you're using triplanar or vertical texture. In RTP2.5 (incoming) you'll be able (most probably) to use vertical texture with 8 layers per pass (but without additional feature I'm working on, it's secret for a while :cool: ). If you desperately need triplanar because of very steep areas present, don't worry - you'll be able to put additional blended geometry there (which can look better than triplanar). I'll prepare special geom blend shader which will do things similar to RTP (heightmap blending of multiple layers based on vertex colors).

    ATB, Tom

    P.S. Response time 30 minutes - not bad result :).
     
  4. sPiz

    sPiz

    Joined:
    Jun 15, 2013
    Posts:
    4
    Hello tomaszek,
    I have a little problem with your excellent tool ( really good job on this).
    I can't control the specular of the map so much.
    I can boost it a bit, (but there is no slider for the gloss) and when i'm far from the map, i can't see the specular at all.
    It's a bit annoying because i must do a terrain in the snow and i wanted to have control on the specular.
    Did i miss something ?
    Thanks in advance.

    sPiz

    Spec:
    I'm using unity 4, d3d9.
     
  5. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    At this moment gloss is cancelled at far distance. I'll try to put it back (but it will have some restrictions in presence of 2 passes) in incoming RTP2.5. Also - in deferred we don't have much control of specularity as its precomputed globally in pre_pass (in forward it's much better).

    ATB, Tom
     
  6. sPiz

    sPiz

    Joined:
    Jun 15, 2013
    Posts:
    4
    Thanks you for all this information,
    after my message , i see the comment in your shader about the specular.
    Nice to know about the forward rendering!

    RTP 2.5 will be a must have :p
    Difficult to wait for it.
    Thanks again for the fast answer as always,
    sPiz
     
  7. LokiDavison

    LokiDavison

    Joined:
    Jan 13, 2013
    Posts:
    41
    Hey Tom,
    I've had a chance to test in 8 layers per pass mode and I get the same error. I have 16 terrains, all of them have the material automatically set. I did copy component when i was setting it up. They all have the same 8 textures, global colour and normal map and i've tried pom and pm mode. One of the terrains (the first i set up) is working fine. The others are pink. What other debugging info can I hunt down? The console isn't very informative and just says:

    Material doesn't have a texture property '_MainTex'
    UnityEditor.DockArea:OnGUI()

    Cheers
    Loki
     
  8. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    First - try not to copy first setuped terrain. Place your 16 terrains and assign ReliefTerrain.cs separately to them. This will assure that they're fully independednt copies. In regards to your debug info:

    Material doesn't have a texture property '_MainTex'

    isn't real error. It's generated always the same when any problem occurs in shader code compilation, and there are numerous errors like this listed ("material doesn't have a property..."). Among them there should be real problem - hunt it down on this long list of errors, then I'd be able to tell more. It wouldn't be bad if we establish 1 to 1 skype session, preferrably with desktop share. I could help you much more efficient then. Just give me your skype id in private message.

    Another thought I had for a long time. Many textures (esp in 8 layers mode) are generated "per terrain" / "per script", so - 16 terrains = 16 texture sets (combined normals, color atlases, hieghtmaps, and so on). It introduces huge memory resource overhead. In rtp2.5 we'll be able to control this combined textures by hand (now its possible only for heightmaps). Although they're calculated dynamically when we manipulate layer texutres (color / bump / heightmap), they now can be replaced manually and saved as regular asset (png file) so they will be exchangeable across multiple terrains / scenes. I mean you can specify one terrain with a set of textures, and the same textures could be re-used on different terrains/scenes. In 8 layers mode you just reuse texture atlases for color, combined normalmaps, combined heightmaps, combined global normalmap (which in most common situation is just perlin noise used as bumpmap).

    I'll try to push RTP2.5 as soon as possible, but I'm adding new complex functionality on this so it take time. More, I concern much about performance which can't drop that dramatically when we use it w/o POM self-shadowing (the most demanding option). I believe it will be noticeable. Simplier modes must go much faster to be usable for wide range of GPUs / platforms.

    Of course as RTP is basically built on Unity's terrain system we can't jump over its limitations and resource drain (for example CPU load/drawcalls). You can also use it on arbitrary mesh, too, but you'll have to split it into smaller chunks yourself. Then you can gain much on Umbra occlusion for complex (wavy - mountain) terrain. For desktops I would definitely stick to what Unity gives for its terrain as CPU load is comparable to what my shader needs. It gives LOD option (low poly on far distance for price of small hickups from time to time when LOD level changes). On low poly mesh (bigger pixel error in Unity terrain setting) for far distance RTP terrain can look quite detailed using eighter lightmapping or directional light baked into global colormap (like in my example scene).

    Another thought - for arbitrary meshes you could use existing terrain extensions that gives opporunity to build and control your terrain. Then (when terrain mesh is ready / chunked) you could try to use my shaders on them.

    Tom
     
    Last edited: Jun 16, 2013
  9. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Good news for anybody interested in using TRIPLANAR with PARALLAX mapping. I found the way to do it effectively and it works quite decent on mid range hardware. Stay tuned for incoming RTP2.5.

    ATB, Tom

    P.S. Of course no POM with triplanar (3x ray tracing will be too expansive)
     
  10. Samsson

    Samsson

    Joined:
    Oct 12, 2010
    Posts:
    165
    So PM Triplanar together ? Yes ! That is good to ear !

    What's next ?
     
  11. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    - Advanced water on terrain surface
    - Fresnel reflections (from static global reflection map - think clouds reflected on the surface and on the water)
    - New geom-blend script that allow to place blended objects within a few clicks
    - Whole new UI (well thought, speed-up workflow considerably)
    - Considerably better performance (esp. 8 layers per pass - option to disable overlapped areas)
    - Better realtime shader LOD gradation (simple mode handles heightmap blending wo parallax and with simplier additional features - good for slower end-user machines while still looks good !)
    - A bunch of bugs squashed

    and more ... (I'm almost lost in all these improvements)

    Tom
     
    Last edited: Jun 25, 2013
  12. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    Awesome!!!!!
    You can definitely count me in as your customer(like i already mentioned), right now i'm still on the Unity Pro Trial and hope the i can find a rebate voucher code or something before the trial ends. However i have saved the money for Pro and some tools already and besides Unity Pro, RTP is on TOP of my shopping list.

    Im a fan of your work!! Keep it up!!
    Peter
     
  13. Samsson

    Samsson

    Joined:
    Oct 12, 2010
    Posts:
    165
    - Advanced water on terrain surface
    - Fresnel reflections (from static global reflection map - think clouds reflected on the surface and on the water)
    - New geom-blend script that allow to place blended objects within a few clicks


    Can't wait to see what i can achieve with that !
     
  14. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508
    I'm also running into very high memory usage, but I have a lot of meshes also. 35 or so. I have a single terrain prefab I use, that they are all created from. So are you saying it's best not to do this, but to create multiple prefabs (one for each mesh), or are you saying to assign the script and properties dynamically to each generic gameobject I create?


    Good idea. I'm trying to find another 8+ texture shader that will work on an arbitrary mesh. Anyone know of one? It would be nice if it supported bumps...but not absolutely necessary yet.

    Thanks,
    JC
     
    Last edited: Jun 30, 2013
  15. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Hi jc,

    As you're of my RTP users, you should definitely wait a bit (I hope a week) for RTP2.5. Most performance and memory (re)usage issues are resolved. I'm finishing doing last features, testing work now and will focus on making some tutorials, in-depth videos and docs on how to use it effectively. One of feature I'm doing right now is "artificial" layers that will allow users "to stick" geometry (for example rocky paths) to the terrain and blend them perfectly so they look like part of terrain (one of its material layers). This way users are not limited to 4,8 or 12 layers, but use only the most necessary materials (for example only 4) on terrain and rest of areas can be placed as additional geometries, sticked to and blended with terrain.

    In regards to copying terrains - I checked this and it seems that we can do it (at least in RTP2.5, I'm also planning to add feature called "copy properties" between multiple terrains in U4 - you'll setup one terrain, add other, add ReliefTerrain.cs script and copy properties from original setuped one with all its layers done, settings, etc).

    Tom
     
    Last edited: Jul 2, 2013
  16. Samsson

    Samsson

    Joined:
    Oct 12, 2010
    Posts:
    165
    Hi Tomas,


    Very interested to know more about your new blending system and how it works. Many questions on this ;-)
    On the water also, how does it works and what can we achieve with it ...
     
  17. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Blending improvements make easy life to developers. Put any geometry you'd like to blend. Add a geom-blend compliant material/shader to this (how to make almost any surface shader geom-blend compliant I'll make a quick tutorial). Put geom-blend script on the object + a few clicks - your object will be nicely blended. Problem with objects like rocks which often have polys perpendicular to the ground which, when blended, don't look good is resolved also. Your blended object can be automatically modified so it's automatically flatten/squashed a bit close to the ground intersections. Additional feaure I was taking about is that we can get any (flat) mesh - for example outline of road or path and stick it to the terrain/ground (vertices will be placed close to the surface. Then you can use simply geom-blend features (painting) to hide it's edges so it looks like part of terrain. You won't have to compromise (dedicate) one terrain layer to put a separate object like path in your medieval village in case you have to save your terrain layers for more obvious applications like grass, sand or rock.

    Water. Basically it works like this - it has 3 states depending on how much water is on it:
    1. surface is "moisturized" - darken a bit
    2. surface get "wet" it become glossy / reflectant (refractive too) - we can add water flowing on the surface depending on the slope direction
    3. surface accumulates water in it's deeper (in terms of layer heightmap) parts. water is basically more glossy and reflectant. It can produce rain drop effects (animated) on the surface. Of course water can flow there (slope driven).

    Water has global wetmask so any part can be excluded from water (under trees and other shelters). In above stream example you just put plain dry mask on the terrain and - in opposite - paint water on the area you'd like to have it.

    Most water params (there are planty of them) are adjusted per layer so, for example water could not appear on the grass (terrain soil with grass is absorbent) while it flow pretty well on rocks (and between them depending on layer heightmap - think of this large rocks layer in my demo where water can flow between rocks, although w/o flowmap but in the right direction depending on the slope, so you can produce effect of shallow flowing waters, for example shallow moutain streams with good looking refraction). Water can be also colorized to produce special effects (it can be then anything - murky oil, or yellow "sandy" water or a bit turquoise carribean shallow water on the shore). Give me a few days and I'll try to start working on video demos/tutorials on this. First I'd like to finish the job so I can start describing the final product. It would be wasting time when I produce tutorial of product where some features could be subject of additions and changes (and bug fixes).

    Tom
     
    Last edited: Jun 30, 2013
  18. Samsson

    Samsson

    Joined:
    Oct 12, 2010
    Posts:
    165
    Thanks for those informations, then i keep my question and wait for your release !
     
  19. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    You can always ask here (or PM). It's quite good method to request a feature or giving me inspiration for adding something handy from the artist point of view.

    Tom
     
  20. Arcanor

    Arcanor

    Joined:
    Nov 4, 2009
    Posts:
    283
    Just another thank you Tom, from someone who has already purchased your excellent package. Reading your patch notes and previews inspires me to do more with my game. You are awesome! :)
     
  21. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Thank you ! It's always good to hear from customer.
     
  22. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508
    Thanks, Tom. I only mentioned the 8+ texture shader because I need something to tide me over until then. I will definitely be using RTP.

    Also looking forward to the updated ui and docs. I'm still pretty new at game development, and I don't really understand how to use some features of the existing pack effectively.

    All of the new changes sound amazing. Very excited to see what comes next!
     
  23. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    142
    What about textures color blend ? There is something in the shader that can solve the problem ? I have a lot of nice textures, but is very difficult to have color blend between them, so the result has a patchwork aspect, textures seem cutted and pasted. The problem is not solvable with normal alpha blending, just the colors should be adjusted..
    I'm doing something wrong ?
     
  24. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Could you provide me with some screenshot which would give me better understanding of your issue ?

    Tom
     
  25. KyleStaves

    KyleStaves

    Joined:
    Nov 4, 2009
    Posts:
    821
    Hi Tom,

    I just purchased your RTP from the asset store and visually the results are great. However, I was wondering if you had any thoughts on my performance issue. In your demo scene, and in my own scene with one very large terrain the performance is fine (hardly noticeable between default shader and RTP). However, I have a procedurally generated scene that uses 16 terrains (created with TerrainComposer) and in this scene trying to use your shader drops the performance considerably (from 60fps to 15fps).

    Any thoughts on why this might be? Should I wait for 2.5 to be released before really trying to do multiple terrains and go from there?

    Thanks!
    Kyle Staves (Sortasoft)

    EDIT:
    One other strange thing - I had to remove RTP from the project entirely for now. For some reason any Terrain using the default shader is covered in a yellow haze in the editor and appears pure white at runtime.
     
  26. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Hi Kyle,

    Yes, RTP2.5 is more concerned about the performance. To preserve Unity3 compatibility I use default terrain shader overriding redefinition, so we can't use both - default shader and RTP one, however in Unity4 it's possible to have different terrain shaders (default and RTP) in one scene (each terrain can use different shader on its own material). Just change the name of shaders in my "firstpass" and "addpass" .shader files, but still - use them in the material assigned to the terrains that uses RTP. Default terrains would not be affected then.

    When using multiple terrains - put your eye on number of polygons that are rendered. If you set your pixelerror low for terrains, you might end with 16M polys per pass... (and even default shader might knee then). Check it in profiler - 16 terrains need considerably big amount of CPU power to compute their meshes dynamicaly. This has nothing to do with actual terrain shader used.

    I guess in presence of multiple terrains - Umbra occluder might help. Remember that by default (in RTP2.1) you've got POM with self-shadowing shader LOD level. Use lower settings (PM) to get better performance. In fact POM with self-shadowing for multiple terrains will work good only for high-end GPUs now. I'm curious what GPU do you have ? Also - in deferred shader need two passes which is 50-80% slower than one pass (one directional light) in forward.

    Tom

    P.S. I think about resolving this issue (not overriding default shader) automaticaly for U4 users in the incoming release.
     
  27. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    142
    I've just realized that color map can be used to blend texture colors and have a more realistic effect. Should be nice to have some way to generate a color map just assigning colors to the textures like ATS do. In that way we could 'tint' the textures and correct the color differences to have more uniform colour variation. I'll post some images to better explain, sorry for my english :rolleyes:
     
  28. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    I've just added another feature that could work similar way. Separate layers can now use additional filter at far distance - it works the way far areas can use higher (up to max) MIP levels than it would result from standard MIP level computations. BTW - it's better to use global color map computed on 3rd party solution (WorldMachine, Terrain Composer from AssetStore) which gives more various and detailed results than making this basing on terrain detail/splat coverage. More - you can bake lighting there, too (for static directional light) - even more details at far distance w/o necessity of using lightmapper.

    Tom

    P.S. I can't see what's wrong with your english (maybe because mine isn't any better :) ).
     
  29. KyleStaves

    KyleStaves

    Joined:
    Nov 4, 2009
    Posts:
    821
    Thanks for the quick response! I'll wait for 2.5 before I give it another go. For what it's worth, with the default shader the actual number of terrains (in our testing anyway) seemed like a fairly insignificant factor in performance assuming nothing else changes. (the difference between one terrain at 2500x2500 world units and 513 heightmap resolution and 16 terrains occupying the same space with the same cumulative resolution is/was virtually indistinguishable). GTX 580 (desktop) for what it's worth on the graphics card front.
     
  30. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    15fps on GTX 580 means far too slow... RTP2.5 will behave muuuch faster (esp. in U4 where I can use different shader for far distance and this shader by default use global colormap sampling only - no detail/splat colors).

    Tom

    P.S. I'm aware about a bug in current shader version which forces it to make high detailed calculations at far distances, too :/ (it's fixed now).
     
  31. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508
    Good news for sure. So...how well does this blend between distant terrain using a global colormap, and nearby terrain using splats?

    I'm working on a procedural terrain, where for each terrain LOD you can use a different material. I think the new RTP changes coming will be very useful.
     
  32. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Seam will be unnoticeable. With good quality global colormap (with baked directional lighting) results are nice.

    I'm just finishing the blending system which will give chance to use virtually unlimited number of layers (perfect for local usage like paths, detail sweateners on the surface) - and now they can be ... height blended with underlying terrain :). Shader that blends this way and handles 2 PM layers (managed by vertex colors) is ready - result is pretty convincing as you wouldn't be able to say which part of surface is "native" terrain layer and which one is blended mesh. I have to write such blending versions that handles water, too (allowing local shallow streams and stuff like this). I need to port terrain script with its whole bunch of improvements to script that handles RTP on arbitrary meshes. I guess will be finished tomorrow. Then - test the system once again and issue it on AssetStore. Then I start with tutorials. Assuming people wait for RTP2.5 for a while - please be patient, the system got so many improvements that it just take tremendous amount of time to finish...

    Tom
     
    Last edited: Jul 10, 2013
  33. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508
    Can't wait to see the changes, sounds like you have put a lot of work into them.

    So, for my current project I'm creating a procedural terrain, planning on using RTP. For areas of the mesh that I don't want to be blended, such as a sidewalk with hard edges, I was planning on leaving those polygons out and creating a separate mesh to draw those with instead.

    I get the impression that some of the new features you are putting in will actually help with that, is that correct? Or will I still need to handle those situations with a separate mesh?
     
  34. Samsson

    Samsson

    Joined:
    Oct 12, 2010
    Posts:
    165
    RTP is a really good asset and you are doing fantastic updates, so we wait impatiently ^^
     
  35. Amfu

    Amfu

    Joined:
    Apr 9, 2013
    Posts:
    180
    Hi Tomaszek,

    When using RTP on an arbitrary mesh, is it possible to determine which layer to use with the vertices' colors instead of a control map?
    If not, would it be easy to do?
     
  36. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Straightforward (in 4 layers mode only). But you must be aware that shader which realizes geometry blend with arbitrary mesh uses vertex color, too, so - if you change it from texture to vertex colors (you probably want to paint on the mesh as RTP use ready made splat control textures taken from Unity's terrain engine), you wouldn't be able to use geom blending features.

    Tom
     
  37. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    142
    Hi, I have some problem using RTP on multiple terrains and streaming that terrains with asset bundles.
    The problem is that, of course, I make bundles starting from terraindata and attach the shader at Runtime.
    My problem is: is there a way to save rtp data (tiling, normal maps, height maps and so on - details map are already defined into terrain, as splatmaps) and apply them on the asset bundle just loaded ?
    Actually I have White terrains, can't see nothing.
    If I attach the script to the loaded bundle, I can see the diffuse textures but nothing more.
    I need to create a lot of terrains at Runtime but can't find any info related to the Scripting use.. I miss something ?

    P.S. How to setup scene and use the shader without using the provided scripts ? Is there a way ?
     
  38. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    Question is quite specific. RTP doesn't have any "hidden" parts. Everything is possible. RTP shaders are just surface shaders. In Unity3 they redefine (overwrite) default terrain shaders. in U4 they are simply shaders like any other. You may look at ReliefTerrain.cs file. All textures and parameters are placed there, then these params are injected into shader via Refresh() function. In U3 I have to feed shaders using SetGlobal... calls, In U4 I provide shaders using Set calls that refer to matrial assigned to terrain (as in U4 we may have material associated with terrain). I'm thinking about what are you trying to achieve and I guess in incoming RTP2.5 setuped terrains can be put into perfabs (i'll check it) w/o loosing any references. To avoid missing references problem I've decided that every texture used can be saved to disk. I believe this can resolve many problems with prefabs.that can be streamed, doesn't they ? More - saved textures can be easily reused on multiple terrains that use the same set of detail/bump/heightmaps. Honestly - focusing on shaders I've never been in need to use streamed assetbundles, I only used RTP that are part of a readymade scene. Anyway it's pretty possible to load terrain runtime, put a material with my shaders on this and provide with all data (floats, vectors, textures) needed. Look at what is called at Awake() in ReliefTerrain,cs. You'll find all clues there (refer to Refresh(), ApplyControlMaps() and InjectBasicParams() functions - what they do is just giving shaders what they need).

    When RTP2.5 I could give you more detailed explanation how to setup terrain runtime.

    ATB, Tom

    P.S. I'm very busy with some urgent simultaneous project now, but RTP2.5 isn't far away (in fact it's almost ready). I'm still tweaking this to shine as never before :).
     
  39. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    142
    Thx a lot for your explanation. I can't wait for 2.5 :D

    If I've understood I can create a material, assign references as you do on your code and then assign that material to the terrain. The LOD script is needed or it is used only to change parameters and, in case needed, rebuild the shader ?
     
  40. Samsson

    Samsson

    Joined:
    Oct 12, 2010
    Posts:
    165
    Any chance to see some screenshots to be more patient ? :D
     
  41. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    Purchased! Love it! Wrote good review ;)

    Looking forward to the update!!
     
  42. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    While you're waiting for release here's a little teaser. I'm going offline for a few days, so I'll submit the package (after testing and making docs) at the beginning of August. However, I'll try to give beta version of package (_w/o_ extensive docs) to a few customers so they will can play around and possibly give me their feedback.

    Some sneak peak (of course I can't mention all improvements, there are too many :):

    Water on the whole terrain (flowing down slopes, reflecting, handling water dropplets)




    Closeup of water capabilities placed on geometry blend object (terrain doesn't have to handle water on its surface when we need "a bit" of water here and there). We'got many new bonus shaders included that can be used w/o terrains (I mean water shaders). It's worth to say that geom blend water shaders can handle flow maps, too, so water flow direction follows not only mesh slopes but also might reflect flowmap directions (you can make your own flowmaps using free Adaszewski's - nick sadaszewski - tool).




    New geom blend manipulation features makes it easy to put any mesh and blend it. Below rock has polys perpedicular to the terrain surface - blending was hard to achieve. As blending is realised via vertex colors - object that are not enough tesellated near the ground also may be problematic, but not now. Arrows shows geometry (bottom polys) that have been added via script, then this bottom part of object has been "flattened" to make nicer blend (one may compare this blending with previous demo scenes).



    New cool feature is that geom blend object can be "sticked" to terrain, then we can add/del tris by painting/erasing them). Geom blend shaders can do trick to heightblend with terrain - we won't see any alpha-blending and object seem to be real part of terrain:



    When we paint on terrain as stated above, we can export mesh to obj, unwarp it in modelling software to resolve stretching and put back to the Unity as geom blend object. Prepared geom blend shaders can "mimic" terrain capabilities like global colormap, perlin nose normal mapping, uv blend, vetical textures, (like below) and so on. Below screenshots shows it - look at transition between 2layers parallax mapped geom blend shader (layers coverage controlled via vertex painter R channel) - we've got geom blend object blended with underlying terrain (sand) object via height blend ! (and works fine in forward and deferred). Resolving cliffs is now easy like 1...2...3 :) - we don't even need to use triplanar mode of RTP shaders (but we can ! and it has PM shading, good - not streteched like before perlin normalmapping and UV blend)




    RTP2_5 is quite performance wise. Of course if you'd like to play with 12 POM layers with snow + water and so on - you have to use GTX480+, but when we've got 8 layers in 1 pass (PM shading), look at performance (classic terrain shader takes 1.3ms to render, RTP takes less than 4ms which is good in 1280x1024 forward on GT240). Multiple terrains and far distances are specially optimized (simpler shader used replacing baseMap distance diffuse shader). Note that when we've got new geom blend features that can "stick" some "virtual terrain layers", we can use 4 layers only and add more variations as separate objects (easily) and get even better performance (note that every geom blend object that "covers" underlying terrain causes this part of terrain is not rendered in pixelshader - so when you use simple geom blend shader you can get great framerates when rendering areas covered by geom blend objects).



    And - RTP2.5 is quite user-friendly. Not only RTPLod manager is now very powerfull (you can disable shaders so they don't take time to compile when you don't need them), but firstpass and add pass shaders are fully and independently configurable to perfectly adjust features you need in your project. New UI makes work with RTP a breeze (sounds bold, I know, but it's true comparing to previous versions) - you won't be lost in all these looooong "unfolds" anymore - we're choosing layers by clicking their thumbs, and other settings are accessible always on the top of UI inspector interface:




    Stay tuned and be patient (cos I'm going for a week on holiday) :)

    ATB, Tom
     

    Attached Files:

    Last edited: Jul 19, 2013
  43. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    A video that shows how water animation behaves (this shader version uses flow map so that water doesn't move in slope direction only, but flows around stones):



    ATB, Tom
     
    Last edited: Jul 20, 2013
  44. norby

    norby

    Joined:
    Jul 10, 2006
    Posts:
    277
    This is so cool

    Norby
     
  45. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    781
    Oh my! This will be soo awesome!! I look forward to use it! Literally can't wait to get my hands on it!!
    The water is incredible good looking!!

    Edit: A question just came to my mind, how to make a flow map for the shader? Don't say it generates one automatically, that would push me right out of my socks ;)
     
    Last edited: Jul 20, 2013
  46. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,861
    No, it doesn't make flowMaps automatically (yet :), but you can use free tool (look user sadaszewski posts on forum).

    ATB, Tom

    P.S. Look to your forum inbox, there should something for you :).
     
  47. Chris12345

    Chris12345

    Joined:
    Jul 14, 2012
    Posts:
    10
    when will the 2.5 update be out? also how well does this work on mobile?
     
  48. mk1978

    mk1978

    Joined:
    Dec 27, 2009
    Posts:
    276
    In RTP 2.0 the textures must be the same tile size but in earlier version it was possible to have different tile sizes. I know that this is performance related issue, but would it be technically possible that textures would still have different tile size? For example I would need to have satellite image as one texture and the tile size would need to be 3000x3000. The rest of the textures would still be the same tile size (10x10).
     
  49. Amfu

    Amfu

    Joined:
    Apr 9, 2013
    Posts:
    180
    Thanks for your reply!

    Sorry for my ignorance, but what is exactly "geometry blend"?

    If I understand well, everything I see in this demo will work (except I'll have only 4 layers): http://www.stobierski.pl/unity/Terrain2_WebPlayer_release_simple_8triplanars/WebPlayer.html

    But what I see in this demo won't work: http://www.stobierski.pl/unity/Terrain2_WebPlayer_release_4layers_triplanar_vtex/WebPlayer.html

    But I'm not suer at all... am I right?


    EDIT: well, I think I figured out what is geometry blend. This is what is shown here: http://www.stobierski.pl/unity/RTP_2_tour/RTP_2_geometry_blend_A.jpg

    So I was completely wrong, actually everything I see in both triplanar demos will work (except I will have only 4 layers) even if I use vertex color instead of splat control textures. Right?
     
    Last edited: Jul 24, 2013
  50. ChadH

    ChadH

    Joined:
    Aug 28, 2012
    Posts:
    101
    Only 3 words (or letters I guess)

    OMG !!!

    8)