Creates a procedural bamboo stalk mesh with segments, node rings, and leaves (signature Bamboo runtime function).
Takes textureSlots, uvMode, unique, numSegments (vertical subdivision, clamped 1-20), segmentHeight (height per segment, default 1.0), stalkRadius (main cylinder radius, default 0.08), nodeRadius (torus ring radius at joints, default 0.1), numLeaves (leaves per node, 0-8, default 3).
Returns mesh entity handle or 0 on failure.
3D Graphics
Parameters & Returns
Parameters
textureSlotsInt
uvModeInt
uniqueInt
numSegmentsInt
segmentHeightDouble
stalkRadiusDouble
nodeRadiusDouble
numLeavesInt
Returns
Int
Quick Summary
Creates a procedural bamboo stalk mesh with segments, node rings, and leaves (signature Bamboo runtime function).
Takes textureSlots, uvMode, unique, numSegments (vertical subdivision, clamped 1-20), segmentHeight (height per segment, default 1.0), stalkRadius (main cylinder radius, default 0.08), nodeRadius (torus ring radius at joints, default 0.1), numLeaves (leaves per node, 0-8, default 3).
Returns mesh entity handle or 0 on failure.
Technical Exegesis...
Creates a procedural bamboo stalk mesh with segments, node rings, and leaves (signature Bamboo runtime function). Takes textureSlots, uvMode, unique, numSegments (vertical subdivision, clamped 1-20), segmentHeight (height per segment, default 1.0), stalkRadius (main cylinder radius, default 0.08), nodeRadius (torus ring radius at joints, default 0.1), numLeaves (leaves per node, 0-8, default 3). Returns mesh entity handle or 0 on failure.
Creates a procedural bamboo stalk mesh with segments, node rings, and leaves (signature Bamboo runtime function). Takes textureSlots, uvMode, unique, numSegments (vertical subdivision, clamped 1-20), segmentHeight (height per segment, default 1.0), stalkRadius (main cylinder radius, default 0.08), nodeRadius (torus ring radius at joints, default 0.1), numLeaves (leaves per node, 0-8, default 3). Returns mesh entity handle or 0 on failure. Creates surface-based mesh: cylindrical segments with 5% taper towards top + torus rings at joints (nodes) + optional leaf quads starting from 3rd segment. Sets normals (cylinder radial, torus local, leaf perpendicular), unlocks. Returns mesh entity handle.
This is the signature function representing the Bamboo runtime branding. Creates realistic bamboo plant with characteristic segmented structure. Structure: (1) Cylindrical stalk segments (internodes) connected by (2) Torus node rings (joints/bulges) with (3) Optional leaf quads extending outward. numSegments parameter: number of vertical sections (each segment = one internode), clamped 1-20. Default 5. More segments = taller bamboo. segmentHeight parameter: height of each cylindrical section, default 1.0. Total height = numSegments x segmentHeight. stalkRadius parameter: base radius of main cylinder, default 0.08 (thin natural proportions). Tapers 5% per segment towards top. nodeRadius parameter: radius of torus ring at joints, default 0.1 (slightly larger than stalk for characteristic bulge). numLeaves parameter: number of leaf blades per node, 0-8, default 3. Leaves appear from 3rd segment upward (bottom segments bare). Leaf dimensions: length 1.5, width 0.15, tilt 0.4 radians upward. Leaves distributed evenly around node (360 degrees/numLeaves). Double-sided leaf quads (both winding orders added for visibility from both sides). Cylinder detail: 16 segments around circumference. Node detail: 16x8 torus subdivision. Use cases: (1) Asian-themed environments (gardens, temples), (2) Procedural nature scenes (forests), (3) Decorative elements, (4) Signature/branding object for Bamboo runtime, (5) Educational example of complex procedural generation. Common pattern: bamboo=b3dCreateBamboo(BBR_ONE_SLOT, BBR_TEXTURE_UV, 0, 8, 1.0, 0.08, 0.1, 3) creates 8-unit tall bamboo with 3 leaves per node. Vertex count: varies significantly based on numSegments and numLeaves. Example: 5 segments, 3 leaves = ~700 vertices. Triangle count: segments create cylinder triangles (32 per segment) + nodes create torus triangles (256 per node) + leaves create double-sided quads (4 triangles per leaf). Leaf attachment: base vertices positioned on stalk surface radius, extends outward radially. Taper effect: each segment 5% narrower than previous (1.0 -> 0.95 -> 0.90...). Node position: at top of each segment (except final segment has no node). Normal calculation: cylinder normals point radially outward, torus normals perpendicular to tube surface, leaf normals perpendicular to blade with slight upward component. UV mapping: cylinder V wraps 0-1 per segment, U wraps 0-1 around circumference; leaves get full 0-1 UV quad. Alternative: manual construction with b3dCreateCylinder + b3dCreateTorus for custom arrangements, custom mesh for different plant types. Modification: surface-based, fully editable. Typical texture: bamboo wood texture (green/yellow with horizontal node lines) on stalk, separate leaf texture (green blade). Rendering tip: use alpha transparency on leaf edges for realistic foliage. Performance: moderate complexity due to torus nodes and double-sided leaves (consider LOD for distant bamboo).