Search Unity

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

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

  1. IanNicolades

    IanNicolades

    Joined:
    Oct 1, 2016
    Posts:
    40
    Is there an example for setting shader parameters in code, and/or an example of properly configured vertex data? My use case is procedural terrain generation, ported from a MonoGame library, so I have full control over all of it - just a bit lost on how to set it all up from scratch!
     
  2. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    The docs describe the vertex format. Editing material parameters works the same as with any other shader, except for the per-texture properties. Shader configuration should be handled in editor, as there’s no way to dynamically generate a shader at runtime in Unity.
     
  3. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @JasonBooth Hi Jason this is a bit of a heads up but I'm also wondering if there is a quick easy fix. The texture arrays no longer show the textures due to a message about incorrect texture format :
    Code (CSharp):
    1. Invalid texture format: 12
    2. UnityEngine.Graphics:CopyTexture(Texture, Int32, Int32, Texture, Int32, Int32)
    3. JBooth.MegaSplat.MegaSplatUtilities:DrawTextureSelector(Int32, Texture2DArray, Boolean) (at Assets/MegaSplat/Scripts/Editor/MegaSplatUtilities.cs:109)
    4. SplatArrayShaderGUI:DrawTextureEditor(MaterialEditor, MaterialProperty[], Material, FeatureData) (at Assets/MegaSplat/Scripts/Editor/SplatArrayShaderGUI.cs:290)
    5. SplatArrayShaderGUI:OnGUI(MaterialEditor, MaterialProperty[]) (at Assets/MegaSplat/Scripts/Editor/SplatArrayShaderGUI.cs:966)
    6. UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
    "

    all the textures that worked before are now showing as a pale yellow sticky note color. Even your demo scenes. I understand if you want to hold off tackling it just yet because this is from a 2018.3.0b9 beta. I was hoping to dive into the multi-threading with VS Pro & MS early but maybe I'll have to wait a while.
     
  4. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Unity broke Graphics.CopyTexture in 2018.3.0b4 and have not fixed it yet.
     
  5. IanNicolades

    IanNicolades

    Joined:
    Oct 1, 2016
    Posts:
    40
    What you mean by shader configuration in the editor? :D I am still being dragged kicking and screaming away from my code-only paradise and into this brave new world of Unity.

    I created a new MegaSplat_procedural shader, named it terrainshader, and set up the splatmaps and projection settings using the MegaSplat procedural example scene's as a guide: https://i.imgur.com/0WuRBiN.png

    In code, I'm creating a new object for each chunk of terrain as needed like this:
    Code (CSharp):
    1. UnityGameObject = new UnityEngine.GameObject("TerrainPatch");
    2. UnityEngine.MeshFilter meshFilter = (UnityEngine.MeshFilter)UnityGameObject.AddComponent(typeof(UnityEngine.MeshFilter));
    3. meshFilter.mesh = new UnityEngine.Mesh();
    4. meshFilter.name = "TerrainPatchMesh";
    5.  
    6. //convert to unity data types
    7. List<UnityEngine.Vector4> mtangents = new List<UnityEngine.Vector4>();
    8. List<UnityEngine.Vector3> mverts = new List<UnityEngine.Vector3>();
    9. List<UnityEngine.Vector2> muvs = new List<UnityEngine.Vector2>();
    10. List<UnityEngine.Vector3> mnormals = new List<UnityEngine.Vector3>();
    11. List<int> mtriangles = new List<int>();
    12. foreach (var v in this.verts)
    13. {
    14.     mverts.Add(new UnityEngine.Vector3(v.position.X, v.position.Y, v.position.Z));
    15.     muvs.Add(new UnityEngine.Vector2(v.texCoord.X, v.texCoord.Y));
    16.     mtangents.Add(new UnityEngine.Vector4(v.tangent.X, v.tangent.Y, v.tangent.Z, -1f));
    17.     mnormals.Add(new UnityEngine.Vector3(v.normal.X, v.normal.Y, v.normal.Z));
    18. }
    19. foreach (var v in m_indices)
    20. {
    21.     mtriangles.Add((int)v);
    22. }
    23.  
    24. meshFilter.mesh.Clear();
    25. meshFilter.mesh.vertices = mverts.ToArray();
    26. meshFilter.mesh.triangles = mtriangles.ToArray();
    27. meshFilter.mesh.uv = muvs.ToArray();
    28. meshFilter.mesh.tangents = mtangents.ToArray();
    29. meshFilter.mesh.normals = mnormals.ToArray();
    30.  
    31. UnityEngine.MeshRenderer renderer = UnityGameObject.AddComponent(typeof(UnityEngine.MeshRenderer)) as UnityEngine.MeshRenderer;
    32. renderer.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.On;
    33. renderer.receiveShadows = true;
    34. renderer.material.shader = UnityEngine.Shader.Find("MegaSplat/terrainshader");
    35.  
    36. UnityEngine.MeshCollider meshCollider = UnityGameObject.AddComponent<UnityEngine.MeshCollider>();
    In game, the shader seems to be getting assigned properly, but it's missing all of the settings when inspected: https://i.imgur.com/KDpDrPz.png
     
  6. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461

    You'd be better off assigning a material than assigning the shader directly, as then you'll have to assign the texture arrays and such as well. You'll also need to process your vertices to have the filtering information on the vertex color channels of the mesh- this is described in the docs, but basically every face needs exactly one red, one blue, and one green vertex on it. The mesh converter does this to existing meshes, but if you're generating meshes on the fly you'll need to do that yourself. (Note that you can do this in the shader with the preprocess mesh option, but it's going to invoke the geometry shader which is much slower than doing it at mesh generation time - though certainly easier).
     
  7. dlstilts

    dlstilts

    Joined:
    Sep 29, 2017
    Posts:
    40
    New
    @JasonBooth Hi I have a question. It says in the unity store that there are dynamic effects that can be changed at runtime. "streams form, entirely repaint your landscape.. at runtime..." However, I can not find any documentation on this? What I want to do is have the terrain textures change over time, possibly even randomizing the textures and fx so it is never the same configuration as the character moves around. I was thinking there would be a clean way of accessing the terrain, texture, FX values with code to randomize or change there values at runtime. How do I do this? Is there an API? Or another way of doing this? Sorry if I am missing something in the documentation.

    Thanks.
     
  8. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Are you talking MegaSplat or MicroSplat? MicroSplat's streams/lava tech has a dynamic flow system, which allows it to propagate water from emitters across a terrain. MegaSplat has no such system, although there is a runtime painting example which will show you how to efficiently paint the landscape with whatever textures or effect you want.
     
  9. dlstilts

    dlstilts

    Joined:
    Sep 29, 2017
    Posts:
    40
    Ok this is the image where I got the info on the dynamic effects for Megasplat in the asset store. It is very misleading.
     
  10. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    How so? The runtime example shows you how to do all of this; the snow is entirely dynamic and animatable, and you can raise and lower the water level on the streams as well as paint them at runtime. There are also several weather systems, like Enviro, for instance, which integrate with MegaSplat to use many of these effects with theirs.
     
  11. dlstilts

    dlstilts

    Joined:
    Sep 29, 2017
    Posts:
    40
    Ok I see. Thanks I will look into that.
     
  12. LoboMontana

    LoboMontana

    Joined:
    Dec 19, 2017
    Posts:
    5
    I want to buy this but I am also looking for a 3rd party plugin that will create real height map on meshes based on real height map. So far the only 3rd party plugin that I have found are only made for 3D modeling application software where the brush uses real height maps then when painted on 3d meshes, the height map shows up, then the next step is simply texturing. In the realm of 3d modeling, it gives super realism especially when using Meganscans Quixel makes it even more real.

    I love this software because of the ability to blend anything you want and if it had the power to create real height map when painting, I would buy it even it was $100 because NO ONE in Unity has that power Brush - a simple Displacement Brush. If I was a coder, that would have been the first thing I would have created and wondering why UNITY doesn't have that brush.

    If you add that to your already amazing plugin here, it's a done deal for me.
     
  13. gaiastellar

    gaiastellar

    Joined:
    Nov 8, 2013
    Posts:
    57
    Hi, it was actually to fade in and out LOD levels in a custom lod system I will be using as part of my terrain generation system. The only way I know how to do that is by using the alpha on the material. Any suggestions?
    Thanks
     
  14. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    There's techniques like stippled alpha, but you'd have to add support for something like that yourself..
     
  15. FuzzyShan

    FuzzyShan

    Joined:
    Jul 30, 2012
    Posts:
    182
    anytime soon that microsplat or megasplat would be able to be compatible with HD render pipeline?
     
  16. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    When they stop breaking them every other month.

    For instance, right now they changed LWRP around again, and I'd like to update MicroSplat's LWRP module to work with, but basically can't. And the new package + unity version thing is a nightmare for support, because now we have version difference to worry about with Unity versions and version differences with packages. So if I update the LWRP package to work with the latest LWRP package, I'll break it for anyone using an older LWRP package, and the new one requires 2018.3 beta, which currently has a bug in Graphics.CopyTexture breaking everything, and would force users who upgrade to have to use a beta.

    So, eventually I'll likely add support for MicroSplat, but not until these things stabilize a lot more. Even out of beta I expect these to be support nightmares.
     
    Kirsche, Aubrey-Falconer and iddqd like this.
  17. DrInternet

    DrInternet

    Joined:
    Apr 6, 2014
    Posts:
    106
    I would like to report a bug:
    Per-tex detail noise is broken.
    To reproduce: open terrain example scene. Enable detail noise and per-tex detail noise. Open Texture Graph. Create two texture nodes, attach one to top, another to bottom layer. Attach height node to blend input. Change per-tex strength for both texture. One slider is doing nothing, another one is changing strength of both textures.
     
    jbooth likes this.
  18. Xype

    Xype

    Joined:
    Apr 10, 2017
    Posts:
    339
    heh id like a fix to that copytexture too. Havn't been hounding ya because I know its just something to wait for unity to fix. But man your batch import has me so spoiled. I have the other 2 big terrain shading tools and its just not the same.
     
  19. totrider

    totrider

    Joined:
    Jul 25, 2014
    Posts:
    13
    I am facing some issues in using megasplat for my project, and I would like to hear your take on it and whether it can be solved.

    First off, context: I started using Megasplat because i ran into the texture limit of Unity's default terrain plate shader, and i was worried that it wont be enough in the long run, so I would rather try and resolve this limitation early rather than later. I needed a shader that could do triplanar projection, handle many textures and be seamless between meshes and terrain plate. For the project I am working on, I am using a mesh for steep cliifs in order to achieve a better look. I know it isn't the most performance friendly approach, but I am confident it will be ok as long as i optimize it down the line.

    Fortunately, Megasplat provide exactly what I need in terms of functionality. My main problem right now though is actually applying the textures to the meshes in question. It seems that the larger or more complex the mesh is, the more it lags when trying to paint textures. When using it on my intended meshes, it feels like I am only getting a few FPS, making it extremely annoying to work with, not to mention time consuming. Seeing as I need to paint a large surface area for each level, this will take waaaay to long time to do.

    Below is an example on how big the mesh for a level is going to be


    Below is a visualization of what I am working with. As you can see, the mesh blends in perfectly with the terrain plate due to triplanar projection and how I go about making my mesh.


    I also ran into some significant color mismatch with the standard Unity shader, as well as the UVfree triplanar shader I was using before megasplat. I cant seem to figure out how to adjust Megasplat to render correctly, so what am I missing? Because if there is no fix for the lag I am experiencing, my backup plan is to just use UVfree for the cliff edges, even though it is more limiting. If the shaders look too differently though, it will create nasty seams, something I should be able to avoid. (red area is standard shader on a plate with specular removed, blue is UVfree, rest is Megasplat on a terrain plate.


    EDIT: forgot to mention I am using Unity 2017.4.3f1
     
  20. Kev00

    Kev00

    Joined:
    Dec 6, 2016
    Posts:
    229
    Hi,

    I picked up your terrain blending package and I can't get it work correctly. It's stretching the terrain texture on vertical sides. Any ideas?

    Thanks
     

    Attached Files:

  21. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    The vertex painter was written before 32 bit indicted were introduced. As such, it didn’t need to do spacial partitioning of the mesh because there was a 64,000 vertex limit, and brute force was fine. I suggest either breaking up the mesh or turning off 32bit indices. Batching could effectively recombine the meshes later, and you might get better culling with it broken up as well.
     
  22. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Use triplanar texturing at set normal blend to 0. The module runs the terrain shader on the mesh, effectively, and without triplanar the mesh is textured via a top down projection - so it stretches the same as the Unity terrain would if it could go straight up.
     
  23. Kev00

    Kev00

    Joined:
    Dec 6, 2016
    Posts:
    229
    ok I didn't have the triplanar UV module, but I guess I'll pick it up
     
  24. Kev00

    Kev00

    Joined:
    Dec 6, 2016
    Posts:
    229
    So that works! Thanks.

    I do have a suggestion for the blend.
    Do you think it would be possible to add edge scattering via procedural noise or a noise texture to the seam?
     
  25. totrider

    totrider

    Joined:
    Jul 25, 2014
    Posts:
    13
    First off, I assume you mean "turn on 32-bit indices", as I can read that Unity used to be limited to 16-bit which is 65535 vertices, compared to the 4 billion with 32-bit. You make it sound like it is a simple thing to do. By 32bit indices, I assume it references to the vertex indices? I have only an understanding from how mesh vertices are handled in Unity from a small project during my studies, so I am not exactly sure what it is you suggest me to do. In other words, how would I go about turning on 32bit indices? Is it a Unity setting "somewhere" or do I have to edit your scripts in some way? as I am mainly an artist, I definitely need a bit more help in getting this to work.

    So far, it sounds like I need to use a newer version of Unity, 2018.1 at least, in order to even use 32-bit indices in the first place. Is this something you can confirm?

    The main reason why I import them as entire meshes is due to how normals are treated, something I already combated in earlier iterations of my approach to terrain. The only solution I found back then, would have been to bake down all the vertex normal data somehow, and then apply that in Unity post import. Something that sounds way too messy and unnecessary for my taste.

    My late-game plan is to get my programmer to make a script that creates a virtual "grid" that separates the level into "chunks", and then use these chunks to split the mesh into smaller ones that only contain the geometry within that chunk. Naturally, I could just wait with painting the terrain until we get something like that working as I would then be working with smaller meshes, but due to the current circumstances, I cant really rely on him having the time due to his studies, and waiting for an uncertain amount of time also wont really work for me.
     
  26. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    I'm not sure what version they introduced it in- but it's an option on the FBX/Blender/Mesh import options. You want to turn off 32-bit indices and force it to break up the mesh. Keep in mind that having it all in one mesh will be significantly slower for other operations as well, as the whole thing will need to be sent to the GPU and processed even if a single triangle is drawn.
     
  27. totrider

    totrider

    Joined:
    Jul 25, 2014
    Posts:
    13
    Oh, ok, that way. So, I don't think that will be a working solution unfortunately, last time Unity broke up an earlier test mesh that was way higher poly, it split it into 6 separate meshes (I think), but the faces for each mesh was selected seemingly at random. This meant that each mesh had fragmented faces all over the place. Guess I gotta talk to my programmer and see if I can get him to work on it :/.
     
  28. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Just break it up in your modeling program.
     
  29. zefirozh

    zefirozh

    Joined:
    Jun 18, 2018
    Posts:
    21
    Hello, before I decide to make a purchase of this Asset I would like to know this gonna fullfill my purpose. I'm working on Mobile platform and I want to make my model look more realistic. For exsample if I would like to add some stain or blood shed on my house model to make it look old and creeppy can I use your asset to do this kind of stuffs. It like the same idea of adding a decal on model. If it can fit my need I'm sure to purchase this Asset ASAP ( For Cyber Week Mega Sale Why not!!! )

    Thank you for your answer.
     
  30. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    It's a splat map shader, not a decal system- so it depends on what you want. With a decal system you can rotate and place textures onto a mesh or object- a splat map system is more like continuous blending between textures- but they all have the same alignment, etc..
     
  31. Bzuco

    Bzuco

    Joined:
    Sep 6, 2015
    Posts:
    56
    Probably some bugs or I am doing something wrong.

    Vertex painter:
    Show wireframe does not toggle wireframe, but orange selection outline. Shortcut CTRL+W does not work for me, only ESC key for activating, and CTRL+V.
    Other things in screenshot.

    Unity 2018.2.16f1

    EDIT1: "L" key is switching only between auto and top layer
     

    Attached Files:

    Last edited: Dec 2, 2018
  32. firefly9000

    firefly9000

    Joined:
    Dec 7, 2016
    Posts:
    13
    Quick question: We generate a Unity terrain on startup from a height map. All of our terrain is built procedurally from maps (there is no painting on the surface). Is Megasplat able to create that terrain and place the grass, rocks etc... based on maps alone, no painting on the surface?

    I guess our basic question is can we use its features to generate terrain programmatically? From what I've read it seems to but we just want to be sure. Thank you!
     
  33. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    It has runtime procedural mode that works on mesh terrains (not unity terrains) to automatically texture the terrain based on projections. There's also a shader graph like system which is designed for edit time, but you could likely adapt it's output (it writes out shaders) to do the work at runtime. You can also write your own procedural texturing system to output it's splat map format (which is different than Unity's).

    MegaSplat does not place vegetation, for something like that I'd recommend Vegetation Studio, which places things based on rules assigned to each terrain texture.
     
  34. zefirozh

    zefirozh

    Joined:
    Jun 18, 2018
    Posts:
    21
    Already bought it, but I only have 32 PBR textures Where are the rest?

    Edit : It's my misunderstanding, I look at cluster that already mix all of 64 textures.
     
    Last edited: Dec 11, 2018
  35. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @JasonBooth Unity stated that they have fixed the CopyTexture for compressed textures (1094698) in V2018.30f0 and testing it the textures now seem to show but my landscape is all faded looking, does something need to be updated or the texture array recreated? upload_2018-12-12_0-15-26.png
     
  36. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Try pressing update on the config?
     
  37. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    Just tried that, everything turns Grey and I noticed the error:
    Unable to parse file Assets/Voxeland_5_With_MegaSplat/MegaSplat_Voxeland_Plus_Models_Standard_Tex_settings test_normSAO_tarray.asset: [Control characters are not allowed] at line 4
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr) So is this error about the characters I used to name the array? I've never had that with any previous Unity version.
     
  38. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Seems like it- some funky characters in there?
     
  39. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    It seems like the error was a matter of empty characters in the name so I just added an underscore and the message was gone but even after trying to update the config, it still looks faded and when trying to load your scenes I received similar error:
    Unable to parse file
    Code (CSharp):
    1. Assets/MegaSplat/Examples/Textures/Arrays/MegaSplat_Example_normSAO_tarray.asset: [Control characters are not allowed] at line 4
    2. UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
    Well this is all on the first Release Candidate, I hope Unity can address this before getting out of Beta if the error is on their end.

    Edit: Ok found the issue. It was in the shader - the "Emission/metallic array" Not sure why it's not working, perhaps it needs to be compatible with the new Unity Release? I've updated project to the new release, my settings worked with 2018.2 so the Emission/metallic array config may need a look over.
     
    Last edited: Dec 14, 2018
  40. Exbleative

    Exbleative

    Joined:
    Jan 26, 2014
    Posts:
    216
    I just upgraded my project to 2018.3 and tried checking the new Draw Instanced box on my terrain, but it caused my terrain to essentially disappear, with a bunch of random bugged out triangles flying around.

    Tried recompiling the shader by turning a checkbox on/off and just Updated the texture list, but no luck.

    Not getting any console errors either.
     
  41. Mercat

    Mercat

    Joined:
    Jun 4, 2018
    Posts:
    1
    Hi, quick question, why is it that when I paint the same texture into both top and bottom layers, smoothness varies depending on blend factor?
    Capture.JPG
    Left side has blend target set to 0 (bottom), right to 1 (top), looking at smoothness in the Scene View.
    Add second UV is disabled in the Shader Compiler.
     
  42. Bodyclock

    Bodyclock

    Joined:
    May 8, 2018
    Posts:
    172
    I had the same thing. Megasplat has not been updated yet unlike Microsplat. Jason said on Discord General discussion that it should be this week when I mentioned the same problem.
     
    WildStyle69 and Exbleative like this.
  43. Exbleative

    Exbleative

    Joined:
    Jan 26, 2014
    Posts:
    216
    I'm getting one error like this for each of my arrays, not just metallic. Only seems to be happening when I make a build as well.
     
  44. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    I removed the Metallic array and the color returned to normal. I've since repacked textures, some normal maps/texture map slots I've noticed had to be fixed in my config. After repacking I refreshed my terrain/scene and added the metallic array and it seemed to work fine after that.
     
  45. Kojote

    Kojote

    Joined:
    May 6, 2017
    Posts:
    200
  46. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    Megasplat has the option to use Triplanar under "splat uv mode" - click on the material with the arrays assigned and its close to the top.

    Also about the stretching with displace.. it shouldn't happen if your displacement settings are mostly the same but otherwise use the Triplanar contrast dropping it down to 4.0 or so (works for me)
     
    Last edited: Dec 29, 2018
  47. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    I was ranting in the discord but I will try and write here as well.

    After some experience with megasplat, first of all it is a pretty good system.

    Here are some of the questions that I have raised mostly to do with work flow and some odd bugs.

    Using Unity 2018.3f2

    1. As others have stated, ctrl-w does not work for me. (vertex painter)

    2. When you convert a fbx file with many objects in it, it does not keep the position of those objects and they are all set to zero after the conversion. Which makes the work flow almost impossible, tedious to try and replace all the meshes manually by hand based on the original mesh.

    3. Realtime lightmapping uses uv3 and the vertex painter also uses it so there is conflict in this and the lightmap can't be backed unless the mesh is baked. Which is understandable, but I think it can be better, we should be able to make use of uv4 instead so we don't have conflicts.

    4. Baking out mesh causes all my mesh collider to be invalid, so I have to add them manually again afterward to test the game. I suppose I can add mesh collider based on some "other" meshes, but that doubles the mesh memory.

    5. Sometimes not clearing the color, uv3 etc before painting can lead to a really bad artifacts.

    6. Tessllation along the hard edge normal causes the disconnection. But this is not just this asset, the other assets do as well. Having said that, I "think" I have seen one tessllation shader asset does not. I need to look for this one and link it here so it can be investigated.

    7. Where can I find short cut key for changing brush size and flow?

    8. I get serveral warnings on script compile :
    Shader warning in 'MegaSplat/MegaSplat': 'UNITY_PASS_FORWARDBASE' : macro redefinition at line 3410 (on d3d11)



    That's it for now.
     
  48. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    1. I second this
    2.there are free obj exporters that do keep position. I also use an asset called Unity FBX Exporter which has kept the position but may not be working correctly in unity 2018.3
    3. I get errors about uv lighting as well but I think it's due to incompatibility with texture arrays.
    6. I haven't had any cracks unless I pushed displacement past ideal settings or used non efficient displacement textures (not ideal grey or black based export settings leading to either extreme or barely visual displacement levels)
    The asset "crack free tessellation shader" is it's own product and requires an additional script to compute the crack free solution) and this solution has a bit of performance overhead which could lag your terrain if that's what it's being used for. Also I believe this shader doesn't use texture arrays.

    8. Your shader warning is likely because you didn't create a new megasplat shader name as instructed in the Megasplat doc.. "MegaSplat/MegaSplat" should be renamed so something like MegaSplat/MegaSplat_Landscape so it doesn't conflict with Megasplat's demo shader settings.. 1. make a new MS shader, rename (the file name should also be added in the shader script after "Megasplat/" 2. drag that shader onto a new material
     
    Last edited: Dec 27, 2018
  49. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    For converting meshes dont we have to use the given tool from megasplat?
     
  50. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    Yes or the slower way that you can setup in the shader "preprocess mesh".
    @JasonBooth
    Is there a solution to this? I've seen others ask for help about this same issue.. I created a video to show what's going on

    3 different topics here:
    1. I've tried changing Megsplat shader settings on the material and Voxeland settings, preview of each texture channel in Voxeland and even though when I was in Albedo mode with tessellation, the scene did not have any black patches whatsoever. Initially I circled the mouse over the fact that it's in Static mode -full resolution for MS. Lastly the black patches only show on completely flat surfaces

    Using Unity 2018.3.0f2 on Windows.

    2. I'm having a problem with Megaplat after setting up Vulkan.. I'm getting this error from the shaders setup specifically with tessellation: SPIR-V requires location for user input/output at line 9 (on vulkan)
    Compiling Vertex program with UNITY_PASS_DEFERRED LIGHTMAP_OFF DIRLIGHTMAP_OFF DYNAMICLIGHTMAP_OFF
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR

    3. Also wanted to share some insight, I guess ptex is compatible with texture arrays and if used could eliminate the need for triplanar mode -resource hog. https://developer.nvidia.com/sites/...dc12/GDC12_DUDASH_MyTessellationHasCracks.pdf 3DCoat (asset store plugin) also allows ptex to be used in Unity so I hope you find it useful to add support for texture arrays -NVIDA seems to be implying that it could be (closer to the bottom of the page). Some might say it may cost more performance but the format is scale-able without pixel loss so imagine taking 8k images and downsizing them to 1k or less.. I don't know if that's possible but other than negating the need for triplanar and also having 4-8k images super small it just might be the winning format in the end. Apparently it has it already has seamless anisotropic filtering built in so perhaps another
    performance advantage if anisotropic filtering is disabled in the shader.
     
    Last edited: Dec 31, 2018
    ftejada likes this.