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

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

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

  1. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    I will post a SS in a few, actually turned off the flow map. and it was still the same.

    once I put the kids to bed shortly I will post a SS. Thanks
     
  2. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    We'll get it sorted out. I'll be doing the same for my kids over the next few hours, but will back shortly as well..
     
  3. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
  4. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    upload_2016-12-14_18-44-5.png



    also I get an error now..I imported to a fresh scene to make sure.
     
  5. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Looks like you have graphics emulation on and set to openGLES2.0. When set to 2.0, all samples for the arrays return black..

    Note that Unity sometimes flips this back to 2.0 without you noticing. Never figured out why, but it happens for me often when I'm set to mobile platforms..

     
  6. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    I tried every setting.... all of them, did the same thing.

    it also sets back to no Emu. as well, ya i'm aware we are a company and developed many mobile games for over a decade .

    But thanks for the info anyways. issue still happens on any setting.
     
  7. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    If you look inside the shader, you'll see a macro that looks like this:

    Code (CSharp):
    1. #if defined(SHADER_API_D3D11) || defined(SHADER_API_XBOXONE) || defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE) || defined(SHADER_API_PSSL)
    2.       #define MSPLAT_SAMPLE_TEX2DARRAY_GRAD(tex,coord,dx,dy) tex.SampleGrad (sampler##tex,coord,dx,dy)
    3.       #elif defined(SHADER_API_D3D9)
    4.       #define MSPLAT_SAMPLE_TEX2DARRAY_GRAD(tex,coord,dx,dy) half4(0,0,0,0)
    5.       #elif defined(UNITY_COMPILER_HLSL2GLSL) || defined(SHADER_TARGET_SURFACE_ANALYSIS)
    6.       #define MSPLAT_SAMPLE_TEX2DARRAY_GRAD(tex,coord,dx,dy) tex2DArray(tex,coord,dx,dy)
    7.       #else
    8.       #define MSPLAT_SAMPLE_TEX2DARRAY_GRAD(tex,coord,dx,dy) half4(0,0,0,0)
    9.       #endif
    If you change the half4(0,0,0,0) in both places to half4(1,0,0,0) do you see red everywhere instead of black? If so, your editor is running in a mode which is not openGLES3.0 or DX11 (most likely, dx9 if your on a windows box). I believe there's a way to force the unity editor to use dx9 or dx11, but if it's using dx9, then it cannot support texture arrays, which prints the exact error your getting in the console.

    Note that this test will only show red in flow mapped areas. I'll look into some way to throw an error in the editor if the editor is set to DX9..
     
    Last edited: Dec 15, 2016
  8. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    Forgot to add, I also wrote a script since another asset I use TC2 causes me to lose the actually stamps/height maps, so I wrote a script to force it . So this shouldn't be the issue either.

    seems like a known Unity bug, when its switching like that.. as I seen it with other tools as well.

    But I did a new scene with nothing and had the same issue.

    I will try what you said later tonight. Thanks John!
     
  9. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461


    Actually, you can see it right in your post. DX11 on DX9 GPU.

    A DX9 GPU doesn't hard the hardware to support texture arrays.

    Are you, perhaps, running in an emulator, on unix, or something? Or maybe a really old GPU..
     
  10. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    Forgot to add, not sure if you seen this or not, this is not related to your asset but with mobile textures , in general, we have to use 0,2,4 etc splats or they will look pixelated/blurry .

    https://forum.unity3d.com/threads/terrain-texture-on-android-device-pixelize.163834/

    Have not been able to see if this still happens with your asset or not, but it does with every other asset and with out..

    So wasn't sure if you seen this or been aware of this issue I seen since 2011.. only with Mobile.
     
  11. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    bah I have three versions open, gave you the wrong one.. one sec. My GPUhttp://www.newegg.com/Product/Product.aspx?Item=9SIA85V4R41406

    X 3... But run one, most of the time.

    I also have 5 other computers lap tops, from older to newer. .
     
  12. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Yeah, this is a general issue on crapy android devices. The issue is that precision is treated as a half or fixed in the pixel shader when it shouldn't, so if you pass some UVs to the pixel shader, then compute a second set of UVs from the first set, say scaling them, it ends up truncating the precision. I believe Unity's shader passes two sets of UVs over to the pixel shader as interpolators, then scales the others in the pixel shader, hence the "two layers are fine, but the others aren't" issue.

    MegaSplat's Mesh shader uses all available interpolators on low end devices already, so there's no room to pass additional UV coordinates over unless you raise the minimum shader level up (which likely cuts out those devices anyway). The terrain shader, on the other hand, has some free, so it might be possible to send a few more UV coordates over. I haven't spent much time exploring this yet, though. All of that said, it should be possible to get a Mesh MegaSplat shader which uses a single UV set to do one or two layer 256 texture splat mapping working (no macro texture, flow, detail texturing, triplanar, as these generate extra UVs), and like macro texturing and detail texturing working on terrain. I'll have to put this on my backlog before the 1.0 version, as a special "low end android compatible" option in the compiler..
     
  13. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    Bah, I'm a newb.... It did switch off No Emu... and I forgot to add my script .. that forces it to stay no Emu... I added it to the others, but forgot the one..

    Glad you see the DX 11 ON DX9. gpu,.... thought that look wrong as well.. after I was thinking about it lol.

    I had it right on two machines, but the Android one, I didn't.... I test alot on many machines.. So it was a user error. on my part.

    Sorry about that.. Thanks for the help though.. I re-imported to a new scene.. and it was fine ..
     
  14. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    actually it happens even on good Android tablets as well. Samsung Tab 3 and Tab S are good Tablets and seen the issue on them as well.. SADLY. would be cool to add low end android compatible.
     
  15. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Question for those of you with MegaSplat:

    The current product includes my full vertex painting toolset. It allows you to do a ton of things, from painting colors, to painting or baking arbitrary information into UV channels, baking ambient occlusion, and allows you to visualize all of this data as well, which can be really useful for debugging. I included it because it allowed me to quickly bootstrap the development of MegaSplats, and I think it adds a lot of potential value for users. Honestly, I haven't seen a vertex painting toolset on the store which supports everything it does, and I charge less for MegaSplat than those systems do just for the vertex painter.

    However, I had a user get into trouble with it when trying to paint flow maps. It was a simple mistake (they were set to paint in the color channels instead of UV2) and luckily they're vocal and contact me when they have issues. Had I broken out only the parts of the system that were needed for MegaSplat, and hardcoded things like which UV channels the flow mapping information goes into, these kinds of mistakes wouldn't be possible.

    So it seems I have a choice between:

    Keep it like it is:
    + Only one code base to maintain (more time to work on other things)
    + Users have a more powerful toolset
    - Users might get confused more

    2. Make a stripped down version of the vertex painter which only supports the features MegaSplat uses
    + Less confusion, simpler interface
    - Two codebases to maintain, debug
    - Less powerful toolset

    Thoughts?
     
  16. Nateply

    Nateply

    Joined:
    May 20, 2014
    Posts:
    46
    Option 1. It's a win for you and users. Confusion can be overcome with documentation. Lack of features can't.
     
  17. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    425
    Bought it, but not used it. Terrain work comes later in my game. I would vote for Option 1.
     
  18. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    I don't know what is more convenient/efficient for you. I`m interested only in the texturing side. No flow painting.
     
  19. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Well, the vertex painter would still be available via github, so people that want a more powerful version have that option. The main thing would be removing the stuff that's not explicitly used by MegaSplat so people don't become confused or accidentally mess things up (for instance, the main painting interface when you open it up is for painting colors, not megasplat, which uses the custom tag. And you can paint flow data into channels which MegaSplat doesn't use for flow, which can mess up other things).

    Maybe all of this can be overcome with tutorials, but that seems like an uphill climb to save features that many people will never use or understand. I'm a big fan of extremely powerful tools and built the vertex painter for many of my own needs; most people aren't baking pivot positions into vertices so they can animate things entirely in shaders, or stuffing data into the fourth uv channel of a mesh. They want to buy a shader and have their stuff look amazing with as little work or understanding as possible.

    Anyway, it's not the highest priority thing right now, so I have some time to think about it. I fear people buying the system, not taking the time to realize how it works, and one staring it. Ratings have a huge impact on sales, and sales have a huge impact on how much time developers can spend working on things, so yeah..
     
  20. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
    Bought it, but not used it yet, I vote for option 1. I got megasplat for that, just trying to find the time to use it!
     
  21. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    Yesterday I spent some time with Megasplat for the first time. All my comments so far were only from reading the docs and watching the video updates. I was surprised to see you used only one material and only one macrotexture for all 4 tiles. I think it needs to be more flexible here. Maybe I want to have one central tile where all the action goes and another 4 tiles on the sides. Or maybe one on the middle with a higher resolution and another one for the external/ring mesh that acts like a border. Or 4 big ones in the center and 12 border tiles on the sides. With meshes you have a little more freedom than you have with terrains, where usually people are using only square tiles. Maybe I want to have 9 tiles, the center one being the main one. I can build the UVs and group the meshes any way I want. So, being able to use one macrotexture for each mesh will help. The same goes for ColorToSplat.
     
  22. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    And talking about multimeshes and multimaps, I would love to have an automapping feature based on some naming convention rules (name of the mesh and channel), to speed up the workflow. It's not a specific Megasplat feature, but workflow wise, mapping the right image on the right mesh/channel will help a lot.
     
  23. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461

    I don't get what your asking- MegaSplat doesn't care if you have 1 tile or 50, 1 material on those tiles, or 50, or any arrangement in-between. It's completely agnostic of how you want to set that stuff up, and lets you paint across as many or as few meshes/materials as you want.
     
  24. StevenPicard

    StevenPicard

    Joined:
    Mar 7, 2016
    Posts:
    859
    I just bought this asset this morning. I was so disappointment with Unity's terrain limitations when it comes to texturing that when I saw you now support native terrains the purchase became a "no brainer'. :)
     
    jbooth likes this.
  25. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    My apologies Sir!
    Back to square 1. I need to spend more time in Unity. And Megasplat too. :)
     
  26. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    As to the textures not showing when playing the game in the editor, I thought of some more differences between my game and your demo scene. Not sure if any of this would matter, but I don't start in the game scene. It's in a loading scene, the game scene gets loaded in async.
     
  27. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Any chance you can send me a repro? Or perhaps we can work a time to do a remote debugging session? Nothing about this description seems suspicious; I generally set up actual games this way as well.
     
  28. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    A repro could take me a while to get together. I'd be fine with a remote session.
     
  29. ikefrc

    ikefrc

    Joined:
    Jul 3, 2012
    Posts:
    81
    Hi, we are currently looking for an alternative to unitys terrain system. The problem is that we are painting the terrain in realtime (for example when a tree gets cut down the forest floor disappears etc) and TerrainData.SetAlphamaps produces lag spikes which are noticeable.

    The terrain itself is procedural generated and painted.

    How well would MegaSplat fit our case and could we replace the build-in unity terrain with it?
     
  30. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    TerrainData.SetAlphamaps is slow because it's going to regenerate all the terrain textures for the GPU from those arrays and re-upload them. If you have more than 4 textures, then it's going to update multiple textures. MegaSplat's works on terrains or meshes; a mesh stores it's data in the vertices, and the terrain uses a single texture to store all of the information.

    For dynamic updates, using a Unity Terrain is going to be very fast. What you could do is create a render texture and Graphics.Blit the _SplatControl texture to it, then use it as the splat control texture. Then when you want to update some area, blit a texture to that area which is the shape and texture choices/blends for the effect you want. Alternatively, if your area is small, you could just use SetPixel to adjust the pixels you want.

    A mesh terrain can also be fast, but it's going to depend on what system you use to figure out which vertices need to be updated. For instance, if you're mesh is 60,000 vertices and you do a linear search through them, that could take significant time- however, I'm betting this will still be much faster than calling your current function. To speed that up, you could specially hash you vertices so you only have to search a limited number of them. You could also break the mesh into multiple meshes to help as well.
     
  31. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Oh, and btw, the linear search isn't so bad- it's what the vertex painter uses, so if you want to see how fast the simplest solution is you could download the vertex painter from my GitHub and try it on one of your meshes and profile it. About half the time spent painting the mesh comes from just iterating over all those vertices and doing distance checks, and the other half comes from the delegate solution I use to make the brushes super general. You could easily optimize out the second part in your case.

    You can see me painting on millions of vertices in this video, using the naive approach (no spacial hashing):

     
  32. ikefrc

    ikefrc

    Joined:
    Jul 3, 2012
    Posts:
    81
    Hmm isn't the unity terrain system more or less a blackbox, so how can access the controlSplat, without going through SetAlphamaps? Or is that something megaSplat enables on the unity terrain by replacing the shader?

    Btw, we've tried only updating small chucks (32*32) through Setalphamaps but it still lagged.
     
  33. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    MegaSplat doesn't store it's splat information in the alphamap fields of the TerrainData. Rather, it's an easily accessible texture (which happens to use a material property called _SplatControl). My guess is that even if you change a small chunk of the terrain it regenerates the entire map, since it's not really designed for runtime changes.
     
  34. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    This week:
    - Conversion from terrains generated in Map Magic (or any standard Unity Terrain) to MegaSplat
    - Render out a macro texture from the splat map paint job

    Unfortunately Unity still hasn't approved the last update, so I'm going to wait on that to be released before submitting this one.

     
  35. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    Thanks for this new update!
    I've watched the youtube dev log 6 and I have a few questions, based on that:

    1. The terrain name given by MapMagic was "Terrain 0,0". I don't own MapMagic, but I suppose it will name each terrain tile based on its own naming convention.
    The output of the Megasplat RenderBaking was "output_channelName". Would it be possible to automatically name the output based on the name of the mesh/terrain tile? A MeshName_ChannelName naming convention will help a lot. I would reeeeeally hate to manually rename each render/bake.

    2. You baked the macrotexture at 1k. What is the maximum render-baking size?

    3. In your mesh scene example, all the mesh tiles have the same name. I suppose they share a common 0-1 UV space. Does it means Megasplat will bake a single macrotexture per parent object? That means a common texture baked for all 4 tiles?

    4. What if I have 4 independent meshes, coming from 4 different .fbx files, different names, but of course, each mesh with its own 0-1 UV space? What the output name will be for each tile?

    5. Same question for terrains. What would be the baking workflow for a multi-tiled terrain setup?

    On a side note, would it be OK with you if I send you the invoice by email and get access to the latest dev version? Would be great to have an online place where we can gey the latest version, without all the AssetStore hassle.

    Thanks again for the great update. I'm sure it's a lot of hard work. And some clever wizardry, for sure.
     
  36. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    Very nice asset. Will a mesh using MegaSplat shader(just 256 diffuse textures) only have 1 draw call? Would it be much slower than using very simple 4-diffuse splat map shader?(sampling rbga from a single texture). The reason I ask is MegaSplat could be pretty much overkill for my current project( Since all I want is more textures for my mesh. And the mesh is just a quad mesh).
     
  37. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Each megasplat layer is 3 samples per pixel regardless of how many textures are used across the mesh, and rendered in a single pass. For Unity Terrains, it's four samples, because the control data is stored in a texture. Right now I don't have an option to not sample a normal map (so 6 samples per layer), but that would be trivial to add. With a mesh, the control points are stores per-vertex, so you'd have 4 textures available on a quad. However, the terrain shader uses a texture, which would allow you to have as many textures as you want across a single quad (it cannot rely on vertices, since Unity does not give you access to them and they LOD them as well).

    The maximum size is 8k. Currently everything in your selection is rendered to one set of output textures. I did it this way because in my mesh case I have 4 meshes making up the terrain which fill a 0-1 UV space. If I output each of them separately, then you'd end up with 4 textures and have to combine them into one. So basically the workflow is to select whatever goes onto one texture page and render bake it all at once.
     
    Last edited: Dec 18, 2016
  38. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    I'd like to get something like this setup eventually. I don't mind one offing it during the beta if people have a specific feature they want to test or have a bug fix that's blocking them.
     
  39. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    Sorry to say, but these are serious limitations. I don't see a reason to limit the resolution.
    Would it be possible to make the render/baking independent for each submesh/tile?
     
  40. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    What, exactly, do you need a texture larger than 8k for? It's not that hard to make it bake it in multiple sections and stitch them together, but why? Unity won't even load textures over that large, and any virtual texture solution is going to be more expensive than running the shader in realtime..
     
  41. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    1. It`s a lot harder to handle 1 big texture compared to a bunch of smaller ones. Photoshop actions, when needed, will do wonders. It's a lot easier to handle smaller textures. And to reach a final 8K display resolution I would rather use 16 x 2k textures.
    2. Many times to get a good, decent quality, you work at a higher scale and scale down for the final version.
    3. The textures might look very different at different render size, especially when you have the option to tweak the tiling for the painted texture.
    4. More control and less constraints. You don't know always how the end result will look like, exception being maybe if it's hand painted.
    5. I plan to have some steampunk mechanical island/floating building, where I have loads of objects, loads, and your Megasplat will be extremely handy to texture huuuge areas with just a few metal textures, somewhere between 24 to 36 textures. Really hard to cover with normal texturing techniques at that scale.. It all depends how good the textures will be, to achieve variation while keeping the metal feeling in place. LOD wise is also is also easier to handle smaller textures to achieve the desired look. I noticed, with Megasplat, the quality of the textures is paramount.
    6. I suppose there are other scenarios that people might find useful having such freedom.
     
  42. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    This doesn't really explain why you think an 8k resolution is limiting; the memory used for a texture of that size is prohibitive for realtime work, on any hardware. If you were to go to 16k resolution with DXT compression (which Unity and I believe no modern GPU supports), it would be 512mb of memory for a diffuse and normal map, and the memory bandwidth required for drawing that would make running the full megasplat shader cheaper that using a baked out map. Practical resolutions for these maps would be 1k or 2k at most, which still gives you the ability to render out at 16 times the resolution you actually need, which is beyond the nyquist frequency of which working in a higher res will have any impact on the final image quality.
     
  43. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    I didn't say 8K is limiting. Rendering/baking in only one chunk is limiting.
    My hole point was to advocate the freedom of baking one map/channel per each submesh/child mesh of the parent object. That goes for ColorToSplat too.The way it is now, it will render/bake only one image, which is very limiting IMHO. Who knows what are you going to build in one game level? Why bake everything in one map? Why not let the user decide what to bake? That is why I said is limiting. Nobody can predict how a tool, especially like this one, is going to be used.

    The post no 271 was made having the same idea in mind.
     
  44. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Limits are a fundamental part of game development. If you design tools or technology to be 'unlimited', they will end up a mess of code that no one needs or uses, run slow, and never achieve everything anyway. If someone can provide a practical example of why they need textures to be over 8k, then I would consider adding the extra code required to support such a feature. This applies equally for specific workflows, such as batch processing these types of utilities, or baking subsections of a terrain. But I'm not going to make the code overly complex and messy "Just in case", and then get complaints because people don't understand the thousands of options the tools provide, which were only put in because "one day they might be useful". Code shouldn't be written in a vacuum of direction, but rather to solve a specific problem.

    IMO, the most common use case for this particular feature is baking a large section of painted terrain to a macro texture as an optimization technique. Should someone come up with widely different techniques which have some amazing result, and the current workflow is a bottleneck to achieving those results, I'll code the workflows to make those techniques easier and eliminate those bottlenecks.
     
  45. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    The objects in a game level are not connected. They are not a continuous surface. You are forcing the user to bake all of them in only one map. No matter the resolution intended for each object.

    It would have been nice to have these baking options inside Megasplat. I'll check the asset Store to see if there is something appropriate for baking. Even though you're the most suitable to make such a tool. Do I need a certain shader for that? If I use the debug option will be good enough?
    I do have a license for Renderator Pro. Maybe it;s good enough. I'll see if the developer wants to help.
    Thanks anyway.
     
  46. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    How so? Select the objects you want to go into one map, bake, then select the next set, bake. All the object's in a single bake go into one map, but you can bake as many separate maps as you want..
     
  47. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    I'll have to try that when I get my hands on v.094.

    What if I do not select them? Can I bake them automatically? All the _splat 3D painted meshes?

    Man, I don't get it. I am asking for a common feature found in any decent 3D workflow a 3D guy might expect, and I have to write pages to convince you that it`s better for me if I don't do it manually. Just to save time and avoid the awful manual work.
     
  48. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    Even though I do have a license, I didn't had in mind Amplify Texture. Now that you're saying, having such an option, to bake huge vistas, would have been interesting.
     
  49. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508
    I'll sort of follow this thread just because I find terrain and vegetation related stuff in Unity, I also play around with Megasplat.
    I don't quite see clearly what you are asking for. I thought maybe to make a color map or "macro" texture of the entire terrain after you paint it with megasplat, but your last statement about amplify texture leads me to believe otherwise.

    I can't help but comment that I think jbooth is trying to be very reasonable and genuinely looking to see the value of what you are suggesting, but some of your posts are somewhat belittling and rude. I think if you clearly show how it's useful to a significant number of people, he'd seriously consider putting a good feature in.
     
  50. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Show me one Unity asset that does this. Just one. Anywhere on the asset store.

    And running Amplify Texture would be more expensive than running the actual MegaSplat shader. So while it might be interesting to you, it's completely impractical and ill conceived for actually shipping a game. As someone who has shipped games and written entire game engines for over 20 years, I see little point in adding features because they are "interesting" when they are counter to actual performance.

    Ok, lets say we put some feature in that allows you to automatically batch bake this stuff out. There *is* an actual case where that is useful; where you have hundreds of objects you want little macro textures for.

    1. How does the tool know which objects go to which textures. For instance, if I have 4 terrain objects that are supposed to go to one texture, but in other cases it's one texture per object?
    2. How does the tool decide which packing to use? If multiple objects can point to one texture, they might each use different packings, making any choice wrong.
    3. How does the final texture get used in the game? It might be a macro texture, but might be used in some other way because the user has rolled their own shader in ASE.

    The only practical way to do something like this if for the user to add components to every object in the scene which specify how to handle each object; which texture to assign the render too, which packing mode to use, and what to do the with the texture when you're done with it. This falls into both "Complex for users to understand" and somewhat into "Game specific" territory. Both areas that are worth avoiding until that complexity is clearly demonstrated, and not just theory.
     
    Nateply likes this.