@equinor/videx-3d
    Preparing search index...

    Class CasingMaterial

    Physically-based (PBR) material for Casings / CasingSection. A MeshStandardMaterial at its core - so casings pick up real image-based reflections from the scene environment, exactly matching neighbouring CompletionTools - with the casing-specific stylization (procedural weathering, granular/brushed/scratch micro-normal detail, silhouette darkening and edge shading) spliced into its shaders via onBeforeCompile, and the slicing/vertex transform driven by the same custom attributes as the picking material.

    OIT-capable via makeOitCompatible so casings participate in the OITRenderPass hybrid pipeline (a no-op in the default render loop).

    Hierarchy

    • MeshStandardMaterial
      • CasingMaterial
    Index

    Constructors

    • Parameters

      • parameters: CasingMaterialParameters = {}

        Parameters accepted by CasingMaterial. A MeshStandardMaterial at heart, so it takes the familiar PBR knobs (color, roughness, metalness, emissive, envMap, envMapIntensity, ...) plus the casing texture-UV units and the grouped effects below.

        • Optionaleffects?: CasingEffects

          Grouped casing stylization effects (silhouette outline, section edge shading, procedural weathering, per-section variation and micro-normal surface detail). Every sub-effect is optional and independent; omitted ones fall back to their defaults (mostly off).

        • OptionalmapUvUnits?: "normalized" | "world"

          UV units for the base map (and the aoMap/lightMap/emissiveMap/metalnessMap/ roughnessMap group): 'normalized' = 0..1 around/along, 'world' = object-space distance (arc length x trajectory distance) so texture.repeat becomes a density that stays consistent across sections of different radius and length. Default 'normalized'.

        • OptionalnormalMapUvUnits?: "normalized" | "world"

          UV units for normalMap / bumpMap, independent of mapUvUnits. Default 'normalized'.

      Returns CasingMaterial

    Properties

    isCasingMaterial: boolean = true
    uniforms: {
        autoSlicePosition: Uniform<boolean>;
        brushedAngle: Uniform<number>;
        brushedFrequency: Uniform<number>;
        brushedOctaves: Uniform<number>;
        brushedSharpness: Uniform<number>;
        brushedStrength: Uniform<number>;
        brushedUniformity: Uniform<number>;
        detailFadeFar: Uniform<number>;
        detailFadeNear: Uniform<number>;
        detailQuality: Uniform<number>;
        edgeShading: Uniform<number>;
        edgeShadingWidth: Uniform<number>;
        granularAnisotropy: Uniform<number>;
        granularFrequency: Uniform<number>;
        granularOctaves: Uniform<number>;
        granularStrength: Uniform<number>;
        innerRadius: Uniform<number>;
        mapUvWorld: Uniform<number>;
        normalMapUvWorld: Uniform<number>;
        radius: Uniform<number>;
        schematic: Uniform<number>;
        scratchAngle: Uniform<number>;
        scratchDensity: Uniform<number>;
        scratchFrequency: Uniform<number>;
        scratchLength: Uniform<number>;
        scratchStrength: Uniform<number>;
        scratchWander: Uniform<number>;
        scratchWidth: Uniform<number>;
        sectionIndex: Uniform<number>;
        sectionVariation: Uniform<number>;
        silhouette: Uniform<number>;
        silhouettePower: Uniform<number>;
        sizeMultiplier: Uniform<number>;
        sliceAngle: Uniform<number>;
        sliceOffset: Uniform<number>;
        weathering: Uniform<number>;
        weatheringScale: Uniform<number>;
        wellLength: Uniform<number>;
    } = ...

    Custom uniforms bound into the patched program in onBeforeCompile and shared by reference with the OIT variants so per-frame updates propagate.

    Type Declaration

    • autoSlicePosition: Uniform<boolean>
    • brushedAngle: Uniform<number>
    • brushedFrequency: Uniform<number>
    • brushedOctaves: Uniform<number>
    • brushedSharpness: Uniform<number>
    • brushedStrength: Uniform<number>
    • brushedUniformity: Uniform<number>
    • detailFadeFar: Uniform<number>
    • detailFadeNear: Uniform<number>
    • detailQuality: Uniform<number>
    • edgeShading: Uniform<number>
    • edgeShadingWidth: Uniform<number>
    • granularAnisotropy: Uniform<number>
    • granularFrequency: Uniform<number>
    • granularOctaves: Uniform<number>
    • granularStrength: Uniform<number>

      procedural micro-normal: three layers that sum, each with its own strength/freq/octaves

    • innerRadius: Uniform<number>
    • mapUvWorld: Uniform<number>

      texture UV units (per texture type): 0 = normalized 0..1, 1 = world distance

    • normalMapUvWorld: Uniform<number>
    • radius: Uniform<number>
    • schematic: Uniform<number>
    • scratchAngle: Uniform<number>
    • scratchDensity: Uniform<number>
    • scratchFrequency: Uniform<number>
    • scratchLength: Uniform<number>
    • scratchStrength: Uniform<number>
    • scratchWander: Uniform<number>
    • scratchWidth: Uniform<number>
    • sectionIndex: Uniform<number>
    • sectionVariation: Uniform<number>

      stylization

    • silhouette: Uniform<number>
    • silhouettePower: Uniform<number>
    • sizeMultiplier: Uniform<number>

      slicing / vertex transform (unchanged geometry contract with the picking material)

    • sliceAngle: Uniform<number>
    • sliceOffset: Uniform<number>
    • weathering: Uniform<number>

      procedural wear

    • weatheringScale: Uniform<number>
    • wellLength: Uniform<number>

    Accessors

    • get effects(): CasingEffects

      Grouped casing stylization effects (silhouette, edge shading, weathering, per-section variation and the granular/brushed/scratch micro-normal layers). Reading returns the current settings reconstructed from the uniforms. Assigning applies the whole group at once - omitted sub-effects reset to their defaults.

      Returns CasingEffects

      Composable casing stylization effects for CasingMaterial. Every field is optional and independent; the procedural surface-detail layers (granular, brushed, scratches) simply sum. Strengths default to 0 (off) unless noted.

      • Optionalbrushed?: {
            angle?: number;
            frequency?: number;
            octaves?: number;
            sharpness?: number;
            strength?: number;
            uniformity?: number;
        }

        Directional fine grain (many thin parallel ridges).

        • Optionalangle?: number

          Grain direction in radians (0 = along the trajectory axis; non-zero angles reintroduce a faint seam on a full shell). Default 0.

        • Optionalfrequency?: number

          Cells per world (object-distance) unit. Default 2.

        • Optionaloctaves?: number

          1-5 fbm octaves. Default 3.

        • Optionalsharpness?: number

          0-1 line thinness. Default 0.5.

        • Optionalstrength?: number

          0-1 strength (0 = off). Default 0.

        • Optionaluniformity?: number

          0-1 blend from an irregular grain (0) to regular, evenly-spaced flutes (1). Default 0.

      • OptionaldetailQuality?: number

        0-1 performance vs. quality of the procedural surface detail (a fill-rate knob; off-effects always cost nothing regardless). Lower = cheaper: fewer weathering fbm octaves (2 at 0 .. 4 at 1) and the coarse/long scratch family only runs at >= 0.66. 1 = full-detail reference. Default 0.6.

      • OptionaledgeShading?: { strength?: number; width?: number }

        Darkening at each section's own top/bottom edges.

        • Optionalstrength?: number

          0-1 strength (0 = off). Default 0.

        • Optionalwidth?: number

          Distance in metres the darkening reaches from each edge, independent of section length. Default 0.2.

      • Optionalgranular?: { anisotropy?: number; frequency?: number; octaves?: number; strength?: number }

        Isotropic value-noise bumps.

        • Optionalanisotropy?: number

          0-1 stretch of the cells along the trajectory axis. Default 0.

        • Optionalfrequency?: number

          Cells per world (object-distance) unit. Default 2.

        • Optionaloctaves?: number

          1-5 fbm octaves. Default 3.

        • Optionalstrength?: number

          0-1 strength (0 = off). Default 0.

      • Optionalscratches?: {
            angle?: number;
            density?: number;
            frequency?: number;
            length?: number;
            strength?: number;
            wander?: number;
            width?: number;
        }

        Sparse, hair-thin surface scuffs that glint under changing light (their relief is kept very shallow - visibility comes from a localized polish, not depth).

        • Optionalangle?: number

          Scratch direction in radians (0 = along the trajectory axis). Default 0.

        • Optionaldensity?: number

          0-1 how many scratches survive. Default 0.4.

        • Optionalfrequency?: number

          Cells per world (object-distance) unit. Default 10.

        • Optionallength?: number

          Average scratch length multiplier (>0). Default 0.6.

        • Optionalstrength?: number

          0-1 strength (0 = off). Default 0.

        • Optionalwander?: number

          0-1 how much the scratch direction drifts. Default 1.

        • Optionalwidth?: number

          0-1 groove width, frequency-independent (world-scaled, hair/needle-thin: ~0.02..0.12mm half-width). Default 0.15.

      • OptionalsectionVariation?: number

        0-1 per-section wear variation so adjacent telescoping strings read apart by looking differently worn rather than by a colour/value ramp. Default 0.

      • Optionalsilhouette?: { power?: number; strength?: number }

        View-space silhouette darkening that outlines each shell, helping nested strings read apart (especially under slicing / auto-slice).

        • Optionalpower?: number

          Exponent tightening the rim toward the edge (higher = tighter). Default 3.

        • Optionalstrength?: number

          0-1 strength (0 = off). Default 0.

      • Optionalweathering?: { resistance?: number; scale?: number; strength?: number }

        Procedural wear/tear/spill (no textures), pinned in world space.

        • Optionalresistance?: number

          0-1 per-material multiplier (1 = full wear, 0 = none) so a preset such as the matte shoe can resist the weathering. Default 1.

        • Optionalscale?: number

          Noise frequency in cells per real-world metre (lower = larger, sparser smears). Default 1.5.

        • Optionalstrength?: number

          0-1 strength (0 = off). Default 0.

    • set effects(v: CasingEffects | undefined): void

      Parameters

      • v: CasingEffects | undefined
        • CasingEffects

          Composable casing stylization effects for CasingMaterial. Every field is optional and independent; the procedural surface-detail layers (granular, brushed, scratches) simply sum. Strengths default to 0 (off) unless noted.

          • Optionalbrushed?: {
                angle?: number;
                frequency?: number;
                octaves?: number;
                sharpness?: number;
                strength?: number;
                uniformity?: number;
            }

            Directional fine grain (many thin parallel ridges).

            • Optionalangle?: number

              Grain direction in radians (0 = along the trajectory axis; non-zero angles reintroduce a faint seam on a full shell). Default 0.

            • Optionalfrequency?: number

              Cells per world (object-distance) unit. Default 2.

            • Optionaloctaves?: number

              1-5 fbm octaves. Default 3.

            • Optionalsharpness?: number

              0-1 line thinness. Default 0.5.

            • Optionalstrength?: number

              0-1 strength (0 = off). Default 0.

            • Optionaluniformity?: number

              0-1 blend from an irregular grain (0) to regular, evenly-spaced flutes (1). Default 0.

          • OptionaldetailQuality?: number

            0-1 performance vs. quality of the procedural surface detail (a fill-rate knob; off-effects always cost nothing regardless). Lower = cheaper: fewer weathering fbm octaves (2 at 0 .. 4 at 1) and the coarse/long scratch family only runs at >= 0.66. 1 = full-detail reference. Default 0.6.

          • OptionaledgeShading?: { strength?: number; width?: number }

            Darkening at each section's own top/bottom edges.

            • Optionalstrength?: number

              0-1 strength (0 = off). Default 0.

            • Optionalwidth?: number

              Distance in metres the darkening reaches from each edge, independent of section length. Default 0.2.

          • Optionalgranular?: { anisotropy?: number; frequency?: number; octaves?: number; strength?: number }

            Isotropic value-noise bumps.

            • Optionalanisotropy?: number

              0-1 stretch of the cells along the trajectory axis. Default 0.

            • Optionalfrequency?: number

              Cells per world (object-distance) unit. Default 2.

            • Optionaloctaves?: number

              1-5 fbm octaves. Default 3.

            • Optionalstrength?: number

              0-1 strength (0 = off). Default 0.

          • Optionalscratches?: {
                angle?: number;
                density?: number;
                frequency?: number;
                length?: number;
                strength?: number;
                wander?: number;
                width?: number;
            }

            Sparse, hair-thin surface scuffs that glint under changing light (their relief is kept very shallow - visibility comes from a localized polish, not depth).

            • Optionalangle?: number

              Scratch direction in radians (0 = along the trajectory axis). Default 0.

            • Optionaldensity?: number

              0-1 how many scratches survive. Default 0.4.

            • Optionalfrequency?: number

              Cells per world (object-distance) unit. Default 10.

            • Optionallength?: number

              Average scratch length multiplier (>0). Default 0.6.

            • Optionalstrength?: number

              0-1 strength (0 = off). Default 0.

            • Optionalwander?: number

              0-1 how much the scratch direction drifts. Default 1.

            • Optionalwidth?: number

              0-1 groove width, frequency-independent (world-scaled, hair/needle-thin: ~0.02..0.12mm half-width). Default 0.15.

          • OptionalsectionVariation?: number

            0-1 per-section wear variation so adjacent telescoping strings read apart by looking differently worn rather than by a colour/value ramp. Default 0.

          • Optionalsilhouette?: { power?: number; strength?: number }

            View-space silhouette darkening that outlines each shell, helping nested strings read apart (especially under slicing / auto-slice).

            • Optionalpower?: number

              Exponent tightening the rim toward the edge (higher = tighter). Default 3.

            • Optionalstrength?: number

              0-1 strength (0 = off). Default 0.

          • Optionalweathering?: { resistance?: number; scale?: number; strength?: number }

            Procedural wear/tear/spill (no textures), pinned in world space.

            • Optionalresistance?: number

              0-1 per-material multiplier (1 = full wear, 0 = none) so a preset such as the matte shoe can resist the weathering. Default 1.

            • Optionalscale?: number

              Noise frequency in cells per real-world metre (lower = larger, sparser smears). Default 1.5.

            • Optionalstrength?: number

              0-1 strength (0 = off). Default 0.

        • undefined

      Returns void

    • get wellLength(): number

      Real-world total length (metres) of the whole wellbore trajectory. Uploaded as a uniform and used by the vertex shader to derive each section's physical length (vSectionLength) and the along-axis coordinate (casingAxial). The weathering is pinned in world space (via vWorldPos) and does not use it.

      Returns number

    • set wellLength(v: number): void

      Parameters

      • v: number

      Returns void