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?: CasingEffectsGrouped 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'.
Custom uniforms bound into the patched program in onBeforeCompile and
shared by reference with the OIT variants so per-frame updates propagate.
procedural micro-normal: three layers that sum, each with its own strength/freq/octaves
texture UV units (per texture type): 0 = normalized 0..1, 1 = world distance
stylization
slicing / vertex transform (unchanged geometry contract with the picking material)
procedural wear
0-1 performance vs. quality of the procedural surface detail (fill-rate knob). Lower = cheaper (fewer weathering fbm octaves; the coarse scratch family only runs at >= 0.66); 1 = full-detail reference.
0-1 strength of the edge shading (darkening at each section's own top/bottom edges).
Distance in metres the edge shading reaches from each section edge. Default 0.2.
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.
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?: {Directional fine grain (many thin parallel ridges).
Optionalangle?: numberGrain direction in radians (0 = along the trajectory axis; non-zero angles reintroduce a faint seam on a full shell). Default 0.
Optionalfrequency?: numberCells per world (object-distance) unit. Default 2.
Optionaloctaves?: number1-5 fbm octaves. Default 3.
Optionalsharpness?: number0-1 line thinness. Default 0.5.
Optionalstrength?: number0-1 strength (0 = off). Default 0.
Optionaluniformity?: number0-1 blend from an irregular grain (0) to regular, evenly-spaced flutes (1). Default 0.
OptionaldetailQuality?: number0-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?: number0-1 strength (0 = off). Default 0.
Optionalwidth?: numberDistance 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?: number0-1 stretch of the cells along the trajectory axis. Default 0.
Optionalfrequency?: numberCells per world (object-distance) unit. Default 2.
Optionaloctaves?: number1-5 fbm octaves. Default 3.
Optionalstrength?: number0-1 strength (0 = off). Default 0.
Optionalscratches?: {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?: numberScratch direction in radians (0 = along the trajectory axis). Default 0.
Optionaldensity?: number0-1 how many scratches survive. Default 0.4.
Optionalfrequency?: numberCells per world (object-distance) unit. Default 10.
Optionallength?: numberAverage scratch length multiplier (>0). Default 0.6.
Optionalstrength?: number0-1 strength (0 = off). Default 0.
Optionalwander?: number0-1 how much the scratch direction drifts. Default 1.
Optionalwidth?: number0-1 groove width, frequency-independent (world-scaled, hair/needle-thin: ~0.02..0.12mm half-width). Default 0.15.
OptionalsectionVariation?: number0-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?: numberExponent tightening the rim toward the edge (higher = tighter). Default 3.
Optionalstrength?: number0-1 strength (0 = off). Default 0.
Optionalweathering?: { resistance?: number; scale?: number; strength?: number }Procedural wear/tear/spill (no textures), pinned in world space.
Optionalresistance?: number0-1 per-material multiplier (1 = full wear, 0 = none) so a preset such as the matte shoe can resist the weathering. Default 1.
Optionalscale?: numberNoise frequency in cells per real-world metre (lower = larger, sparser smears). Default 1.5.
Optionalstrength?: number0-1 strength (0 = off). Default 0.
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?: {Directional fine grain (many thin parallel ridges).
Optionalangle?: numberGrain direction in radians (0 = along the trajectory axis; non-zero angles reintroduce a faint seam on a full shell). Default 0.
Optionalfrequency?: numberCells per world (object-distance) unit. Default 2.
Optionaloctaves?: number1-5 fbm octaves. Default 3.
Optionalsharpness?: number0-1 line thinness. Default 0.5.
Optionalstrength?: number0-1 strength (0 = off). Default 0.
Optionaluniformity?: number0-1 blend from an irregular grain (0) to regular, evenly-spaced flutes (1). Default 0.
OptionaldetailQuality?: number0-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?: number0-1 strength (0 = off). Default 0.
Optionalwidth?: numberDistance 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?: number0-1 stretch of the cells along the trajectory axis. Default 0.
Optionalfrequency?: numberCells per world (object-distance) unit. Default 2.
Optionaloctaves?: number1-5 fbm octaves. Default 3.
Optionalstrength?: number0-1 strength (0 = off). Default 0.
Optionalscratches?: {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?: numberScratch direction in radians (0 = along the trajectory axis). Default 0.
Optionaldensity?: number0-1 how many scratches survive. Default 0.4.
Optionalfrequency?: numberCells per world (object-distance) unit. Default 10.
Optionallength?: numberAverage scratch length multiplier (>0). Default 0.6.
Optionalstrength?: number0-1 strength (0 = off). Default 0.
Optionalwander?: number0-1 how much the scratch direction drifts. Default 1.
Optionalwidth?: number0-1 groove width, frequency-independent (world-scaled, hair/needle-thin: ~0.02..0.12mm half-width). Default 0.15.
OptionalsectionVariation?: number0-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?: numberExponent tightening the rim toward the edge (higher = tighter). Default 3.
Optionalstrength?: number0-1 strength (0 = off). Default 0.
Optionalweathering?: { resistance?: number; scale?: number; strength?: number }Procedural wear/tear/spill (no textures), pinned in world space.
Optionalresistance?: number0-1 per-material multiplier (1 = full wear, 0 = none) so a preset such as the matte shoe can resist the weathering. Default 1.
Optionalscale?: numberNoise frequency in cells per real-world metre (lower = larger, sparser smears). Default 1.5.
Optionalstrength?: number0-1 strength (0 = off). Default 0.
UV units for the base map group. 'world' uses object-space distance so
texture.repeat is a radius/length-consistent density.
UV units for normalMap / bumpMap, independent of mapUvUnits.
Unlit "schematic" shading mode: flat material color + silhouette outline only,
with all lighting/env, textures and realism detail ignored. Set by the Casings
component's schematic prop; the slice is locked separately (component side).
Index of this section within the wellbore's casing stack, used to seed the per-section variation of the stylization effects.
0-1 strength of the per-section wear variation: how much each section's procedural wear is offset (seed) and scaled (amount) by its index, so adjacent telescoping strings read apart by looking differently worn rather than by a colour/value ramp.
0-1 strength of the view-space silhouette darkening (outlines each shell).
Exponent tightening the silhouette rim toward the edge (higher = tighter). Default 3.
0-1 per-material wear multiplier (1 = full wear, 0 = none). Lets material presets (e.g. the matte shoe) resist the procedural weathering the component applies globally via weathering.
0-1 strength of the procedural wear/tear/spill surface detail (no textures). The effective amount is scaled per-material by wearResistance.
Weathering noise frequency in cells per real-world metre (lower = larger, sparser smears).
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.
Physically-based (PBR) material for
Casings/CasingSection. AMeshStandardMaterialat its core - so casings pick up real image-based reflections from the sceneenvironment, exactly matching neighbouringCompletionTools- with the casing-specific stylization (procedural weathering, granular/brushed/scratch micro-normal detail, silhouette darkening and edge shading) spliced into its shaders viaonBeforeCompile, and the slicing/vertex transform driven by the same custom attributes as the picking material.OIT-capable via makeOitCompatible so casings participate in the
OITRenderPasshybrid pipeline (a no-op in the default render loop).