stride3d/stride · error · Exception
. should be greater than .
Error message
{ nameof(Parameters.FloatingPointComponentRange) }.{ nameof(Parameters.FloatingPointComponentRange.Y) } should be greater than { nameof(Parameters.FloatingPointComponentRange.X) }. What it means
FloatingPointComponentRange defines the min (X) and max (Y) float values used to map heightmap pixel data to heights. The compiler validates that Y (max) is not less than X (min) before scaling and throws this descriptive exception when the range is inverted.
Solutions
- Swap the values so FloatingPointComponentRange.X is the minimum and Y is the maximum
- Open the heightmap asset in the editor and fix the Floating Point Component Range field
- Verify the serialized asset file contains correct X/Y order
Example fix
// before heightmapAsset.FloatingPointComponentRange = new Vector2(100f, 0f); // inverted // after heightmapAsset.FloatingPointComponentRange = new Vector2(0f, 100f);
Defensive patterns
Strategy: validation
Validate before calling
var r = heightmapAsset.FloatingPointComponentRange;
if (r.Y < r.X) throw new InvalidOperationException($"FloatingPointComponentRange inverted: {r}"); Prevention
- Set ranges in the editor UI, not by hand-editing asset files
- Remember X is min, Y is max
- Copy range values from logged terrain bounds
- Validate asset properties in CI by loading assets headlessly
When it happens
Trigger: Setting Parameters.FloatingPointComponentRange with X > Y on a heightmap asset that uses ScaleToHeightRange or floating-point height data, compiled in DoCommandOverride.
Common situations: Typo when hand-editing the .sdfloat asset properties, copy-pasting a range backwards, or programmatically configuring the asset with swapped min/max.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- format is not supported.
- height type is not supported.
- Failed to compile .
- failed to scale .. to .. . Check HeightScale and…
- type is not supported.
AI-assisted analysis of stride3d/stride@96fad776d2 (2026-09-14).
Data as JSON: /api/errors/d709ec49c9871ed5.
Report an issue: GitHub.
Appendix: source
Thrown at sources/engine/Stride.Assets/Physics/HeightmapAssetCompiler.cs:143
default:
throw new Exception($"{ texImage.Format } format is not supported.");
}
// Convert pixels to heights
using (var image = textureTool.ConvertToStrideImage(texImage))
{
var pixelBuffer = image.PixelBuffer[0];
var pixelBufferSize = new Int2(pixelBuffer.Width, pixelBuffer.Height);
var minFloat = Parameters.FloatingPointComponentRange.X;
var maxFloat = Parameters.FloatingPointComponentRange.Y;
var isSNorm = (Math.Abs(-1 - minFloat) < float.Epsilon) && (Math.Abs(1 - maxFloat) < float.Epsilon);
if (maxFloat < minFloat)
{
throw new Exception($"{ nameof(Parameters.FloatingPointComponentRange) }.{ nameof(Parameters.FloatingPointComponentRange.Y) } should be greater than { nameof(Parameters.FloatingPointComponentRange.X) }.");
}
var useScaleToRange = Parameters.ScaleToHeightRange;
switch (heightType)
{
case HeightfieldTypes.Float:
{
float[] floats = null;
switch (image.Description.Format)
{
case PixelFormat.R32_Float:
floats = HeightmapUtils.Resize(pixelBuffer.GetPixels<float>(), pixelBufferSize, size);
floats = isSNorm ?
floats :
HeightmapUtils.ConvertToFloatHeights(floats, minFloat, maxFloat);
break;View on GitHub (pinned to 96fad776d2)