rthome / sharpnoise Goto Github PK
View Code? Open in Web Editor NEWA library for generating coherent noise.
Home Page: https://www.nuget.org/packages/SharpNoise
License: GNU Lesser General Public License v3.0
A library for generating coherent noise.
Home Page: https://www.nuget.org/packages/SharpNoise
License: GNU Lesser General Public License v3.0
Hello,
I have been looking through the documentation, and I am wondering whether there is any built-in functionality to normalize/map all values inside a noise map instance to a certain fixed range (such as [0.0, 1.0]
) based on the minimum and maximum?
Of course, implementing this yourself isn't a big deal, but since I have been doing it in multiple projects again and again I feel like this could be a nice thing to implement as a library feature. What is your opinion on this? (I would be willing to add such functionality if its a desired feature)
If I try to compile the OpenGLExample I get this error message
/usr/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets: Error: Tool exited with code: 1. Output: Error: Invalid ResX input.
Position: Line 123, Column 5.
Inner exception: Could not find a part of the path "/home/markus/Projects/SharpNoise/Examples/OpenGLExample/resources/normals.frag".
(OpenGLExample)
Don't know what this means or how I can solve this.
I was getting weird results from the Curve module so I went digging through the code.
This is the return statement from the CubicInterp function in the original libnoise:
return p * a * a * a + q * a * a + r * a + s;
And this is the return statement from the Cubic method of NoiseMath in SharpNoise:
return (p * a * a * a) + (q * a * a * a) + (r * a) + s;
It seems q
is being multiplied by a
one too many times. Removing the extra multiplication fixed the issues I was having.
For an easy start it would be nice if you could add a more simple example without a GUI. Just how to set up a noise and save an image for example.
You currently have the permutation table defined as:
private static readonly short[] P =
{
151,160,137,91,90,15, ...
};
If you instead randomly select those values you should get random simplex noise.
Alternately you can shuffle the table while expanding the permutations, see this implementation for a seeded simplex: https://github.com/everbytes/LibNoise/blob/master/src/LibNoise.NET35/Primitive/ImprovedPerlin.cs
Using var source = module.SourceModules[0];
will never thrown the expected exception (NoModuleException
) as Module class constructor will always initialize source array properly:
if (sourceModuleCount > 0)
sourceModules = new Module[sourceModuleCount];
else
sourceModules = emptyModulesArray;
(and also, exception is not even declared as throw-able, AFAIK)
In test SharpNoise.Tests\GraniteTextureTest.cs, in GraniteTexture_SphericalRender
test (the last one), the output file created in:
bitmap.Save(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "test.bmp"), System.Drawing.Imaging.ImageFormat.Bmp);
Should be removed after the test end.
Or file created into temp directory.
I can create a new nuget package, which will create confusion. Any chance of getting a new release pushed to nuget?
I'm not sure if there is anything in the library that couldn't work with .Net Core. especially now that version 2.0 is available. Is it just a matter of adding new targets to the nupkg?
Hello , first say thanks for this nice library is pretty interesting and useful, im doing a visual implementation for a programming enviroment call vvvv gamma,i get all the modules work except the spheres, is implemented in the library or just on the way?
Thanks
I would really appreciate it, if you where adding Opensimplex noise as module because Perlin noise has some ugly artifacts and Simplex has some patent issues.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.