Minetest_game: Restore ability to rotate slab/stairs textures

Created on 20 Sep 2018  路  45Comments  路  Source: minetest/minetest_game

I would like to invite you to look at this nicely decorative wooden floor:
tile_before

It took less than five minutes to make, but I think we can agree that it is somewhat interesting, especially when compared to the alternative:

tile_after

1935 was merged back in November 2017, but I assume has not really been playtested much because it's not in stable. The idea - prevent upsidedown stairs looking so weird - is great. The problem is that it changes the nicely decorative flooring above into the rather more plain and boring non-decorative version when you update an existing world to current dev version of MTG.

Personally I find this kind of breakage of existing builds, and removal of creative potential, completely unacceptable.

I don't believe enough consideration was given before merging and I would like this reverted, or some adjustment made so that this change in behaviour is optional, not default.

Action / change needed Blocker Bug Textures

All 45 comments

You can use a a screwdriver to rotate it (like first picture above) or make it configurable, making world-aligned texture simplifies building on a lot of structures, makes textures coherent, as was proven in other voxel game.

1935 reduces the artistic content value dramatically, you can't expect servers to 'upgrade' to something that instantly negates the effort players made to create something unique.

Show some examples?

the slab work posted above shows it perfectly, the rotation pattern disappears leaving the player to perform the whole thing again, isn't that enough?

@Fixer-007 You are incorrect. The first screenshot shows the results of a screwdriver having been used on stable. The second is that exact same build (I copied the whole world folder) moved to current dev. The texture orientation is locked even if the nodes are rotated.

... leaving the player to perform the whole thing again

It's worse than this - there is no way to reapply it. The very ability to rotate the texture, even if you rotate the node, is gone.

I think it is a bug, because I can rotate a full block and a stair, but not a slab (with a screwdriver).

Look more closely - you can rotate the node, but the texture orientation does not change.

Texture rotates on full block, but not on slab/stair, otherwise it will look bad on various architecture forms, like columns, etc. But is not you can set some nodes to have rotateable textures?

I have mixed feelings about this. Yes, artistic freedom is a very valid argument, but having misaligned textures is the biggest pain for me whenever I try to build something. Especially with slabs.

@Fixer-007 In stable you can rotate them all. This has been actively used by players to create variation in their builds.

I'd also add the stairs don't even look good. It makes very little sense to me that some steps would have wood lengthways and others widthways.

The whole point is you should not break one thing that has already been depended on to fix another.

Stairs and slabs need to be rotatable and adhere to the surface pointed at when placing e.g. place slab flat when on floor or upright when against a wall... Make use of the sneak key when placing to copy the rotation of the slab/stair you are pointing at.

Oops, #1935 was a mistake then, we need to reconsider. ~So i'm fine with a revert in the meantime and will +1 that.~

The largest issue is basically that you cannot specify whether the world alignment should be used (or not) on a specific node. Whereas the PR arised this issue, it's a major improvement for pillars and architectural decoration based on stairs which all had different orientations. I don't mind reverting the PR but please consider both sides before doing it.

I fully recognise the original issue is a genuine one, and it's one that's annoyed me personally in the past as well, but a fix that does this is, in my opinion, a pretty poor fix.

I feel there are some nodes (stone/cobbles for example) where using this can only be a positive, but for more structured materials like planks and bricks which have a definite direction that players might want to change, it's not so good.

Can it be made optional? Would we want to go that way, or would it make more headaches through not all nodes then being consistent in behaviour?

I do see both sides of this, but existing worlds did not specify what should or should not have world aligned textures, so we shouldn't have set all nodes to be world-aligned. Ideally it needs to be decided for each node placed in a world, which will be a lot of rebuilding work, but is the correct way to apply the feature.
Not sure how to make it optional, first thought is each stair node has 2 versions, the new nodes being the world-aligned ones. Inventory will explode somewhat.

Yea, I don't think the original issue justifies having two versions of nodes. If doing that, you may as well have special upsidedown_stairs nodes and have done.

I think it's much better to assess which specific nodes it's worth applying this to, but there will be disagreements there anyway, since the ones where the original issue is most visible will also be the ones that most need to be preserved.

More issues:
stairssss

1 - Planks go one way across top of stairs, another across the back. I find this visually icky, especially since staircases going round corners won't be consistent.
2 - Brick texture has four rows of bricks. It makes sense to split a stair between these horizontal rows, two on each level. Here we're splitting in the middle of individual bricks instead. It just looks bad.
3 - The join between the bricks on the lower step doesn't match up (inversion of which side is light/dark).

1, 2, 3 are only fixable by providing multiple textures per node instead of 1, such that the top texture can be rotated. But it doesn't bother me much, non-realism is everywhere in MT and MTG.

@paramat 1, 2, and 3 are not issues at all in current stable. They only exist as issues due to #1935.

I show these purely because it shows how #1935 introduces problems with the textures in their normal/most common (node right-side up) usage for the sake of fixing an issue in less-common node upside-down usage.

Ok i see. That makes it more tricky @numberZero is that an engine bug?

I was too quick to support a revert. The current code can possibly be altered into the solution.

A random initial suggestion:

