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. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Nateply likes this.
  2. zmaxz

    zmaxz

    Joined:
    Sep 26, 2012
    Posts:
    143
    Got it !!
     
    jbooth likes this.
  3. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508
    I am snagging this as soon as I get home.
     
  4. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    This is looking great!

    I have some questions before i buy it.

    Can i use this together with RTP to blend Objects (using your shader) to terrain?
    Can i use it with Amplify Texture 2 (will it bring speed or other benefits)?
    Will it work with substances (not just rendered substances but also animated ones)?

    Will you later ad (more) texture features for terrains?

    Would be great if i can use splatmaps for example from worldbuilder to faster texture meshterrains.

    Edit:
    Forget to ask if i can use this on animated objects?
     
  5. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    I have no idea how RTP works, but this is a very different set of shaders. You can use this shader to paint textures from terrain onto your regular objects though. It's discussed a bit in my videos, and I'll likely do more work on making this more flexible for these use cases soon.

    From my understanding, Amplify Textures 2 is a virtual texturing system, which is a different approach than splat mapping. In theory, you could bake out the splat map results into some massive texture and feed that to Amplify texture, but I have no idea if that would actually be an optimization or de-optimization.

    Definitely not for the splat map textures, since they are packed into texture arrays, and texture arrays will likely never support something like substance materials (they're a low-level GPU format, unlike substances).

    I won't rule it out, but I don't have any plans to add more actual textures. I am looking into other shader features though. I'm currently working on the first patch, and soon I'll post a poll for people to help me learn what's most important, feature wise, from the community of users.

    In the works and discussed previously in the thread. I may have a first version of this in the first patch, but I might hold off until I have some time to experiment with how this might work with a multi-layered shader. Having not used worldbuilder, does it have support for an arbitrary number of textures?

    [/QUOTE]

    Sort of- the shader doesn't care, but the mesh painting tools only work with standard meshes, because the .additionalVertexStream feature isn't available on skinned mesh renderers. So, it could be done, but it would take some hackery to make it work.
     
  6. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    Thank you for the fast response.

    Maybe it is becouse english is not my main language but i am unsure about terrains now.
    Can i use your shader on a Unity terrain or not?

    I understand it at first that i can not but would like it more if it can.
     
  7. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    No, unfortunately Unity does not provide the low level access to the vertices it creates for me to support a terrain version of the shader. I'd love to, but just can't..
     
  8. StevenP94

    StevenP94

    Joined:
    Jun 3, 2013
    Posts:
    143
    Got it !
     
    jbooth likes this.
  9. Darkoo

    Darkoo

    Joined:
    Feb 4, 2013
    Posts:
    96
    OMG... something is wrong with my bank atm :((( have tried to get it for one hour now... I guess I'll leave it for tomorrow :((((
     
  10. Darkoo

    Darkoo

    Joined:
    Feb 4, 2013
    Posts:
    96
    BTW, if you possibly could implement some kind of photoshop layer/texture blending something like the attached image could easly be created with that.. If you take a look at the layers to the left I use an mask from the heightmap to add a pink "glow" and on top of that a smaller white "glow" and on top of everything another pink but smaller "glow" without any heightmap usage that has a layer blending to add some coloring to the stones.. one could simply add a few primary and secondary colors as texture to the texture array and do some cool stuff with blending effect and heightmap.
     

    Attached Files:

    Last edited: Nov 23, 2016
  11. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    You can do that right now- just add the textures and paint them lightly into the opposite layer the stones are on.
     
  12. Darkoo

    Darkoo

    Joined:
    Feb 4, 2013
    Posts:
    96
    Sweeeeet!!
     
  13. Reiika

    Reiika

    Joined:
    Jul 18, 2015
    Posts:
    43
    Hey, love the shader, very easy to use!
    I have been lowkey eyeing this asset when you first posted on Reddit and it was an instant buy for me, I am having a little bit of trouble though, I am integrating it into Ultimate Terrains, its coming along fine, ive been able to add voxel types specifically with different alpha channels using different textures so I can use all 256 now, I was able to change the code to set each vertex in a face red blue or green, so that portion is working, most textures line up great, but I am having one small issue

    Some triangles will show a spread of textures that are not even define within any of my voxels so some kind of corruption is happening. Do you have any ideas of what may be causing it? megasplatissues-01.png
    Face with vertex / edges marked with black to show the triangle

    -Sorry if my post isn't coherent, been working on this for the past 7 hours or so, and its 5:32AM

    Edit2: Feature request
    1. macro texture scaling option
    2. per texture scaling (ended up using tex1 &2 scale option slider stopped at 0.4354
    Thanks for the great tool I love it
     
    Last edited: Nov 23, 2016
  14. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508

    In the shader properties, lower the interpolation contrast, seems like the default setting is a bit high.

    [Edit] Nevermind. I thought this addressed it before, but since I reloaded the project it's doing it again :| I'll let you know if I find what fixed it for me before, sorry!
     
  15. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    That will happen if the vertex colors are not correctly marked. The markings allow me to figure out which three indices need to be sampled across the triangle, without any interpolation. If they are not correct, then the value will interpolate across the face creating the effect your seeing. Most likely what you have there is a triangle with 2 of the same color values.

    Been there, got the T-Shirt..

    I'll add a macro texture scale option in the next patch. Per texture scaling is currently available, but clamped at 50% -> 150%. Basically, since there's no support for arrays of values in materials, I store the data in a 8-bit texture, which means I have to choose some range for the values.
     
  16. Reiika

    Reiika

    Joined:
    Jul 18, 2015
    Posts:
    43
    Thanks for the information, I was able to correct the issue by changing an odd vert to blue instead of green in the pattern and it fixed the issue, so the integration was pretty easy!

    I am loving this

    megasplat-01.png

    I would suggest for the per texture scaling a range of maybe -10 to 10 which would be more than enough, for this particular terrain I had to set the Texture Scale to 0.5 and Secondary Texture to 0.5
     
  17. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Awesome, I'm glad it was pretty easy to integrate into a voxel system. Maybe I should look at integrating with some of the ones on the asset store?

    Anyway, what I think I can do is add a "Per Texture Texture Scale Scaling" property (once I come up with a better name for it). Basically, at 1 it would provide a scale of .5 to 1.5, but at 10 it would provide a scale of .05 to 15. Then people can tune how they want to use the 8 bits of scaling information present.
     
  18. Reiika

    Reiika

    Joined:
    Jul 18, 2015
    Posts:
    43
    Sounds great and yes, the more this is integrated with products the better, I think this is a great too to be honest, I always hated having a texture limit
     
  19. Reiika

    Reiika

    Joined:
    Jul 18, 2015
    Posts:
    43
    Progress is picking up, I am able to paint with the shader individual textures now and its working pretty great as is
    megasplat-02.png Currently I dont think I am taking advantage of the 2 layer system, I want to add it in but hit a small roadblock, per documentation,

    Color RGB = Vertex Weights (DONE)
    Color Alpha = index of bottom texture layer (1/255 increments) (DONE)
    UV3.R = Blend between first and second layer (layer shader only) (WIP)
    UV3.A = index of top texture layer (1/255 increments, layer shader only) (WIP)

    In terms of Unity, what is UV3.R and UV3.A? I am having trouble with locking this down..
    Code (CSharp):
    1.             //Megasplat Integration
    2.             //Added code to force code integration with Megasplat, which needs UV3 data populated
    3.             Vector2[] uvs2 = new Vector2[uvArray.Length];
    4.             for (int i = 0; i < uvs2.Length; i++)
    5.                 uvs2[i] = new Vector2(0, 22);
    6.             mesh.uv3 = uvs2;
    7.             //End
    This is test code for UV3 I didn't know if I was in the right direction or not, but when I set my vector2 to (value1,value2)
    with value1 being anything other than 0 everything becomes textured with the last texture element in megasplat #59 I believe, value2 doesnt seem to control anything
     
    neoshaman likes this.
  20. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    So, as of Unity 5.3, UVs can now be Vector2, Vector3, or Vector4. So what I think you want is:

    Code (CSharp):
    1. Vector4[] uvs2 = new Vector4[uvArray.Length];
    2. for (int i = 0; i < uvs2.Length; i++)
    3. {
    4.      uvs2[i] = new Vector4(0.5, 0, 0, 22.0f/255.0f);
    5.    
    6. }
    7. mesh.SetUVs(3, uvs2);
    Basically, you put the weight of the blend in the X channel, and the index/255 in the W channel.

    I've updated the docs to say UV3.X and UV3.W instead of R/A - too often I write shaders where RGBA and XYZW are interchangeable.
     
  21. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Also, keep in mind the two layer system currently doesn't support triplanar. I might be able to squeeze it in there, but haven't tried yet..
     
    Reiika likes this.
  22. Reiika

    Reiika

    Joined:
    Jul 18, 2015
    Posts:
    43
    Sounds good, thanks for the code snippet I got it working, ill post a screenshot once I have it fully implemented to show it off,

    One other question is it possible to have per texture interpolation contrast? I like the hard on some and soft on others..
     
  23. Darkoo

    Darkoo

    Joined:
    Feb 4, 2013
    Posts:
    96
    Hey! again this is awesome, I'm starting to get a hang of it :D

    Two things I would suggest for people that want to use wacom like tools with this:
    1: holding alt and trying to rotate around the mesh( I ment holding alt and moving your hand around over the wacom which is something you do when you want to move your hand to a new position on the wacom surface) just like you do with the mouse will with a wacom pen make your brush falloff change uncontrollably..

    2: I wonder if you possibly could add pen pressure to brush flow, that would be a great feature if possible..
     
    Last edited: Nov 23, 2016
  24. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    It currently reads the pressure setting Unity provides for wacoms/etc, but since I don't have a wacom I've never actually tested it.
     
  25. Darkoo

    Darkoo

    Joined:
    Feb 4, 2013
    Posts:
    96
    I can't see any thing being read by the pressure of the pen, if you want me to test something specific with it I can.

    I think there might be something weird with picking triplanar and then going back to uv or changing shader to layered.. triplanar is still somehow on.. I had to restart unity for it to make it reset. I will make some more tests and see how I got in that situation.
     
  26. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    It might be the UV scale- they currently use the same variable, and what you want for Triplanar is massively different than what you want for a textured UV'd landscape.

    Going to make them use different variables in the next patch..
     
  27. Darkoo

    Darkoo

    Joined:
    Feb 4, 2013
    Posts:
    96
    I don't know but I kept changing the scale back and forth but it did not effect anything other than changing the texture scale, it still acted as if I was in triplanar using heightmap for the blending and so on.
     
  28. Reiika

    Reiika

    Joined:
    Jul 18, 2015
    Posts:
    43
    @jbooth

    I just realized that to fix an issue I was having, I would need triplanar lol, Do you think it is something that can or will be added to this shader?
     
  29. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Triplanar is currently available for the single layer shader.

    I'll look at adding triplanar support to the 2 layer shader after I get the first patch out, but I've crashed Unity's shader compiler more than a few times trying to add more options to that thing, so I'm not sure if I can get it to fit (already at 300+ variants). That said, it would be pretty easy to make a third shader for 2 layer triplanar which removes some other features (like flow mapping), and you'll be able to make custom variations in Amplify pretty soon now as well, so either way you'll eventually be all set.
     
  30. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    Got it when went live! :) Again, thanks for this awesome asset!
    I do have some questions but first I need spend a bit more time with it.
    It will take a bit of time to have access to my desktop and can't try everything I have in my mind, till then my laptop will have to do it. One question regarding rivers. What will be the best approach to make rivers and have flow painted on the river surface? Would it make sense to have the river surface as a separate mesh with a transparency based water shader and the main mesh terrain shader visible underneath? This has looks a bit more appealing to me, especially considering the Amplify integration. I don't know if performance wise it's the best approach.
     
  31. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    The best water is likely going to come from using another shader with it's own parameters and geometry. Water is a whole specialized field of shaders, and integrated flow mapping within another shader can never compete with that. You can create some interesting effects with MegaSplat's flow mapping, and you only pay the cost of it for pixels on screen, so it's good for things like quick pools of goo or lava, etc..
     
  32. Darkoo

    Darkoo

    Joined:
    Feb 4, 2013
    Posts:
    96
    Any idea why there is different "shading" on uv ilands? I can understand that the seams will show different part of the texture on each side of the seam but I can't seem to get rid of the shading difference.. I am using macroLayered, standard and also removed macro diff and normal to see if it was the reason but still get that difference.

    Edit: fixed something was wrong with the splat normals, I think probably the linear check box,, anyway somehow it got fixed :)
     

    Attached Files:

    Last edited: Nov 24, 2016
  33. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Here is my changelog for the first patch. I have to do another test pass, but am hoping to have this submitted this weekend or by Tuesday at the latest. It's quite a lot of changes and new features, so I'll be doing a video showing some of them off as well:

    Compatibility issues
    • Per-Texture scale values have changed. As a balance between flexibility and performance, the slider now goes from a user-specified minimum and maximum value. The previous range allowed scaling between .5 and 1.5, while this range allows any range of scales you’d like to use. The caveat is that you’ll likely want to make your base texture scale your smallest value and only scale textures up.
    • Triplanar mode now has it’s own texture scale, so if your using triplanar texturing on an existing shader you’ll have to set the scale again.

    New Features:
    • Texture Cluster UI rewritten in both the Texture Cluster library and Brush system. Live previews are now available, allowing you to adjust the parameters and see them previewed on a rendered sphere. Preview renders are also used for brush selection.
      • TextureArrayConfig’s now have a link to a normal config used for lighting these previews, as well as an option for how this data is packed
    • Added Amplify Shader Nodes
      • MegaSplatSamplerNode, like a Texture Sampler node, but does MegaSplat magic
      • MegaSplatLayerBlend, for multi-layer blending of MegaSplat data
      • Several nodes submitted to Amplify for inclusion in ASE
        • texcoord 2/3 access
        • Vertex To Fragment node, for copying data from the vertex shader to the pixel shader
        • These are shipping in the latest version of ASE
    • Added Splat from ColorMap utility to Vertex Painter’s Utility panel. This allows you to auto-paint entire terrains from a guide image. You can create mappings from color -> Brush in a scriptable object. When applied, each vertex will be assigned a texture value from a standard brush, chosen by perceptual closeness to the target color in LAB color space. Because these map color -> brush, the chosen values can affect both texture layers on the 2 layer shader, blend factor, etc, and use all features of the brush (noise, height filtering, angle filtering)
    • Added Amplify Shader Editor examples; a one and two layer 256 texture splat map shader
    • Ability to scale the macro texture UVs
    • Ability to provide a range scale for the per-texture scale factors
    • Multi Top/Bottom layers now share cluster choice instead of remembering separate selections
    • Added packed Normal/Smoothness/AO texture for macro terrain
    • Various shader optimizations
    • Triplanar texturing has it’s own scale property, since the scales needed between UV mode and Triplanar mode are so widely different.
    Fixes:
    • Fixed bug in shader for Metal based iOS hardware
    • Fixed bug in specular response on some combinations of shader features
    • Fixed bug in inconsistent lighting in one specific shader feature combination
    • Theoretical addition of PS4 texture array gradient sampler support (no way to verify)
    • Early out optimization when splat maps are completely covered by the macro texture, this is a huge optimization when cross-fading to a macro texture
    • Parallax is now optimized out via a shader_feature rather than a branch. While a tiny bit more efficient, this makes the shader take twice as long to compile, but was necessary to prevent divergent paths in the pixel shader and to work around what looks like a low-level GPU driver issue with Texture Arrays and gradient sampling.
    • Fixed long standing bug in the vertex painter that required a 2x option for mouse position on some monitors in Unity 5.4. I had long suspected this was some kind of retina thing, but was poking though Rix’s decompiled unity code and saw a reference to a scaling value that you must apply to mouse input otherwise they’ll be wrong on some displays.

    Here's an example of a single entry in the Splat from ColorMap utility, where you map a color in the guide image to a brush. The sphere preview is live, so as you edit the settings it updates the render. Notice that the color is mapped to a brush blending two Texture Clusters together using noise. This makes it very easy to use a guide image to quickly paint your entire terrain with complex, multi-layered surfaces.


    Here's an example of the new brushing interface, which uses the new preview spheres for selecting Texture Clusters:
     
    pixelsteam and julianr like this.
  34. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    Thanks for update!
    It looks like a very consistent patch and even I'm not able yet to properly appreciate the fine nuances I can easily see it`s very consistent. I'm not sure I followed it properly: The scale per texture feature it can go only up, no scaling down anymore? I'm not sure yet how important this feature is.
    The UI update looks cool. Would it be possible to select/change the texture cluster without using that terrible drop down list?
    Thanks again.

    P.S. - The new "Splat from ColorMap" feature and Amplify integration are brilliant. Looking forward to the next video/tutorial.
     
  35. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Basically, instead of having a slider that goes from 50% to 150% texture scale, you now have a slider that goes from a min/max scale value that you specify. So, you can set the min to 0.1 and the max to 10 and get a slider that goes from 10% to 1000% scale if you want a large scale range. However, with a .1 to 10 scale range, a value of .5 is no longer a scale of one (it would give you a value of 5.05), and you have far less bits of precision for the scales below one than the ones above one.

    I could correct this using some math (pow( factor, ( value - 0.5 ) * 2.0 )), but that would make the shader more expensive, so I opted against that. So instead, if you want linear control over scaling, you should only scale above one or below one. In essence, set your min to one and your max to 10, then set the global scale to the smallest scale value you want (or vice versa for scaling the other direction). This will give you 256 scale values evenly distributed between 1 and 10.

    I might squeeze in some selection shortcuts; mainly ones for changing painting layer and moving around the brush choices, it really depends on how much time I get this weekend..
     
  36. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461


    Ok, reworked that UI a bit- there's now a layer section, and tabs for the brush type. M will tab through the brush modes, and L will change the layer. The arrow keys can also be used to move around the texture/cluster selection.
     
    Seneral likes this.
  37. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    Sir, you are my hero! Hats off!
     
  38. Reiika

    Reiika

    Joined:
    Jul 18, 2015
    Posts:
    43
    Good stuff man, got my terrain system working how I want for the most part, heres just a little screeny with it in action with megasplat

    Megasplat03.png
     
    jbooth likes this.
  39. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Love it! It's always great to see what someone does with some tech you create!
     
    Reiika likes this.
  40. jrhtcg

    jrhtcg

    Joined:
    Jul 13, 2013
    Posts:
    34
    I purchased your app. I love it so far except a small quirk has popped up. It was working now it is not. Every thing looks fine in the editor until I run the game, and then I get this error:

    Not allowed to access colors on mesh 'Combined Mesh (root: scene) 2'
    UnityEngine.Mesh:get_colors()
    JBooth.VertexPainterPro.VertexInstanceStream:EnforceOriginalMeshHasColors(Mesh) (at Assets/MegaSplat/VertexPaint/VertexInstanceStream.cs:128)

    Not sure what that is all about, but the in game mesh is defaulting to what it looked like before I painted it. Any ideas what is up with that?
     
  41. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Looks like your mesh import options have turned off Read/Write. Basically, the CPU needs to keep a copy of the mesh around so it can create the additionalVertexStream. If you need to turn read/write off or enable static batching, then you'll want to bake a copy of the mesh out using the baking options in the Utility panel when you're done painting.
     
  42. Darkoo

    Darkoo

    Joined:
    Feb 4, 2013
    Posts:
    96
    When you create your texture array you hit sort for diffuse array and normal array to ensure that their indexes are in sync with each other, later in the process of your painting if you decide you need a few more textures and add them to the array and hit sort depending on the new texture name they will rearrange the entire array and that will in turn mess up all the work you done so far. This can be resolved by making sure not to hit sort and also manually assure that the new textures are sorted correctly in the different arrays.. I would advise to approach this in another matter if possible, maybe only sort latest added files thus the previously added ones stay as usual.. And in the vertex painter custom tab under single have a visual sorting for better workflow.
     
  43. jrhtcg

    jrhtcg

    Joined:
    Jul 13, 2013
    Posts:
    34
    Ahh, I was playing around with importing my mesh to see what would happen. I deleted the the original and reimported it, and forgot to set the flag. I guess I did not notice it because It seems to only show up as an error when you run the game.

    Thanks
     
  44. jrhtcg

    jrhtcg

    Joined:
    Jul 13, 2013
    Posts:
    34
    I think I found out what is going on with this as it happened again. It appears that running the Occlusion Culling bake maybe flagging the meshes as readonly. I will try the utility function to bake my meshes first next time, and see if that solves the problem. Would I still leave the script enable, or would that be turned off after the baking of the mesh?
     
  45. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Once you bake the meshes, you don't need the VertexStreamComponent anymore- all it does is store arrays of information to generate the additionalVertexStream mesh at runtime. It's actually more efficient to bake down your meshes anyway, and I'm looking into potentially building a pre-build step that allows you to do this on scenes automatically.
     
  46. Frednaar

    Frednaar

    Joined:
    Apr 18, 2010
    Posts:
    153
    I was checking out the asset store for mesh based terrains systems to use this asset....I know Gaia and TC2 can convert to mesh, or use exported WorldMachine meshes but I was wondering if there's an all in one solution in the store I am not aware of...
     
  47. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    What does it means a "baked mesh" after the vertex painting process? Can we change/replace your shader with a new one created in Amplify Shader Editor after the painting is done? What about the texture clusters? How would I manage them if I want to save them for later? Maybe a short but complete videotutorial from start rto finish how you create a texture cluster, import and paint the mesh, bake all that it`s possible to bake, save, export, import back in an empty scene the entire work, maybe change shaders.
    I didn`t had time to read the docs yet and I was asking myself what are criteria for allocating the textures that are part of a one texture cluster? Can I have control or direct impact on which texture and how they are distributed/painted?
    Also, can we have the height, angle and displacement criteria all acting the same time, not one or another as it is now?
    Some of the questions might look like dumb questions(or maybe they really are :) ), but I rather ask and avoid any possible doubts? And I didn't spent that much time with MegaSplat. Yet.
    Thanks!
     
  48. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    I'm looki
    There are a few options here; it would be possible for the texture config to have a revision number that gets incremented on each change, then mark the meshes (in AssetImporter userdata) being painted with that revision number, and remapping between revisions would be possible. There would be limitations, of course, as renaming textures, deleting them, etc, could not be properly handled. But it might be worth exploring that.

    I'm hoping to integrate MegaSplat into a few packages in the future, which would make this much easier.

    So, the vertex painter stores the painting data in the VertexStreamComponent, and creates the additionalVertexStream from this data at startup. This allows for all editing to be non-destructive, and allows you to paint multiple instances of a mesh with different paint jobs without having to duplicate the mesh, etc. However, in the Utilities panel there are tool to combine and bake out meshes, creating new meshes with this data baked into the actual vertex information instead of living separately.

    Sure, that's the main point of adding amplify support, as it allows you to roll very custom shaders using the splat mapping techniques enabled by MegaSplat. As long as you follow the same vertex layout that the tools expect, you can continue to paint using the painting system, etc.

    Texture Clusters are saved with the TextureArrayConfig so you can reuse them over and over. The painting process does not paint clusters though, it paints the resulting texture choice from the cluster.

    A lot of that is covered in this video:


    Right now there are three modes for how a texture is chosen from a cluster (noise, angle, height). I originally experimented with the more classic "hierarchy of filters" approach which allows for all of these to be combined, but it quickly becomes very hard to work with and a complete mess to understand what's going on. For most users, this is way to complex and difficult to work with. My experience tells me that the most common use for these types of deep hierarchies are for filling large terrains procedurally, not making "really smart brushes", because if you're going to paint it by hand anyway, you generally want to know what's going to come off the brush when you make a stroke, and it's hard to do that when you build a deep hierarchy of height/angle/noise filters choosing from dozens of textures.

    So I kept the brush system simple, and shifted my focus towards the problems of filling a large terrain procedurally. The tool I'm adding in the first patch allows you to map colors in a guide image to brushes; so you might map green in the image to be a brush which paints moss on the bottom layer and rocks on the top layer with a 45% blend using a noise function to vary it. White might be mapped to blend two texture clusters of snow and ice, where the ice texture cluster is choosing it's texture based on angle.

    I think this keeps the interface more understandable and predictable.

    A video showing this workflow will be released tomorrow, and it's quite powerful for quickly texturing a massive terrain.
     
  49. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    @ShadowK: I wonder if this might be interesting for your new project?
     
    Deleted User likes this.
  50. Deleted User

    Deleted User

    Guest

    Thanks for the heads up Martin, it surely would.. The words Parallax and macro variations pretty much sold me instantly, I was working on something but this seems far better.. Will check it out.!
     
    neoshaman and Martin_H like this.