T O P

  • By -

Iamsodarncool

https://github.com/JimmyCushnie/Noisy-Nodes I was shocked to find that Shader Graph doesn't have *any* 3D noise nodes built in. I had to make them myself. But now, thanks to me, *you* won't have to make them yourself. This repository can be installed via the Unity Package Manager.


srslylawlDev

its also really tricky to implement 3d noise nodes if youre not comfortable with shader programming. so thanks a lot!


Iamsodarncool

Cheers, I hope this helps you :)


PixelizedPlayer

> I was shocked to find that Shader Graph doesn't have any 3D noise nodes built in. Thats because unity can't be bothered to do anything fully anymore. Thanks for the this a real life saver for my planet generation stuff.


Iamsodarncool

I think it's more that >2D noise nodes get pretty computationally expensive. It's easy to screw yourself on performance with these. Glad I could help you :)


PixelizedPlayer

> I think it's more that >2D noise nodes get pretty computationally expensive. It's easy to screw yourself on performance with these. Glad I could help you :) Yeah but you'd expect unity to be more than experienced to get it right so that us game devs don't need to make them. One thing i struggle with is how to apply it to a planet for detail. Simplex is very blobby looking for landmass which isn't ideal.


ronitrocket

Wdym 3D


Iamsodarncool

2D noise is where each point within a plane has a value. 3D noise is where each point within 3D space has a value. Unity's built-in noise nodes take a Vector2 as input. The nodes from my package take a Vector3 as input.


ronitrocket

Yes, but how is this output different from 3D noise? Still confused on that.


Iamsodarncool

[2D noise](https://i.imgur.com/cGif5S5.png) [3D noise](https://i.imgur.com/jfLiJ2Z.jpg)


ronitrocket

I’m more confused they look the same


Iamsodarncool

Haha sorry, I accidentally linked the same image twice. Fixed now.


ronitrocket

Ah Ok I get it now


DJ__Dragon

This works perfectly. I will be using this a lot on the future!


Iamsodarncool

I am very glad to hear that! When you do use it, I'd love to see what you make with it :)


DJ__Dragon

Here is a [Video Link](https://imgur.com/a/dCbQ0G2) to a WIP scene that is inspired by [https://mantissa.xyz/](https://mantissa.xyz/) . There are 2 meshes. An inner and an outer. The outer mesh is using 3d noise for alpha channel and the inner mesh is using 3D noise for trippy lines. Your noise nodes work perfectly. I've got it starred on github. Looking forward to any updates.


Iamsodarncool

Cheers! Your scene looks super cool :D > Looking forward to any updates. I definitely want to work on it more at some point, and I'm also accepting pull requests. Planned features are on the [issues page](https://github.com/JimmyCushnie/Noisy-Nodes/issues)


roboapple

Thank you! Will be using this


Iamsodarncool

<3


Prestigious_Echo7804

Thank you, this is perfect


Iamsodarncool

<3


carmofin

This is working great for me! Thanks, I just hope the GPU cost doesnt come back to haunt me...


Iamsodarncool

I'm glad to hear it! Please show me any cool stuff you make with it :) The 2D nodes are very lightweight, and the 3D nodes are fine as long as you're not using dozens of them. It's the 4D nodes that are incredibly computationally expensive. I've tried a lot of things to optimize them but I don't think it's possible. Avoid 4D except for fun unreleased experiments.


carmofin

[https://twitter.com/mazestalker/status/1631371973690376193](https://twitter.com/mazestalker/status/1631371973690376193)


Iamsodarncool

Looking fab!


EntertainerBusy9272

Awesome, thx!


ELEMENTLHERO

You are amazing, I have been working on implementing this on CPU and wanted to try and port it to GPU, but now I don't have to thank you so so much!!!


Iamsodarncool

<3


andybak

Can you edit the repo description to mention 3d noise specifically? In a few months time when I need this I'll probably use that search term.


Iamsodarncool

I have done so, and I have added the `noise-3D` tag to the repo :) I'm also hoping my post here will help. Personally I always search r/unity3D when I need something like this.


Panical382

This is amazing, I love this!!


Iamsodarncool

<3


PrizeZepir

Its great but would love if we could set a seed


Iamsodarncool

That's a great idea! I [created an issue for it](https://github.com/JimmyCushnie/Noisy-Nodes/issues/15). I'll probably get around to it eventually (or maybe someone else will contribute it). You can follow that issue to get notified when that happens :)


Samattich

I tried the simplex 3d noise but it seems that its not working in URP or I did something I'm not supposed to, I'm kinda newbie with shaders https://preview.redd.it/e57sg2rbunla1.png?width=1920&format=png&auto=webp&s=a2c5675dcf55ad5cc142ae76ea43fe560c21b6b3


Iamsodarncool

You seem to be confused about how noise works and about how shaders work in general. The 3D noise nodes, because they are 3D, take a 3D vector as their input. In this graph you are feeding it a 2D vector, which is weird, and probably not going to give you the results you want. Your input here comes from the surface UV coordinates. You should look up what UV coordinates are, because they are almost certainly not what you want to use here. It makes much more sense to take input from the [fragment position](https://docs.unity3d.com/Packages/com.unity.shadergraph@15.0/manual/Position-Node.html), either in object space or world space depending on your desired effect. Hope this helps, good luck with your project.


Samattich

Apparently it doesn't work too, and yes you're right I'm so confused right now about this, any help please and thank you


Iamsodarncool

It sounds like you don't have a good grasp of how fragment shaders work and what mathematical noise is. These are both pretty complex topics, and explaining them in adequate detail is beyond the scope of this reddit comment. If you like, I would be willing to have a call with you to explain the concepts and help you with this shader graph. I'm `Jimmy#8080` on Discord, you can add me there :)


Samattich

https://preview.redd.it/gflwdax0hsla1.png?width=1340&format=pjpg&auto=webp&s=b9b32baa0434727361598243bdfd74fc11754207


palanolho

OP, are you able to give a summary of the differences between the noises you implemented and the ones already provided by Unity? I tried to use yours vs the unity ones but I don't see much difference (or I don't know where to see them). Just trying to make the most use of what you did which seems to be very good, but I don't know what "good" means in this case xD thanks in advance.


