FastNoise_CSharp | FastNoise C# Version | Generator Utils library
kandi X-RAY | FastNoise_CSharp Summary
kandi X-RAY | FastNoise_CSharp Summary
FastNoise C# Version
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of FastNoise_CSharp
FastNoise_CSharp Key Features
FastNoise_CSharp Examples and Code Snippets
Community Discussions
Trending Discussions on FastNoise_CSharp
QUESTION
Well, I'm continuing this question without answer (Smoothing random noises with different amplitudes) and I have another question.
I have opted to use the contour/shadow of a shape (Translating/transforming? list of points from its center with an offset/distance).
This contour/shadow is bigger than the current path. I used this repository (https://github.com/n-yoda/unity-vertex-effects) to recreate the shadow. And this works pretty well, except for one fact.
To know the height of all points (obtained by this shadow algorithm (Line 13 of ModifiedShadow.cs & Line 69 of CircleOutline.cs)) I get the distance of the current point to the center and I divide between the maximum distance to the center:
...ANSWER
Answered 2018-Nov-29 at 15:00The problem is that the lerp percentage (e.g., from high/low or "red" to "black" in your visualization) is only a function of the point's distance from the center, which is divided by a constant (which happens to be the maximum distance of any point from the center). That's why it appears circular.
For instance, the centermost point on the left side of the polygon might be 300 pixels away from the center, while the centermost point on the right might be 5 pixels. Both need to be red, but basing it off of 0 distance from center = red
won't have either be red, and basing it off the min distance from center = red
will only have red on the right side.
The relevant minimum and maximum distances will change depending on where the point is
One alternative method is for each point: find the closest white pixel, and find the closest green pixel, (or, the closest shadow pixel that is adjacent to green/white, such as here). Then, choose your redness depending on how the distances compare between those two points and the current point.
Therefore, you could do this (pseudo-C#):
QUESTION
I have a function that returns a bounded noise. For example, let's imagine that out input range is [-1, 1]. With my method I can return a bounded/in range noise (depending on the biome we are currently).
...ANSWER
Answered 2018-Nov-28 at 22:47I think this is not the best way to do this.
But, to everybody that visit this question, you should visit Part 2: Smoothing noises with different amplitudes (Part 2)
There is a very nice answer.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install FastNoise_CSharp
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page