jrandom
eye kan kode gud
I can haz procedural texture!

It's far from feature complete -- not all the inputs/settings are implemented yet (Function, Octaves and related) and coordinate rotation doesn't work yet, but the thing that really has me stumped is the bump vector. My code is based on the implementation by Stefan Gustavson, and right now I'm just assigning the noise derivatives directly to the bump output after scaling by the bump height setting:
It almost works, but I get all these discontinuities:

Any of you experienced procedural texture devs know what causes this and how to avoid it?

It's far from feature complete -- not all the inputs/settings are implemented yet (Function, Octaves and related) and coordinate rotation doesn't work yet, but the thing that really has me stumped is the bump vector. My code is based on the implementation by Stefan Gustavson, and right now I'm just assigning the noise derivatives directly to the bump output after scaling by the bump height setting:
Code:
// ---------------------------------------------------------------------------- Evaluate_Bump()
void Simplex_Noise::Evaluate_Bump ( LWTypes::LWNodalAccess * nodal_access,
LWTypes::NodeValue node_value )
{
// Retrieve noise and bump height
const Simplex_Result_t simplex ( Get_Noise( nodal_access ) );
const double bump_height( Input_Bump_Height.Get( nodal_access ) );
// TODO: Figure out how to actually do this
LWTypes::LWDVector output_vector( simplex.Noise_dX * bump_height,
simplex.Noise_dY * bump_height,
simplex.Noise_dZ * bump_height );
// Output computed bump map
Output_Functions->setValue( node_value, output_vector );
}
It almost works, but I get all these discontinuities:


Any of you experienced procedural texture devs know what causes this and how to avoid it?
Last edited: