Search Unity

Shader Graph Question

Discussion in 'Shaders' started by Sark_Klimento, Jan 17, 2019.

  1. Sark_Klimento

    Sark_Klimento

    Joined:
    Jan 17, 2019
    Posts:
    12
    So i have question about the Unity Shader Graph: How can i generate seamless texture using noise? Which nodes i need to use or what i need to search for ? Will appreciate any answer!
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,348
    What exactly are you trying to do? I mean you can throw in a Simple Noise or Gradient Noise node and you have a seamless "texture" of sorts, but I get the impression that's not exactly what you're looking for.

    If you're looking to do texture synthesis along the lines of Substance Designer, that's not really what Shader Graph is intended for. While it's possible to do some of the things Substance does, doing a full realistic texture in real time is exceedingly expensive.

    If you're looking to take an existing non-seamless texture and make it seamless in Shader Graph, that's possible, but again not what Shader Graph is intended for.
     
  3. Sark_Klimento

    Sark_Klimento

    Joined:
    Jan 17, 2019
    Posts:
    12
    So i was working on the planet generation, but before the actual shader graph release. Now, i want to somehow generate planet textures by using the shader graph. Main problem for now - is that i have the edges at the sphere when using the shader graph, so i need to solve this to move next.

    To be clear, i need some kind of solution to generate hight resolution textures for my randomly generated planets. When i was looking for solution i find the shader graph, but it ends with the "seam" problem.
     
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,348
    dog_funtom, gaetan-dpt and demalpica like this.
  5. Sark_Klimento

    Sark_Klimento

    Joined:
    Jan 17, 2019
    Posts:
    12
    ph_ likes this.
  6. alanmthomas

    alanmthomas

    Joined:
    Sep 7, 2015
    Posts:
    197
    I don't know if you're still looking for a solution for this. In the event that you are, you can achieve what I think you are looking for using a simple noise node, convert it normals and then feed that into the normal map. Create a tiling and offset node and feed that into the UVs of the noise. This worked pretty well for me.
     
    demalpica likes this.
  7. ph_

    ph_

    Joined:
    Sep 5, 2013
    Posts:
    232
    Same as @alanmthomas, I'm not sure you're still looking for a solution but it could be useful to someone else.
    You don't need a 3D noise, all you need is a 2D noise that can tile (e.g is periodic). It's going to be faster to compute and/or to store. You can definitely fine implementation of such noise online.
    I've also released a plugin, which among other features, gives you 2D/3D noise that can be tilable or not. You can even bake the result into a texture asset from ShaderGraph (the bake is for 2D noise only at the moment): ShaderGraph Essentials on the asset store

    Hope it helps !

    noises_node.png
    bake_texture.png
     
    Last edited: Apr 26, 2019
    demalpica likes this.
  8. makerspender

    makerspender

    Joined:
    Aug 20, 2017
    Posts:
    9
    A screenshot of that node setup would be wonderful, if it isn't too much to ask :)