Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[FREE]MicroSplat, a modular terrain shading system for Unity Terrains

Discussion in 'Assets and Asset Store' started by jbooth, Aug 9, 2017.

Thread Status:
Not open for further replies.
  1. superkratos

    superkratos

    Joined:
    Sep 4, 2017
    Posts:
    112
    By the way, I'm using an Unity version of 2019.4.0f1.
     
  2. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    That's odd- so just a cube in HDRP with terrain blending? I'll see if I can repro it and fix.
     
  3. superkratos

    superkratos

    Joined:
    Sep 4, 2017
    Posts:
    112
    Yes, it's just an Unity cube, with the example terrain. I tried sphere and other terrains, but always one axis(x/z) was stretching. Should be easy to repro. :D
     
  4. fredboy

    fredboy

    Joined:
    Nov 16, 2012
    Posts:
    3
    Microsplat in WebGL - Good news/Bad news
    Microsplat Core works just fine after a webGL platform switch and it builds and runs successfully in 2018.4.25 (shown below). The bad news is Microsplat Mesh example does not. I get several errors as shown in screenshots including: 'Binary to YAML conversion: type UInt16 is unsupported' on import and it's asking about possibly missing render textures and shader build not supported by GPU (GTX 1080, DX11.4, Shader Model: 5.0, OpenGL 4.6). Microsplat Mesh tests and paints fine after switching back to Windows platform, but materials are not loaded in Microsplat.mat under WebGL unless set by hand - materials slot showing up blank - but then stays set after switching platforms back and forth after that. Also tried reimporting MicroSpalt Mesh but with repeatable results - can just switch platform to webGL to reproduce. I am able to paint on the control textures with the texture method brush in overlay mode and I see the control texture changing, but no splat textures show up over the background image (combined and vertex methods also just show up blank with blank material). I'm happy to test further if there is something you suggest trying.
    upload_2020-8-7_16-6-46.png
    upload_2020-8-7_16-3-28.png
    upload_2020-8-7_16-4-33.png
    upload_2020-8-7_16-5-54.png
     
  5. GarrettF

    GarrettF

    Joined:
    Jul 4, 2019
    Posts:
    49
    Hi I just purchased the microsplat terrain bundle as well as the HDRP plugin.

    I'm having an issue with setting up and painting terrain textures. If I use the demo scene with the terrain already setup the demo textures are good. But if I try to set up my own terrain from scratch or add my own terrain layer/texture the textures just end up looking like foil, super dark and reflective. Almost like I cranked the smoothness and turned the lights down.

    I'm using Unity 2019.4lts and the newest version of HDRP.

    I've been trying to follow all of the documentation and can't find my answer.

    I set up a new terrain layer with an albedo and normal textures and "update" the microsplat material and nothing works.

    If anyone could point me in the right direction or let me know if they have solutions to the same issue. There's gotta be something I'm doing wrong.

    Thank you.
     
  6. Cookieg82

    Cookieg82

    Joined:
    Mar 28, 2017
    Posts:
    73
    Hi, Sorry to add to the list. I may be in-experienced here with this asset but I just purchased Dynamic Snow and bought the latest MicroSplat HDRP plugin - I opened up the Terrain scene and it is all pink? And I am not sure how to get it all working correctly? Tried the auto pipeline upgrade and nothing? Any help? thanks!

    P.s. Opened the HDRP Microsplat Help doc and I cannot see where this RenderLopp part is? Also the demo terrain has missing scripts??

    Again, any setup help greatly appreciated as I have spent a good chunk on this and supporting HDRP plugin etc.

    Thanks
     
    Last edited: Aug 8, 2020
    McPeppergames likes this.
  7. Pointcloud

    Pointcloud

    Joined:
    Nov 24, 2014
    Posts:
    37
    Hi, so I have your URP package and the streams package and whenever I try to run the streams scene the lava and streams flicker and disappear in URP, any suggestions here? I changed to LD.
     
  8. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    I’m not at home right now to check, but I think the streams component has an SRP checkbox on it? Can’t remember if it’s detected automatically or exposed. But basically in SRPs many normal rendering functions don’t work, and the new replacements are very buggy, so it has to use a separate pathway. Anyway, if the checkbox is not there then it’s likely the detection mechanism is failing in some way.
     
  9. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    if you are adding new textures make sure to set Max Textures high enough on the shader.
     
  10. Pointcloud

    Pointcloud

    Joined:
    Nov 24, 2014
    Posts:
    37
    Yeah I'm not seeing a checkbox or anything you mentioned. Is there a way to force the detection mechanism to prompt the SRP checkbox?
     
  11. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    The Mechanism to detect looks at your keyword files- if the SRP pipeline keywords are found, it uses the SRP pathway, if not, the standard..

    This is in the StreamManager's OnEnable function:

    Code (CSharp):
    1. if (msObject.keywordSO.IsKeywordEnabled("_MSRENDERLOOP_UNITYLD") || msObject.keywordSO.IsKeywordEnabled("_MSRENDERLOOP_UNITYHD"))
    2.       {
    3.          updateBuffer = new SRPBuffers ();
    4.       }
    5.       else
    6.       {
    7.          updateBuffer = new StandardBuffers ();
    8.       }
    So you could check the keywords file and make sure those keywords are enabled, or step through this code to make sure it takes the right path. If it is using the SRP pathway correctly, then it's likely another bug in Unity's new CustomRenderTexture class (or the one I have already logged with them that causes it not to work on windows in some cases). If you can let me know whats happening in your case it might give me more info..
     
  12. Pointcloud

    Pointcloud

    Joined:
    Nov 24, 2014
    Posts:
    37
    so I switched updateBuffer = new StandardBuffers(); to new SRPBuffers so it has to use SRP and it still flickers
     
  13. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Bleh - sounds like another bug in CustomRenderTexture- what version of unity and os are you using?
     
  14. Pointcloud

    Pointcloud

    Joined:
    Nov 24, 2014
    Posts:
    37
    2019.4.0f1 LTS Windows 10 19041.388
     
  15. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    335
    My game world is using small terrains squares (24 x 24) and sharing all same 16 textures Microsplat set.

    But sometimes I would like to use smaller terrains ( something like 24 x 12 )and for sure share the same Microsplat textures. Problem is the ratio is different and by example the grass texture on a 24x24 terrain looks perfect but the 24x12 will look stretched.

    Anything I’m doing wrong ? Is there a way do have the textures look the same on different terrain size ?

    Thx
     
  16. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    You'd have to setup one material for 12x24 and one for 24x24, such that you could have the UV scale on one vs. the other. Alternatively you could change the UV space to world space so everything is textured regardless of UVs.
     
    f1chris likes this.
  17. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    335
    Thx. Just tested with World Space UV and it’s working great. Don’t know if any cons of using worldspace on terrains ( performance or other limitations) but so far didn’t see any negative impact.
     
  18. Pangamini

    Pangamini

    Joined:
    Aug 8, 2012
    Posts:
    54
    Hello.
    Does basemap work with microsplat terrain? The basemap distance for rendering doesn't seem to affect anything, yet in RenderDoc I can see drawcalls generating a basemap texture.
    I am trying to get access to this texture, as I'd like to render grass that's tinted by whatever's under it. Do you think it's somehow possible, without rendering my own basemap?
    Or even if I do, I need it to capture all the effects applied by the procedural texturing model - and it seems like that one applies its effects based on mesh, not the heightmap ( noticed when I reduce the terrain mesh pixel error ), which means I can't render a basemap with a simple quad geometry?
     
  19. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    The basemap is not used by MicroSplat. I used to automatically reduce it to 16x16 pixels, but apparently the GI system uses it, so I keep it around for when GI is baked. There's a baking system to generate a final albedo from the terrain, you could replicate this code and generate a shader to do this at runtime if you wanted.

    I use the geometry, because the height map is not guarantee'd to be generated (Unity generates one only when Draw Instanced is used). Ideally, there would be a way to tell unity to always generate these textures, because right now it's a giant patchwork to manage (For instance, it's possible to end up with 3 normal maps for the terrain- one if instancing is on, one if you use my per pixel normal setting - which warns if instancing is on that you don't need it - and one for the dynamic streams and terrain blending data). It would be really nice if there was a way to just always have unity provide this info and I could delete all my workarounds for when it doesn't.
     
  20. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    Just a simple question.
    How can i see whats going on in editor so not in playmode?
    I just see your wind and glitter video and there you are making changes and all the time i can see the results in the scene window also you are not in playmode.
    I opened your scene in Unity 2019 lts and there it is only sometimes simulating the wind and glitter for some little frames when i am not in playmode.
     
  21. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Turn on animated materials - it’s a drop down in the scene view window.
     
    RandAlThor likes this.
  22. Rastapastor

    Rastapastor

    Joined:
    Jan 12, 2013
    Posts:
    589
    Long time no see :), below pictures of my latest terrain in Unity HDRP paired with Microsplat. Terrain created in World Creator 2 standalone, bridged to Unity. I used physic based sky

    The reference terrain (https://www.artstation.com/artwork/QrxVRB mods dont delete it, its just to show the reference material from World Creator :) )
     

    Attached Files:

    • 1.jpeg
      1.jpeg
      File size:
      286.8 KB
      Views:
      392
    • 2.jpeg
      2.jpeg
      File size:
      157.7 KB
      Views:
      384
    • 3.jpeg
      3.jpeg
      File size:
      199 KB
      Views:
      386
    • 4.jpeg
      4.jpeg
      File size:
      246.8 KB
      Views:
      375
  23. bobAZ2019

    bobAZ2019

    Joined:
    Mar 28, 2019
    Posts:
    28
    hi,

    i have a bunch of MicroSplat product and now looking to add
    MicroSplat - Runtime Procedural Texturing

    after looking at the demo, it seems like what i needed but want to make sure before the purchase.
    i'm looking for an auto terrain generator that support STANDARD & URP.
    what i wanted is a terrain that can generate during game play at runtime.

    example, my game is flying from San Franscisco to New York.
    where ever the plane is heading, the terrain should be generated automatically with texture, of course.
    in a way, it's like of like Microsoft Flight Sim.

    my question is.... can this module perform the above required task?
    if not, anyone know such a tool for Unity?

    thanks a bunch!
     
  24. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    It can do the texturing- but it doesn't generate height maps or anything like that..
     
  25. Rastapastor

    Rastapastor

    Joined:
    Jan 12, 2013
    Posts:
    589
    Another one in Unity :). Did one closeup shot. Ofc terrain made with World Creator 2 standalone and bridged to Unity. Used physical based sky and ofc Microsplat. Texutres are from Game Textures.
     

    Attached Files:

    • 1.jpeg
      1.jpeg
      File size:
      611.7 KB
      Views:
      369
    • 4.jpeg
      4.jpeg
      File size:
      336.8 KB
      Views:
      376
    • 5.jpeg
      5.jpeg
      File size:
      255.7 KB
      Views:
      372
    • 6.jpeg
      6.jpeg
      File size:
      338.2 KB
      Views:
      371
    • 7.jpeg
      7.jpeg
      File size:
      973.7 KB
      Views:
      367
  26. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    648
    Hi jBooth,

    How would I go about creating clean roads like I saw in one of your trailers for microsplat? I'm using Gaia Pro to generate the terrain and microsplat on top of it. I'm not tied to anything specific ... just trying to understand the workflow and tech needed to do this.

    I see that (a) the road is very clean, with crisp smooth lines on either side the road the whole way, (b) the terrain itself seems to have flattened on the road but immediately raises up into a hill around it, (c) the texturing also seems to have taken the curve into account.

    Using Gaia Pro + Nature Renderer + Microsplat, I can start to see how to generate some nice looking terrains. However, making roads that look "right" is something I still cant even figure out where to start with, and its shown in your trailer, so if you could point me in the right direction (including whatever additional assets would be needed as necessary) I would be really thankful.

    Thanks so much!

    PS: 1 click and my jaw dropped from not only the visuals of microsplat, but the _performance_. Holy moly you made something special, I hope you're getting rich so you can keep making this stuff ;). Its basically a foregone conclusion I'll be picking up your packs, I just want to make sure I have the right workflow in mind first.
     

    Attached Files:

  27. GuitarBro

    GuitarBro

    Joined:
    Oct 9, 2014
    Posts:
    179
    My apologies if this has been answered somewhere else (I've had no luck in finding it), but is the Digger integration module going to be coming to the Terrain Collection or does that need to be purchased separately on top of that?
     
  28. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    That shot is from a users project- I believe he used EZ-Roads to do it..

    Rich, no way, but it's a fun hobby..
     
    StevenPicard and Willbkool_FPCS like this.
  29. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    No, the terrain collection includes only the modules listed in it, and won't have any modules added.
     
  30. GuitarBro

    GuitarBro

    Joined:
    Oct 9, 2014
    Posts:
    179
    Gotcha, thanks for the fast reply though.
     
  31. bobAZ2019

    bobAZ2019

    Joined:
    Mar 28, 2019
    Posts:
    28
    if i use this module along with your URP module, will it work for auto texturing for URP project?
     
  32. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    335
    My terrains are sharing the same microsplat textures set (16 textures) but sometimes I want to use meshes instead of terrains for performance. Trying to reuse my existing 16 textures set with Microsplat mesh tool but can't make it work.

    First is that something feasible ? I don't want to create another set and doubling memory for exactly the same textures.

    thx
     
  33. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Yes

    Yeah, you can use the same arrays on everything- notice the demo content uses the arrays from core. Just assign them on the material..
     
  34. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    335
    Good thanks, but it needs to be another material right ? because one material is using the Microsplat Terrain shader and other one the Microsplat Mesh shader !
     
  35. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    yup
     
    f1chris likes this.
  36. gfbeach

    gfbeach

    Joined:
    May 19, 2015
    Posts:
    9
    I'm working with Unity 2019.3.15 and URP 7.3.1 and have purchased the appropriate URP module for Microsplat. How do I get a terrain with a Microsplat shader to accept lightmaps? A lightmap gets generated when I bake (there's an entry in the Inspector -> Terrain -> Terrain Settings -> Lightmapping), but it doesn't seem to apply to the terrain if I have a MIcrosplat shader on it.
     
  37. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Should just work- but URP was developed with 7.2.1 so there is the possibility that unity changed something, though for that level of release they are not supposed to break things like that..
     
  38. gfbeach

    gfbeach

    Joined:
    May 19, 2015
    Posts:
    9
    I tried doing a bake in the example scene included with MicroSplat and yeah, the Microsplat shader doesn't accept light baking for whatever reason. The left is with a default URP Terrain Lit shader, the right is the Microsplat.
     

    Attached Files:

  39. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Alright, I'll see if I can repro it.
     
  40. perholmes

    perholmes

    Joined:
    Dec 29, 2017
    Posts:
    296
    Jason, let me just salute you for creating some dynamite tools. I'm running most of your Microsplat tools in URP, and it's working great. I've read about your struggles with the SRPs, but your work is making a huge difference, creating painting tools that are both better than Unity's own and Unreal's. You've solved major problems for us.

    I had a question, but I solved it before I managed to click post.
     
    jbooth and StevenPicard like this.
  41. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    reviews on the asset store are a great way to say this! ;)
     
  42. perholmes

    perholmes

    Joined:
    Dec 29, 2017
    Posts:
    296
    Hi Jason,

    I'm struggling a bit with a strategy around wetness, puddles and snow. Our app needs to be able to bend the seasons, which is easy. I simply paint everything that needs to be wet to maximum wetness, I paint maximum puddles, and then I turn them down from a master controller. No problem.

    BUT, that precludes me from using them specifically. Case in point, I have a soggy area in a forest where I've painted wetness and puddles because there's water seeping. I will need this to *always* be there, regardless of season. Same thing around a waterfall. The rocks will always need to be wet. But on a rainy day, all the other rocks in the forest also need to be wet.

    I basically need two maps, one I paint for "minimum wetness", and one I paint for "maximum wetness", and then fade between them based on seasons. I can't just paint the "minimum wetness" map and then dump wetness on literally everything, which it doesn't look good. Wetness looks most photoreal when I've chosen all the places that are able to look wet, basically taking 20 minutes to carefully paint wetness on the whole map.

    Do I have any options here? Would you entertain the idea of having a second control texture and a slider? Would it be possible to *swap* control textures at runtime? As a plan B, I could force a choice, that *either* we have specific wetness in specific areas, *or* or we have specific wetness for the whole map? Then the choice is between wetness on the waterfall rocks, or wetness on all rocks in the map. I could live with that, although it's not additive, which would be ideal.

    Left a bunch of reviews.
     
  43. perholmes

    perholmes

    Joined:
    Dec 29, 2017
    Posts:
    296
    Second question, almost every time, the MicroSplatData directory goes into the Asset root folder instead of being next to the scene. Do you have any idea why this is happening? It's difficult to manage many maps if they all use the same data directory.
     
  44. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Well swapping the map at runtime is not an issue - you can use mat.SetTexture to do that. Another other options would be to have as many layers as you need and composite them into a render texture, which gets set on the material. Adding another wetness map is also an option- less flexible than compositing but more performant since you can do the compositing in the shader. Basically, this would be a rain wetness mask and the shader would take the max of the two wetness value? So you might paint wetness or puddles in one area that are always there, but have others who's levels depend on the current wetness values..

    This happens when the terrain doesn't have a path. By default, it will put the folder next to your saved terrain data object or scene. So as long as you save things before doing the conversion it should be fine. Note you can move the MicroSplatData directory, just don't rename it or stuff in it.
     
  45. par-002

    par-002

    Joined:
    Jul 4, 2012
    Posts:
    52
    I have a question about Terrain texture sampling. I am trying to get the texture values of a point on the terrain while using MicroSplat Low Poly (inside MapMagic 2).

    I have the terrain looking great but when I go to grab the alpha values of the terrain at any point, they don't seem to be very accurate and I'm wondering if the code I'm using to get the textures doesn't work well with MicroSplat.

    The returned values in the array are percentages of the textures used for that specific point. So if I'm using 2 textures on the terrain and the returned array looks like :
    Code (CSharp):
    1. [0] == 0.70 and [1] == 0.30
    then that means the point has 70% of Texture[0] and 30% of Texture[1].

    What I am seeing though are values that don't make sense when visually looking at the terrain after the Low Poly MicroSplat has been applied. If Texture[0] is dark green and Texture[1] is yellow, most of the time when I grab the textures at a point that looks like it should be mostly Texture[0], the values in the array do not match that.

    Again, I am wondering if the Low Poly asset requires different code to get the relative texture values at any given point.

    Here is the terrain texture code I'm using:

    Code (CSharp):
    1.     public static float[] GetTerrainTexture(Terrain terrain, Vector3 worldPosition) {
    2.         Vector2 terrainPositionXZ = ConvertPosition(terrain, worldPosition);
    3.         return CheckTexture(terrain, terrainPositionXZ);
    4.     }
    5.  
    6.     public static Vector2 ConvertPosition(Terrain terrain, Vector3 playerPosition) {
    7.         Vector3 terrainPosition = playerPosition - terrain.transform.position;
    8.  
    9.         Vector3 mapPosition = new Vector3
    10.         (terrainPosition.x / terrain.terrainData.size.x, 0,
    11.         terrainPosition.z / terrain.terrainData.size.z);
    12.  
    13.         float xCoord = mapPosition.x * terrain.terrainData.alphamapWidth;
    14.         float zCoord = mapPosition.z * terrain.terrainData.alphamapHeight;
    15.  
    16.         return new Vector2(xCoord, zCoord);
    17.     }
    18.  
    19.     public static float[] CheckTexture(Terrain terrain, Vector2 terrainPositionXZ) {
    20.         float[,,] aMap = terrain.terrainData.GetAlphamaps((int)terrainPositionXZ.x, (int)terrainPositionXZ.y, 1, 1);
    21.  
    22.         float[] textureValues = new float[aMap.Length];
    23.  
    24.         for(int i = 0; i < aMap.Length; i++) {
    25.             textureValues[i] = aMap[0, 0, i];
    26.         }
    27.  
    28.         return textureValues;
    29.     }
     
  46. perholmes

    perholmes

    Joined:
    Dec 29, 2017
    Posts:
    296
    Hi Jason,

    About the wetness/puddle/snow multiple control textures, isn't it less performant if you have two control textures instead of one? Of course, getting the max between these textures is exactly what I need. I don't know if sounds like you're considering it, but let's think about whether there's a deeper truth here, or just some dude's weird need for a feature.

    Basically, with one control texture, you can only use any given effect for a single thing, across the entire map. With multiple control textures, you can control multiple things, like specific (painted) wetness, and general (still painted) wetness, together. You're right, it's just a max between them.

    The argument against doing this in real-time is that at least for me, this is not a real-time feature. It would even be acceptable with a small wait as a new control texture is computed. The mix value doesn't change once set, or just changes rarely.

    So it sounds like the best workflow would be that during editing, I swap between two textures as I paint the different versions of wetness. And then with those two textures in hand, I need to mix them into a single control texture and feed it into MicroSplat every time my values change.

    Is this a possible workflow? Of course, this would need to be done separately for every object using MicroSplat (I use the mesh workflow heavily). So it could be a lot of work. But I'm just spooked by sampling potentially unlimited control textures. Are you warm to the idea of multiple, mixable control textures? Am I exaggerating the processing penalty?
     
  47. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    MicroSplat keeps copies of the textures on the terrain, and keeps them in sync with the arrays, so all of this type of code should work the same. However, remember that the visual appearance of any given pixel is not just about the weights, but the height maps as well (assuming height map blending is still active), and any other effects you may have on (distance resampling, low poly features, etc). So while the weight of texture 0 might be higher than texture 1, texture 1's height map may cause it to show instead of texture 0.
     
  48. par-002

    par-002

    Joined:
    Jul 4, 2012
    Posts:
    52
    Ah wow ya I forgot about the order. Thanks for the reply, I didn't even think of that.

    Would you know of any mathematical way to represent the weight? As an example, would the example I have above make the Texture[1] have a "greater percentage" in comparison than Texture[0] even though its 40% less? If so, how do I do a legitimate comparison to see what is more prevalent visually?
     
  49. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    The performance cost is 1 extra texture sample and an extra texture around - which is not much. For me the "deeper truth" is:

    - How many people would use this feature?
    - How many people would understand it?
    - How much confusion (and thus support requests) would it cause?

    For instance, if there are two layers, then the painter would have to have some distinction about these layers, and people would have to clearly understand when they need the second layer and when they don't. Additionally, they'd start to ask for separate controls or parameterization for each layer. Or ask for this for the vertex painting workflow, which doesn't have room in the vertex structure for more data. Writing the feature is actually easy- it's always side effects like these that need to be considered.

    Yup, that would work. Alternatively it's not hard to modify the module to support a second control texture, sample them both, then max the values. You don't have the need to have it explained, or work in the vertex workflow, etc, so there aren't tons of edge cases to worry about. Mostly you can just follow the pattern in the C# files and fragment files, and just have a 2 of all of that, then just take both samples and max(s1, s2) in the fragment code.
     
  50. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    You'd have to recreate any effect in the shader which changes that - so it's very dependent on your shader. For instance, if all you were doing is height map blending, you'd have to sample the textures at the correct UVs for each texture, then height blend them for the weights. Very quickly your basically writing all the MicroSplat code on the CPU as well, which would not perform well at all, which is why the approximation of just using the weights is fine for most use cases.
     
Thread Status:
Not open for further replies.