qmlui: draw the smoke that Smoke and Hazer fixtures put in the air - #2162
Open
CristianDeluxe wants to merge 2 commits into
Open
CristianDeluxe wants to merge 2 commits into
CristianDeluxe wants to merge 2 commits into
Conversation
The gobo mask used only the red channel times alpha, so a colour gobo lost its colour and a photographic one lost most of its contrast, and the texture was sampled unfiltered with no mipmaps, so the projection aliased once minified. Tint the beam and the lit surface with the gobo's RGB, and give the texture mipmaps, trilinear filtering and anisotropy.
The 3D view had a single scene-wide smokeAmount, so firing a fog machine changed nothing on screen. Every 100 ms MainView3D now reads each Smoke and Hazer fixture's output channel and publishes up to eight emitters to the shaders: position, density, direction, reach and the colour of the machine's own LEDs. Density rises in 1.5 s and clears in 3 s for a jet or 30 s for a hazer; nothing is published while no smoke is in the air, so an OnDemand scene stays idle. A jet leaves smoke.dae's nozzle along the mesh's +Z, widens, rises and breaks up at its tip; a hazer is a soft cloud around the machine. The light pass ray-marches each plume only inside a cylinder around the jet's axis, clipped between nozzle and tip (a bounding sphere covered half the screen and cost 9.5 ms a frame on an M1; the cylinder brings the heaviest pass to 4 ms), so a jet glows in its own LED colour plus ambient light, and the spotlight scattering pass thickens beams that cross it. The plume code is shared through an #include that makeShader expands from the resources.
CristianDeluxe
force-pushed
the
pr/3d-smoke
branch
from
September 24, 2026 01:27
d05e226 to
bdd27d9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Summary of Changes:
The 3D view had one scene-wide smoke amount, so firing a fog machine changed nothing on screen. MainView3D now reads each Smoke and Hazer fixture's output channel every 100 ms and publishes up to eight emitters to the shaders (position, density, direction, reach and the colour of the machine's own LEDs). Density rises in 1.5 s and clears in 3 s for a jet or 30 s for a hazer; nothing is published while there is no smoke, so an on-demand scene stays idle.
A jet leaves the nozzle of smoke.dae along the mesh's +Z, widens, rises and breaks up at its tip; a hazer is a soft cloud around the machine. The light pass ray-marches each plume only inside a cylinder around the jet's axis, so the jet glows in its LED colour plus ambient light, and the spotlight scattering pass thickens beams that cross it. The plume code is shared through an
#includethat makeShader now expands from the resources.Related Issues:
Depends on #2160 (it touches the same line of spotlight_scattering.frag); this branch contains that commit, so review only the last one.
Checklist
{on a new line for functions and class definitions.Testing
Test Cases:
Four jet fog machines with RGB LEDs and one hazer in a rig, fired from a Virtual Console button while moving heads crossed the plumes.
Test Results:
The plumes appear, take the LED colour, rise and clear on the timings above, and beams crossing them brighten. The cylinder bound brings the heaviest pass from 9.5 ms (bounding sphere) to 4 ms a frame on an M1.
Additional Notes
Tested on macOS 27 with an Apple M1 (Qt 6.11.2) only; not on Windows or Linux. The branch builds on its own from master. The engine and fixture-definition unit tests pass apart from
InputOutputMap_Test::profileDirectories, which fails the same way on master in a non-bundled macOS build.