Giter Club home page Giter Club logo

Comments (6)

echush avatar echush commented on May 26, 2024

@Auburn Do you think this is possible? Or is there maybe some way already now to see those values?

from fastnoise2.

Auburn avatar Auburn commented on May 26, 2024

There is no way to get the theoretical min/max directly from the node tree, it would need to be something more rudimentary like the min/max y vert position from the meshes

from fastnoise2.

echush avatar echush commented on May 26, 2024

Ok, then it would be best to display the min/max coordinate each for X/Y/Z of the mesh. I assume that's probably easy to implement?

from fastnoise2.

douglasg14b avatar douglasg14b commented on May 26, 2024

I have a request that's similar to knowing the output bounds, normalizing.

I have a need to normalize the output, ensuring it's clamped between 0 and 1. I'm trying to replace my own noise generation code, where I pre-calculate the global max & min, and then normalize my output to be between 0 and 1.

Is there a way to do this with a node? I was messing around with the remap one, with little success.

Edit: Even if there was a way to guarantee the noise output of this lib could be -1 -> 1 that would be very helpful.

from fastnoise2.

douglasg14b avatar douglasg14b commented on May 26, 2024

For reference this is how I currently normalize my noise:

private static void Normalize(float[] noiseArr, float minHeight, float maxHeight, float lowerBound, float upperBound)
{
    for(int i = 0; i < noiseArr.Length; i++)
    {
	float normalized = Maths.InverseLerp(minHeight, maxHeight, noiseArr[i]);

	if (normalized < lowerBound)
	{
	    normalized = 0;
	}
	else if (normalized > upperBound)
	{
	    normalized = 1;
	}

	noiseArr[i] = Maths.InverseLerp(lowerBound, upperBound, normalized);
    }
}

from fastnoise2.

Auburn avatar Auburn commented on May 26, 2024

I've added a min air Y and max solid Y for the voxel mesh: a228926

Calculating the theoretical min/max for a node tree would be quite a lot of work to add. I think in a lot of cases it wouldn't even be that useful since it would be very far off from the actual output in many cases.

from fastnoise2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.