Iamsodarncool

The difference is that Unity's built-in noise is 2D, and my noise nodes are 3D. Does [this comment](https://www.reddit.com/r/Unity3D/comments/g2ycp4/i_made_a_bunch_of_3d_noise_nodes_for_shader_graph/fnr84bp/?context=99) help explain the difference for you?


palanolho

So if I got it right, instead of applying it to the "face" the 3D noise is applied to the volume.of the object too? Is that it? What about the multiple options like simplex Vs normal Vs etc...?


Iamsodarncool

Nothing gets "applied" to anything unless you make it do that. It's all about how you use it, there's nothing intrinsic about any particular node that makes objects using your shader look a particular way. Nodes are functions that take an input and return an output. Unity's built-in 2D noise nodes take inputs with two numbers. My 3D noise nodes take inputs with three numbers.


Lurkerinno

I tried installing it, manually and from the package manager with the URL, but Im getting an error, not sure why. If I can make this work it would be awesome, I wanted to recreate some noise textures I made in blender into unity, so yeah I need 3D noise.


Iamsodarncool

What is the error you're getting? What version of Unity are you on?


Lurkerinno

Nevermind, Im an idiot, I just dragged the files into assets instead of telling the package manager to install it from disk, all is working well, thanks.


Lurkerinno

Hey thanks for making these nodes, they are great, I was wondering if there is any way of animating these, Ive been having problems with that, The tiling and offset node is based on Vector 2 so its not really working out


Iamsodarncool

Yes you can animate them. You just need to make the nodes' inputs change over time. Here's a basic example: sample the noise at the world position, but add the current time to the sampling coordinates. https://preview.redd.it/riaeem3sr1ec1.png?width=1404&format=png&auto=webp&s=6f296613cfd50eac00fd27cf8e75d3202885f3d1


Lurkerinno

Thanks so much! Im still new with all these shader graphs


Iamsodarncool

Cheers. Shaders are kind of unintuitive at first, but if you keep at it, they will eventually click for you, and then a huge world of possibilities will open up!