It seems that many nodes are fine being world-aligned only (ice etc.) so we could first decide those.
In the stair/slab registration function add a field that decides between world-aligned, non-world aligned or both, then register 1 or 2 nodes.
I think adding extra nodes to provide the choice is acceptable, it won't double the number because many will be chosen to only be world-aligned.
All existing MTG stair/slab nodes revert to non-world-aligned, then builders can use the new nodes where they want world-aligned nodes.

It's not en engine bug; it's the expected effect of world-aligned textures when the textures themselves have not been created with that in mind and/or are not suitable for it.

Doubling stairs/slabs nodes for MTG feels crazy to me.

No that鈥檚 not a bug but the only way it could work. Take a look at a screenshot:

Here you can see that there is no single orientation for horizontal faces consistent with all the vertical ones. The problem is that that鈥檚 unsolvable, just like the hedgehog theorem: there may not be any single correct orientation for an arbitrary object (that was the reason I didn鈥檛 add the feature to mesh nodes).

Sorry, i see.

Yes lots of extra nodes is a bit crazy, but i can't see any other proper solution, the choice needs to be there for many node materials.

More:
stairendswhere
Some kind of weird physical strangeness where a brick is split on the top but not the bottom.
(and yes, I know there are cases like this normally, but this makes it much much easier to see)

This should not have been merged.

My suggestion is to disable the feature for all nodes that have well-defined orientation (like wood), but keep for those that don鈥檛 (like stone). That would be most logical.

On the other hand, the original problem was with stone bricks. Basically, there were 2 reasons for misalignment:

  1. Highlights are encoded in the texture, and thus (physically incorrectly) rotated with the node,
  2. Splits are encoded as well, and thus (physically correctly) rotated with the node.

The latter may only be solved correctly by adding a separate node that is split differently. The former should be solved in some other way, but that鈥檚 certainly non-trivial.

My suggestion is to disable the feature for all nodes that have well-defined orientation (like wood), but keep for those that don鈥檛 (like stone).

I support this. It's a really nice feature for nodes like stone and cobble. Maybe a guide for which nodes it should apply to can be whether we allow the main node to be rotated?

Of course, this leaves the original issue.

So an extra field in registration to decide WA per-node?
Let's suggest which node gets which.

I'd suggest judging purely by whether something can be rotated or not in full-node form.

Possibly good. Then auto-decide on node's paramtype2 being "facedir" or not?

I think so. Probably worth reviewing that everything you'd expect the screwdriver to work on, it does work on, as well.

Looked through all stair nodes and checked facedir for each parent node, seems fine.

Yes, from a quick check, also seems fine to me.

I'll give this a little longer for input, then make a PR.

I just remembered that there is a client-only option to disable world-aligned textures, is that of any help?

Is it possible, to add a new tool to the stairs mod, which is used to place stairs with rotated textures, and then when placing stairs without the tool, maintains the world aligned textures?

It's just an idea, I have not even though as to whether it is actually doable, or thought of any way to code it.

Using more rotation tools sounds like a hack for a broken placement system imho.

A tool to quickly convert a non-world-aligned wood/brick stair to the (possibly) added world-aligned wood.brick stair is a good idea for the rebuilding that will be needed. Nothing to do with an alledged 'broken placement system'.

...for the rebuilding that will be needed

What rebuilding?

I'd actually favour a tool to convert the nodes over having them all need to be separately crafted, though no idea what that tool should be called, but the default state of existing nodes needs to remain non-aligned.

Well, it's optional rebuilding. If we add additional world-aligned wood/brick stair nodes, then many builders will want to use these because they look better, so they will want to replace their non-world-aligned nodes. There will be a lot of these nodes.

the default state of existing nodes needs to remain non-aligned.

But surely the stair nodes of non-rotatable nodes (stone, snow, ice) should be world-aligned? The textures should not rotate because the parent nodes are not rotatable.
You supported this here https://github.com/minetest/minetest_game/issues/2216#issuecomment-423319604 and both versions of my PR were coded that way.

But surely the stair nodes of non-rotatable nodes (stone, snow, ice) should be world-aligned?

I'm just talking about the ones that are rotatable. Sorry for any confusion. I'm simply not considering non-rotatable nodes when thinking about the default state they are in, because they have only one default state.

I don't think there will be as many nodes getting converted as you seem to think. The alignment issues are only major and really bad to look at when you start placing upside nodes, which is (sadly) not something your average player seems to even think about.

Is it possible to improve screwdriver instead without messing with the nodes?

That would be nice but,
as of now, screwdriver is used to rotate nodes, and uses left/right clicks

not sure how adding the ability to choose between the two types of nodes would work..., it may over complicate screwdriver.

A new tool may really be required, but it would be created within the stairs mod, itself.
This silly little issue, is actually a fairly complex matter

Note* I do not say "silly little issue" to insult or demean the problem

Ezhh ok great.

Fixer in order to do what? Duplicated nodes is necessary anyway.

There is the issue of crafting, it may better to only craft the nonWA and apply a tool to it to convert it.

Leave all nodes as world-aligned but make screwdriver override it once you use it on block? So you can have both benefits: world aligned when you place it, and custom rotation when using screwdriver.

I've used Shara's first pic pattern myself, but was not aware it was broken, but I still would like to have both ways (WA and rotation).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Desour picture Desour  路  6Comments

paanrama picture paanrama  路  4Comments

sofar picture sofar  路  5Comments

TekhnaeRaav picture TekhnaeRaav  路  5Comments

Fixer-007 picture Fixer-007  路  6Comments