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. Dismiss Notice

SplatTerrain: Color Splat Map Based Shaders

Discussion in 'Assets and Asset Store' started by chronos78, Apr 30, 2014.

  1. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,291
    Also i understand what you are talking about i am, as a customer, feel unsatisfied with this statement.
    Even if it is true that you investet much more then you get until now it is what most of us getting in the beginning.
    I think you are right to say that you never will get the money out of this that you invested in it and for this product maybe never will get it. But i do not know someone who do not get this feeling like you, and it does not matter if he sell software or want to sell ice. Most of them do not get their invested money back after the first season.
    What you get back is the good feeling from satisfied customers and then hopefully more customers in the next season or for the next product.
    The way you wrote i, as a customer, get the feeling that you do not mean what you say and maybe never will buy another product from you even if it the best what can be happen.
    All the other asset developer do have the same problem like you and there are bad ones and good ones and from them i will and do buy more and more assets because they do not complain others but do the best they can do to satisfiy their customers.
    This does not mean that i do not understand that at the moment you have to search for a way or even have to get help from unity so this can take a while.

    I do respect you and your first product and hope that you do respect us as customers too so i can buy more good products from you later.
     
  2. chronos78

    chronos78

    Joined:
    Dec 6, 2009
    Posts:
    154
    Thanks RandAlThor for your concern. I did not mean for my rant to come off as me complaining but more as me voicing my thoughts that with the continued radical changes Unity has been making to their product that I as a single weekend developer with a full time job find very hard to keep up with. Yes I understand that I'm not alone in this and that other developers have the same problems and not all of them post their thoughts for customers to see. My intention was to bring light what I perceive as a growing disconnect between Unity and small developers such as myself and if this trend continues for too long that I may have to bow out of the Asset Store altogether. I also felt that it was my responsibility to inform you my customers of my current situation and to let you know why development on SplatTerrain has been slowing down and that if faced with another 100 plus hour rewrite of SplatTerrain that the product would be retired.

    However as of now I am still working on SplatTerrain and continue to respond to every single email, post, and comment that I receive and will do so for the foreseeable future.
     
  3. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,291
    @chronos78
    I now better understand what you mean and wish you and us all the best.
    I like your asset and hope that you will make a 5.1 compatible version for us and that it do not take so much time for you.
    Thanks for the support.
     
  4. backwheelbates

    backwheelbates

    Joined:
    Jan 14, 2014
    Posts:
    225
    Hi Chronos78,

    Your shader set looks awesome! I was just going over the previous posts from earlier in the year there was some discussion about features and rewrites for Unity 5. Im targeting mobile devices (iphone 4s and up) and I wanted to check in and see if this has happened and if your SplatTerrain asset is safe to pickup and use with the latest Unity 5.

    Thanks for all your hard work!

    Eric
     
  5. chronos78

    chronos78

    Joined:
    Dec 6, 2009
    Posts:
    154
    @Eric, yes the current version of SplatTerrain called SplatTerrain2 has been completely rewritten to support Unity 5 and has been available for several months now. There is a new version which is in the works that will make a few changes such as making use of the Unity 5's shader_features options to reduce the number of variants needed and plans to add shadows & fog to the mobile variants. Others have asked me about this and I've told them that if they need shadows and/or fog then just use the diffuse variant as you won't be getting much more performance from the mobile shaders once these features are added but as it is often requested I will add the ability to enable shadows and/or fog on the mobile shaders.

    At this time I don't know when I'll be able to release the next version due to current obligations but the next version won't really be adding anything new to the current version. The next update will be mostly a restructuring of the current shaders to improve flexibility, workflow and ease of use. So if you want to play with it there will be no benefit from waiting until the next version is released. Plus when the next version does finally get released you can always just download it.

    Thanks for your interest in SplatTerrain.

    Lee
     
  6. backwheelbates

    backwheelbates

    Joined:
    Jan 14, 2014
    Posts:
    225
    Thanks for the info Lee. Ill make my purchase right away!

    Just curious, is your new version available as an alpha (or at least the mobile shaders)? or are you still in development?
     
  7. chronos78

    chronos78

    Joined:
    Dec 6, 2009
    Posts:
    154
    It is still in development but I do have a stable pre release version that has some vertex color and fog support. When you make the purchase email with the invoice # and I will send you a copy of it to try out.
     
  8. backwheelbates

    backwheelbates

    Joined:
    Jan 14, 2014
    Posts:
    225
    Thanks, I just sent you a private message with my order number.

    Eric
     
  9. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,291
    When i load your demo scene i have one big terrain out of some parts.
    Is there a way i can copy your terrain, move it to the side and use other textures on the new terrain but the old terrain stay the same? Now, when i change something from one terrain, the other terrain change also.
    I would like to use you asset multiple times in one scene. How can i do that so that each will not effect the other?
     
  10. chronos78

    chronos78

    Joined:
    Dec 6, 2009
    Posts:
    154
    If you want to keep the demo terrain unaffected by changes to additional terrains than you will have to assign different materials to the new terrains. Since any change to the material settings effects every object that has that material applied to it.
     
  11. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,291
    Oh yes, i am sorry. This is normaly a beginner failure;)
     
  12. chronos78

    chronos78

    Joined:
    Dec 6, 2009
    Posts:
    154
    No problems happens to the best of us. Especially at 2am. :)
     
  13. backwheelbates

    backwheelbates

    Joined:
    Jan 14, 2014
    Posts:
    225
    Hi,

    Just a quick question about the RGBA format. Ive been painting splat maps in another application (maya) and Id like to use 4 textures in my final splat map. The 4th color references the alpha, which is a bit cumbersome to paint in a separate 3d application. The alpha is another channel, so its not so easy to view it together with the other rgb channels, or its transparent which as also difficult to visualize.

    At any rate, what Id like to ask is why not setup a 4 texture shader WITHOUT an alpha. Internally the shader could set the base layer texture to be fully on, and THEN the 3 other textures would be layered on top when setting the r/g/b texture values. In other words, the first texture would be represented by black, and the following 3 would be appended on top using the standard color * r/g/b lerping.

    Does this make sense, do you think this would be more efficient? Maybe this is already being done in other shaders already.

    Thanks!
     
  14. chronos78

    chronos78

    Joined:
    Dec 6, 2009
    Posts:
    154
    Hey Eric,

    The method you describe is exactly how the shader works now except black means only the base color map, and r/g/b/a lerp in the detail textures. This unfortunately also causes a bug in the detail normal map variant because of how the normal maps are combined, where the splat map is left black the blended normal map will not be calculated correctly. So if 1/4th of the detailing was reliant on the splat map being black, than those areas of the map would also have incorrect lighting. At some point I plan on trying to find another way to blend normal maps to get rid of this bug but I've not had the time to look into as of yet.

    It may be possible to interpolate the 4th detail texture by summing the r/g/b and subtracting the sum from one to get the value for the fourth texture. In effect doing the same as you are suggesting. The problem with doing so would break my workflow as my splatmaps are generated from World Machine and include alpha. It would also mean breaking everyone else's projects who've purchased and have been using SplatTerrain over the past year and half. Though your idea is a good one and it may be possible to add it as an option in a future version as opposed to changing the way things are currently calculated. I'll have to do some experimenting and see how well it works.

    In the mean time this might help. The way I deal with visuallizing the alpha channel for painting is to paint it in gray scale in a separate layer and then copy it into the alpha channel when it is done instead of working on it as transparency.
     
  15. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Hi,

    Any news?
     
  16. chronos78

    chronos78

    Joined:
    Dec 6, 2009
    Posts:
    154
    Currently I'm been crazy busy with work and other commitments and haven't had time to work on the next update much. I do have a pre release version that does implement vertex colors for the mobile shaders and a couple other experimental features. I've been sending out copies to people who've requested it. If you'd like to give it a try just send me an email at lee@cygengames.com with your invoice # requesting to the pre release and I'll send it to you.

    The reason the next update keeps getting pushed back is that the plan is another complete rewrite of the Unity 5 versions of the shaders to take advantage of the shader_features options now available with Unity 5. I'm hoping to reduce the overall number of shader variants down to only a few. Ideally just two, one for mobile devices and one for desktops but we'll see how this plays out. Since this is a non trivial goal and will take probably a week of dedicated work to do and another to test & debug I have yet to be able to allocate the time needed to accomplish the task. As of right now when I get free time I tinker around with implementing features that you guys recommend to see how they might be incorporated into upcoming releases.
     
  17. backwheelbates

    backwheelbates

    Joined:
    Jan 14, 2014
    Posts:
    225
  18. chronos78

    chronos78

    Joined:
    Dec 6, 2009
    Posts:
    154
    A long time ago when first creating this asset I had played with creating a splatmap painting component to go along with it. I abandoned the idea because Unity did not and I believe still doesn't have the ability to update large textures in real time. For small textures like the ones used in the asset you linked it is fine. But in my tests once you push past 256x256 things start to stutter, by 1024x1024 it is really bad and by the time you are dealing with 2k, 4k or 8k textures it is unusable.

    Some day as Unity improves this might become more feasible and I have a few ideas on how it might be done more efficiently so even larger textures could be painted but with my current time constraints it will be some time if ever before I get around to it. For now I'm just trying to get the time to finish the next update of SplatTerrain. ;) Thanks for the idea though, keep em coming and I'll add what I can.
     
  19. backwheelbates

    backwheelbates

    Joined:
    Jan 14, 2014
    Posts:
    225
    Thanks for your thoughts on this Lee.

    Thats interesting, I was painting 2k maps with t4m in unity 4 and I didn't have any problems. When I get around to testing Splat Painter, Ill let you know how it goes!
     
  20. chronos78

    chronos78

    Joined:
    Dec 6, 2009
    Posts:
    154
    SplatTerrain was developed back in Unity 3, things change. Was there any lag when painting the 2k maps, particularly when trying to paint large section of the map at once? Might be time to give it another go at some point then.
     
  21. backwheelbates

    backwheelbates

    Joined:
    Jan 14, 2014
    Posts:
    225
    I didn't notice any slowdown with t4m splat painting at 2k. Not sure about Splat Painter yet...
     
  22. chronos78

    chronos78

    Joined:
    Dec 6, 2009
    Posts:
    154
    Okay thanks, looks like a project to play with when I get a free afternoon.
     
  23. backwheelbates

    backwheelbates

    Joined:
    Jan 14, 2014
    Posts:
    225
    Yeah, it makes great sense to bundle these two features!

    Good luck:)
     
  24. fisherman_b

    fisherman_b

    Joined:
    Dec 18, 2014
    Posts:
    36
    Hi there,

    just purchased your asset and played with it on an iPad Air, iOS 8.1 and Metal.

    I would love to try the shadow feature in the mobile shader, any news about a schedule for the next version?
    The "Terrain Full" shader results in a black mesh on DX11 (Win) and Metal. The used splat map works in any other shader. Am I dong something wrong here?

    Thanks
     
  25. chronos78

    chronos78

    Joined:
    Dec 6, 2009
    Posts:
    154
    The Terrain Full requires DX11 and Windows but it should be fine there and black in all others. Not sure if that was a typo in your post or if it is some other problem.

    The default demo scene is set to use the 8k textures and you'll want to switch that over to the 2k for anything other than DX11 as well. For mobile you may want to down sample them even more.

    I have mobile shadows working in a prerelease build that I will send you if you email me with your invoice #. The prerelease also has the ability to enable vertex colors instead of splat maps for controlling the blending. But other projects still taking up all my available time so there is still no eta on when the next update will be out.
     
  26. fisherman_b

    fisherman_b

    Joined:
    Dec 18, 2014
    Posts:
    36
    Ok, thanks. eMail with invoice # sent.
     
  27. Jiraiyah

    Jiraiyah

    Joined:
    Mar 4, 2013
    Posts:
    175
    Hi lee
    before i start rambling, let me tell you this : I am watching your terrain tutorials for the 4th time now :p
    now, that being said, I have few things for you ;
    1- I think Unity now is cabable of handling large texture manipulations but not with the old way of texture set pixels, take a look at compute shaders, they are capable of handling stuff on GPU with 4096 multi threading there. even when you just create a compute shader from the menu, the default template is generated for a writable texture !!!!
    2- As someone who is in love with your terrain system (for those who don't know what i am talking about, it's not my place to tell you about it, ask chronos would tell if he want to), I am doing massive R&D on how to change your solution for that system and use it in production pipeline, part of what we would need is ability to make splat maps if you are interested on what I have in mind, please mail me at khodakarami@gmx.com I would certainly need theoretical help from you.

    now these being said, I would buy the asset but right now, i have 0 online money, but if you ask me, i would do something for next upgrade, how about adding model 4 shaders to the pack, people who would want to use shaders for mobile would choose them from a mobile sub folder but others who aim the platforms that support DX11 then could choose this new sub set, also, I am interested in knowing what happened to your idea that would let people use more than 8 textures.

    oh god, I have many questions regarding your terrain system, but if you give me permission, i will contact you by email then.
    thanks for your time and efforts lee, you were the first one teaching me how to code and use unity and the best teacher I ever had.
     
  28. chronos78

    chronos78

    Joined:
    Dec 6, 2009
    Posts:
    154
    @Jiraiyah Hello and thanks for the praise.

    For those of you who don't know the terrain project & teaching he is referring to is my previous life of producing Unity training videos at 3DBuzz.

    As many of you who have been following and / or using SplatTerrain have realized by now is that production has been put on hold for the time being. I'm still dealing with all the support issues that cross my desk but I've not had time to work on any of the new features that I want to add. The reason for this is that I've been contracted to produce another terrain system which is taking up all of my free time. Without going into too many details, this new system blows the one that I designed for 3DBuzz out of the water and is capable of producing infinite worlds in realtime even on a mobile device. A major component of it is the way the world is created. Think World Machine / Vue but done inside Unity and with the ability to create the terrain & place foiliage at run time or bake out seamless terrain patches. At some point once this project is completed I'm hoping to marry the tech with SplatTerrain, but that is a ways off yet.

    Your idea of using compute shaders for painting the splatmaps is interesting and worth investigating one of these days time permitting.

    As far as SpatTerrain and DX11 goes, there are variants already included for mobile, desktop, and even one for Shader Model 4 called SM4_Full. The current hard limit for the texture count is the available number of samplers that a shader can have in a single pass. To get more SplatTerrain will need to have multipass capability. I have had test shaders with this feature working but I wasn't happy with the structure of the Shader code as it was too fragile and will need more development time to make it solid.

    Just for clarification SplatTerrain isn't dead just in hibernation for the moment. It won't ever really die because terrain creation is probably my favorite thing to program. And to make good looking terrains you need a really good terrain shader.
     
    Last edited: Dec 16, 2015
  29. Jiraiyah

    Jiraiyah

    Joined:
    Mar 4, 2013
    Posts:
    175
    wow, now i can't wait to see what you come up with lee, honestly it's not hard for me to think you will surpass what you had done in 3D Buzz, that system was developed for old unity versions with very big handy caps you had back then both from unity and for demands of the project. But I really want to get my hand on any beta testing available for your new terrain system if that would be possible, and if i can do any help at any time, i would be glad to take off some of that monsterous pressure off your shoulder sir. no one would be as loyal to you as your old students any ways :p
     
  30. Jiraiyah

    Jiraiyah

    Joined:
    Mar 4, 2013
    Posts:
    175
    by the way lee, i sent you an email, please if it is possible,help me there. thanks
     
  31. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,777
    Hi all,

    Just wanted to say that I just added support to SplatTerrain into Gaia - coming in the release due in the next few weeks.

    Gaia plus splat terrain.jpg

    I generated and textured this terrain in Gaia - then exported it as an OBJ file (available now) - then exported the Splatmaps (next release).

    I then copied these into a new project, and set it up using SplatTerrain's sample textures. It's still missing a normal and colour map - so that's just with what you get in the sample textures.

    The FPS was 3000+ per second, but i dropped it by adding Time of Day, Depth of Field and Anti Aliasing! It then averaged out at around 2000fps.

    I will be adding a spawn to mesh feature to the next release of Gaia as well. You can find out more about Gaia in the Gaia Forums. I see Gaia and SplatTerrain as being synergistic products :)

    Still learning my way around SpatTerrain - but liking what i see so far!!

    Cheers,
    Adam.
     
    Last edited: Jan 3, 2016
    TheSeawolf likes this.
  32. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Cheers for the heads up Adam. Picked this up to be able to do a little end-user testing at some point.

    Looks like fun
     
    AdamGoodrich likes this.
  33. TheSeawolf

    TheSeawolf

    Joined:
    Apr 10, 2015
    Posts:
    267
    Well, thanks to Adam adding support to Gaia, it looks like I have found my next asset store purchase.

    Well done on your asset chronos78.
     
    AdamGoodrich and twobob like this.
  34. taku

    taku

    Joined:
    Jun 5, 2012
    Posts:
    24
    Chronos78, would it be possible in the future to make your shader compatible with Shader Forge?
     
  35. chronos78

    chronos78

    Joined:
    Dec 6, 2009
    Posts:
    154
    @Adam - It's good to see you were able to get SplatTerrain integrated with Gaia.

    @TheSeawolf - Thanks glad you like it.

    @taku - Not sure if this would be possible. I'm not very familar with how shader forge works as I tend to always write my own shaders from scratch. But I thought you could only build shaders from the included nodes that make up Shader Forge. If this is indeed the case then no it would not be possible to integrate SplatTerrain into Shader Forge. There however should be nothing from preventing you from using SplatTerrain on your terrains and Shader Forge shaders on other assets if this is what you mean.
     
    AdamGoodrich likes this.
  36. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,511
    Is this asset still being supported? I have run into problems similar to the comment on the store thread:

    This comment was 3 months ago. I'd love to get an update to this, or some help as to why it's not working as expected.
     
  37. chronos78

    chronos78

    Joined:
    Dec 6, 2009
    Posts:
    154
    The short answer is sort of.

    The long answer is that while I still respond to every question received and post updates when something in Unity changes that breaks SplatTerrain, I no longer have the time to actively pursue further development of the asset. So if SplatTerrain breaks when Unity 2017 finally releases, there won't be a new version to fix it.

    As to the problem you are experiencing here is the relevant section from the support email that I sent to the original poster of the comment you refer to. I do not know whether or not it fixed his issue as I never received a response. But based on all of the support questions I've answered over the years this is most likely the solution to the issue.

     
  38. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,511
    Thanks for your reply. Wasn't expecting it, so it was pleasantly surprising.
    I personally don't mind the maintenance capacity for this latest release and any possible future releases, since I bought it based on its existing feature set.

    I also appreciate the snippet from the email, since, after reading it, it definitely seems like what I'm encountering.
    I was actually hoping that the RGBA values would be normalized in the shader. Well, I will eventually look at it again, but I just wanted to rule out any bugs before looking at usage issues. As a terrain expert, do you see normalizing the RGBA values a bad idea? Or do you recommend any tools that can guarantee that the splat map results in normalized values? I was looking at Splat Painter and was hoping to use something like that. Unfortunately, Splat Painter works by using Mesh Colliders for mouse detection. and my terrain is actually broken up into quad tiles with special UV coords, so I have no idea if it'll work. Well, sorry for talking about someone else's asset...

    Again, thanks for the quick response.