Transparent Smoke — Superficial analysis

Home Forums MeseCraft Discussion Suggestions Transparent Smoke — Superficial analysis

Viewing 1 post (of 1 total)
  • Author
  • #4039

    I’m looking now at the smoke mod, to try to figure out why smoke is opaque.  The only explanations I can find —

    * smoke/init.lua: “Transparency causes visual glitches when smoke is in contact with liquids”.
    It also notes: “backface_culling=false… seems to mitigate a bit visual glitches when transparency is enabled.”
    Screenshots of the original mod include transparent smoke, and this: “…also I have noticed a glitch happens when the smoke is next to another liquid node…” — this was before it was switched from liquid to “glasslike”.

    Bias: I play singleplayer without the smoke mod.  I hate how much it obscures things, especially with mobs about.  Nobody would use torches that put off so much thick, impenetrable smoke.


    Experimentation —

    With transparency set to “blend”, and backface culling disabled, I do get visual glitches when the smoke is up against something.  Not good.
    With transparency set to “blend”, and backface culling enabled, I really have to go out of my way to find visual glitches.  In fact, it’s far easier to observe using colored glass than it is with smoke.  This particular glitch does go away with backface culling disabled.

    Colored glass setup: If you want to see for yourself what I’m talking about, without editing any source code — Hollow out a swimming pool, but don’t fill it all the way.  Leave the top layer mostly flowing.  Now, cover part of the pool with colored glass, immediately above the surface of the water (use apx a dozen or more).  If you hop in, and view the glass from below, you will occasionally see some weird texturing glitch.  I think it’s actually the flowing water texture that’s glitching, but it only happens with certain nodes adjacent.


    Recommendation (and caveats) —

    I recommend enabling transparency blend, using backface_culling, and decreasing SMOKE_OPACITY to 100.  It makes smoke much less obnoxious (picturesque occasionally), and introduces a minor visual glitch that I think will be rare.  Besides, it’s not a bug in smoke, but in the renderer itself.


    * This was the only visual glitch that I could find.  I did my best, but I didn’t have a lot of clues to work with.  There may be others if someone knows where to look.

    * I only tested on Minetest 5.7.0.  It’s possible that what I’m observing is the result of patches between versions.  There may be visual glitches in prior versions that I’m unaware of.  (I’m not sure what the MeseCraft release targets are.)

    Further testing and discussion are probably called for.

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.