Search Unity

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

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

  1. JBT27

    JBT27

    Joined:
    Jul 13, 2016
    Posts:
    197
    Yep, that's what I was seeing, but on mesh terrains.
     
  2. FiveFingerStudios

    FiveFingerStudios

    Joined:
    Apr 22, 2016
    Posts:
    510
    While trying to complile the shader I'm getting the below error

    Shader error in 'MegaSplat/ParkTerrain2': unable to find compatible overloaded function "texCUBE(samplerCUBE, float3, float2, float2)" at line 1279 (on d3d9)
     
  3. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    This looks suspiciously like an issue that Unity introduced in 2018.1 that broke MicroSplat; but I don't see this issue in 2018.1 of MegaSplat, so I'll have to try in your version of 2017. What platform are you running on? Which graphics API?
     
  4. FiveFingerStudios

    FiveFingerStudios

    Joined:
    Apr 22, 2016
    Posts:
    510
    I’m on Windows 10 and using DirectX11
     
  5. zoltanBorbas

    zoltanBorbas

    Joined:
    Nov 12, 2016
    Posts:
    83
    Hi There,

    I am using your MegaSplat asset and was looking for the dedicated snow textures mentioned in MicroSplat snow module video. I assume that MegaSplat should also contain those or alike textures for the global snow feature of the shader. Is there any chance that i am just blind :p, if so could you provide the name of the two textures that should go into the Diffuse/Height and Snow NormalSAO slots of the global snow feature.
     
  6. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    There's a few (snowy_ground*), but I just noticed they aren't packed into NormalSAO format anymore, so I'll include ones pre-packed in the next update..
     
  7. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    There's a few (snowy_ground*), but I just noticed they aren't packed into NormalSAO format anymore, so I'll include ones pre-packed in the next update..

    I cannot repro this, using Unity 2018.1f2. Opened up the texture graph, created a new graph, plugged a Texture Cluster into a layer and it apply's the chosen texture fine.
     
  8. zoltanBorbas

    zoltanBorbas

    Joined:
    Nov 12, 2016
    Posts:
    83
    Thanks for the quick response!

    Can i ask how soon is the next update will come? Snow looks great even without it just i am sure with that it would blast :D.
     
  9. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    I want to follow up on the issues people say they are having with 2018 before releasing another patch, but it's pretty easy to make the textures yourself if your in a rush. The format is basically:

    Albedo in RGB
    Height in A

    Normal in RG
    Smoothness in B
    Ambient Occlusion in A
     
  10. DrInternet

    DrInternet

    Joined:
    Apr 6, 2014
    Posts:
    106
    This one will be difficult to reproduce as:
    1) I can't reproduce it in clean project either
    2) The issue persists in existing project although I tried it on new terrain, in new scene and after deleting/reimporting megasplat

    If JBT27 won't come up with how to reproduce it, I'll try to slim and upload the project.
     
  11. MrMcCoy

    MrMcCoy

    Joined:
    Dec 7, 2017
    Posts:
    4
    Hi. Recently bought MegaSplat and can't get MegaSplat mesh painting working.
    We are on Win 10, Unity 17.3, MegaSplat 1.66.

    We followed the latest 1.6 docs:
    • Drag your converted Mesh into the scene. (Converted a small mesh)

    • Assign the material to your mesh (added a MegaSplat material)

    • Open the Vertex Painter window at Window->Vertex Painter Pro

    • Make sure your mesh is selected

    • Go to the ‘Custom’ tab

    • Assign your Texture Array Config using the “Brush” field

    • Change the brush mode to “Single Bottom”

    • Make sure the “Active” toggle is checked in the Vertex Painter window

    • Select a texture from the brush UI and begin painting
    Nothing happens. No texture is applied. No changes in material.

    Is there some other basic stuff that the documentation doesn't mention that needs to be set?

     
    Last edited: May 30, 2018
  12. FiveFingerStudios

    FiveFingerStudios

    Joined:
    Apr 22, 2016
    Posts:
    510
    I’m running on Windows 10 and using DirectX 11
     
  13. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    It looks like the texture arrays are not assigned to your material.. Think of the texture arrays like collections of textures, so they need to be assigned to the material, same as regular textures would..
     
    MrMcCoy likes this.
  14. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @jbooth is it possible to make per texture tessellation set with distance? I'm thinking if camera distance at max could be set to a texture then it might be possible. Some textures look good without tessellation. This may help increase performance where certain textures/areas don't require tessellation at all.
     
    Last edited: May 30, 2018
  15. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    No, this would require sampling the textures in the stage of the shader where tessellation amount is chosen, which currently does not need to sample the textures at all- so this would actually be more expensive..
     
    Ascensi likes this.
  16. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    Hey Jason, is Mega Splats by chance in time, going to get Substance support again? or is that off the table for good. I know they added the new add on, so I was just wondering. Thanks!
     
  17. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    The new addon doesn't have a way to script imports like the old system, nor does it add #define's so you can add support for it in an asset. So not unless they add that stuff..
     
  18. MrMcCoy

    MrMcCoy

    Joined:
    Dec 7, 2017
    Posts:
    4
    Hi Jason. Thanks for the answer to the last question. It may be obvious in hindsight but it's not mentioned as a critical part of setting up MegaSplat in the documentation anywhere for beginners. It would be helpful if you could add "assign the texture2darray to use into Splats slots of the material" after "Assign the material to your mesh" in the Paint a mesh chapter of the documentation. Or something like that explaining quickly how to get your own materials working.

    Now we have two other issues.

    First it seems like clusters painted on same layer is not blending at all. The edges are sharp. How do we get them to blend?

    The second more serious issue is the strange borders.
    Searching the thread a bit I found this https://forum.unity.com/threads/rel...at-mapping-system.441329/page-80#post-3494700 .
    You answered "Read the documentation in vertex format; you need to stamp some data on the mesh to fix the bands."
    I have no idea what you are referring to here. Could you explain a bit more if this is the problem?
     
  19. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    There's a mesh preprocessor you run your mesh through- if you are generating the mesh dynamically, then you will need to produce a mesh that conforms to what the mesh preprocessor does to your mesh. This is described in the documentation, but essentially means having one red, one blue, and one green vertex on every triangle.

    Interpolation contrast will control how sharp the blend between textures is (both on the same layer or different layers)
     
  20. MrMcCoy

    MrMcCoy

    Joined:
    Dec 7, 2017
    Posts:
    4
    Thank you. We did have a converted mesh (*_splat) but it was converted in an older version of MegaSplat. I redid the conversion in 1.66 and now it works fine.
    Interpolation Contrast slider also works fine.

    However, I'm unable to convert a big mesh with the tool. The mesh consist of 12 parts with between 40000 and 150000 triangles. This is supposed to be supported I read in the latest release notes. It's not working at all. I only get a very small piece of the mesh converted (1148 vertices).
    How to move forward with that issue?
     
  21. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Can you send me the mesh?
     
  22. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    I haven;t actually looked at it, but they where suppose to allow it so developers could do this . Maybe they plan to with an update. .. oh well.
     
  23. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    I was thinking of a hack.. the shader set with distance based tessellation relies on camera distance to increase or decrease tessellation does it not? I was thinking that if a texture was identified/marked as a camera to the shader at maximum distance it simply wouldn't tessellate until you get close to the unmarked textures. I could be very wrong but I thought it could be a way to trick the shader instead of coding tessellation parameters for each texture - that's what I think when you explain it to me. No need to reply if I'm totally off base/lack the depth and understanding. I just thought I would try to explain another way in case I wasn't clear enough in this approach.
     
  24. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    The thing is you don't know which texture is on a given area until you do all the height map blending, and that can also change radically from one pixel to the next- so which texture gets priority for an entire triangle when it goes to subdivide? There's not really a good way to make this choice even if you did sample the textures, because you are determining the subdivision level for an entire triangle, not a pixel, etc..
     
  25. zoltanBorbas

    zoltanBorbas

    Joined:
    Nov 12, 2016
    Posts:
    83
    Cool, thanks for the info but i can wait.
     
  26. MrMcCoy

    MrMcCoy

    Joined:
    Dec 7, 2017
    Posts:
    4
    No problem, I PM:ed you the box link.
     
  27. RoyS

    RoyS

    Joined:
    Jan 12, 2009
    Posts:
    664
    I've done searches on this forum post and google searches, but couldn't find anything.

    I have a Unity Terrain and was going to paint Megasplat textures on it and use the flow/wetness/puddles. I set it up according to the video using "Terrain Paint" (not Vertex Painter Pro). I can paint on the bottom layer, but not the top layer using "Cluster". Nothing will blend no matter how I move the Blend Target slider.

    What am I doing wrong?
     
  28. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Set your layer mode on the shader to Two Layer.
     
    RoyS likes this.
  29. crudeMe

    crudeMe

    Joined:
    Jul 8, 2015
    Posts:
    92
    Hi,
    i'm having this issue.

    SplaBlend_3Layer : invalid subscript 'viewDir'





    - Unity 2018.1.1f1 (dx11, forward)
    - Brand new project
    - Latest MegaSplat 1.66 (re-downloading it now again)
    - Unzipped Example folder in /MegaSplat/VertexPaint/

    Sorry if I missed a solution somewhere.

    upd: upon commenting everything '#if PARALLAX', SplatBlend shaders start to work. I'm particulary interested in SplatBlend_4Layer, which is giving another error:

    SplaBlend_4Layer : maximum ps_5_0 sampler register index(16)


    I'm pretty sure i'm using 1.66
     
    Last edited: Jun 1, 2018
  30. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    This shader isn't really part of MegaSplat, it's part of the vertex painter which is hosted on my GitHub for free; the shaders in there are just included as part of that package. I expect your running 2018 then? Because Unity seems to have changed something in the lighting system that is pushing the sampler count up, above 16.

    Why are you using this shader instead of the MegaSplat ones? What's the use case?
     
  31. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @jbooth you have a strong grasp on texturing & shaders.. How might you tackle creating a snow, dirt, rock, mudslide avalanche with Megasplat? maybe with displacement, Flow mode with a cracked snow texture morphing/changing? This would be very cool to add to Megasplat along with Lava, puddle flow etc


    Edit: I guess it could make it look more all consuming if the MS physics is absent on that texture but perhaps would add more resources to look that texture up on the landscape?
     
    Last edited: Jun 3, 2018
    zoltanBorbas likes this.
  32. crudeMe

    crudeMe

    Joined:
    Jul 8, 2015
    Posts:
    92
    Hi,

    - Yes, it is Unity 2018.1.1f1 (dx11, forward)

    - We're using free VertexPaint since U5 or something. The tool was so good, we needed to back you up, so the MegaSplat was bought. Also, MegaSplat supposed to contain an improved version of VP.
    Use case: We are using mesh instead of Unity Terrain. We still want to build project for dx9.
     
  33. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Ah, I see- that makes sense. I'll see if I can take a look at them in 2018 and figure out what's happening with them.
     
    crudeMe likes this.
  34. zoltanBorbas

    zoltanBorbas

    Joined:
    Nov 12, 2016
    Posts:
    83
    Hi there!

    I am having no luck figuring out how to paint lava onto the my terrain. I am having your Mega Splat asset an using the terrain painter tool. I have lava selected in the puddle drop-down and the lava_02_diff texture selected, which i assume should show up wherever the flow is painted. I switch over to the terrain painter, then select the flow tab and the disc brush visualisation. At this point no brush appears until i go and select the config in the paint tab, which is odd since if it is needed why is not under the flow tab but then again i just set the lava texture on the material so why would i need to select the config file to see the brush... I don't know at this point i am confused, probably not doing something right. So i go back to the flow tab set the size of the brush and start brushing but nothing happens at all. Is there something that i am missing? What am i doing wrong? I realy wish to make use of the lava feature of the tool.

    FYI i am using Unity 2017.4.4f1.
     
  35. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    The config is the brush code and data effectively. The texture arrays and textures assigned to the material are not enough information for the UI; and the painting system is actually just a custom brush for the vertex painter. So thats why things always need the config.

    The flow tab only paints flow directions (which can be used with multiple things). To paint the lava down, switch to the paint tab and select UV3_Y - Puddles, this will paint lava, then you can switch to the flow tab to paint which direction you want the lava to flow in.
     
  36. zoltanBorbas

    zoltanBorbas

    Joined:
    Nov 12, 2016
    Posts:
    83
    And i feel like a fool... As soon as switched to the puddles tab it was fine. Sorry about that. Thanks for the very quick response.
     
  37. Decordova360

    Decordova360

    Joined:
    Nov 9, 2015
    Posts:
    8
    Im having glossy issues with Microsplat on my Terrain, is there something I am doing wrong, using Unty 2017.4.2f2?
    Thanks
     
  38. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Need more info, like screenshots and texture settings/data? Are you sure your putting proper smoothness maps in?
     
  39. Decordova360

    Decordova360

    Joined:
    Nov 9, 2015
    Posts:
    8
    Yes, used Smoothness/Roughness plus invert same issue, its under the PBR Texturing Mode. Ive tested the same textures used on a plane with amplify shader which looks to be fine so the smoothness seems to be working correctly, but not the same for the terrain.
    upload_2018-6-4_13-31-58.png
    upload_2018-6-4_13-33-55.png
     
  40. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    If you can zip up the project I can take a look. Nothing particularly complex about smoothness values though, I would expect them to look very similar given that Amplify writes surface shaders as well..
     
  41. Decordova360

    Decordova360

    Joined:
    Nov 9, 2015
    Posts:
    8
    Project zip and sent to you.
    Thanks again.
     
    jbooth likes this.
  42. mrnas

    mrnas

    Joined:
    Jan 13, 2018
    Posts:
    15
    Hi,

    i was wondering if i can use MegaSplat for my Project in a convenient way.

    The main Problem is, i want to make a flight Simulator, so i need very fast spawning of Terrain Tiles at Runtime and also a very large view distance.
    For all i know (could be wrong though) spawning Unity Terrains is too slow for me.

    So i started building a terrain Rendering System that uses GPU Instancing to basically draw a flat Grid Mesh at different positions and scales (different scales for different LOD Levels). The height and colors are then applied via shader/textures.
    With that i am able to get a gigant view distance and a "tile spawning time" of virtually zero (provided the data is already loaded of course, which is a different issue though).

    Now, is there a convenient Way of using MegaSplat with such a Rendering System? What would be the key issues?


    Also i would greatly appreciate any general advice on how to approach my goals concerning fast terrain spawning and large view distance :)
     
  43. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    I don't know if I'd recommend MegaSplat for this, actually. It's blending is designed for up close more than massive distances. MicroSplat would be a better choice for this, though you'd have to modify it to do the vertex displacement (trivial though).

    If most of your terrain is going to be very far away, then what you really want is a way to generate good looking distance maps, because most of it is going to be about that distant view- not pebbles on the ground and such. Either shader can blend into a global map in the distance though.
     
    mrnas likes this.
  44. mrnas

    mrnas

    Joined:
    Jan 13, 2018
    Posts:
    15
    Thanks for the super fast Answer!

    So MicroSplat is suitable for runtime generation aswell? From the comparsion Page i took that only Mega Splat can do that.. o_O
     
  45. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    That's if you want the texture choices done by the shader; MegaSplat has a feature for that; if you can generate your textures like you would for a standard Unity terrain, then MicroSplat will read that data just fine.
     
    mrnas likes this.
  46. Ali-Nagori

    Ali-Nagori

    Joined:
    Apr 9, 2010
    Posts:
    151
    i checked the update version, i still can't find the two nodes and shader gets an error when compiled.


    another question is you had been asked before , about the support for Nintendo Switch Support, the device had a full Vulkan Support, does vulkan support Texture arrays like DX11?
     
  47. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    I would expect Vulkan to support texture arrays, but without a developers kit it's hard to say. One of the big problems with doing shaders for the UAS is dealing with platform inconsistencies when you don't have access to the platform. I haven't looked at the ASE nodes yet.
     
  48. Ali-Nagori

    Ali-Nagori

    Joined:
    Apr 9, 2010
    Posts:
    151
    my entire project consists of only Splat Materials including for my skinned models , expect for the waters , the skysystem and the UI , so if any of the platforms won't support megasplat i will get in touch.


    no pressure. the only reason i went there because i wanted to add wind reaction + double culling for cloth materials
     
  49. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Have you looked at the custom extension feature? It lets you keep all the other features of MegaSplat and extend the shader with custom code without having to change source.
     
  50. strich

    strich

    Joined:
    Aug 14, 2012
    Posts:
    374
    I'm trying to use Megasplat with procedural meshes (CDLOD Terrain). Previously I was relying on controlmap textures to define the splatting with the Unity Terrains option. However this does not appear to work with procedural meshes.

    Is there a way for me to use controlmaps with procedural meshes? Or is there a way to expose the vert/UV properties necessary to set in the custom functions?