Returns vertex blue color component (0-255 integer).
Takes mesh (surface-based mesh entity), surface (surface handle, 0-based), vertexIndex (vertex number, 0-based).
Returns blue component as integer (0-255) or 255 on error.
3D Graphics
Parameters & Returns
Parameters
meshInt
surfaceInt
vertexIndexInt
Returns
Int
Quick Summary
Returns vertex blue color component (0-255 integer).
Takes mesh (surface-based mesh entity), surface (surface handle, 0-based), vertexIndex (vertex number, 0-based).
Returns blue component as integer (0-255) or 255 on error.
Technical Exegesis...
Returns vertex blue color component (0-255 integer). Takes mesh (surface-based mesh entity), surface (surface handle, 0-based), vertexIndex (vertex number, 0-based). Returns blue component as integer (0-255) or 255 on error. Validates mesh exists, type is ENTITY_MESH, is surface-based, surface index valid, and vertex index valid. Converts internal float color (0.0-1.0) to integer: (int)(color.z * 255.0f).
Returns vertex blue color component (0-255 integer). Takes mesh (surface-based mesh entity), surface (surface handle, 0-based), vertexIndex (vertex number, 0-based). Returns blue component as integer (0-255) or 255 on error. Validates mesh exists, type is ENTITY_MESH, is surface-based, surface index valid, and vertex index valid. Converts internal float color (0.0-1.0) to integer: (int)(color.z * 255.0f). Returns 255 if: invalid mesh, not surface-based, invalid surface, vertex index out of range (255 = white/full intensity, error default).
This function retrieves vertex blue color component for water/sky coloring. Vertex colors multiply with textures during rendering. Blue component range: 0 = no blue (black/yellow/red/green), 255 = full blue intensity. Internal storage: color.z as float (0.0 to 1.0), converted to 0-255 integer for user API. Return value 255 ambiguous (could be full blue or error) - validate separately. Use cases: (1) Water coloring (blue tint for oceans/rivers), (2) Sky gradients (blue top, white horizon), (3) Team colors (blue vs red), (4) Temperature visualization (blue cold, red hot), (5) Material identification (blue = metal, brown = wood). Common pattern: For i=0 To b3dCountVertices(mesh, surf)-1, r=b3dVertexRed(mesh, surf, i), g=b3dVertexGreen(mesh, surf, i), b=b3dVertexBlue(mesh, surf, i), If b > r And b > g Then Print "Vertex " + i + " is predominantly blue". Default color: b3dAddVertex sets (255, 255, 255) white. Color multiplication: vertex blue (128) x texture blue (200) = final blue (100) after normalization (128/255 * 200 ~ 100). Vertex color modification: b3dVertexColor(mesh, surf, i, r, g, b, a). RGB color space: 0-255 per channel, blue = (0, 0, 255) pure, cyan = (0, 255, 255) blue+green. Typical blue values: 255 = bright blue (sky), 128 = medium blue (ocean), 64 = dark blue (deep water), 0 = no blue (yellow/orange/red). Use cases: depth-based ocean coloring (shallow=cyan, deep=dark blue), ice/frost effects (high blue, high white), magic effects (glowing blue), team identification. Alternative: material-based coloring, texture blending, post-process color grading. Precision: integer from float, slight rounding. Performance: fast direct access. Render pipeline: vertex colors interpolated linearly across triangles (Gouraud shading), multiplied with texture sample in pixel shader. Alpha channel separate: use b3dVertexAlpha for transparency (0.0-1.0 range, not 0-255).