Search Unity

  1. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  2. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Participate with students all over the world and build projects to teach people. Join now!
    Dismiss Notice
  5. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  7. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

TC2 Node Painter - The TC2 extension for painting the world!

Discussion in 'Assets and Asset Store' started by Seneral, Feb 5, 2017.

  1. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    173
    I didn't understand exactly how to move the terrain up and let let Painter subtract terrain from the imported height map.
    Can you show me some screenshot ? :)
     
  2. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,144
    I'll make the video today, showing all of this:)
    Edit: Sorry, something got in between. Will have to delay it to tomorrow.
     
    Last edited: Mar 4, 2018
    MaximilianPs likes this.
  3. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    173
    No problem at all, thank you for your efforts :)
     
  4. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,144
    @MaximilianPs Ok, finally got it uploaded...

    In this one I briefly cover some tips for working with large scale terrains in unity and how to integrate painters into your workflow.
    It is less structured than the others but I hope that helps a bit:)
    Seneral
     
    MaximilianPs likes this.
  5. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    173
    New problem :D
    Even if I use "Replace" it still paint with just the altitude terrain, but the profile remain the stame from the RAW file.

    I've made a painter, and a mask that's linked to the painter, but still doesn't work as expected :confused:
    Also "Lag" as hell..
    I've also tryed by using Curve, but the entire patch with TCNP get extruded very hight, about 1000.
     
    Last edited: Mar 10, 2018
  6. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,144
    Ya went over that shortly in the latest video, it refers to another tip video (Terrain Plateaus). In short, this requires a special setup - one additional layer. The weird behaviour of the layer setup of yours is expected, since it adds to the terrain. Well, just watch the video:)

    Hope that helped.
    Regarding the lag, in what sense? There's currently no known case where lag appears, except if you have a very high resolution over 4k, a very slow PC or memory issues. If it is memory (just monitor in task manager), you can lower the undo stack size as described in the docs.
    Seneral
     
  7. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    173
    yes, I've already watched it a bunch of times, I'll try so experiment something different.
     
  8. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,144
    Hm, does it not work in a way? Do note I put the complete layer I made in the video in the description, you could just drag it in your project and test that:)
     
  9. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    173
    I'll try to face the problem in a different way, i'll make a brush the with mountains from the raw file, then I'll paint all by hand.
    On this way I'll have no raw file to import and more simple TC2 configuration is, better is. (I hope)
    It's a very huge terrain, and I need to keep the things simple, because "to make a mess" is really easy.
     
  10. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,144
    Did it work out for you? If not, we can chat about this, since I can't seem to get your specific problem:) Would gladly help you.
    Seneral
     
  11. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    173
    I guess all my issue are coming from the fact that I'm using a 13x13 terrains grid, the terrain and the maps are shifted by -5000 on X and -7000 on Z , but most of all it's shifted on Y 'cause I need to draw rivers, and that complicate my life a lot
     
    Last edited: Mar 14, 2018
  12. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    173
    I wonder why I didn't test it before.
    If I create a single terrain (1x1) it works very smoothly and really fine.
    At this point I'm wondering what happen if I prepare all on a single terrain and then re-import the whole configuration on a 13x13 grid.
     
  13. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,144
    Don't see why that would be a problem, if you handle it right... Just tested it with, works fine. Created a multi-tiled terrain, offsetted the terrain area in all axis, then the top layer nodes to correct the offset (so a newly created node will be right in the center of the terrain in the scene) and everything works just fine.
    I still not get what your problem is. If it is performance with multiple tiles, I have a older TC2 version modified to use the partial generation feature I developed for Node Painter, which means only the areas that are modified are regenerated at all times (not only when painting, but when moving a small node, or change it's values, only it's area will be updated, not ALL terrain tiles). This should speed it up quite alot and tbh I wonder why this has not been done at start:) Might get it integrated, it's easy. If you want, I can send an updated version to you.
    If it's something else, please tell me...
    Seneral
     
  14. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    173
  15. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,144
    @MaximilianPs Well that's never good! Can't help you in that case :eek: I can just recommend you to rewatch the video, and either get it working or tell me the actual problem if you find it:)
    Wish you best luck! Seneral
     
    recon0303 and MaximilianPs like this.
  16. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    173
    @Seneral When I export the Raw file, it get flipped on Z axis (I guess), 'cause when I re-import it is flipped down.
     
  17. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,144
    Ya, observed that recently. I will prepare a fix next weekend! Thanks for noting:)
     
    MaximilianPs likes this.
  18. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    173
    Any idea how to fix that dark borders?
    It happens just when I paint, I mean that the splat map without using TN2NP it's fine.

    http://i64.tinypic.com/30wkr4y.png

    [€dit]
    I Notice that it isn't so visibile in gambe, but still present, and very noticeable from the far.
     
    Last edited: Mar 25, 2018
  19. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,144
    This happens when that pixel isn't assigned to any splat.
    The most likely possibility is that the mask node for the affected splat is missing in the top row (remember you have to add it to the painted layer AND to the group). This is most likely since you can see a small red dot on the final mask node.

    Also, it seems you don't have ANY procedural splat nodes, right? In that case, you can completely remove ALL mask nodes in the group mask (the top row) and replace it with a shape/constant white node, since you don't need to mask with procedural content below that layer:)

    If you don't know what I'm talking about we can chat so I can further clarify:)
    Seneral
     
  20. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    173
    Nope, indeed I have a procedural splat which is the second from the bottom, it's the one create procedurally and based on the terrain's height.

    Indeed I was missing a Mask on top, which was the second from the bottom I've made a copy of his mask, but the problem at the moment still be present.

    I'll made a new check to see if all nodes are correctly linked.

    [Edit]
    No way the problem still present.:\

    Here is the completed tree
    http://i68.tinypic.com/2hfm24i.png
     
    Last edited: Mar 26, 2018
  21. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,144
    Well the procedural content is meant to be put BELOW the paint group, not in it, since that defies the whole meaning of the mask ontop and the lerp mode. Also with procedural splats, why not make an eraser channel, that is the whole point of mixing procedural with manual painted splats... I can just recommend you to follow the tutorial on point, since the problem here lies in the incorrect/unlogic setup of the nodes. I can understand it's hard to get around it though, so just try it out:
    Use one eraser channel that is not assigned to a node so you can return to the underlying procedural splats, instead of the red sand splat that currently would replace all procedural splats.
    Again, refer to this video for details:

    Seneral
     
  22. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    173
    @Seneral , thank you for your patience :oops:

    I'm back,
    after a complete "re-Splat"
    for some reason now I've a a white "background" when I paint.
    I can use the Curves, from the - Alpha's Mask Group, but it will create a "gap" which make impossible to paint 2 texture side by side.


    Here is the Splat Manager.


    You can click on pictures to have a bigger view.
     
  23. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,144
    Btw, to keep you updated, we resolved @MaximilianPs issue over a screenshare session this weekend:)
     
  24. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    173
    Yes indeed, sorry for the delay I was pretty busy on the last days.
     
    Seneral likes this.
  25. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,144
    Hey everyone,
    just wanted to note this asset is now live for about a year now! Thanks very much for all of your support:)
    I'm currently in final essay phase of Abitur, planning a trip after it, learning another language, and working on a completely new tool, so it was hard finding time to implement some new features for TC2NP. Hope you can understand.
    Still here for support, that you can count on:)
    Best regards, Seneral
     
    MaximilianPs likes this.
  26. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,144
    Hello everyone,
    I have an announcement to make: This tool will be free from now on!
    (Probably will take effect very soon)

    Don't worry, I will continue support just as I've done so far, especially for those that buyed the tool. TC2 Node Painter is NOT being deprecated! This is my hobby so you can count on me continuing it. I still have alot of future stuff planned :)

    Also, since this is kind of spontaneous ( I apologize ), if you purchased the tool in this month (April 2018), you are free to PM me for a refund if you feel like it:)

    Best regards,
    Seneral
     
    coverpage and Nateply like this.
  27. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    173
    I will not, after all support that you gives me, you deserve it ;-)
     
    Seneral likes this.
  28. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,144
    Thanks very much for the kind words:) Ya, intend to continue it like before:)
     
  29. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    1,796
    Been meaning to purchase this, and finally went to do so yesterday -- and lo and behold, it's free! That's awfully generous of you, Seneral!

    But already I need som help. In both the Heightmap demo scene and a new test scene, the Brush palette looks different than in the videos and manual -- there are no brush icons, just numbers, and the sliders are different -- see screenshot. What do I do about that?

    And when I try to paint on the terrain to modify the height, the brush is always square, and has extreme values -- I have to reduce the sliders to .001 or so, else the terrain goes very high.

    Am I doing something wrong?

    thanks!
    Dave

    node problems.jpg
     
  30. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,144
    Hm never seen that, it obviously can't find any brush textures - that's why there's no selection bar, and without textures, shaders by default assume a square white texture, which explains the painting. Sliders are normal, only the first default function brush has some additional parameters (hardness and falloff), probably what you've seen in the videos. Since it is also 'dynamic' it is also not there.

    So, the painter fetches all the brushes automatically from 'Assets/Node Painter/EditorResources/BrushStamps'. Can you verify that this path is existing / correct and also valid in the Settings window ('Window/TC2 Node Painter Settings', Folder Location section)?

    You probably moved the whole extension, in which case you just need to adapt all of the paths found in that settings section to their respective new locations. See the docs for more information.

    Seneral
     
  31. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    1,796
    Thanks! Yes, that was the problem -- I'd moved Node Painter into a subfolder in my project. So I've updated the paths, and now the brush icons appear in the inspector. Whew!

    But now on the terrain, and in the Value-Format New Canvas Preview, the brush icon is pink, with errors in the console, below. I'm on Mac High Sierra, Unity 2017.3, with Mac Metal Editor enabled (necessary for TC2). Any idea if that's fixable?

    Shader error in 'Projector/BrushOverlay': failed to open source file: 'PaintUtility.cginc' (on metal)

    Compiling Vertex program
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHTMAP_RGBM_ENCODING


    Shader error in 'Hidden/BrushGUIViz': failed to open source file: 'PaintUtility.cginc' (on metal)

    Compiling Vertex program
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHTMAP_RGBM_ENCODING
     
  32. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,144
    Ah Mac :)
    Definitely fixable, taking a look right now.
    What bothers me though, it's only those two shaders that complain, both in the vertex program, about PaintUtility, but neither vertex shader makes use of that include file. Also, the canvas projector uses the same vertex shader.
    Those vertex files are the standard vertex shader files for projectors and GUI shaders. Will take a look if anything happened there on unitys side in the default shader sources, unlikely though. Most probably mac specific though, not getting these errors.

    Doubt there's any more info you can give me? Any more detailed error log when directly selecting the shaders (BrushGUIViz and BrushProjector-Overlay in Shaders/Painting)? Really no other shader complaining?
    Any comments of unity changing these shaders automatically at the top of the files (including PaintUtility.cginc)? Sometimes unity 'upgrades' them...
    Finally a blind try, add '#define CALC_BRANCHES 1' at the very top of PaintUtility.cginc and see if that changes anything.

    Thanks for your assistance,
    Seneral
     
  33. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    1,796
    Well, I came back to this now, and those errors are gone, and the brushes look good on the terrain! Weird....but good!

    EDIT: But hmm, I'm having some odd behavior when painting splats -- it doesn't appear to be doing anything until I change the splat selected on that node, and then it appears and looks real good. But I have to adjust that slider each time I paint.

    And there is this error in the console -- so probably I missed something with splat painting. I'll watch the videos again to check that, but here's the error:

    NullReferenceException: Object reference not set to an instance of an object
    TerrainComposer2.NodePainter.NodePainter.CheckNodeTargets () (at Assets/AssetStore Tools/Node Painter/Scripts/Core/NodePainter.cs:324)
    TerrainComposer2.NodePainter.NodePainter.Update () (at Assets/AssetStore Tools/Node Painter/Scripts/Core/NodePainter.cs:292)
     
    Last edited: Apr 27, 2018
  34. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,144
    Don't think I can quite follow - so you followed my splat painting video with the multi-format canvas and each time you try to paint on a channel (splat) you have to go to the masked splat node in TC2 and change the splat it is assigned to?
    Did you make sure you have the 'Auto' generation enabled in the TC2 window? If that's not the issue, instead of changing the splat on the node, does the 'Refresh' button work?

    Finally, that error means you have a node target unassigned. So in one of your channels, you added a node target field but did not assign a node. Of course that should not trigger an error, was a simple bug, will fix that:)

    On a different node, will have a small update ready soon, with some fixes and internal improvements, aswell as (hopefully full) support for non-square canvases.

    Seneral
     
  35. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,144
    Hey everyone,
    just submitted another update, 1.2.1, which adresses mainly minor things:
    @gecko
    Here's the link until it is accepted on the AS:
    https://www.dropbox.com/s/k9rvpfj51aey7qh/1.2.1_NodePainter_5.6_upload.unitypackage

    Seneral
     
  36. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    1,796
    Thanks -- and yes, my problem yesterday was due to my own ignorance, sorry for the false alarm.
     
  37. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,144
    If it happens to you, it happens to others aswell - if there's anything related to workflow that can be improved / was unclear, let us know:)
    Glad it works for you now though.

    On a different note, I consider (after user request) to add support for other tools that could benefit from a painter.
    Namely MapMagic, which would very much fit in the pattern that TC2 needed aswell.
    The core itself and TC2 related stuff is separated either way so that should be easily possible.
    If you have suggestions / other tool ideas regarding that, please post here. Don't know when that will be realized though...
    Seneral
     
  38. Keaneo

    Keaneo

    Joined:
    Mar 7, 2015
    Posts:
    43
    Hi,
    I'm trying to import a raw heightmap file from World Composer - has anyone tried this successfully? I get the "failed" white background with a req question mark image in node painter window.

    Thanks!
     
  39. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,144
    Hm, the raw file should be the correct format, since TC2 and Unity terrain use it aswell as TC2NP. Does it work if you load it into either of those other two (in a TC2 raw node or directly into a unity terrain of the correct size)?
    Besides that, if it fails, there should be no such question mark in the node painter window, which makes me think that this is the actual data in the raw file (or a completely different problem).
    If it really failed to read, it would probably throw an error or be some distorted mess:)
    Seneral
     
  40. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,144
    Hello everybody,
    I'll be on a trip to Japan from the 26.06. to the 19.07., so support will be slower, and I'll have no development PC there.
    I'll try my best to answer!
    Seneral
     
    evilangel89 likes this.
  41. evilangel89

    evilangel89

    Joined:
    Feb 8, 2017
    Posts:
    268
    Have a safe trip man. Enjoy Japan! It's a beautiful country.
     
    Seneral likes this.
  42. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,144
    Thanks! Yeah, it definitely is (safe and beautiful). Quite a lot of devs I had come in contact with come from here, too:)
     
    evilangel89 likes this.
  43. gsclasses

    gsclasses

    Joined:
    Dec 3, 2012
    Posts:
    4
    Screen Shot 2018-11-16 at 4.36.01 PM.png Hey!
    First of all, let me thank you for an excellent tool! TC2 + TC Node Painter is a great combo for those who are looking to bring their terrains into the entire new level!

    However, I faced an issue today. For some reason, NP cursor is not aligned with actual OS cursor... It's far away from it which makes it almost impossible to use NP :(

    Any chance this can be fixed? It wasn't observed before (was using NP for a couple of days).

    Details:
    OS: MacOS Mojave
    Unity 2018.2.16f1 Personal
    Screenshot attached
     
  44. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,144
    Thanks for your kind words:)
    I'll look into it, downloading 2018.2.16f1 now and see if they changed anything.
    Let's hope it's not platform dependend (too many Mac-only problems recently...)
     
    Last edited: Nov 17, 2018
  45. Seneral

    Seneral

    Joined:
    Jun 2, 2014
    Posts:
    1,144
    Ok so I can't get 2018.2.16f1 on linux to run at all so I fired up windows - and as expected, the cursor works just fine on windows.

    For clarification:
    1. Does the brush in the GUI preview work fine, or does it also show an offset?
    2. Is only the Brush projection on the terrain offset and NOT the actual painting, or both?
    3. Is the offset dependant on the mouse position, or fixed? Is it vertically inverted or anything similar?

    If you want, you can check in NodePainter.cs/CalcBrushWorldPos(l.632), there is the brush position calculation. It involves raycasting against the terrain colliders and messing with editor-dependant mouse position transformations. If there is a platform-dependant bug, it's there.
    Experimentally, you can modify the following line (l.644) (37.5f is the toolbar header height of the scene view):
    mousePos.y = (Screen.height - mousePos.y) - 37.5f;

    to these:
    mousePos.y = (Screen.height - mousePos.y);

    mousePos.y = mousePos.y - 37.5f;

    mousePos.y = mousePos.y;

    And see if any of these modifications work.
    Seneral