G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing
Banner Institutions GREYC CNRS ENSICAEN UNICAEN

A Full-Featured Open-Source Framework for Image Processing



Latest stable version: 4.1.1 (2026/12/04)

Reference
Table of Contents  ▸  List of Commands  ▸  3D Meshes  ▸  raytrace3d◀  random3d    |    reverse3d  ▶

raytrace3d

Arguments:

  • [object3d],_x[%],_y[%],_z,_opacity,_rendering_mode,_is_double_sided={ 0 | 1 },_focale>=0,_bounces>=0,0<=_reflectivity<=1,_ior>=1,_shadow_softness>=0,_light_x,_light_y,_light_z,_specular_lightness,_specular_shininess

Description:

Draw specified 3D vector object on selected 2D images using a BVH-accelerated raytracer.

Behaves similarly to object3d (supports perspective focale>0 and parallel focale=0 projections,
textured/colored primitives, transparency, Snell/Fresnel refraction, iterative reflections, hard/soft shadows with shadow cache,
and inherits defaults from mode3d, double3d, focale3d, specl3d, specs3d when set to -1).
rendering_mode can be { 0=dots | 1=wireframe | 2=flat (unlit) | 3=flat-shaded | 4=flat-shaded with cast shadows | 5=smooth-shaded (Phong normals) with cast shadows }.
For rendering_mode in { 0,1 }, falls back to object3d (scanline rasterization).
ior controls index of refraction for transparent faces (1 = no refraction, 1.5 = glass).
shadow_softness controls angular penumbra radius (0 = hard shadows, ~0.05..0.2 = soft shadows).

Default values:

x=y=50%, z=0, opacity=1, rendering_mode=-1 (auto), is_double_sided=-1 (auto),

focale=-1 (auto), bounces=2, reflectivity=0.2, ior=1, shadow_softness=0, light_x=0, light_y=0,
light_z=-5e8, specular_lightness=-1 (auto) and specular_shininess=-1 (auto).

Example of use:

random3d 30 circles3d 0.2 *3d 800 c3d s3d rand.. 0,255 a y 800,800,1,3 raytrace3d. ..,50%,50%,200,1,4,0,800,2,0.4,1.5,0 rs 50%

Command: random3d 30 circles3d 0.2 *3d 800 c3d s3d rand.. 0,255 a y 800,800,1,3 raytrace3d. ..,50%,50%,200,1,4,0,800,2,0.4,1.5,0 rs 50%
Command: random3d 30 circles3d 0.2 *3d 800 c3d s3d rand.. 0,255 a y 800,800,1,3 raytrace3d. ..,50%,50%,200,1,4,0,800,2,0.4,1.5,0 rs 50%
G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing

G'MIC is an open-source software distributed under the CeCILL free software licenses (LGPL-like and/or
GPL-compatible). Copyrights (C) Since July 2008, David Tschumperlé - GREYC UMR CNRS 6072, Image Team.