Search Unity

[Released] MegaSplat, a 256 texture splat mapping system..

Discussion in 'Assets and Asset Store' started by jbooth, Nov 16, 2016.

  1. Ali-Nagori

    Ali-Nagori

    Joined:
    Apr 9, 2010
    Posts:
    151
    how the integration with Amplify shader editor works, simple button click brings an empty canvas in amplifyEditor .

    is the integration is only for new shaders or it also edits the existing one.
     
  2. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    There are 2 nodes available for amplify which allow you to make your own shaders using the MegaSplat technique, which allows you to splat map up to 256 textures.
     
  3. Ali-Nagori

    Ali-Nagori

    Joined:
    Apr 9, 2010
    Posts:
    151
    where are these two nodes? i can't find them with search , or how i add them.
     
  4. FuhaoXie

    FuhaoXie

    Joined:
    Nov 18, 2016
    Posts:
    26
    When I try to change parameter I got this error, in newest MegaSplat,
    strange thing is I didnot use the example shader. the example shader get error and my shader is also broken
    MegaSplat/MegaSplat': redefinition of 'VertexOutput::_ShadowCoord' at line 372
    upload_2018-5-19_20-52-40.png upload_2018-5-19_20-53-14.png
     
  5. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    What version of Unity is this? Also, are you sure you have the latest version and are not just installing the old version from your cache? Cause this was fixed a while back..
     
  6. Ali-Nagori

    Ali-Nagori

    Joined:
    Apr 9, 2010
    Posts:
    151
    about the amplify editor 2 nodes , the example shader gives an error when compiled.
    and again in a new convas i can't find Megaspalt sampler or the blend nodes.
    both plugins are uptodate.
     
  7. dnszero

    dnszero

    Joined:
    Dec 18, 2015
    Posts:
    4
    @jbooth I'm thinking of buying this asset but I wanted to know if it'll work for my use case:

    1. Unity 2017.4 building for IOS
    2. My goal for now: To paint a brown trail across a low poly mesh that already has a texture applied to it.

    I tried grabbing VertexPainter from github, but ended up with some shader errors and a magenta mesh. I'm guessing that was related to the IOS build...

    If Megasplat will work though, I'd buy it in a heartbeat
     
  8. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Sounds like ASE changed something again- I'll have to get latest and look at it, it's been a while since I've done that.

    MegaSplat will work fine on any iOS device with openGLES 3.0 or Metal. It's more of a high end shader than something I would explicitly recommend for heavy mobile use though..

    Do you have the shader errors?
     
  9. FuhaoXie

    FuhaoXie

    Joined:
    Nov 18, 2016
    Posts:
    26
    I will double check
     
  10. FuhaoXie

    FuhaoXie

    Joined:
    Nov 18, 2016
    Posts:
    26
    I have found the bug is like compile shader is somehow relay which scene I opened on scene path, upload_2018-5-20_18-3-5.png scene file under scenes is ok, but if I open scene file in test folder will break the shader compile
    upload_2018-5-20_18-4-33.png
     
  11. jebediahh

    jebediahh

    Joined:
    Feb 20, 2017
    Posts:
    26
    Hi - I saw your video about autobrush - it looks like it works very nicely. I heard you mention that this technique is exposed for developers at runtime. I'm currently painting at runtime successfully using your script named "RunTimePainting" as a template. I'm just wondering how to incorporate the 'autobrush' technique at runtime. Can you point me in the right direction? Is there an example somewhere that I can look at?
     
  12. Thisguyoverhere

    Thisguyoverhere

    Joined:
    Apr 6, 2014
    Posts:
    1
    Hi guys! I just purchased Megasplat and it seems awesome so far! I'm running into a problem with the batch importer. The importer will import the diffuse channel but none of the other channels. Anyone know what could be going on? I triple checked the naming conventions. ( _diffuse / _normal / etc ) All the textures are in the project, normals marked as normals. I just can't seem to figure it out. JPG format, not sure if that matters? Any help would be appreciated.
     
  13. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    The best example is to look at the autibush code itself, which is in the TextureArrayConfig_Brush.cs file.
     
  14. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    A few people have reported having an issue like this but I haven’t looked into it yet. For now you can manually drag textures into the slots.
     
  15. Pollawat

    Pollawat

    Joined:
    Aug 27, 2016
    Posts:
    192
    Hello, I got a question about Is this asset support unity 2018 yet?
     
  16. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    yes..
     
  17. JBT27

    JBT27

    Joined:
    Jul 13, 2016
    Posts:
    197
    I cannot get the Vertex Painter Pro brush to recognise a mesh that is over the old vertex limit. I can convert meshes fine, and have one at around 240K polys, and I can fill the mesh from the vertex painter, but I cannot paint on it. The brush's disk icon remains vertical, which is what happens when the brush is over a mesh it doesn't recognise. There is a mesh collider on the mesh.
     
  18. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Can you send me the mesh so I can take a look? I don't actually use mesh colliders, but rather use an internal unity raycasting call, so I wonder if that has something to do with it.
     
  19. JBT27

    JBT27

    Joined:
    Jul 13, 2016
    Posts:
    197
    I have sent a pm with a Dropbox link. Thanks very much.
     
  20. JBT27

    JBT27

    Joined:
    Jul 13, 2016
    Posts:
    197
    At the risk of being a complete pest, it's clear that if I attempt to use any other vertex brush on a MegaSplat(ted) mesh, assorted bad things can happen. I get that, and I asked about that already. But all I really want is the ability to push and pull and smooth, to adjust my terrain meshes. The Vertex Painter Pro already pushes and smoothes, but it does not pull, for some reason. Is there any chance we could have that at some point please?

    In my case, adjusting buildings to sit on a terrain mesh, or rather adjusting the mesh, is something I would like to tweak in the editor. In the future, it would be great to see a wider range of deform tools built in, like the flatten tool of the terrain tools, which is very handy. I'd happily pay for that upgrade.
     
  21. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    There's a modifier key to pull (shift, alt or control, can't remember which off the top of my head). You can use any tool you want to adjust the mesh, as long as that tool doesn't mess with the UV and color channels in any way. The main problem that I often see with this is that many tools treat UV's as if they are 2 channels (vector2), when in fact they are Vector4 values since Unity 5.3 or so.
     
  22. JBT27

    JBT27

    Joined:
    Jul 13, 2016
    Posts:
    197
    I did wonder - it does say about the shift key, but in fact that adjusts the falloff of the brush. I have tried all three keys, but can only get it to push, and smooth. Yes, you mentioned about the UV problem. PolyBrush doesn't play nicely, neither does the free EditorSculpt, nor a couple of others I tried. I shall have another go tomorrow though, in case I missed something. Thanks.
     
  23. Pollawat

    Pollawat

    Joined:
    Aug 27, 2016
    Posts:
    192


    This is the result after I open an example scene. Last time I did that I think might be my mistake somehow so I re-boots my PC and re-install Unity 2018 and Megaslash but the result is the same. I don't know how to do, please help.


    Test with a new sample scene from unity.
     
    Last edited: May 23, 2018
  24. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Select the shader from the material and do a reimport, then look for the error in the console log and post that here.
     
  25. Cubic_Creo

    Cubic_Creo

    Joined:
    Oct 13, 2014
    Posts:
    47
    I've got an issue that only occurs in a build. I've got a large set of terrains and am using World Streamer to load them in. I'm also using the WorldMover script, which shifts the position of all the objects in the scene when the player starts to get too far away from 0,0,0. Anyway, what's happening is that in a build (not in the Editor), some terrains are losing their textures. It appears to happen when a terrain is moved.

    As I launch the build, I can see the terrain that I spawn on with the correct textures, but it only has its textures for a split second. Then it turns white. I believe this is because WorldMover has to immediately shift the world position, since the player spawns a far distance from 0,0,0. As soon as WorldMover moves the terrain and player to 0,0,0, the terrain turns white. Then, as the other terrains get loaded in, they appear correctly with all their textures. If I move the player far enough to cause the world to be moved again, any terrains already loaded become white, and then new terrains that are loaded in get loaded in correctly with all their textures.

    Terrains do not turn white in the Unity editor. Only in a build. Is there something I can look at to debug this? There are no errors in the output log.

    white terrain.png
     
  26. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Does the world mover script you use do anything to the terrain or materials? You could try calling MegaSplatTerrain.Sync() after the terrain gets moved/loaded to instantiate the material on the terrain from the template material..
     
  27. Cubic_Creo

    Cubic_Creo

    Joined:
    Oct 13, 2014
    Posts:
    47
    Thanks! Turns out it was my fault. I had forgotten that I added some code a while back when I was debugging to toggle moved gameobjects off and then back on again. Not sure why toggling them off and back on causes them to lose their material in a release build, but removing that code solved the problem. Thanks!
     
  28. Pollawat

    Pollawat

    Joined:
    Aug 27, 2016
    Posts:
    192
    I got some clue from unity forum they said HDR not supported terrain yet, I don't know exactly is it the cause of the problem or not.

    https://forum.unity.com/threads/terrain-disappear-in-2018-normal.532702/

    And this is what are you asking for right?



    If the first thing is the cause of the problem (HDR) then how can I solve that or I need to wait for another version because for now, I'm working with Megascans library (LIT).

    Or it can be something else. Thank you for your time.
     
  29. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Are you trying to use the new HD Render Pipeline? Cause that isn't going to be out of beta for like another year.. No, I was asking for shader compile errors- which there are none of in your logs. But if you're trying to use the new HD pipeline, then that would explain it..
     
    Pollawat likes this.
  30. Pollawat

    Pollawat

    Joined:
    Aug 27, 2016
    Posts:
    192
    Yes, I try with the "High Definition Render Pipeline" for the conclusion. "I can't use it with HDR right?"

    Can I ask you for your opinion about is it necessary to build a game with HRD? My game phototype nearly complete and I'm looking for improving graphics system so yeah... is it necessary? or I just build it on lightweight and it just fine.

    Thank you.
     
  31. strich

    strich

    Joined:
    Aug 14, 2012
    Posts:
    375
    @jbooth I have had to write some custom code and a specific control texture to cut alpha holes as I'm using the same splat control texture (As global) on another Megasplat material to fill the hole. All is fine, however I'm calling clip() in the function provided in the custom.cginc file. Is calling clip() here too late from a perf point of view? Could it be called earlier?
     
  32. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    No, the HDRP is not likely to be ready for actual use until 2019 or so, and it will require a rewrite of all custom shaders. Honestly I wouldn't use an SRP right now unless you are building it yourself and willing to write all your own shaders.
     
  33. Ecocide

    Ecocide

    Joined:
    Aug 4, 2011
    Posts:
    293
    Hi Jason,

    I was first using CTS where you can assign Profiles. When you change these profiles the terrain has different materials applied, for example changing all grass areas to snow etc. I know switched to MegaSplat because I had some performance issues with CTS (only in builds, very strange bug).
    Can I achieve something similar with MegaSplat? What's the best workflow for that?
     
  34. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    It's kind of hard to say, as the compiler has a lot more control over the final code than most compilers would have, and it will also depend on the platform's compiler.
     
  35. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Easiest would be to swap texture arrays or materials. Basically, a material is a "profile" for a shader, as it is what actually contains all the texture pointers and settings. You could have one material which points to a different set of texture arrays, changes parameters, or even changes the shader options itself. You could assign it to the MegaSplatTerrain's templateMaterial property and call the Sync() function to apply the changes.
     
  36. strich

    strich

    Joined:
    Aug 14, 2012
    Posts:
    375
    @jbooth I've noticed that when I turn on tessellation that the shadows projected onto the terrain are very close to black, where they should otherwise be a lot lighter. Is this a known issue?

    I'm using 2018.1 linear color mode with the latest Megasplat in Standard PBR lighting mode.
     
  37. JBT27

    JBT27

    Joined:
    Jul 13, 2016
    Posts:
    197
    It's definitely not pulling. The shift key allows the adjustment of brush falloff, the ctrl key continues to allow pushing, and the alt key is a Unity navigation key. The interface does state the shift key, although it says it's for pushing. It pushes by default, whereas pulling doesn't appear to be accessible.
     
  38. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Real-time or baked shadows? Which baking system if baked?
     
  39. strich

    strich

    Joined:
    Aug 14, 2012
    Posts:
    375
    Real-time. No baking.
     
  40. JBT27

    JBT27

    Joined:
    Jul 13, 2016
    Posts:
    197
    Correction: shift plus LMB does pull, but the brush icon goes vertical and stays in the same spot. So, you cannot brush the pull deform as you can with the push.
     
  41. JBT27

    JBT27

    Joined:
    Jul 13, 2016
    Posts:
    197
    The texture graph is not responding as I scroll through a simple texture index node attached to the bottom input. I noticed earlier that node trees I am using are not working - this is 18.1. I had earlier problems with the graph where seemingly a mesh has to be painted first before the graph compiles on it. But it's not responding consistently. Are you aware of any problems with it in 2018.1? I'm stumped.
     
  42. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    No, but I haven't explicitly tested it on 2018.1 yet either, so who knows. I'll do this next week (going out of town for a few days)..
     
  43. JBT27

    JBT27

    Joined:
    Jul 13, 2016
    Posts:
    197
    OK - thanks.
     
  44. iichiversii

    iichiversii

    Joined:
    Nov 23, 2011
    Posts:
    139
    Does megasplat have the ability to enhance real satellite imagery like the image below and replace fields with high quality textures?

     
  45. iichiversii

    iichiversii

    Joined:
    Nov 23, 2011
    Posts:
    139
  46. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Nothing in particular for this; you can use this image as a macro texture.
     
  47. FiveFingerStudios

    FiveFingerStudios

    Joined:
    Apr 22, 2016
    Posts:
    510
    I recently upgraded from Unity 5.6.4.p3 to Unity 2017.4.f1. I noticed this issue then updated Megasplat to the latest version, but it did not get fixed.

    Is there anything I can do to fix this or will I have to repaint the mesh?
     

    Attached Files:

  48. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    The painting format hasn’t changed; so it’s likely you just need to reassign the shader/material or regenerate the shader by changing an option on it.
     
  49. ShadeWolfDK

    ShadeWolfDK

    Joined:
    Feb 5, 2013
    Posts:
    1
    I am wondering, would I require to use Megasplat or would Microsplat plus some add-ons help me with the following?
    I would like to make it so that my characters get "wet" when it rains, ingame. Is that something that's possible with MicroSplat or MegaSplat?

    Also, is it possible to do, run-time conversion of meshes for use with MegaSplat if MegaSplat is required for above scenario?

    Thanks for reading and for these awesome tools.
     
  50. DrInternet

    DrInternet

    Joined:
    Apr 6, 2014
    Posts:
    106
    Unfortunately, I can confirm that texture graph is broken in 2018.1. While using on native terrains, it paints with random cluster and/or ignores data nodes.
     
    JBT27 likes this.