Search Unity

  1. Check out our Unite Austin 2017 YouTube playlist to catch up on what you missed. More videos coming soon.
    Dismiss Notice
  2. Unity 2017.2 is now released.
    Dismiss Notice
  3. The Unity Gear Store is here to help you look great at your next meetup, user group or conference. With all new Unity apparel, stickers and more!
    Dismiss Notice
  4. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  6. Unity 2017.3 beta is now available for download.
    Dismiss Notice

Relief Terrain Pack (RTP) v3 on AssetStore

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

  1. rahul007

    rahul007

    Joined:
    Jul 9, 2013
    Posts:
    45
    Just bought rtp 2.1b an hour ago:D:cool:. Waiting eagerly for the v3 update:p!!
     
  2. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,502
    Eagerly waiting :)
     
  3. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Ive had a look at this, its an absolute beast, I cannot figure how they managed so many features jammed into one product and so well produced. Part of why I cant show anything to them with my fooling is i simply dont have time atm to take all the options into account! But rest assured I just cannot imagine there being more options and considered combinations possible within the constraints of shader writing, well, WELL worth the investment, just be ready for a good think about what you want where, being free of having to make choices that might have you thinking too hard as the option isnt there is gone. The options are there, I cant think of a single option they could fairly have supplied given limitations of Unity/shader writing and wotnot that isn't genuinely attempted to be catered for.

    If I have one suggestion it's that while the LodManager is really great and offers you everything you need in a very straightforward way, some kind of wizard with before and afters would be absolute great for getting folks confused by a lot of numbers things to click on (me) on their way to getting exactly the shader solution they wish. Of course everyones a bit busy for that right now but maybe even i''ll have a go at it sometime of noone else does just to learn the editor api

    Anyways, if you want the best you can get out of a terrain shader, this is it, grab it
     
  4. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,182
    Here's a video of using RTPv3 with TerrainComposer...This is something quick I made inbetween projects, as we are working on more official demo's, but this is just a quick preview of what can be possible scratching the surface of RTPv3 and TerrainComposer.

     
  5. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,424
    Hi everyone,

    I think RTP isn't the only product treated this way and can't tell the reason (Heloween time loads of work for them maybe) as Nathaniel also experienced this with TerrainComposer submission (month of waiting, 2 times resubmitted...).

    Of course it's bad to judge easily anybody, but the fact is counting on AssetStore leads to letdown. Since it's still not available on the stock and there is even a chance that they will reject it due to some tiny technical constraints (that are not mentioned clearly anywhere - usage of Terrain main menu that is discontinued since U4) I'm offering RTP3 release access for customers that will drop me their pdf invoice:

    tomaszek at stobierski dot pl

    And what can I say - thank you for all support. Nathaniel made the video big American theme (I mean the music) :). One may know that he dare to tweak RTP shader a bit using triplanar version and UVblend option with additional line (2 lines) of code to mix large scale texture at far distance - this way he get rid of all tiling on rocks texture while it's still very detailed at close distance. I think it might be an option for next RTP3 (but I'm scared how long it would take to resubmit anything with tweaked features or even tiny details). Or I'll make an info or tutorial how to achieve this by hand in shader code.

    In regards to LODmanager. I thought it's already a wizard so people don't need to touch shaders :), but maybe something even simplier that would ask user needed info step by step and put all LODmanager checkboxes then. This might be an idea.

    ATB, Tom
     
    Last edited: Nov 4, 2013
  6. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,424
    Hi everybody,

    I'm receiving RTP3 access request every 15 minutes in average now - this is quite uplifting as I see the product is interesting for users and is followed here. The problem is I won't be online during the weekend. I'll however try to get thru emails this evening and maybe tomorrow evening, so please give me a moment to react on your request.

    ATB, Tom
     
  7. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,956
    This is looking pretty great! I've always been impressed by your shaders. When do you plan on releasing the demo environment shown in the op?
     
  8. rahul007

    rahul007

    Joined:
    Jul 9, 2013
    Posts:
    45
    Where to find pdf invoice:neutral:?
     
  9. alexzzzz

    alexzzzz

    Joined:
    Nov 20, 2010
    Posts:
    1,275
    You got the one by e-mail after had purchased the asset. The letter's subject is "Unity Asset Store purchase confirmation. Order number: XXXXXXXXXXX"
     
  10. rahul007

    rahul007

    Joined:
    Jul 9, 2013
    Posts:
    45
    Thanks alexzzz
     
  11. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,424
    It depends on time we can invest in near future. Unfortunately we can't work only on this (Peter, Nathaniel, me), we have to work on many things quite far from Unity under deadlines... But I'd say that it's mostly ready, only a few touches required now to make it ready for prime time. However, we don't like to push it, even if it's already spectacular enough because we'd like to get maximum impact on both community and maybe Unity people too (making this Unity's official showcase would be a dream!) - to bring what their lovely tool (WITHOUT DX11 specific features) can do in hands of a few freaks :).

    Tom

    P.S. Below screenshot might be interesting I guess for people considering buying RTP3 (zoom it in for better resolution). It's taken from RTP3 AssetStore submission package screenshots - water presented is placed using bonus shader that implements the same water functionality as on terrain, but here we can use flowmap and it doesn't need to be used on terrain - you can use it separately anywhere you need - example scene presenting this is part of package too:

    [​IMG]

    Used 2 layers (big rocks and pavement) PM rendering - coverage using vetex R color, water coverage using B vertex color.
     
    Last edited: Nov 2, 2013
  12. botumys

    botumys

    Joined:
    Apr 16, 2009
    Posts:
    693
    A fast test with PM + water (this is 2.1 I know :) )
    A lot of possibilities!
    ps: best in full screen and 720p


     
  13. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    686
    Thanks Norby! glad you noticed that, myst was one of my inspirations for the environment, i try to capture that mood that made myst so special!
    And yes the shader(actually its far more than just a collection of shaders) the most awesome thing for terrains, nothing else can even get close to it! I really hope that Tom is going to have great success with it because i want to see him making a RTPv4 and RTPv5 and so on in the future. For now i am really happy that unity finally overcame one of its biggest weaknesses... the terrain. I think RTP will prove that Unity is capable of all that fancy massive AAA stuff and i hope Unity will no longer be seen as a neat little engine for making mobile games. And speaking of bigger games, maybe some of you have a vote at unity feedback left, you might want to spend it on the 64bit editor voting:

    http://feedback.unity3d.com/suggestions/platforms-64bit-unity-editor

    Stunning! Seeing what you already made in the past with unity i can only imagine what you will come up with in the future, you are going to love RTPv3 :)
     
  14. eskovas

    eskovas

    Joined:
    Dec 2, 2009
    Posts:
    1,209
    RTP3 is looking amazing.
    I've been thinking about buying RTP2 for a long time but i think i'll have to get RTP3 now :) This completely brings the Unity terrain to a new level.
     
  15. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,060
    Gave 64bit support 10 votes, unreal how they haven't made this first priority.
     
  16. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,751
    They said it was a top priority, years ago, since then. .. nothing. not even a small hint at progress, so i stoped believing and am treating unity like a prototyping toy since even top priority features don't make it it has no roadmap :(
     
  17. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    686
    Thanks :) hope the guys at unity will take the over 2500 votes to the heart... its really about time to go 64bit! With the outstanding quality that can be achived now (thanks to some really inventive asset producers ;)) its tempting to do things on a bigger scale, working with 32bit is a major obstacle for this.
     
  18. MadToLove

    MadToLove

    Joined:
    Jul 22, 2012
    Posts:
    70
    I am so excited! I'm happy I invested in RTP2. I'm quite picky when it comes to buying assets and I have no regrets and the fact that this is a free update to that package is amazing. You sir are awesome. Id love to see a tutorial on just exactly how yall are getting that running water effect. Is this something coming in the new package?
     
  19. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,424
    Sure - running water - it's part of RTP3. And shaders I put in the package as bonus that don't need to be related to the terrain - you could use them in any scene, too (to make running water, puddles - there however running water would not looks much nice, but animated droplets would).

    I guess I could make a video presenting water capabilities. With some smart usage of parameters I was also surprised how it could be versatile. For example once I put water flowing speed to zero and used reflecting water with a bit cyan tint and I suddenly realized - "hey - this looks pretty like very realistic ice !"

    Tom
     
  20. SeanM3D

    SeanM3D

    Joined:
    Jul 24, 2013
    Posts:
    192
    Hi Tom,

    do you know why I am getting these super ugly, blocky transitions between the textures you see in the screenshot? All textures are part of your package. I set them all (diffuse, height and normal maps) to 1024px and uncompressed in the import settings (just for testing, shouldn't actually be necessary).

    $terrain.jpg

    "Detail Blend Sharpness" is at 6. But playing with this values doesn't get rid of the blockiness.
    "MIP level bias" is set to -0.75.

    In the rollout "Near Distance values I set the following values:
    - "Distance start" is at 0.
    - "Fade Length" at 50


    I am using RTP 2.1.

    Would be great if you find the time to help out quickly as I am approaching a project deadline. Thanks a lot!

    Sean
     
    Last edited: Nov 4, 2013
  21. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,424
    Hi Sean,

    Will be better for you to get RTP3 access (sending me pdf invoice by email). This blocky artifacts are result of hieghtmaps combined compression. They don't need to be of high resolution. 256x256 is enough in most cases but resultant combined texture have to be uncompressed. In RTP2.1 it's compressed during creation (combining). In RTP3 this issue is already addressed - so output is uncompressed and it's up to you to decide if you'd like to use them untouched (uncompressed) or compress them after saving on disk as png.

    Tom
     
  22. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,424
    Eh,

    The time has come ! RTP3 is on AssetStore - please get it there as I'm removing package from link provided to verified users.

    Tom

    P.S. EDIT: note that $50 RTP2 price has gone, but $65 is also introductory so ... just get it :).
     
    Last edited: Nov 4, 2013
  23. SeanM3D

    SeanM3D

    Joined:
    Jul 24, 2013
    Posts:
    192
    Ok, thanks Tom. Do I have to delete the "ReliefPack" folder before upgrading?
     
  24. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,424
    Yes, best to do so before you proceed with RTP3.

    Tom
     
  25. blockcipher

    blockcipher

    Joined:
    Jul 4, 2013
    Posts:
    19
    Congats on the v3 release Tom. It took them long enough, and now the asset store is repeatedly failing my download since it became active. Figures! Glad I have the prerelease to tide me over until it works again.
     
  26. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,424
    Have you contaced AssetStore about downloading issues ? It can be problem for users, so it's also problem for me because I'd like to provide reliable services...

    Tom
     
  27. EvilFox

    EvilFox

    Joined:
    Jul 23, 2013
    Posts:
    67
    I downloaded RTP3, but the import displays RTP2.
    Then I moved from folder "%APPDATA%\Unity\Asset Store" (it seems in "\Tomasz Stobierski\Editor ExtensionsTerrain\" I do not remember exactly - moved without looking using Everything) file "RTP - Relief Terrain Pack.unitypackage" - he had obstructed import of "Relief Terrain Pack v3.unitypackage". After that import RTP3 earned.
     
  28. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    Hi Tom

    RTP 3 looks amazing so far ... sorry I was not able to test the beta version you were Kind enough to provide to me.
    Being a 2D / 3D Artist, programmer and game designer l was sadly occupied with other stuff.

    I'm happy to migrate to RTP 3 as soon as I find time, I have some questions about.the upgrade Path from 2 to 3 though:

    1) Is the new version upgrade included in my existing RTP 2 license? If not , what is the upgrade cost?
    2) Can I just download the new version from the asset store and import it to my existing Project? Do I need to get rid of RTP2 first?


    Thanks for the help and congratulation on your big release

    Gian-Reto
     
  29. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,424
    Gian-Reto,

    RTP3 is free upgrade. I answer it again and again :). Somebody could ask - why I'm doing so ? Because I still believe that RTP3 isn't popular enough and market is not saturated with good terrain solutions - I just count on new users and I'm saying "thank you" to current users.

    And for current users - instead of paying additional fees for upgrade, it could help more future development when presenting work - I think of new showcase thread where RTP users can share their experience, but the thread would be purely "showcase", not technical.

    Seeing is believeing. I could write more and more features w/o any attention from potential customers, just because they wouldn't realise the solution is there. Even RTP v1 was cool enough to intereset people, but w/o "nice pictures" and professional presentation like Peter helped me with my product would be always "in shadow". With great users (as I believe ALL RTP users are great :) ) "RTP community" could grow and attract new users. This is what I think is even stronger contribution for me than charging money for updates.

    The other problem is technical and I hope at some point Unity will introduce upgrade system to the store. Now, let's say with a hundred users managing this manualy via email would be awkward. I'd need to write my own verification/upgrade system myself on my server then...

    Upgrading to RTP3 - it's whole new world comparing to RTP2 as almost whole stuff I organised from scratch. To get RTP3 into work remove RTP2 first as you could get interfering files.

    ATB, Tom
     
    Last edited: Nov 5, 2013
  30. katoun

    katoun

    Joined:
    Dec 26, 2012
    Posts:
    62
    Hello tomaszek,
    Just bought RTP and I have 2 questions:
    How easy will it work with TerrainComposer?
    If you know will it work with UniStorm day/night cycle plugin?
    Thank you.
     
  31. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,424
    RTP3 is extensively tested with TC. Nathaniel put much effort to make your life easier, so after making terrain in TC, applying 4/8 layers you just click RTP button there and it just setups RTP (if present) basically. Then you can adjust RTP params manually while "the base is ready".

    UniStorm - hard to tell. I aven't played with this. Beware of any terrain replacement shaders in 3rd party (UniStorm) packages that might interfere with RTP.

    Tom
     
    Last edited: Nov 5, 2013
  32. katoun

    katoun

    Joined:
    Dec 26, 2012
    Posts:
    62
    Hello,
    Thank you for the reply.
    As I've seen, so far UniStorm dose not replaces the terrain shaders, it just creates a Sun/Moon/Sky system. I am not sure thought how on the next version snow is going to be implemented.
     
  33. eagle555

    eagle555

    Joined:
    Aug 28, 2011
    Posts:
    2,182
    Hello Katoun,

    I have a new update of TC comming that even has more functionality with RTP. As you can load/save complete RTP presets to prefabs with it. It will put RTP Lod manager in the Scene and assign automatically the RTP scripts to every terrain and then load all saved settings into it, optional all textures/colormaps/normalmaps/vertical texture, the whole deal ;). you can even open the presets in other projects with TC if RTP is in there, etc.
    In this video I show this new feature:


    And there's much more in the new TC update in conjuction with RTP..I will show this in a video soon...

    Nathaniel
     
    Last edited: Nov 5, 2013
  34. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    Hi Tom

    Thanks for the answer ... great news about the free upgrade, and sorry about asking an already answered question.

    I think creating an RTP showcase gallery would be a great idea! You can count on my contribution as soon as my current project is ready for the spotlights.

    Bummer about needing to remove RTP 2 first, but of course that is not really a problem.

    Thanks

    Gian-Reto
     
  35. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    686
    I really look forward to the showcase thread, i'm very curious to see which ways other environment artist go... It would also be a good basis to learn from each other.
     
  36. MadToLove

    MadToLove

    Joined:
    Jul 22, 2012
    Posts:
    70
    Just upgraded to RTP3 from RTP2. Suddenly having some compiler errors. Wondering what might cause this. Assets/ReliefPack/Editor/ReliefTerrain/ReliefTerrain2GeometryEditor.cs(50,68): error CS1061: Type `RTP_LODmanager' does not contain a definition for `RTP_UV_BLEND' and no extension method `RTP_UV_BLEND' of type `RTP_LODmanager' could be found (are you missing a using directive or an assembly reference?)


    There are 15 of those ending differently but all starting with this

    Assets/ReliefPack/Editor/ReliefTerrain/ReliefTerrain2GeometryEditor.cs(57,68): error CS1061: Type `RTP_LODmanager' does not contain a definition for

    Any ideas?
     
  37. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    686
    afaik, RTPv3 is basically redone from scratch. you should remove RTP2 first before importing it.

     
  38. MadToLove

    MadToLove

    Joined:
    Jul 22, 2012
    Posts:
    70
    Thanks very much i actually went back in the thread and just saw that. Silly me now i feel foolish! Deleting RTP2 files and downloading and installing RTP3 now! Hope it works :p Having so much fun with this! I've had RTP for awhile now but just started messing with it this week, great timing right!? I had gotten the big environment pack 1 off the asset store and was eager to start making some pretty things!

    Last night didnt fall asleep till 4 AM cause i couldn't stop messing around, nothing was made near the quality of whats been posted here but only had one real night of messing with terrain creation, next up just gotta work on figuring out how to make proper splat maps as mine last night was all kinds of funky :p

    https://www.facebook.com/photo.php?v=10202300324168557&saved
     
  39. gotstyle

    gotstyle

    Joined:
    May 6, 2009
    Posts:
    84
    Congrats on the RTP3 release! The Island Demo looks amazing.

    How is this achieved? Is this all sculpted in Mudbox or do you use World Machine / Terrain Composer?
     
  40. MadToLove

    MadToLove

    Joined:
    Jul 22, 2012
    Posts:
    70
    Not sure why but im fiddling with it, its great but unlike RTP2 for some reason when i go to my textures I am using I cannot change the layer extrude reduction, its greyed out, why is that?

    *EDIT* I found in the LODManager the checkbox for this feature, clicked it and recompiled and now i have the option for layer extrude reduction.
     
    Last edited: Nov 6, 2013
  41. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    686
    Hey gotstyle :)

    I'll give you a little overview and if you have further questions feel free to ask!
    Plan ahead and make a rough layout in a sculpting program or just use unitys terrain brushes, check how many terraintiles you need for the overall shape. I tried to use as much of the 2 terrains without revealing the square shape that terrains always have. I used 2 terrains with a heightmap resolution of 512 each. The size of the terrains is 300x300 meters joined to 1... that makes the island 300x600 meters big and have good resolution of less than ameter per pixel... This way you can give the terrain itself a interesting shape.

    I used Zbrush for the rough shape and exported a heightmap from it, then i exported it to worldmachine used its erosion features. Exported to unity and did some testing(walking around and look at the result from first person perspective). I used Easy Roads to make the paths on the terrain but didn't use the mehses that Easy Roads generates. i Just used it to flatten the terrain where i wanted to have the paths. I then used unitys terrain brushes to refine the shape here and there, manually smothing some places that were to jaggy.

    then exported the heightmap again to worldmachine and made distribution maps:
    flowmap/depositionmap for dirt, steepness for cliffs, heightrange for the sand on the beach....
    i used noise to get some variations in(i.e. on the steepnes to mix 3 types of cliff textures). I exported it also to my 3d program to make ambient occlusion maps, cavity maps, convexity maps, etc. with all these grayscale maps i went to photoshop to mix them(to add some dirt in the crevices using the AOmap and cavity maps). If you are clever about mixing all these maps(substracting one from another) you can have very detailed distributionmaps for each layer. Then i used the fabulous Terrain Composer to compose splatmaps out of it:

    (splatmap layer 4-7 of the first terrain)
    $splatmapExample.jpg

    Of course i used Terrain Composer also to place the vegetation.

    After some final manual tweaks here and there i exported the Terrains .obj and baked the sky with removed sun (IBL) into the colormap. Thats about it basically, of course this can be just an overview, but if you (or anybody else) have any specific questions, i am happy to help.
    Lastly i want to say that this does not mean to be the best way, RTP is so incredible flexible that you can make things entirely different and may get even better results. I also want to encourage anyone to explore on his own to find cool ways to achieve some things and share it here or in the upcoming showcase thread that Tom said he will make.

    Also i highly recommend to get Terrain Composer as it makes your life so much easier. Many of the things i described here could be done entirely in Terrain Composer so you dont really need to use a sculpting program or even a 3d app.

    Hey MadToLove,
    some of the Tips above might be usefull for you aswell, one other thing that could improve the look of your terrain a lot would be: Match the colors of your grass with the underlying grass texture. The grassplanes should also have a gradient in brightness from top to bottom(for faking ambient occlusion). it should be quite a bit darker on the bottom side, and this color there should match the color of your grasstexture on the terrain. this way you can also reduce the view distance of your grass and get a better frame rate.


    All the best and good luck with making the most stunning terrains!
    Peter

    PS: If you made something cool please show it, i am very curious to see the results!!
     
  42. gotstyle

    gotstyle

    Joined:
    May 6, 2009
    Posts:
    84
    Thank you for that detailed answer! Helps me a lot :)
     
  43. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    428
    Hi,

    Congrats with this asset, really brilliant!
    However I encountered an issue using the Geometry Vs Terrain Blend. Let me explain.
    I have a lot of rocks (from Michael O) so I followed the guide and replaces the shader of the rock provided with the one in the zip file. Applied the component to blend with the terrain and everything works fine, except for some rocks where in editor mode everything seems fine but in game mode those rocks are flickering, locking closely at the flickering shows there seems to be some Z ficghting between the Rock and the child object RTP created. This occurs in approx 25% of my rocks after applying the blending.

    Any idea how this can be fixed?

    Example:
    Attachments seems to be broken, please follow this link: http://www.cygnusprojects.com/upload/RTP3001.jpg
     

    Attached Files:

    Last edited: Nov 6, 2013
  44. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,424
    The problem is extensively described in troubleshooting section of PDF documentation (look for "the longest" one there :) ).

    Tom
     
  45. MadToLove

    MadToLove

    Joined:
    Jul 22, 2012
    Posts:
    70
    Yeah thanks! Once I sort out how to make this all work I might have to make a tutorial, great tools but for someone just coming into terrain creation etc. the only thing Id like to see more of is more tutorials, walkthroughs and documentation on each feature of this tool. What is superdetail how do you implement it. Perlin noise, what is it how do you use it to the best effect? Render settings, distance settings, water, snow. etc etc etc.

    I did have better results on the actual mountains etc. this time. Still need to work on blending the base grass texture with the grass I use. But honestly everything that I accomplished there was pure luck and messing with random settings. I would love love love to see detailed documents on implementing and using every single feature this has to offer. The only PDF doc i seem to be able to find is the one labeled RTP2 and that still does not have much in it. Is there a manual or indepth documentation on this somewhere?

    *EDIT* found the readme file with the link to the PDF instructions/details of the features online! AWESOME! Cant wait to dive in.

    https://www.facebook.com/photo.php?v=10202306972774768&set=vb.1204921332&type=2&theater
     
    Last edited: Nov 7, 2013
  46. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,502
    Hi Tom. I thought I would ask a few questions here, so others might benefit from any clarity you can add.

    First, my project currently uses several mesh terrains, of two different sizes. The closer, detailed terrain is smaller because of the vertex limit. The distant, lower resolution is larger because it has less detail and is distant so it can cover more area.

    Second, my prefabs I create these terrains from have no meshes initially, it is created at run time. I have two prefabs: One used to create near, high detail terrain (with a more powerful shader) and a distant, low detail terrain with a less detailed shader.

    So, when I go to the Settings tab, the Tile Size X and Y values will not change from NaN. If I could manually set these to the correct values, would the textures display correctly? I currently just see solid color greens, browns, etc on my meshes.

    Second, you stated that terrains must be the same size. Does this apply to both meshes AND Unity terrains?

    One thing I am going to try is just creating the mesh in blender, that way the RTP script will have something concrete to deal with. I'm still curious if I can have a distant, low detail mesh and a near high detail mesh.

    Thanks,
    JC
     
  47. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,424
    Hi JC,

    When your prefabs initially has no mesh (so it has 0 bounding box which is used to compute tiling in script to feed the shader) - RTP would get nuts about this :). But you can setup your tiling via script. First get ReliefTerrain instance for given object - let's say your close-distance terrain gameobject is named "aTerrain" (C#):

    Code (csharp):
    1.  
    2. ReliefTerrain rtInstance=aTerrain.GetComponent(typeof(ReliefTerrain)) as ReliefTerrain;
    3.  
    then you get ReliefTerrainGlobalSettingsHolder instance which is shared across every terrain tile on the scene:

    Code (csharp):
    1.  
    2. ReliefTerrainGlobalSettingsHolder aSettingsHolder=rtInstance.globalSettingsHolder;
    3.  
    then you can set tiling:

    Code (csharp):
    1.  
    2. aSettingsHolder.ReliefTransform=new Vector4(numTilesX, numTilesZ,0,0);
    3.  
    where numTilesX, numTilesZ are number if detail tiles across your terrain (if RTP used on mesh - remember to set uvcoords the way terrain has - in rect (0,0)x(1,1) ). Depending on your terrain size you'll have set the right numTilesX/Z to get desired detail tile size in world coords.

    At the end call refresh to set changed tiling values in shader:

    Code (csharp):
    1.  
    2. aSettingsHolder.Refresh();
    3.  
    I haven't played with setup that would consist of both RTP shader on mesh and RTP shader on terrain, but this could be possible (I guess even working out-of-the-box but haven't tested this yet).

    The problem is when you'd like to use different detail tiling, or different terrain sizes in one scene as globalSettingsHolder stores shared values between terrains. Somebody asked me already about this issue. This can be overcomed with small tweak in shader code so every terrain tile can actually has independent size and independent detail tiling. Of course constraint that every layer for a terrain will share the same detail tiling with each other layer on this terrain is held and this can not be overcame for the RTP shader (this would require redefining deeply shader construction, would have no POM shading and instead of 1 texture fetch for detail heightmaps we'd have 4 - not performance wise...).


    1. The simpliest case - independent tiling for multiple terrain setting that DOESN'T use materials.

    Look for such line in RTP_Base.cginc and RTP_AddBase.cginc files:

    Code (csharp):
    1.  
    2. void vert (inout appdata_full v, out Input o) {
    3.  
    and put this line before the line shown above:

    Code (csharp):
    1.  
    2. float4 _Splat0_ST;
    3.  
    The above float4 vector (like Vector4 in script) stores tiling for the first layer as it's used in Unity terrain engine, but is unused in RTP.

    Next look for 2 lines like this:

    Code (csharp):
    1.  
    2.  o._uv_Relief.xy=v.texcoord.xy * _TERRAIN_ReliefTransform.xy + _TERRAIN_ReliefTransform.zw;
    3.  
    and replace them with such line:

    Code (csharp):
    1.  
    2.  o._uv_Relief.xy=v.vertex.xz*_Splat0_ST.zw;
    3.  
    Then you can set independent tiling using unity terrain engine for the 1st detail layer - go to Unity terrain inspector/brush tool. Select first layer for editing and change tiling using such values - tile size 1,1, tile offset 1/N where N is desired size (in world coords), so for 3x3 m tiling this would be like (1, 1, 0.3333333, 0.3333333)

    Remember then RTP will reset this every time it refreshes shader values - you have to set it every time you change something on terrain (calling refresh functions).


    2. Independent tiling for multiple terrain setting that DO use materials.

    You can use above solution and manually set baseMap distance in terrain setting to high value. The problem with materials is that then RTP uses optimization - baseMap distance is shortened (check this - it's set to close ditance start +close distance fade) and instead of Unity's default basemap diffuse shader we're using RTP shader that has only far distance calculations (no parallax, normalmapping on detail layers and so on). This boosts performance a lot because only quite a small area is computed with really complex shading. The problem is that Unity won't feed our far distance shader with this _Splat0_ST tiling variable and we have to resolve this manually introducing new variable in shader.

    Look for such line in RTP_Base.cginc and RTP_AddBase.cginc files:

    Code (csharp):
    1.  
    2. void vert (inout appdata_full v, out Input o) {
    3.  
    and put this line above:

    Code (csharp):
    1.  
    2. float2 RTP_CustomTiling;
    3.  
    Next look for 2 lines like this:

    Code (csharp):
    1.  
    2.  o._uv_Relief.xy=v.texcoord.xy * _TERRAIN_ReliefTransform.xy + _TERRAIN_ReliefTransform.zw;
    3.  
    and replace them with such line:

    Code (csharp):
    1.  
    2.  o._uv_Relief.xy=v.vertex.xz*RTP_CustomTiling.xy;
    3.  
    Next we have to feed RTP shader with this new tiling variable. You can make some new script and attach this to terrain object, then you can call somewhere over there such code:

    Code (csharp):
    1.  
    2. Terrain terrainComp = (Terrain)GetComponent(typeof(Terrain));
    3. if (terrainComp  terrainComp.materialTemplate!=null) {
    4.    terrainComp.materialTemplate.SetVector("RTP_CustomTiling", Vector4(1.0f / tileSizeX, 1.0f / tileSizeZ, 0, 0));
    5. }
    6.  
    We just get terrain component and its material. If it's not null we set custom material value with desired tiling.

    3. Independent tiling for multiple RTP mesh objects.

    Here solution is like in point 2, but instead of getting material reference from terrain component we use it like this:

    Code (csharp):
    1.  
    2. renderer.material.SetVector("RTP_CustomTiling", new Vector4(1.0f / tileSizeX, 1.0f / tileSizeZ, 0, 0));
    3.  
    Meshes can be also transformed (terrains can be only translated, not scaled nor rotated). If you transform your mesh, use this in shader:

    Code (csharp):
    1.  
    2.  o._uv_Relief.xy=(mul(_Object2World, v.vertex)).xz*RTP_CustomTiling.xy;
    3.  
    We just transform vertices positions from object to world coords before using them for tiling.



    Yes, I know it all looks a bit like a magic for non programmer, but I assume that you're programmer as you setup your terrains runtime. It should then easy for you to resolve your issue using above approach. For rest, non-programmers, I'll probably introduce optional independent tiling feature in next RTP release, but now it would take another weeks for AssetStore to be reviewed while I'd like to provide you with an instant solution.

    Kindest Regards, Tom
     
    Last edited: Nov 7, 2013
  48. MadToLove

    MadToLove

    Joined:
    Jul 22, 2012
    Posts:
    70
    Best looking terrain I've ever made before. Nothing like what some of yall post but I'm pretty stoked how quickly I have made it from a couple days ago. Cant wait to keep honing these skills using RTP3! $EvironmentTest2.jpg
     
    Don-Gray likes this.
  49. tomaszek

    tomaszek

    Joined:
    Jun 18, 2009
    Posts:
    3,424
    Hi, I saw your video a few posts above and with this screenshot - I'm more and more confident about my solution, what gives me quite a lot of satisfation that my customers can make great things now ! It's not only work but also pleasure to see real results of my efforts and it's strong motivation to work more on RTP in the future.

    ATB, Tom
     
    Last edited: Nov 7, 2013
    Don-Gray likes this.
  50. Becoming

    Becoming

    Joined:
    May 19, 2013
    Posts:
    686
    Lovely and a great start!! My tip on what can easily be improved and would have a big impact on the look: Increase either your ambient light intensity and make it a slight blueish tint (or use the RTP complimentory lights for the same purpose). Reason: Your sky is pretty bright blue. The sky in reality is a pretty strong diffuse light source, of course not as strong as your direct light but strong nontheless... also something you can think of, is to change your lighting from gamma to linear if you have unity pro(player settings)... this will change the look overall and you might think at first look, thats not better... but if you adjust your scene lights accordingly it will look a lot more realistic.

    Thanks for posting your work and keep us updated :)

    All the best,
    Peter