|
scimesh 0.3.4
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 (default: 0). | |
| float | fog_end = 1.0f |
| Distance at which fog is fully opaque (default: 1). | |
| Color | fog_color = TRANSPARENT_BLACK |
| The color that distant objects fade into. | |
| FogSpace | fog_space = FogSpace::WORLD |
The space and unit in which fog_start / fog_end are given. | |
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 157 of file render_options.h.
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 201 of file render_options.h.
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.
Rendering is two-sided in that case: a visible back side is lit with the normal flipped towards the camera, so single-sided geometry (a plane, a surface patch) looks the same from both sides, and the exactly coplanar face pairs generated by e.g. generate_plane() shade identically no matter which of the two wins the depth test.
Definition at line 108 of file render_options.h.
Background color (default: opaque white).
Pixels not covered by any triangle get this color.
Definition at line 124 of file render_options.h.
| std::vector<ClipPlane> scimesh::RenderOptions::clip_planes |
Optional clip planes for cross-section views.
Each plane removes the geometry on its negative side; planes are combined with a logical AND. By default a plane is defined in world space (see ClipPlane::space), so the cut is a fixed feature of the scene and does not move when the camera moves. Pass PlaneSpace::EYE for the legacy camera-relative behaviour.
Definition at line 237 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 211 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 130 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 337 of file render_options.h.
| Color scimesh::RenderOptions::fog_color = TRANSPARENT_BLACK |
The color that distant objects fade into.
Definition at line 267 of file render_options.h.
Enable depth fog (default: false).
When enabled, objects fade toward fog_color with their distance from the camera, between fog_start and fog_end.
Definition at line 248 of file render_options.h.
| float scimesh::RenderOptions::fog_end = 1.0f |
Distance at which fog is fully opaque (default: 1).
Must be greater than fog_start. Same space/unit as fog_start.
Definition at line 264 of file render_options.h.
| FogSpace scimesh::RenderOptions::fog_space = FogSpace::WORLD |
The space and unit in which fog_start / fog_end are given.
Default: FogSpace::WORLD, i.e. the fog distances are distances in world units from the camera. Use FogSpace::NDC for the legacy normalized-device-depth interpretation.
Definition at line 291 of file render_options.h.
| float scimesh::RenderOptions::fog_start = 0.0f |
Distance at which fog begins (default: 0).
Interpreted according to fog_space: world units from the camera by default, or raw normalized device depth when fog_space == FogSpace::NDC.
Definition at line 257 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.
Flip all surface normals (default: false).
Useful when normals from a file point inward instead of outward.
Definition at line 113 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 194 of file render_options.h.
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 331 of file render_options.h.
| ProjectionType scimesh::RenderOptions::projection = ProjectionType::PERSPECTIVE |
Projection type (default: PERSPECTIVE).
Definition at line 183 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 173 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 167 of file render_options.h.
Enable SSAO (default: false).
SSAO darkens crevices and corners to add depth and realism.
Definition at line 312 of file render_options.h.
SSAO darkening intensity (default: 0.8).
0.0 = no effect, 1.0 = full effect.
Definition at line 320 of file render_options.h.
| float scimesh::RenderOptions::ssao_radius = 16.0f |
SSAO sample radius in pixels (default: 16).
Definition at line 315 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 302 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.
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 141 of file render_options.h.
Color of the wireframe lines (default: black).
Definition at line 144 of file render_options.h.