Search Unity

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

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

  1. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    261
    Hi @jbooth -- any news on the shadow issue?

    Cheers!
     
  2. DerrickMoore

    DerrickMoore

    Joined:
    Feb 4, 2018
    Posts:
    232
    very nice, also, did we go to school together?
     
  3. zmaxz

    zmaxz

    Joined:
    Sep 26, 2012
    Posts:
    143
    I got a shadow problem .
    Shadow side is completely black when i use tessellation .
    When i close the tessllation every thing is ok .
    Unity 2017.3.0p4 MegaSplat 1.62
    MsTessError01.jpg MsTessError02.jpg
     
  4. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,735
    Unfortunately not- I have not had a second since I got back in the country to look at it, or really do any work on my assets really.

    Not unless you went to music school?
     
  5. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,735
    There's a known issue when Tessellate Shadow Pass is on. It looks like the area is still being lit though, just getting different results than the untessellated version, right?
     
  6. zmaxz

    zmaxz

    Joined:
    Sep 26, 2012
    Posts:
    143
    yes,
    but my Tessellate Shadow Pass is off .
     
  7. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    577
    Does this look right?
    upload_2018-2-6_10-33-46.png
    this is an import with the default settings as I was talking about. The other textures don't appear to be generated. I was reading through the doc about batch importing but couldn't find anything I might be missing. My folder dir that I imported from also has the corresponding normals, AO, height maps etc but they didn't get imported.
     
  8. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,735
    The generated textures are put right into the array, they don't show up in the GUI (it's a GUI for your source textures, not the resulting array), as they are not generated yet. You are much better off supplying all of those textures than generating everything from the diffuse textures. The batch importer should pick them up if your extensions match- but if not drag them in there.

    Also keep in mind those channels settings are only used if you supply actual textures for those channels- IE: If you have your height map in the alpha of the diffuse, you can drag the diffuse into the height map texture input and set the channel to A.
     
    Last edited: Feb 6, 2018
  9. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    577
    Ok thanks for the tips. The extensions are correct but unfortunately they didn't get added.. the extensions were all uppercase and I tried again with lower case and it worked better but not everything was added, only random map types but single textures of each material as seen here: upload_2018-2-6_13-49-4.png

    My actual textures libraries are all uppercase -it's how they come purchased. there is an import pattern.. it first adds ao then normal, smoothness, ao, smoothness.. maybe I need to checkout one of your video blogs to see specifically how you import batches if you have this demonstrated.
    Update: watched your video. I think the issue is that the creator of the textures saved out the png format to one that Unity doesn't like. I had this kind of issue before and I had to re-save each png file. So I'll convert them all manually and let you know if that was the main issue aside from the uppercase naming in MS.
     
    Last edited: Feb 6, 2018
  10. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,735
    I does a case insensitive comparison, so it should have just picked them all up. Next time I'm able to get some work done on stuff I can double check it..
     
  11. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    577
    @jbooth sorry for the headaches but I found another issue when trying to create a 4k library
    I admit I'm only running 16GB of host ram but I ran into a problem for creating new texture array configs using all referenced textures rather than auto generate. When I load the textures into the config the PC slows down to a halt then I get the blue screen of death. I checked the task manager and saw that as I filled up the config with all the textures it prevents the ability for me to add any more and I'm only at 50 textures (I'd really would like to use my full library)
    I think for large projects that the config file might have to contain a reference to the images by name or somehow they don't load into memory directly.
    Empty scene & nothing clicked
    nothingloaded.jpg
    Empty scene with config file selected
    MS_settings_loading.jpg
    Ram had increased beyond 12GB
    I'm going to experiment with my Virtual memory settings, it's currently not setup on the hard drive my project has been saved to.
     
  12. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,735
    Your just running out of memory at that size, though I'm not sure exactly why. To generate missing channels, etc, it has to create uncompressed buffers for the texture data. It does this one texture at a time, but a 4k by 4k uncompressed resolution, which is 64 megs of data per buffer. I suspect that what is happening is that Unity is not cleaning these up when they are released and deferring them to the end of the 'frame', which isn't happening because we're in the editor, and you're just running out of memory. I'll have to take a look and see if there some way I can get it to reclaim the buffers between renders..
     
    Ascensi likes this.
  13. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    577
    There are black patches generated in the distance using Megasplat with Voxeland and if I try to paint the surface they don't go away. Some patches seem to disappear as you get close. I started with single layer mode.
    This black patch issue is happening for other users as well black patches.jpg This only happens with Tessellation.
    Update: fixed it by raising/sculpting the terrain. Still odd that it was there.

    By any chance can double layer mode now be baked into a texture?

    I also for some reason lost the ability to scale textures individually not sure what I did to break that. Update Fixed: I guess this was the scale range was set at 1 which didn't allow for adjustment - this would be good to note under trouble shooting/faq.


    Lastly when packing textures does MegaSplat take samples through Unity texture settings or direct from the textures? I realized to get sharp images I might have to set Kaiser and no compression before packing.
     
    Last edited: Feb 11, 2018
  14. SeanPalmer

    SeanPalmer

    Joined:
    May 30, 2015
    Posts:
    5
    There seems to be some sort of compression error on some of the included textures. The following textures have out-of-place deep black spots on them:

    forrest_mud_01_diff
    grass_stones_01_diff
    grass_stones_02_diff
    grass_stones_03_diff
    ice_01_diff
    ice_02_diff
    ice_snow_01_diff
    lava_01_diff
    lava_02_diff
    rock_dirt_01_diff
    rock_dirt_02_diff
    rock_dirt_03_diff
    wet_mud_01_diff
    wet_mud_02_diff
    wet_mud_03_diff

    I may have missed some, since a few of them were subtle. In case it is just me, here is an example of what I'm seeing on ice_02_diff
    ice_02_diff.png
    BTW thank you for replying to my previous comment. I didn't expect the examples to be so extensive and I've got the texture graph working now. Thanks again.
     
    Last edited: Feb 11, 2018
  15. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    670
    Hi @jbooth, looking for a workflow preventing me to repeat my actions 255 times.
    I have a tiled landscape (16x16) and setup everything to work the normal unity way (textures and splats are in place). I've followed your video explaining how to convert teh normal unity terrain towards Megasplat and that works great. However this in only affecting one tile of the landscape. Is there a way I don't have to repeat myself 255 times more?

    Kind regards,

    Wim
     
  16. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,735
    If you select all the tiles it should set them up as one landscape system, sharing the same shader/material/etc
     
  17. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    670
    This does indeed seems to work, never thought it would be so easy ;-)
     
  18. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,735
    Yeah, basically everything in the tools works on selection - want to paint on 50 objects at once? Select them all, or a root object which contains them.
     
  19. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    577
    @jbooth thanks for adding the procedural tools that can work on Voxel based terrains!-things like automatically applying textures to cave ceilings. Genius!
    I fast forwarded the vid.
    I don't have an example yet to show you at this time (you were wondering what the 4k photo-scanned clustered textures would look like) I experimented a bit and didn't like it so much as texture areas just pop in rather than having smooth interpolation - I will get around to show you what I mean.

    I have two questions that I really need to know since I couldn't see this covered in the Doc
    By any chance can the two layer mode now be render baked set with everything into a texture? You had said before this wasn't possible but in the doc it doesn't say anything about not being able to bake two layer mode into 1 output of textures.


    Does "taking from source textures" when packing into an array imply that it will bypass Unity's settings applied to textures? I realized to get sharp images I might have to set Kaiser and no compression before packing.
     
    antoripa likes this.
  20. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,735
    The render baking works fine with a two layer shader, but doesn’t handle things like overlapping uv coordinates.

    The texture packet reads the data from whatever format you have the textures in. This means uncompressed is the highest quality, but due to the way these block based texture formats work I haven’t found the quality of them coming from compressed textures to be much of an issue, as the compressor just has the best endpoints already from the previous compression.
     
  21. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    577
    Thanks for your quick response. In terms of overlapping UVs, voxel based system should be alright in this case? especially since I have Megasplat set to Triplanar and Voxeland doesn't use UVs or does this pose a problem because it doesn't use any? The end animation program I'd be using also uses a Triplanar shader for terrains.
     
  22. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,735
    It uses the meshes original UVs to map the data back to the texture, so unless you have a single, non-overlapping UV in a 0-1 space for your resulting voxel mesh, that's not going to work..
     
  23. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    342
    Hey there,
    I decided to switch from MicroSplat to MegaSplat so I can use it with Voxeland. I noticed there is no slots for substances in Texture Array Config. I am wondering is that only a MicroSplay feature? Is there any plans for substance support in MegaSplat?
    TIA,
    Boysenberry
     
  24. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,735
    It supports substances, but only on versions of Unity which officially support it without throwing warnings (2017.2 and below) since Unity is removing substance support.
     
  25. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    342
    Darn, I am on 2017.3. I have talked with the Substance creators and they are going to have a plugin for Unity 2018. I've already started my project in 2017.3 so going back might prove a bit difficult for me. Is there anyway to enable it for 2017.3? I would hate to have to scrap using MegaSplat and Voxeland but I invested a bunch of money and time in Substanses as well. It seems MicroSplat still uses Substances as well in 2017.3, for I am using it that way already with MapMagic and normal terrains. So worse case scenario I will just stick to MicroSplat with MapMagic and normal terrains, but my heart will be sad knowing I am working with less than I am able.
    So if there is a way to enable Substances in 2017.3 or you are willing to enable it for 2017.3 I'd really appreciate it.

    Thanks,
    Boyseneberry
     
  26. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,735
    You can remove the #if UNITY_2017_3_OR_NEWER in the TextureArrayConfig code. It will throw warnings in 2017, and break the compile in 2018.. I disabled it because Unity users will 1 star your asset if you throw warnings on install, so I treat warnings as errors and remove things when unity starts warning about them.
     
    boysenberry likes this.
  27. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    342
    While I appreciate no warnings as much as the next guy, I'll take it, thank you!
    It's a shame people ding for warnings, not I...

    PS Super easy fix as well, thanks again. :)
     
  28. Aler-Zampi

    Aler-Zampi

    Joined:
    Jul 8, 2012
    Posts:
    6
    I'm trying to use alpha layered technique, but cant done it right.

    With fully painted bottom layer (erased overlay as I understand) i got light tint over model
    GIF WITH A PLOBLEM

    Material config
     
  29. DominikAbe

    DominikAbe

    Joined:
    Mar 20, 2015
    Posts:
    5
    Hi,


    we are using MegaSplat in our new project and are very happy with the first results.

    We have one scene where we are using the Puddles feature which works as expected. But one thing we need is to change the smoothness value of the puddles. This is not possible right now? So, I hack implemented it the following way, which gives us the desired result; but obviously this is not very user friendly, hard to maintain in updates and ugly

    Code (CSharp):
    1. float DoPuddles(inout MegaSplatLayer o, float2 uv, half3 waterNormFoam, half puddleLevel, half2 flowDir, half porosity, float3 worldNormal)
    2. {
    3.            ...
    4.  
    5.             half wetSmoothness = o.Smoothness;
    6.  
    7.             WaterBRDF(wetAlbedo, wetSmoothness, o.Metallic, waterBlend, porosity);
    8.             wetSmoothness = min(wetSmoothness, 0.55);) // hack for puddles Smoothness
    9. }
    10.  
    Would it be possible to add this feature in the future? Another question: Are you planning to add specular setup support?

    Thank you, Bests
     
  30. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,735
    The smoothness of the puddles is based on the porosity of the surface, which is automatically calculated from the roughness of the surface based on Sebastian Legards work. There is a per-texture porosity adjustment available as well as a global one, so you might try adjusting those to see if you can get the same effect your after in a more physically based way that clamping the min of the results.
     
  31. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,735
    Your macro texture is set to tint mode, meaning the macro texture is blended as if it's a color overlay. I don't have the code available at the moment to check the details, but I'm betting that is the issue..
     
  32. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    577
    Maybe a bug, choosing procedural textures are difficult. I've attached a very small video. in the video I try to grab a slider for the corresponding texture and instead it jumps to the texture on the left. This happens for all textures. If I click on a number I can't just type it in and if I have many textures, sliding to the left or right makes the texture selection stiff then jumps ahead several textures past. For example a texture I want maybe #40 and I'm on 39.. if I drag to the right as gentle as possible it might skip ahead 5 textures or more. Keep in mind I'm using 4k textures and the array all seems to be loaded into ram rather than releasing ones that haven't yet been used or textures or currently not selected so it might be having problems updating.
     

    Attached Files:

  33. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,735
    If you make the window wider it will likely work a lot better. Unity's sliders get a little finicky when they don't have a lot of area..
     
  34. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    577
    I tried that, my display is 1920 x 1080 and I've stretched out the window half the screen and it doesn't let up. this vid has more detail. Update: oddly it works opposite -when the window is more compact. Megasplat might need a fixed window size as a fix - if I didn't try that it would have been extremely frustrating and almost impossible to do anything with that.
     

    Attached Files:

    Last edited: Feb 14, 2018
  35. DominikAbe

    DominikAbe

    Joined:
    Mar 20, 2015
    Posts:
    5
    Thanks for the ultra-fast answer :) Unfortunately we cannot achieve the desired result by changing the porosity value. I must admit we have a rather unrealistic camera setup (kind of isometric) which gives you uncommon light/camera angels in some cases. So I guess we have to maintain the hack… Btw I really like the way you can extend the shader in most cases. Still are you planning to add specular setup support?
     
  36. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,735
    No plans to add specular workflows- it would require a very serious rewrite of everything, and there's no great way to pack the extra channels needed, so it would be slower than a metallic workflow (more texture lookups and memory due to another texture array)..
     
  37. A_White_Guy

    A_White_Guy

    Joined:
    Jul 7, 2013
    Posts:
    1
    Hello, microsplat user here. Have a quick question: Is there a way to apply microsplat to multiple terrains at once? I am using terrainformer and have a 6x7 terrain grid so that's like 42 terrains and would be a pain to do each one individually. Is this something that is specific to megasplat functionality, or is there a microsplat module to purchase? Again, i just need to apply the settings to multiple terrains at once, not have a tool to paint across them all. Terrainformer will allow painting on multiple terrains, so if they all have the same microsplat they should work I figure but i am a noob so I cannot figure it out xD. Thanks!
     
  38. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,735
    Select them all and convert them all at once. This is actually a much better way to do it, because they will all share one shader/material instead of each having their own, so you only have to adjust the settings in one place.

    As for painting, it uses the standard Unity terrain data, so any tool which allows you to paint across multiple terrains will work.
     
  39. ibbybn

    ibbybn

    Joined:
    Jan 6, 2017
    Posts:
    156
    Tesselation question:
    Is there a way to make the displacement only one-directional?
    Right now it seems to be bi-directional which makes every object with tesselation quite a bit smaller until the bumpiness even gets noticed. I guess i could work around this with height maps which have at least 50% grey everywhere ?
    Is there an easier way to do this in code perhaps if you don't want to create and adjust a massive amount of height maps ?
     
    Last edited: Feb 16, 2018
  40. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,735
    The default option is to push in the direction of the normal where 0 is the original surface position. You must have enabled the option to displace from the center, which can make the object smaller.
     
  41. ibbybn

    ibbybn

    Joined:
    Jan 6, 2017
    Posts:
    156
    And indeed that was it. How could I've overseen that.. Working night and day does seem to have a negative effect after all!

    Workflow question: I usually use one .blender file per level. After adding stuff there I need to preprocess the whole file again and then reassign all the missing splat meshes in the mesh filters. Is there a way to make the mesh filter search for the last assigned mesh again from the new splatmesh file with the same name?
    This is getting a bit cumbersome with big levels.
     
  42. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,735
    No, by that time, the mesh filter no longer has any data about what it used to point to. You could likely script some kind of custom step for your data based on file/script naming conventions or something though.
     
  43. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    261
    Hi @jbooth -- wondering if you have any kind of internal road-map for MegaSplat features and bug fixes etc. If you do, would you be willing to share it with the community, so we can have some idea on when to expect things?

    Obviously my current interest is the issues I've already reported to you, on the shadow and tessellation bugs. They are not holding me back right now, as I'm waiting for the mesh feature of Vegetation Studio to be complete. However once that is done, I'll be looking to move forward again. To complete the MegaSplat upgrade and merge on my project, I really need those issues to be verified as fixed.

    Not trying to hassle you, just genuinely would like to know, thanks man. :)
     
  44. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,735
    Not really- I have to fix the tessellation/shadow caster issue on MegaSplat, beyond that, SRP is coming up and I need to decide which of my assets I'm going to port to which pipelines, etc. Unity has, as usual, provided no real documentation on the shader side of the new SRP pipelines, and the idea of having to maintain 3+ more undocumented lighting pipelines is not exactly exciting to me.
     
  45. sBabb

    sBabb

    Joined:
    Feb 2, 2015
    Posts:
    49
    Hi @jbooth

    Quick question; is there anything like the mesh terrain blending module that MicroSplat has for MegaSplat?

    I read the doc of course and have looked in this thread, but I couldn't find an answer. I read the Object Blending section in the doc for Megasplat, and tried some things out but I couldn't get it working - or at least I'm not understanding what it's doing. The MeshBlending scene provides some information, but I tired adding a few objects, using the conversion tool for the mesh data, applying that correctly, and then switching to the object blending MegaSplat shader, but no luck.

    Thanks,
    Steve
     
  46. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,735
    Nothing automatic like MicroSplat’s module. You can see more than a few answers about this in this thread.
     
  47. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    261
    OK thanks man -- also adding back the higher detailed quality sampling as option for when scaling textures would be great, as the current method makes things very blurry.
     
  48. sBabb

    sBabb

    Joined:
    Feb 2, 2015
    Posts:
    49
    Alright, thanks for the feedback. I'll browse through here again. I think I'm just going to switch over the MicroSplat and buy the modules I need. I really like using MegaSplat and have been for some time with Map Magic, but I think it's just too complex for my needs.

    Thanks,
    Steve
     
  49. SonGoku10c

    SonGoku10c

    Joined:
    Dec 9, 2017
    Posts:
    75
    Hi.

    I have some questions about the texture graph and some other problems:

    1.: Is there a way, that I use the terrain high and not those inaccurate values from 0 - 1. My terrain goes from 0m to 3800m and I want sand from 0m to 100m (and a little bit higher for some beach). Is it possible and when yes, how?

    2.: the textures don't allign with the borders of the terrains. How can I fix this?

    3.: How can I make these hexagons smaller to get a smoother line (I reduced the interpolation contrast to show them). They are ~1/16 (1km) the sitze of my terrain (16kmx16km).

    Megasplat1.JPG
    Megasplat2.JPG
     
  50. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,735

    1. Do the math in the editor; ie type 100/3800

    2. You can use projected, world space UVs, or tile your textures a evenly divisible amount.

    3. The hexagons are a symptom of the barycentric blending; interpolation contrast obviously helps, but having more low frequency height variance in your height maps and using multiple layers to keep things blending is best.