Commit Graph

26 Commits

Author SHA1 Message Date
CrackedMatter 2c1d9e1330
Flip item textures of glass doors (#3009) 2023-01-26 17:32:03 +01:00
ExeVirus 6bd059915c
Safe texture compression (#2808)
Only a single program was used to safely compress all textures in MTG.

 * `optipng -o7 -zm1-9 -nc -strip all -clobber %%f`

The key command used is -nc, which stops color mode changes. I.e. any RGBA textures will remain RGBA textures, with none being changes to 8-bit indexed mode.

utils/optimize_textures.sh performs this compression automatically, assuming optipng is installed.
2021-02-12 20:55:18 +01:00
Wuzzy 6605724fe1
Add icons for invisible nodes (#2718) 2020-09-30 16:41:04 +01:00
sfan5 ef45a8e148
doors: Remove unnecessary nodebox and empty texture (#2662) 2020-05-04 19:20:01 +02:00
Paramat 5c48c76aa2
Fix trapdoor side textures and orientations
Previously, opening a trapdoor caused the side textures to flip.

Fix the incorrect textures.
Also add a texture transform to a tile of the open trapdoor, such
that the closed trapdoor sides use the lower part of the texture
and the open trapdoor sides use the higher part.

Clean up some codestyle issues.
2019-05-03 23:49:07 +01:00
Paramat da10af919e
Doors: New handle and hinges for glass door 2018-12-22 00:33:37 +00:00
SmallJoker ad486bc863 New glass, glass stair/slab, and glass door textures 2018-11-02 17:22:54 +00:00
DS-Minetest 7e9c5a3576 Doors: Avoid white particles when digging wooden trapdoor
Alter the wooden trapdoor side texture, replacing the white area with a
repetition of the wood pixels.
It is now consistent with the steel trapdoor side texture.
2017-06-08 15:52:31 +01:00
Martin Doege eb1805ea0a Textures: Strip color profiles from some textures
Removes the "iCCP: known incorrect sRGB profile" error messages on the
console when starting minetest_game by stripping offending color profiles.
2017-01-22 07:43:12 +00:00
paramat 47efa2f558 Textures: Revert many back to RGBA to fix visual bug
With mip-mapping enabled, some GPUs cause a visual bug with indexed
textures that use alpha. This bug has been present for a while but
not noticed before. All indexed alpha textures must now be converted
to RGBA, to start this process we revert some textures converted to
indexed in the recent commit af3c918.
2016-11-19 23:45:08 +00:00
Auke Kok af3c91862c Convert many textures to indexed color
This fixes all cases where the color profile was broken, and
libpng warns about. It also makes almost all textures indexed
instead of RGB where possible (textures that don't have
semi-transparent pixels).
2016-11-18 05:37:02 +00:00
Auke Kok 9de43cdf7d Doors: Allow falling nodes to fall onto doors.
We were cleverly attempting to use an airlike node as the
top half of the doors, but as airlike nodes are not walkable,
falling nodes would not stop falling and thus remain an entity
stuck on top of a door.

After inspecting the builtin/game/falling.lua code, I considered
the remaining options: (a) revert doors such that the top part is
actually the door, (b) play with nodedef fields and see if other
flags may work, or (c) modify the hidden door part to another
drawtype that properly prevents this issue.

(a) seemed way over the top for now, although it would solve the
issue, it would cause a rewrite of most of the code including the
old-door-conversion.

(b) turned up nothing.

(c) turned out to be relatively simple.

So, here's the implementation where I turn the hidden door top
into a tiny, non-targetable but walkable nodebox that is entirely
inside the door hinge. It's entirely transparent, so you still
can't see it, can't hit it, nor can you place anything in it or
make liquids flow through it. The top part is placed in the right
position on placement and not touched further.

Falling nodes will properly stop on top of these doors. I've
adjusted the door conversion code to properly account for the
issue as well, so the only thing remaining is people who have
been running a git branch - those can upgrade by re-placing the
door.
2016-03-21 06:17:27 +00:00
paramat c17c317669 Doors: Update glass door item textures to new design 2016-03-15 16:23:05 +00:00
Auke Kok f600a9f645 New mesh door models, and extensive door API
This patch replaces the default door nodes with a new mesh model
and nodes.

Two new models were added that are 2 blocks high. One for left-hinge
and one for right-hinge doors. This allows us to make a single texture
fit on both models. The alternative would have been 1 model and 2
unmapped textures, which is more work for mod developers.

Doors work exactly like the old doors, including ownership, breaking
doors, opening and closing.

Under the hood, we can prevent the top part of the door from being
obstructed by placing an invisible node. This prevents liquids from
flowing through doors or people placing sand or other blocks in the
top half. The door code automatically places and removes these as
needed.

Metadata is used to store door state, just like the old version.

A doors API is added, it allows mods to use the API to open/close or
toggle door states without worrying about sounds, permissions and
other details. This is intended for e.g. mesecons. This API allows
mods to manipulate or inspect doors for players or for themselves.

In-game old door nodes are automatically converted using an ABM and
preserve ownership and orientation and state.

TNT blows up all doors and trapdoors except for the steel ones,
who can survive a blast. We return an itemstack in on_blast(),
which requires a TNT API patch which is also pending.

We enable backface culling for most of these doors, as this gives
the identical visual appearance that the old doors had. In the case
of the glass door, there's a slight twist.

The texture files used by the new doors have new names that do
not conflict with previous texture file names to avoid texture
pack conflicts.

Thanks to red-001 <red-001@users.noreply.github.com> for some
of the conversion code, cleanups, and extra textures.
2016-02-13 03:47:28 +00:00
Auke Kok 322967d2d1 Better trapdoor side appearance.
We're using a normal wooden side texture to draw the sides
of trapdoors. But the side textures have only 2 edges that
have a nice texture for the 2px wide trapdoor. We can
either repaint the textures, or just rotate the texture
properly for the two sides that need it.

Because the side texture for wooden doors was just a default:wood
texture, it clashes with the colors in the trapdoor, and so
we add a wooden trapdoor-matching tile side texture as well.

This also improves the steel trapdoor side, but without a
texture change there since that was already a specially
drawn texture for that node.

We also increase the thickness of the trapdoor to 2px. Right
now the model is 0.4 large, but this causes the side textures
to look odd as there's a mismatch in pixel size. By scaling the
trapdoor side up to exactly 2px, the sides look natural.

Thanks to @kilbith for the suggestion.
2016-01-20 22:17:25 +00:00
Auke Kok e9a7782c88 Steel Trapdoor.
Adds a steel trapdoor. Textures were painted from scratch, and
inspired by the current Steel Door. Ownership on the trapdoor
works as expected, and so does the crafting recipe.
2016-01-03 02:11:40 +00:00
jp f86ac2fdff Optimize textures and model (use *.b3d instead *.x) 2015-02-28 22:33:19 +01:00
Craig Davison 6157982787 Follow naming convention of textures and sounds in doors 2015-01-17 16:05:23 +01:00
Amaz 8007c142de Added the new door textures 2014-11-30 17:34:35 +01:00
David Gumberg e106fd51ca Compress all textures losslessly using optipng and advpng 2014-07-05 16:06:00 +02:00
PenguinDad da9579846c Added Glass and Obsidian Glass door (doors mod) 2014-07-05 16:02:17 +02:00
Sfan5 c2ce3d032e Pngcrush all Textures 2013-05-25 16:20:35 +02:00
PilzAdam fcf0816fa8 Move all common mods back to minetest_game 2013-05-18 16:05:16 +02:00
PilzAdam d6ec56811b Use common mods 2013-03-21 18:44:36 +01:00
PilzAdam 5311c6ec96 Replace the doors mod 2012-11-28 14:43:49 +01:00
Perttu Ahola 5bd33df1a3 Add doors 2012-03-30 11:15:31 +03:00