From 75f2fc73d0d856168a2bc28518496b0df16687c3 Mon Sep 17 00:00:00 2001 From: gforney Date: Fri, 6 Feb 2026 23:47:15 -0500 Subject: [PATCH 1/7] smokeview source: add f/F shortcut for increasing describing 3D fire opacity by 25% --- Source/smokeview/callbacks.c | 19 +++++++++++++++++++ Source/smokeview/glui_smoke.cpp | 8 ++++++++ Source/smokeview/glui_smoke.h | 3 +++ Source/smokeview/options.h | 3 ++- 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/Source/smokeview/callbacks.c b/Source/smokeview/callbacks.c index e1758c1609..972f69a41c 100644 --- a/Source/smokeview/callbacks.c +++ b/Source/smokeview/callbacks.c @@ -1886,6 +1886,24 @@ void Keyboard(unsigned char key, int flag){ break; } break; +#ifdef pp_OPACITY_SHORTCUTS + case 'f': + case 'F': + if(use_opacity_depth == 0){ + use_opacity_depth = 1; + GLUISmoke3dCB(USE_OPACITY_DEPTH); + GLUIUpdateUseOpacityDepth(); + } + if(key2 == 'F' || keystate == GLUT_ACTIVE_ALT){ + fire_halfdepth *= 1.25; + } + else{ + fire_halfdepth /= 1.25; + } + GLUISmoke3dCB(UPDATE_SMOKEFIRE_COLORS); + printf("50%% opacity at depth: %f (m)\n", fire_halfdepth); + break; +#else case 'f': alt_ctrl_key_state = KEY_ALT; break; @@ -1894,6 +1912,7 @@ void Keyboard(unsigned char key, int flag){ GLUIUpdateShowHideButtons(); glutPostRedisplay(); break; +#endif case 'g': switch(keystate){ case GLUT_ACTIVE_ALT: diff --git a/Source/smokeview/glui_smoke.cpp b/Source/smokeview/glui_smoke.cpp index ea67cba477..6c4a7efa94 100644 --- a/Source/smokeview/glui_smoke.cpp +++ b/Source/smokeview/glui_smoke.cpp @@ -328,6 +328,14 @@ extern "C" void GLUICreateVolTourList(void){ } } +#ifdef pp_OPACITY_SHORTCUTS +/* ------------------ GLUIUpdateUseOpacityDepth ------------------------ */ + +extern "C" void GLUIUpdateUseOpacityDepth(void){ + CHECKBOX_use_opacity_depth->set_int_val(use_opacity_depth); +} +#endif + /* ------------------ UpdateCombineMeshes ------------------------ */ void UpdateCombineMeshes(void){ diff --git a/Source/smokeview/glui_smoke.h b/Source/smokeview/glui_smoke.h index 732092ea73..0b772c3f59 100644 --- a/Source/smokeview/glui_smoke.h +++ b/Source/smokeview/glui_smoke.h @@ -106,6 +106,9 @@ EXTERNCPP void GLUIUpdateFireAlpha(void); EXTERNCPP void GLUIUpdateSmoke3dFlags(void); EXTERNCPP void GLUICreateVolTourList(void); EXTERNCPP void GLUIDeleteVolTourList(void); +#ifdef pp_OPACITY_SHORTCUTS +EXTERNCPP void GLUIUpdateUseOpacityDepth(void); +#endif #endif diff --git a/Source/smokeview/options.h b/Source/smokeview/options.h index 24f0053da8..541cf108fa 100644 --- a/Source/smokeview/options.h +++ b/Source/smokeview/options.h @@ -13,7 +13,8 @@ //#define pp_SHOW_UPDATE // show what is being updated in the UpdateShowScene routine //#define pp_TERRAIN_HIDE // hide terrain when hiding internal blockages -//#define pp_OPACITY_DEBUG // output hrrpuv opacity in center of each mesh +//#define pp_OPACITY_DEBUG // output hrrpuv opacity in center of each mesh +#define pp_OPACITY_SHORTCUTS // add shortcuts for increasing/decreasing opacity depth //*** options: windows From fa1706c5d6d358e800e41f68a15910e47c2ca2d7 Mon Sep 17 00:00:00 2001 From: gforney Date: Fri, 6 Feb 2026 23:55:03 -0500 Subject: [PATCH 2/7] smokeview source: fix compiler warning --- Source/smokeview/renderimage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/smokeview/renderimage.c b/Source/smokeview/renderimage.c index af8eccdbab..19fd5131ef 100644 --- a/Source/smokeview/renderimage.c +++ b/Source/smokeview/renderimage.c @@ -836,7 +836,7 @@ int MergeRenderScreenBuffers(int nfactor, GLubyte **screenbuffers){ } } - char infobuffer[100]; + char infobuffer[512]; int ninfobuffer; int skip=3, channel=2; char fds_label[256], smv_label[256]; From 0c99c0994abd4c8445c2223559104de1e5ffc30e Mon Sep 17 00:00:00 2001 From: gforney Date: Sat, 7 Feb 2026 00:01:58 -0500 Subject: [PATCH 3/7] smv ug: document f, F and ALT f shortcuts for modifying fire opacity --- Manuals/SMV_User_Guide/SMV_User_Guide.tex | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Manuals/SMV_User_Guide/SMV_User_Guide.tex b/Manuals/SMV_User_Guide/SMV_User_Guide.tex index b67e0b5147..5625175a48 100644 --- a/Manuals/SMV_User_Guide/SMV_User_Guide.tex +++ b/Manuals/SMV_User_Guide/SMV_User_Guide.tex @@ -6096,11 +6096,9 @@ \chapter{Keyboard Shortcuts} \item only translate the scene left and right when the mouse is moved left and right (ignore up and down mouse movement) \end{itemize} -\kitem{f}Activates the {\tt ALT}\ key when moving the scene with the mouse. -Pressing and releasing the {\tt f}\ key then moving the mouse causes the scene to go in and out until the -mouse button is released. +\kitem{f}Increase distance by 25 percent at which fire opacity is 50 percent. -\kitem{F}Toggle algorithm for hiding blockage overlaps. +\kitem{F, Alt f}Decrease distance by 25 percent at which fire opacity is 50 percent. \kitem{g}Toggle the grid visibility. When the grid display option is active, the x, y and z keys may be used to show or hide the From cc9e96992f4ab614bfc49916dd9a3bdd9d5a2ff6 Mon Sep 17 00:00:00 2001 From: gforney Date: Sat, 7 Feb 2026 09:40:13 -0500 Subject: [PATCH 4/7] smokeview source: change 50% opacity depth bounds to min=0.001m, max=1000.0m (from min=0.01m, max=100.0m) --- Source/smokeview/glui_smoke.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/smokeview/glui_smoke.cpp b/Source/smokeview/glui_smoke.cpp index 6c4a7efa94..ea17e9588e 100644 --- a/Source/smokeview/glui_smoke.cpp +++ b/Source/smokeview/glui_smoke.cpp @@ -618,7 +618,7 @@ extern "C" void GLUI3dSmokeSetup(int main_window){ SPINNER_emission_factor = glui_3dsmoke->add_spinner_to_panel(PANEL_fire_opacity, "opacity multiplier:", GLUI_SPINNER_FLOAT, &emission_factor, USE_FIRE_ALPHA, GLUISmoke3dCB); glui_3dsmoke->add_checkbox_to_panel(PANEL_fire_opacity, "off axis planes", &smoke_offaxis); glui_3dsmoke->add_checkbox_to_panel(PANEL_fire_opacity, "adjust opacities", &smoke_adjust); - SPINNER_smoke3d_fire_halfdepth->set_float_limits(0.01, 100.0); + SPINNER_smoke3d_fire_halfdepth->set_float_limits(0.001, 1000.0); CHECKBOX_force_alpha_opaque = glui_3dsmoke->add_checkbox_to_panel(PANEL_fire_opacity, "force opaque", &force_alpha_opaque, FORCE_ALPHA_OPAQUE, GLUISmoke3dCB); GLUISmoke3dCB(USE_OPACITY_DEPTH); From 45372ceed266b4e72b824fb05ee7863a0b33ef32 Mon Sep 17 00:00:00 2001 From: gforney Date: Sat, 7 Feb 2026 09:41:20 -0500 Subject: [PATCH 5/7] smokeview source: add help menu item documenting f/ALT f short cut (for changing fire opacity) --- Source/smokeview/menus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/smokeview/menus.c b/Source/smokeview/menus.c index 7c3299ad3b..a2427c33b7 100644 --- a/Source/smokeview/menus.c +++ b/Source/smokeview/menus.c @@ -11814,6 +11814,7 @@ static int menu_count=0; glutAddMenuEntry(" 0: reset animation to the initial time", MENU_DUMMY); glutAddMenuEntry(" 1-9: number of frames to skip", MENU_DUMMY); glutAddMenuEntry(" a/ALT a: increase/decrease flow vector length by 1.5", MENU_DUMMY); + glutAddMenuEntry(" f/ALT f: increase/decrease 50% fire opacity depth by 1.25", MENU_DUMMY); glutAddMenuEntry(" H: toggle slice and vector slice visibility", MENU_DUMMY); glutAddMenuEntry(" I: toggle visibility of slices in blockages", MENU_DUMMY); glutAddMenuEntry(" N: force bound update when loading files (assume fds is running)", MENU_DUMMY); From 4871def87710c5549c049e40d3beadf6a564824e Mon Sep 17 00:00:00 2001 From: gforney Date: Sat, 7 Feb 2026 10:44:14 -0500 Subject: [PATCH 6/7] smv ug: document l/ALT l shortcuts for increasing/decreasing smoke opacity --- Manuals/SMV_User_Guide/SMV_User_Guide.tex | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Manuals/SMV_User_Guide/SMV_User_Guide.tex b/Manuals/SMV_User_Guide/SMV_User_Guide.tex index 5625175a48..ea4ea3a188 100644 --- a/Manuals/SMV_User_Guide/SMV_User_Guide.tex +++ b/Manuals/SMV_User_Guide/SMV_User_Guide.tex @@ -6096,9 +6096,9 @@ \chapter{Keyboard Shortcuts} \item only translate the scene left and right when the mouse is moved left and right (ignore up and down mouse movement) \end{itemize} -\kitem{f}Increase distance by 25 percent at which fire opacity is 50 percent. +\kitem{f}Decrease distance by 25 percent at which fire opacity is one half. This increases fire opaqueness. -\kitem{F, Alt f}Decrease distance by 25 percent at which fire opacity is 50 percent. +\kitem{F, ALT f}Increase distance by 25 percent at which fire opacity is one half. This decreases fire opaqueness. \kitem{g}Toggle the grid visibility. When the grid display option is active, the x, y and z keys may be used to show or hide the @@ -6128,6 +6128,10 @@ \chapter{Keyboard Shortcuts} \kitem{ALT k}Toggle device selection. +\kitem{l}Increase the mass extinction coefficient by 25 percent. This increases smoke opaqueness. + +\kitem{L, ALT l}Decrease the mass extinction coefficient by 25 percent. This decreases smoke opaqueness. + \kitem{m}Switch between meshes in multiple mesh cases. \kitem{M}Toggle command line scene clipping. When turned on, the From c9d52da52554370e8280756405214bf00b54038a Mon Sep 17 00:00:00 2001 From: gforney Date: Sat, 7 Feb 2026 10:45:18 -0500 Subject: [PATCH 7/7] smokeview source: add l/ALT l short cuts for increasing/decreasing smoke opacity (L also decreases smoke opacity) --- Source/smokeview/callbacks.c | 22 ++++++++++++++++++++++ Source/smokeview/menus.c | 1 + 2 files changed, 23 insertions(+) diff --git a/Source/smokeview/callbacks.c b/Source/smokeview/callbacks.c index 972f69a41c..f5f1952aa7 100644 --- a/Source/smokeview/callbacks.c +++ b/Source/smokeview/callbacks.c @@ -1889,6 +1889,10 @@ void Keyboard(unsigned char key, int flag){ #ifdef pp_OPACITY_SHORTCUTS case 'f': case 'F': + if(global_scase.smoke3dcoll.nsmoke3dinfo<=0){ + printf("***warning: 3D smoke files not present, fire opacity setting not changed\n"); + break; + } if(use_opacity_depth == 0){ use_opacity_depth = 1; GLUISmoke3dCB(USE_OPACITY_DEPTH); @@ -2110,12 +2114,30 @@ void Keyboard(unsigned char key, int flag){ if(visTimebar==1)PRINTF("Time bar visible\n"); } break; +#ifdef pp_OPACITY_SHORTCUTS + case 'l': + case 'L': + if(global_scase.smoke3dcoll.nsmoke3dinfo<=0){ + printf("***warning: 3D smoke files are present, smoke opacity setting not changed\n"); + break; + } + if(key2 == 'L' || keystate == GLUT_ACTIVE_ALT){ + glui_mass_extinct *= 1.25; + } + else{ + glui_mass_extinct /= 1.25; + } + GLUISmoke3dCB(SMOKE_EXTINCT); + printf("Mass extinction : %f (m2/kg)\n", glui_mass_extinct); + break; +#else case 'l': case 'L': #ifdef pp_MEMDEBUG printf("memory blocks: %i total size: %i\n", COUNTMEMORYBLOCKS(0), (int)GETTOTALMEMORY); #endif break; +#endif case 'm': switch(keystate){ case GLUT_ACTIVE_ALT: diff --git a/Source/smokeview/menus.c b/Source/smokeview/menus.c index a2427c33b7..27f0a08f6d 100644 --- a/Source/smokeview/menus.c +++ b/Source/smokeview/menus.c @@ -11817,6 +11817,7 @@ static int menu_count=0; glutAddMenuEntry(" f/ALT f: increase/decrease 50% fire opacity depth by 1.25", MENU_DUMMY); glutAddMenuEntry(" H: toggle slice and vector slice visibility", MENU_DUMMY); glutAddMenuEntry(" I: toggle visibility of slices in blockages", MENU_DUMMY); + glutAddMenuEntry(" l/ALT l: increase/decrease mass extinction coef by 1.25", MENU_DUMMY); glutAddMenuEntry(" N: force bound update when loading files (assume fds is running)", MENU_DUMMY); glutAddMenuEntry(" p,P: increment particle variable displayed", MENU_DUMMY); glutAddMenuEntry(" s,S: increase/decrease interval between adjacent vectors", MENU_DUMMY);