Search Unity

  1. Unite Berlin 2018 schedule is now updated with talks on real-time ray-tracing, upcoming 2D features & many more. Check it out!
    Dismiss Notice
  2. Unity 2018.1 has arrived! Read about it here
    Dismiss Notice
  3. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  4. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

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

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

  1. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    2,635
    MegaSplat is out! Don't know what MegaSplat is?

    MegaSplat is a collection of shaders and tools to allow you to splat map meshes with up to 256 textures in a single pass. It features consistent shader performance regardless of how many textures you paint onto your mesh or terrain, and that performance is faster than traditional splat map techniques.

    MegaSplat works with Unity Terrains, or Meshes!

    Asset Store Link

    tessellation_small.png

    MegaSplat includes a unique shader compiler, generating unique and efficient shaders for the features you want. Shaders are based off Unity's standard shader metallic workflow, and support all the lighting and rendering modes they support. In additional to a full PBR workflow, they also support features like:

    • Tessellation, Displacement, and Parallax
    • Flow Mapping for moving surfaces
    • Refractive Flow Mapping for watery surfaces
    • Paintable Puddles and Wetness
    • Global Snow, with adjustable sparkle (ice BDRF)
    • Triplanar UVs, projected UVs, and multiple UV set support
    • Texture Clustering, which prevents visible tiling of textures better than any other solution
    • Macro Texturing/Detail Texturing with multiple blend modes (overlay, multiply2x, normal, etc)
    • Distance cross-fading to a macro texture to use a simpler representation in the distance
    • Multiple texture packing options
    • Ability to paint splat maps over regularly textured objects
    • Alpha and Alpha Test (clipmap) modes
    • Integration with many Unity store assets
    • And much more
    shader_features2_small.png
    MegaSplat also includes my Vertex Painting toolset, which is one of the most advanced and performant Vertex Painting systems for Unity. Easily paint over hundreds of objects with millions of vertices, paint into any vertex channel (color, uvs, etc), edit mesh geometry, paint flow directions, visualize vertex data, bake ambient occlusion and lighting information into your vertices and much more.

    MegaSplat also includes a Terrain Painting tool for working with Unity Terrains using the same workflow. All features available in the Mesh workflow are available in the Terrain workflow.

    MegaSplat also includes custom brushes for working with it's shaders. Easily paint multiple textures down in a single stroke, choosing which texture gets applied to which vertex based on 3d noise functions, height, or slope. With so many textures available, whole new ways to texture terrain are possible!

    painting_toolset2_small.png
    MegaSplat includes 60 high quality PBR terrain textures to get you started. Having this many textures available for splat mapping greatly expands the types of techniques you can use. The included textures are paired into several variations each, which allows you to prevent visible tiling by varying and blending the textures together using it's unique Texture Cluster technology.

    60_textures2_small.png

    You can easily convert terrains generated in Terrain Generation tools like Gaia, Terrain Composer, and Map Magic to MegaSplat format. Simply map your source texture to one of the Texture Clusters in MegaSplat and press convert, then proceed to paint even more textures down.
    easy_conversion2_small.png

    Native integrations available for:
    • Map Magic
    • Landscape Builder
    • Gaia 2.0 (coming soon)
    • Terrain Engine
    • Amplify Shader Editor

    Includes native procedural texturing tools.
    Use a shader graph like interface to design custom texturing procedures which work natively in MegaSplat format, allowing you to take advantage of hundreds of textures at once. Adjustments to parameters show their results in real time, as you work, instead of having to wait minutes to see the results.
    A runtime procedural system based on triplanar projection is also available for meshes, allowing you to project two layers of top/side/bottom textures, mixed by noise functions, and using Texture Clusters to vary textures in the projections.


    MegaSplat also includes:
    - Tools for rapidly painting a terrain from a guide image
    - Components for determining which texture is hit with raycasts or collisions
    - Shader modes for painting splat maps over traditionally textured objects
    - Tools to "Render Bake" out the final splat mapping results (Albedo, Normal, etc) to use as distance LODs
    - Nodes which integrate into the Amplify Shader Editor, allowing you to use the splat mapping technique easily in your own shaders
    - Tools for creating and automatically managing Texture Arrays in Unity
    - Tools for integrating physics interactions with tessellated/displaced surfaces
    - Extensive documentation and videos

    Note that MegaSplat requires shader model 3.5 and Unity 5.4 or greater for Texture Array support. This means that it will not work on openGLES 2.0 or DX9 devices, but will run on devices with openGLES 3.0, openGL3.2, Metal, and most console platforms. Tessellation requires shader model 4.6, and will run on PCs, OSX, consoles, and high end mobile hardware.

    Why be limited to just a few textures, let you imagination run wild!
     
    Last edited: Jul 28, 2017
  2. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    2,635
    Here's a quick video showing off painting in MegaSplat:

     
    Last edited: Nov 18, 2016
    StevenP94, gurayg and hippocoder like this.
  3. zmaxz

    zmaxz

    Joined:
    Sep 26, 2012
    Posts:
    137
    Awesome!!Super cool!!
    I'll be sure to buy it !
     
    Last edited: Nov 18, 2016
  4. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    21,769
    Distance cross fading seems interesting, as only worry I have about this is that it's meshes without any lod support... what performance would we be looking at?
     
    TechDeveloper likes this.
  5. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    2,635
    Distance cross fading is strickly optional, but can actually be a performance optimization, since I can stop doing the splat mapping once the opacity is 0 on the splats, making the shader much cheaper in the distance (I haven't actually added this optimization yet, but will very soon).
     
  6. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,502
    This is AWESOME. I was like...WHERE are the cool new terrain shaders using texture arrays??!! Finally!
    Would like to get a sneak preview of your documentation, if possible.

    A couple of questions:
    Why the 2 layer limit? Not a big deal, I personally think 2-4 textures at one location MAX is plenty, I'm just curious.

    I tried to view the video using just youtube, says removed by user. That correct?
    The video quality is low, I found myself wanting to see more detail on how your textures look when using normal maps, height maps, etc. Looking forward to seeing your terrain painting in all its glory.
     
  7. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    2,635
    Here's another video I recorded going over the process of setting up meshes and texture arrays with MegaSplat:

     
    antoripa likes this.
  8. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    2,635
    So, to be able to work with TextureArrays in this manner, you need to get an index value from the vertex to the pixel shader for each vertex on a given triangle. As an example, you might paint index 1 on the first point, 5 on the next, and 9 on the third vertex. In this pixel shader, you need to sample these three textures and height blend them together. So the first issue is that if you simply put those values into the vert2fragment structure, they're going to be interpolated, which will cause it to sample every texture between 1 and 9 across the face.

    So the mesh preprocess marks some filtering data onto the vertex colors which can be used to ensure that the correct values make it to the pixel shader, and only textures 1, 5, and 9 are sampled. This means that each layer of texture requires 3 samples per texture, and one texcoord worth of data in the vert2fragment structure. If you use the NormalSmoothnessAO packing I use, that means you have 6 texture samples per pixel for one layer of splat mapping. When you go to two layers, that's now 12 texture samples per pixel and two texcoords.

    A third layer may be possible to add, but that would be 18 samples minimum per pixel and 3 texcoords. If you've ever written shaders, you know that texcoords are in short supply, so that might bump the minimum requirement up to shader model 4.0.

    Timing, I just updated it (chopping off the 2 minutes of black at the end).

    It's a 1080p video- although I think YouTube caps playback at 720. You can adjust the quality settings in the bottom right, but if you'd like I can cut out some screenshots of things up close. Most of the quality is limited by the quality of your textures and especially the height map; the better they are, the better it looks.
     
  9. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    2,635
    Here is a link to the current documentation, which I'm continuing to work on. Let me know if any section is unclear or needs more explanation.
     
  10. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,502
    jbooth, thank you very much for your clarification and video update and the link.
    Best of luck to your asset!
     
  11. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    Your new shader looks really interesting. A few questions:
    1. The brush painting blending is based on height. Which height information? The one in the alpha channel of the brush texture? Or in the alpha channel of the macro texturing maps?
    2. Is it possible to use in the painting process a B&W bitmap mask UV mapped on the mesh?
    3. Is it possible to import a mesh with vertices already painted and associate the vertex colors with the texture clusters or individual textures?
    4. I`m also curious about the price. :)

    Good luck with your interesting asset!
     
  12. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    2,635
    1. Alpha channel of the splat map diffuse. So each terrain texture has an alpha channel, and it's used to resolve the blend between multiple splat maps.
    2. The vertex painter allows you to project textures onto a mesh, so yes, you could do this. You'd map your texture choice to the color.a value for the first layer (index/255 being the value to use), and UV3.w for the second. UV3.x is the blend between the two layers.
    3. As long as the vertex data is specified in the format above, sure.
    4. Currently $30, but the plan is to raise it after the beta period/more features/etc.

    In regards to more features, I'm pretty open to working with people on their needs. Some of the things I'm currently looking at is integration into Amplify's shader editor, so you can roll whatever shaders you want using the technique, and integrating into some other terrain generation systems that can take advantage of having so many textures available and essentially paint the terrain for you. I also have some other tools that didn't make the initial release, which allow you to map a color image to texture clusters as a quick pass over the terrain. Some landscape tools will also output a guide image that you can use for this. But for now, I thought it best to get this out and get some feedback from users before I get too far into any of these things..
     
  13. Enoch

    Enoch

    Joined:
    Mar 19, 2013
    Posts:
    179
    This looks fantastic.

    How hard is this shader to edit?

    I have some very specific requirements that I will need to modify your shader to meet:

    I currently have my own smooth voxel solution and I have a need to bury the lighting data in the Color.a. I use this data as ambient lighting multiplyer (so underground where there is no light it is 0, above ground it is 1), when rendering my voxel tris I set it in the Color.a. I also need triplanar mapping (I am not setting UVs), AO, metallic, roughness, emission and height. Currently for my triplanar splat shader I have a Texture Scale component that I need to set on a texture by texture basis. The voxelized aspect of this means that in terms of a splat shader I assume I would use Vertex Color rgb to define the current texture index?

    I am currently using a solution where I runtime generate a material based on the 3 verts of a given tri and I am getting anywhere between 8-20 drawcalls per chunk (yes ouch), if I can convert this shader to my needs I drop to one draw call per chunk (16x128x16 voxels), this would be a ridiculously huge improvement. I really hope I can use your product, at the very least I definitely need to start looking at texture arrays.
     
  14. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    Your asset starts to become more and more interesting. :)
    1. Got it.
    2. A video tutorial with a simple plat plane, with enough vertices will really help to understand the workflow, features and the end result you get.
    3. I`m not sure I followed this. An .fbx file it`s not good enough, I suppose. I have to read the docs.
    4. Sounds good.
    Integration with the Amplify Shader Editor sounds like a really good idea!
    Not to mention the image color used as a guidance for the texture clusters. It means I can use 6 sand textures in a texture cluster to map/paint them on a yellow beach area in the UV mapped image color on the mesh?
     
  15. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    2,635
    I don't think it will be too hard for you- the single layer shader already supports triplanar for the "UV Challenged" among us, as well as a full PBR stack. I may extend the multi-layer shader to support triplanar if there's enough demand. Each texture can already be scaled individually as I have a system for per-texture properties. So the shader is relatively close to what you want. Right now it uses the color.rgb for special weighting values - basically, each triangle in your model needs to have exactly 1 red, blue, and green colored vertex (ie: no two reds and a blue). That's what the mesh preprocessor does, but if your constructing your own meshes it should be pretty easy to do that on the fly. color.a is the texture choice for the first layer of splat maps, though it's trivial to move that to some other channel if you prefer to use color.a for something else.

    Is one chunk one voxel, or a 16x128x16 block of voxels? Either way, you should be able to generate your mesh and setup the vertices for whatever texture you want on each vertex and draw the whole thing in one draw call.
     
    Last edited: Nov 18, 2016
  16. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    2,635
    An FBX file is fine- you'd just convert it using the tools provided.

    You can do that right now- what I'm talking about is using an image to, say, paint the entire terrain at once. So you put yellow in your image, and it finds your six sand textures and randomizes them across the yellow area of the mesh. green = grass, etc.
     
  17. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    Nice!. You really have to make a videotut about this feature. You sample a color/pixel in a certain area from the image color using a brush and a tolerance/sensitivity, or you define a color in the color picker? The first option looks more powerful, if you ask me.
    Thanks!
     
  18. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    2,635
    No, in the current implementation (which is still being worked on) you either define a color -> texture cluster mapping yourself, or it scans through all the textures in the array and averages the color of each one to produce that mapping for you. Then you give it a guide image and it goes through each vert, looks up the color on the guide image, and finds the color closest to this in the configuration and applies a texture from that texture cluster to the vertex.

    The real thing I want to explore is gradients for the 2 layer shader; basically, find the two closest texture clusters for each vertex and blend between them based on perceptual color distance.
     
  19. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    Interesting, curious to see how it works in practice. Maybe having more than one method it doesn't hurt, I mean implementing the perceptual method next to the existent one.
    Few more questions:
    1. Would it be possible to export a baked texture based on the UV layout of the mesh for all channels (diffuse, normal, etc.)? If yes, which would be the maximum size?
    2. Does the painted vertex need to be visible on the screen? Or it`s a 3D brush and if placed in the volume space of the brush, the vertex, visible or not, gets to be painted,
    3. The final result of the painted process are the vertices being colored. I suppose the textures need to be present in the assets folder. How strict this is? I mean, is it possible to move them in a different location after the painting is done?
     
  20. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    2,635
    1. I don't have any plans for baking out textures; it would be pretty easy to do for something like a terrain, but once you get into UVs that potentially overlap it gets complex. I usually use Simplygon for those types of tasks.
    2. No, the brush is a spherical volume.
    3. It's just an asset in unity, so you can move it around as usual. Unity doesn't care where things are located; it gives every object a GUID, so the file path is irrelevant.
     
  21. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    1. I was hoping to get a consistent look and really smooth transition by using the bake as macro-texture. Including the smooth fading macro-texture option with the single layer it's a really great feature, I think.
    I checked Simplygon. Man, for commercial purpose, it`s 400$/month.
     
  22. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    21,769
    How does this work with simplygon? does it bake the appearance of this complex shader down to a single texture? Also this is a good system for other meshes too, not just terrain style ?
     
  23. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    2,635
    MegaSplat works with any mesh, just not Unity terrains due to the lack of access to the vertex data with Unity terrains.

    To be clear, MegaSplat doesn't have anything Simplygon specific in it, but Simplygon can be used to bake any set of meshes/shaders/materials down into new meshes and textures using their ProxyLOD tech. Unfortunately the Unity integration for Simplygon is lacking, requiring you to write a "shader" for Simplygon to translate a Unity shader into simplygon inputs.

    What we did for our Star Trek game, which I briefly cover in my Unite 2015 talk, was to integrate Simplygon into our pipeline the same way it's integrated into the Unreal engine. Basically, we render every triangle in the model to a small texture, then feed all of these textures and a mesh using them to simplygon, then simplygon returns a new model and texture, which is tightly packed and comes in standard diffuse/normal/etc textures all combine. This allows you to take any number of models and shaders and bake them down to a single mesh/texture set. When I was at Harmonix working on a large-world game, we actually did this for whole chunks of the world for distance LODs instead of having object based LODs. After about 100 meters, the entire world was just cubes of objects combined with simplygon, which gave us really consistent rendering.

    All that said, if you just want to bake a terrain down and don't have multiple objects or overlapping UVs, then you could likely write something to do that pretty easily (just turn the UVs into a flat mesh and render it to a texture). I don't provide any capability like this in MegaSplat though- not what the package is about- but it can all be done if people want to do that kind of thing.

    I'm curious as to what the original use case for something like this is? Is it primarily LOD, or a poor man's Substance Painter?
     
  24. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    2,635
    Yeah, simplygon keeps changing their licenses around, which is pretty annoying since you can't count on the price being the same next month as it is this month.

    I see, so the idea is to paint the terrain, then bake out the macro texture and cross fade to that as an optimization, removing the need to splat map in the distance. It would be pretty easy to write this as a Utility function as long as you don't mind it not working for overlapping UVs or multiple objects, as that would require re-meshing those objects and re-doing all of the UVs.
     
  25. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    2,635


    Working on MegaSplat support for Amplify's shader editor, allowing you to roll whatever 256 texture splat mapping shader you want. This is a basic one layer shader with Diffuse/Normal/MSEO texture recreated in Amplify. The main node allows you to sample and filter one layer of splat mapping, and a blend node is also available to blend multiple layers together. (Disclaimer: Not finished, not in the initial release, but coming soon)..
     
    moure likes this.
  26. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    Merging/baking the painting in one image/channel (diffuse, normal, metal, etc) seems to me a natural workflow approach. You will get a strong consistent look from foreground to background with no seam between, and that it`s not a little thing to have. There are mainly 2 kind of users in Unity: coders and artists. I`m not a coder but I can appreciate a good tool for an artist. I can use, more or less, a similar workflow in my main 3D app of choice, with way more options and offline rendering power, but it will be impossible to match the textures distribution and painted height masking ot the foreground with the background macro-texture
    I had no optimization/re-meshing/merging assets in mind. If I have a bad UV layout, that's my bad. Or there are other tools like Mesh Baker or a bunch of other tools for such a case. You can`t match the megasplat painting in any 3D app, Substance Painter, Mari, Photoshop or any other 3rd party app. The main and great advantage is that it`s all done inside Unity, the final publishing environment! This is huge. Painting an ultra detailed foreground (1 texture/vertex, isn`t it?) with a dynamic max. 256 textures/channel brush and being able to also get a background texture to save frame rate it is not a small thing. Sorry, but there's no other way I can put it.
    And, I`ll be really happy to have the baking solution you mentioned: "just turn the UVs into a flat mesh and render it to a texture"! If I paint 3 converted meshes, just select&drag the converted/prepared and painted meshes in the megasplat baker and bake. The same as the conversion process.
     
  27. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    Man, this is epic!!
    I see there's the MSEO texture packing there. I suppose all of the other options will be available/included.
    A lot more freedom! Will you provide the Amplify version for all the shaders will ship with the Megasplat asset?
     
  28. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    2,635
    I can add a tool to do this to the backlog. If you have overlapping UVs, etc, then it will just render over that region with whichever is the last to render. Then you can spit out a texture that represents the final paint job and use it as an LOD. Additionally, you could process that texture in photoshop to give it some additional love..


    Those are just special texture samplers for MegaSplat- you can then create whatever packing you want; they work just like sampling a regular texture, but they perform the MegaSplat magic on them to extract the right sample from the texture array. Notice that I just break out the channels from the MSEO texture and map them to those inputs. If you wanted your texture to be emissionRGB + roughness in the alpha channel, you could just do that instead. This free's you from using any particular packing I come up with, allows for new techniques which I can't cram into my giant shaders, and allows for very custom uses I wouldn't think of.

    Amplify equivalents to my shaders cannot currently be created in Amplify because it doesn't support things like true conditional branching, gradient samplers, shader feature keywords, etc. Generally speaking, shader graphs are targeted at writing more custom/one off shaders. So, for instance, if you want to create a 3 layer MegaSplat shader with your own texture packing format, you could easily do that in amplify. Or if you wanted to write a shader that used the normal angle to select the texture index instead of having it painted onto the vertices, you could do that. What you can't do is write a giant uber-shader with lots of selectable options and certain optimizations I've made. But as ASE adds features, that may one day be possible.

    I'm a big fan of shader graphs, having written one myself for a previous company, as they allow people unfamiliar with shader internals to create amazing things they wouldn't be able to create otherwise. My current plan is to add the necessary nodes to ASE to ship examples that include a one and two layer mega-splat shader; from there, you can easily create flow mapping/macro texture/detail texture variants the same way you would with regular textures.
     
    jason-fisher likes this.
  29. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    You got yourself a client!
    Would it be possible to bake all the channels in separate images?

    I`m not able to write a single line of code but I manage pretty well with Shader Forge, hence my question about shaders. A few examples will do, just to help and learn how to use your specific nodes in ASE. And I suppose specific shaders have greater chances to be more performance efficient compared to the big multipurpose ones.

    Definitely, looking forward for MegaSplat to be released! :)
     
  30. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    2,635
    Yes, should be possible. Having done this before, I know the Unity renderer doesn't quite expose enough to do this without writing special shader for it, so I'll likely have ones that map from the ones I provide.

    Or less- you often have to make certain tradeoff's when designing mega-shaders that you don't when writing custom ones. Mainly, I haven't seen a shader graph that fully supports everything you can do in code..
     
  31. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    21,769
    Well I was thinking there doesn't seem to be any drawbacks just having your shader for all environment purposes, including buildings. I was planning on going with using LOD mostly for characters, vehicles and so forth but env including buildings would be dependant on vertex density, so I was thinking of just doing a straight swap for many high detail objects in a cell -> one low poly baked lump... sounds similar to what you did?

    So to get this to work I really need to prepare extra geo for simplygon...
     
  32. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    2,635
    You can use the shader for regular objects, create a series of textures which are essentially invisible (grey color, blue normal map) and paint splat information only where you want it. This will be more expensive than just using a regular shader, but you'll get a ton more variation and uniqueness, so my recommendation would be to put it onto objects where you get a lot of bang for buck out of it.

    In regards to simplygon as a cluster-lod approach, what we did was divide the world into 64x64x64 meter blocks. Each block would claim the objects which were primarily in it, and then simplygon it into a single mesh/texture. We'd then do this with 128x128 blocks, etc, until the whole world was just one block. Then, every frame, we could determine which blocks to draw and get an extremely consistent draw call count, with all the shading cost being consistent regardless of what shaders the artists created.

    Our integration to simplygon would take a series of meshes/shaders/etc and render out the inputs to the lighting equation for them. So basically, the stuff you plug into the surface shader structure or plug into on the shader graph. We'd go through each triangle and render the final albedo (Without lighting), normal, specular terms, etc to a texture sheet. Then we'd generate a new version of the model which referenced those textures instead of the original, and simplygon would return a fully optimized model with one set of textures which we could further pack to work with a cheap shader. It worked out surprisingly well.
     
  33. Darkoo

    Darkoo

    Joined:
    Feb 4, 2013
    Posts:
    96
    Hello! Has there been any testing on mobile? I'm creating game with "terrain" tile meshes in zbrush and each tile will be about 8000 or less polys heavy and all this tiles will be having the same shader with the same texture in theory this should be much less heavy than using multiple terrains I would say!?
     
  34. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    2,635
    It'll work on mobile devices that run openGLES 3.0 or better. How costly using this technique is and if it's faster than, say, Unity's terrain shader, depends on which features you're using. You can see some performance information in the documentation link posted above.
     
  35. Darkoo

    Darkoo

    Joined:
    Feb 4, 2013
    Posts:
    96
    Great, from the stats I can find out there that's about 85% of the Apple devices running ios.. so I can live with that :)

    When will this be out, because I would like to pay for it? :)

    I have downloaded your vertex painter tool and it works great!! I would suggest some interface changes to make things very clear because at a first glance it all looked a bit confusing. Could I start working with the vertex painter tool and once this is out continue working and not loose any work that I have done so far with the current vertex painter?
     
  36. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    2,635
    That's up to the asset store- usually takes about 5 days, so hopefully in the next few.

    The data layout is not compatible with the shaders in that package, so no. Any interface recommendations are always appreciated.
     
  37. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    1. Keyboard shortcuts to control the brush settings (size, intensity, flow, etc.). Can be with or without modifier keys. Or even better, to have options to set them manually. Or, same as Zbrush, a key to pop up the brush settings menu underneath the mouse cursor/pen.
    2. Separate window for Texture Arrays, ideally one tab for each Texture Arrays. This way I can dock the Texture Arrays window on the second screen, together with Megasplat and the rest of the Vertex Painter Pro settings and have access directly with one touch of the pen. Combined with my left hand on the keyboard it can ensure a smooth and immersive painting experience, without being distracted from endless clicks and deep scrolling in the interface. Eyes focused to the tip of the pen, that's the secret. :)
    3. Would it be possible to have an option to have options to set the size of the icons for the textures and maybe having the option to have the textures displayed in 4-6 columns? The idea is to avoid scrolling.
    4. Numeric pad keys to switch/change the texture in the Texture Array while painting.
    5. Same options for the mesh masks when available.
     
  38. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    2,635
    Do you mean for the texture array brush? You only really need the diffuse one open as it's just a selection guide; painting one texture paints the value for all of them at once.

    The texture selection grid scales to fill the size it's given. So if you make a wide window, you'll get 4+ in a column. One thing I need to do and haven't gotten to is improve the selection on the Texture Clusters- right now they're an enum and have no visual representation, but doing something better, even if just using one texture from the cluster to represent it, would be nice. Or maybe I'll render material spheres instead..

    The brush is currently a plugin to the Vertex Painter- it actually doesn't know anything about the vertex painter and vice versa. That said, I can likely extend the mechanisms to support this easily enough.

    Mesh mask?
     
  39. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    I watched all your videos on youtube and I had the feeling you had to select a texture to paint the mesh and the blending was done based on the brightness of the heightmap placed in the alpha channel. The brightest one of the two (the brush texture versus the one already painted) will be on top. Or maybe this was the behavior for the 2 layers brush? Or maybe the brightest one from the entire Texture Array? I have to watch the videos again. Or better, play with it after release.

    I watched an older version I think where the textures were placed in one column with way to much extraspace wasted. Glad it`s not the case anymore.

    The smoother the painting experience is, the better result you get, I think. Anything in that direction helps.


    I was thinking about:
    Maybe it`s a communication problem? If that`s the case, another question/suggestion/request. Is it possible to UV map on the mesh a B&W image that acts as a mask where I maybe want to paint the grass and avoid the rocks/boulders. And having a few masks and cycle them with a key would be really helpful. Huge speed up gain and quality. Or maybe use a conventional RGBA splatmap as a mask, each RGBA channel masking a certain Texture cluster.
     
  40. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    2,635
    Ah, I was planning on having the second option and have done some work towards it, but it allows you to use more than just 4 textures (basically, nearest color -> cluster mapping instead of channel -> texture weight). Projection masks I haven't thought about, but might be something that could be added to the vertex painter in some fashion.

    I just got the asset accepted email, but the link doesn't seem to work yet. Might take a bit to be fully updated, but it's supposed to be here:

    https://www.assetstore.unity3d.com/#!/content/76166
     
  41. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    Implementing all these would be nothing less than ... sorry, I can't find the proper word. :)

    Congrats for the release!!!
    Indeed, the link is not active yet. Was hopping to be the first one. :)
    Don`t forget to update the first post.
     
  42. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    2,635
    I've done some work on the first feature, but masks would likely be a way off. I'm expecting a slew of requests and bug reports over the coming weeks that will likely derail any plan I were to make right now. Just found a bug when using Metal on iOS, so that's my highest priority right now..
     
  43. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    Hope I can help with the bugs.
    Requests wise, I was one of the firsts in the que. :)
     
  44. zmaxz

    zmaxz

    Joined:
    Sep 26, 2012
    Posts:
    137
    Hi !!
    Can i use splatmap bake to vertex color ?
    It's just like terrain to mesh and i have done the painting works .
     
  45. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    2,635
    Not sure if I follow you - what do you want to bake to the vertex color?
     
  46. zmaxz

    zmaxz

    Joined:
    Sep 26, 2012
    Posts:
    137
    If i can bake splat map to vertex clolor and then i can set r = element0 , g = element1 , b= element1 ;
    Just like this picture :
    RGBA.jpg
     
  47. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    2,635
    I'm working on tools for this soon, but it's a bit more advanced than this. Basically, you give it any number of colors -> texture cluster mappings. So instead of 4 values, you can have hundreds. So you might have something like this:

    Color (0, 0, 128) -> Ice
    Color (128, 128, 128) -> Ice_snow
    Color(0,255,0) -> Moss
    Color(0,128,0) -> Grass
    Color(255, 0, 0) -> Lava
    Color(40, 40, 100) -> forest_floor
    etc..

    With each of these (Ice, Moss, etc) being a selection of textures that get blended together based on noise, height, or angle. So which lava texture gets chosen might be based on the slope, and the grass might be randomized based on a noise function, etc..

    This is all pretty straightforward; what I want to do some research into is how to use the layering with something like this. For instance, maybe your moss gets some rocks blended into the second layer based on the angle of the normal or height, such that rocks appear on cliffs edges - but rather than being a hard choice, it blends some of them in. Unlike a traditional splat map shader, each layer only has a single choice per vertex, which doesn't give you the nice multi-material blends you get from having alpha values for each. Using the layers I can get that back, but the best way to do it will take some experimentation..
     
  48. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    It would be really useful to have some aligning options for the painted textures. Lets say I fill a wall with a beige bricks texture and a have a second bricks texture with beige and dark brown bricks randomly scattered on the map. I would need to align the bricks in case they don`t automatically match in the textures. Maybe a scale percentage option? Or using the tiling settings would be good enough?

    Would it be possible to have a starting point on the texture, similar with Photoshop, when you start cloning you press Alt+click on the point where you want to start cloning from.
     
  49. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    2,635
    If you turn on per-texture properties, you get a 50% to 150% scaling option on each texture. And in the two layer shader, both layers have a global scale value. That said, you can't really arbitrarily line things up as there are no separate UVs, etc.
    This could potentially be done, but remember it would only be cloning the vertex control data- it's not a giant virtual texture where you can clone stamp specific bits of texture around.
     
  50. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    It's good to have these settings. It seems that the quality of the textures matched with the specifics of the project will have even an more important role. Like in everything that require good quality, to be honest.

    The illusion of a 3D painting program is very strong. :)