|
scimesh 0.3.2
Headless CPU-only 3D software renderer for scientific mesh visualization
|
All settings that control rendering output. More...
#include <render_options.h>

Public Attributes | |
Output size | |
| int | width = 800 |
| Image width in pixels (default: 800). | |
| int | height = 600 |
| Image height in pixels (default: 600). | |
Shading | |
| ShadingMode | shading = ShadingMode::SMOOTH |
| Shading mode (default: SMOOTH). | |
| bool | backface_culling = true |
| Enable backface culling (default: true). | |
| bool | invert_normals = false |
| Flip all surface normals (default: false). | |
Colors | |
| Color | background_color = WHITE |
| Background color (default: opaque white). | |
| Color | default_color = DEFAULT_COLOR |
| Default color for meshes without explicit vertex/face colors. | |
Wireframe | |
| bool | wireframe = false |
| Draw triangle edges as lines (default: false). | |
| Color | wireframe_color = Color(0.0f, 0.0f, 0.0f, 1.0f) |
| Color of the wireframe lines (default: black). | |
Anti-aliasing | |
| int | aa_samples = 1 |
| Anti-aliasing sample count (default: 1 = no AA). | |
Specular highlights | |
| Color | specular_color = Color(0.0f, 0.0f, 0.0f, 0.0f) |
| Specular highlight color (default: transparent = no specular). | |
| float | shininess = 0.0f |
| Shininess exponent (default: 0.0 = no specular). | |
Projection | |
| ProjectionType | projection = ProjectionType::PERSPECTIVE |
| Projection type (default: PERSPECTIVE). | |
Lighting | |
| std::vector< Light > | lights |
| List of light sources. | |
| float | ambient = 0.3f |
| Ambient light level (default: 0.3). | |
Post-processing | |
| float | contrast = 1.0f |
| Contrast adjustment (default: 1.0 = no change). | |
Clipping planes | |
| std::vector< ClipPlane > | clip_planes |
| Optional clip planes for cross-section views. | |
Fog | |
| bool | fog_enabled = false |
| Enable depth fog (default: false). | |
| float | fog_start = 0.0f |
| Distance at which fog begins (in world units). | |
| float | fog_end = 1.0f |
| Distance at which fog is fully opaque (in world units). | |
| Color | fog_color = TRANSPARENT_BLACK |
| The color that distant objects fade into. | |
Threading | |
| int | threads = 0 |
| Number of render threads (default: 0 = auto-detect). | |
Screen-space ambient occlusion (SSAO) | |
| bool | ssao_enabled = false |
| Enable SSAO (default: false). | |
| float | ssao_radius = 16.0f |
| SSAO sample radius in pixels (default: 16). | |
| float | ssao_intensity = 0.8f |
| SSAO darkening intensity (default: 0.8). | |
Clipping distances | |
| float | near_plane = 0.1f |
| Near clipping plane distance (default: 0.1). | |
| float | far_plane = 10000.0f |
| Far clipping plane distance (default: 10000.0). | |
All settings that control rendering output.
The defaults produce a reasonable result for most cases:
Definition at line 74 of file render_options.h.
| int scimesh::RenderOptions::aa_samples = 1 |
Anti-aliasing sample count (default: 1 = no AA).
Super-sampling anti-aliasing: each pixel is sampled aa_samples times in each direction, then averaged. A value of 4 means 16 samples per pixel total. Higher values produce smoother edges but are slower and use more memory.
Definition at line 151 of file render_options.h.
| float scimesh::RenderOptions::ambient = 0.3f |
Ambient light level (default: 0.3).
Ambient light is uniform "fill" light that illuminates all surfaces equally, preventing shadowed areas from being completely black. Range: 0.0 (no ambient) to 1.0 (fully lit). Typical: 0.2ā0.4.
Definition at line 195 of file render_options.h.
| bool scimesh::RenderOptions::backface_culling = true |
Enable backface culling (default: true).
When enabled, triangles facing away from the camera are not drawn. This is an optimization and is almost always what you want. Disable only if you need to see both sides of single-sided geometry.
Definition at line 102 of file render_options.h.
Background color (default: opaque white).
Pixels not covered by any triangle get this color.
Definition at line 118 of file render_options.h.
| std::vector<ClipPlane> scimesh::RenderOptions::clip_planes |
Optional clip planes for cross-section views.
Each plane removes geometry on its negative side.
Definition at line 216 of file render_options.h.
| float scimesh::RenderOptions::contrast = 1.0f |
Contrast adjustment (default: 1.0 = no change).
1.0 increases contrast, < 1.0 reduces it.
Definition at line 205 of file render_options.h.
| Color scimesh::RenderOptions::default_color = DEFAULT_COLOR |
Default color for meshes without explicit vertex/face colors.
Overridden by per-mesh Mesh::default_color.
Definition at line 124 of file render_options.h.
| float scimesh::RenderOptions::far_plane = 10000.0f |
Far clipping plane distance (default: 10000.0).
Geometry farther than this is not rendered. Increase for massive scenes; decrease to improve depth precision.
Definition at line 282 of file render_options.h.
| Color scimesh::RenderOptions::fog_color = TRANSPARENT_BLACK |
The color that distant objects fade into.
Definition at line 236 of file render_options.h.
| bool scimesh::RenderOptions::fog_enabled = false |
Enable depth fog (default: false).
When enabled, objects fade toward fog_color based on their distance from the camera.
Definition at line 227 of file render_options.h.
| float scimesh::RenderOptions::fog_end = 1.0f |
Distance at which fog is fully opaque (in world units).
Definition at line 233 of file render_options.h.
| float scimesh::RenderOptions::fog_start = 0.0f |
Distance at which fog begins (in world units).
Definition at line 230 of file render_options.h.
| int scimesh::RenderOptions::height = 600 |
Image height in pixels (default: 600).
Definition at line 82 of file render_options.h.
| bool scimesh::RenderOptions::invert_normals = false |
Flip all surface normals (default: false).
Useful when normals from a file point inward instead of outward.
Definition at line 107 of file render_options.h.
| std::vector<Light> scimesh::RenderOptions::lights |
List of light sources.
If empty, a default single directional light from +Z is used.
Definition at line 188 of file render_options.h.
| float scimesh::RenderOptions::near_plane = 0.1f |
Near clipping plane distance (default: 0.1).
Geometry closer than this is not rendered. Reduce if you need to see very close objects; increase if you have z-fighting issues.
Definition at line 276 of file render_options.h.
| ProjectionType scimesh::RenderOptions::projection = ProjectionType::PERSPECTIVE |
Projection type (default: PERSPECTIVE).
Definition at line 177 of file render_options.h.
| ShadingMode scimesh::RenderOptions::shading = ShadingMode::SMOOTH |
Shading mode (default: SMOOTH).
SMOOTH interpolates normals across triangles for a rounded look. FLAT uses one normal per triangle for a faceted look.
Definition at line 95 of file render_options.h.
| float scimesh::RenderOptions::shininess = 0.0f |
Shininess exponent (default: 0.0 = no specular).
Higher values produce sharper, more focused highlights. Typical range: 16ā128. Only used when specular_color.a > 0.
Definition at line 167 of file render_options.h.
Specular highlight color (default: transparent = no specular).
Set to white or a tinted color to add shiny highlights.
Definition at line 161 of file render_options.h.
| bool scimesh::RenderOptions::ssao_enabled = false |
Enable SSAO (default: false).
SSAO darkens crevices and corners to add depth and realism.
Definition at line 257 of file render_options.h.
| float scimesh::RenderOptions::ssao_intensity = 0.8f |
SSAO darkening intensity (default: 0.8).
0.0 = no effect, 1.0 = full effect.
Definition at line 265 of file render_options.h.
| float scimesh::RenderOptions::ssao_radius = 16.0f |
SSAO sample radius in pixels (default: 16).
Definition at line 260 of file render_options.h.
| int scimesh::RenderOptions::threads = 0 |
Number of render threads (default: 0 = auto-detect).
The renderer can use multiple threads for triangle rasterization. Set to 1 to force single-threaded rendering.
Definition at line 247 of file render_options.h.
| int scimesh::RenderOptions::width = 800 |
Image width in pixels (default: 800).
Definition at line 79 of file render_options.h.
| bool scimesh::RenderOptions::wireframe = false |
Draw triangle edges as lines (default: false).
When enabled, each triangle edge is drawn on top of the filled triangle. Wireframe thickness is 1 pixel.
Definition at line 135 of file render_options.h.
Color of the wireframe lines (default: black).
Definition at line 138 of file render_options.h.