[MOD] Aligned Bricks [alignedbricks]

Post Reply
User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

[MOD] Aligned Bricks [alignedbricks]

by Napiophelios » Post

AlignedBricks mod
by Napiophelios

for Minetest_game v0.4.11 or later

License: LGPL v2.1 for code and CC-BY-SA 3.0 for media

Depends : default

Repository : https://github.com/Napiophelios/alignedbricks
Download : https://github.com/Napiophelios/aligned ... master.zip
Rename extracted folder to "alignedbricks"

This mod aligns all sides of default brick nodes to maintain a continuous staggered pattern from all points of view.
The mod now makes better use of texture modifiers to reduce the number of textures needed for the effect.
The mod overides these default nodes with 3 textures per node:

default:brick
default:desertstone brick
default:desert_sandstone_brick
default:obsidian brick
default:sandstone brick
default:silver_sandstone_brick
default:stone brick

added support for:
nether mod
mud bricks mod
xdecor (partial)
Spoiler
Includes 16px default style brick textures
Image

...and 16px compact style brick textures (inside alternates folder)
Image
screenshot.png
screenshot.png (144 KiB) Viewed 1272 times
Last edited by Napiophelios on Thu Jul 20, 2017 05:59, edited 16 times in total.

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: [MOD] Aligned Bricks [alignedbricks]

by ExeterDad » Post

Whatever flaws you claim look awesome from where I'm sitting. Excellent!

User avatar
Hybrid Dog
Member
Posts: 2834
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [MOD] Aligned Bricks [alignedbricks]

by Hybrid Dog » Post

l like your mod, maybe you could reduce the amount of textures if you use texture modifiers.
https://github.com/minetest/minetest/bl ... i.txt#L285

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [MOD] Aligned Bricks [alignedbricks]

by Napiophelios » Post

Updated the mod:
-uses 32px textures now
-fixed the flawed stencils (I think)
-fixed node registration (tile orders)

@ExeterDad : thats nice of you to say, but those screenshots are lying to you!!
In-game the flaws are very noticeable when you approach them upclose.
but I think I have them fixed now.
Hybrid Dog wrote:l like your mod, maybe you could reduce the amount of textures if you use texture modifiers.
https://github.com/minetest/minetest/bl ... i.txt#L285
Thats how I initially started out, but I didnt have much luck with that route.
I thought I could use 3 textures for each node, but I couldnt figure it out.

The pixels are evenly numbered so it makes alignment hard when flipping the textures;
one side will look correct while the other will be one pixel off.

The stencils used where also flawed as was how I placed them in the node registration.
I think I have corrected these mistakes in the newest version.

User avatar
Hybrid Dog
Member
Posts: 2834
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [MOD] Aligned Bricks [alignedbricks]

by Hybrid Dog » Post

Napiophelios wrote:Thats how I initially started out, but I didnt have much luck with that route.
I thought I could use 3 textures for each node, but I couldnt figure it out.

The pixels are evenly numbered so it makes alignment hard when flipping the textures;
one side will look correct while the other will be one pixel off.
it this case it's better to use combine, l think
https://github.com/minetest/minetest/bl ... i.txt#L250

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
Bas080
Member
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080
Location: Netherlands

Re: [MOD] Aligned Bricks [alignedbricks]

by Bas080 » Post

Wouldn't it be nice if you could make an alligned brick out of other textures. Maybe make a transparent texture that have the aligned brick pattern and then draw that over the node you want to brickify. You won't get the custom style but you could make brick out of anthing fast!

Btw, to avoid the error showing up for unregistered blocks you can check if a node is registered.

Overriding multiple nodes and checking for each node if it is registered.

Code: Select all

   
  local override_nodes = function( nodes, defs )
     function override( index, registered )
       local node = nodes[ index ]
       if index > #nodes then return registered end
       if minetest.registered_nodes[node] then
         minetest.override_item( node, defs )
         registered[#registered+1] = node
       end
       override( index+1, registered )
     end
     override( 1, {} ) 
   end 
 
   override_nodes( biome.spawn_surfaces,{
     after_destruct = function( pos )
       local pos_min = { x = pos.x -1, y = pos.y - 1, z = pos.z - 1 }
       local pos_max = { x = pos.x +1, y = pos.y + 1, z = pos.z + 1 }
       local positions = minetest.find_nodes_in_area( pos_min, pos_max, "group:vines" )
       for index, position in pairs(positions) do
         minetest.remove_node( position )
       end
     end
   })

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [MOD] Aligned Bricks [alignedbricks]

by Napiophelios » Post

Hybrid Dog wrote: it this case it's better to use combine, l think
https://github.com/minetest/minetest/bl ... i.txt#L250
It might take me a minute to get it working right,but that looks like something I can do.
Thanks for the insight.
Bas080 wrote:Wouldn't it be nice if you could make an alligned brick out of other textures. Maybe make a transparent texture that have the aligned brick pattern and then draw that over the node you want to brickify. You won't get the custom style but you could make brick out of anthing fast!
I thought about that too,it would be easy to do, but I just dont think it would look very nice on all textures.
However you could also have several different layouts so the patterns arent always the same,that would be nice.

Sokomine
Member
Posts: 4287
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [MOD] Aligned Bricks [alignedbricks]

by Sokomine » Post

I'd love to have those textures as additions to the normal game, as new blocks. New nice looking material to build with is always welcome!
A list of my mods can be found here.

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [MOD] Aligned Bricks [alignedbricks]

by Napiophelios » Post

Sokomine wrote:I'd love to have those textures as additions to the normal game, as new blocks. New nice looking material to build with is always welcome!
I am not really happy with the textures myself. I kinda like the brick and sorta like the obsidian,
but neither are quite right...and the rest just suck eggs in my opinion.

Also the node overide doesnt make other mods use the redifined textures so its kinda pointless.

So I think I will take your advice and just use them as new blocks in a new mod some how.

Thanks for checking it out tho :)

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [MOD] Aligned Bricks [alignedbricks]

by Napiophelios » Post

Mod Updated/Fixed
The mod now uses texture modifiers to reduce the amount of textures need for the effect
The node registrations are now uniform and coherent.
All textures have been replaced (x32)

The new stencil pack includes template for consistent node registration
as well as stencils for x32 and x64 base textures.
Hybrid Dog wrote:l like your mod, maybe you could reduce the amount of textures if you use texture modifiers.
Apparently I was making this alot harder than it needed to be.
I have kinda come up with a "standard" of sorts that makes this pretty easy to do
with any texture used.

I experimented with "[combine" but you cant use other texture modifiers with it so its kinda limited

User avatar
Hybrid Dog
Member
Posts: 2834
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [MOD] Aligned Bricks [alignedbricks]

by Hybrid Dog » Post

Napiophelios wrote:I experimented with "[combine" but you cant use other texture modifiers with it so its kinda limited
Yes, but you can e.g. do the last part into brackets, see https://github.com/HybridDog/connected_ ... t.lua#L157

Where can l find the download link?

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [MOD] Aligned Bricks [alignedbricks]

by Napiophelios » Post

Hybrid Dog wrote:Where can l find the download link?
Sorry I was editing the post,
I added some alternate x64 textures..and x16 stencils
you caught me in the middle of uploading :(

User avatar
Hybrid Dog
Member
Posts: 2834
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [MOD] Aligned Bricks [alignedbricks]

by Hybrid Dog » Post

Napiophelios wrote:
Hybrid Dog wrote:Where can l find the download link?
you caught me in the middle of uploading :(
sorry

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [MOD] Aligned Bricks [alignedbricks]

by Napiophelios » Post

Hybrid Dog wrote:
Napiophelios wrote:
Hybrid Dog wrote:Where can l find the download link?
you caught me in the middle of uploading :(
sorry
no problem,man :)
I appreciate you pointing me in the right direction on this;
I have finally created my first functioning mod -woohoo!!

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [MOD] Aligned Bricks [alignedbricks]

by Napiophelios » Post

Update
-all textures remade, based on Mintest 0413 default images
-mod now uses default sized 16px textures
-includes alternate 32px textures
-removed expanded drops

User avatar
RealBadAngel
Member
Posts: 557
Joined: Wed Jul 18, 2012 16:30

Re: [MOD] Aligned Bricks [alignedbricks]

by RealBadAngel » Post

Using a modifier means producing new texture... You start with original texture, end with 2 textures: source and modified, both stored in memory.

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [MOD] Aligned Bricks [alignedbricks]

by Napiophelios » Post

RealBadAngel wrote:Using a modifier means producing new texture... You start with original texture, end with 2 textures: source and modified, both stored in memory.
That is a texture modifier known as [combine
There are many texture modifiers such as [transform [colorize etc.
what is your point?
Minetest Lua Modding API Reference 0.4.12 wrote: line228

Texture modifiers
-----------------
There are various texture modifiers that can be used
to generate textures on-the-fly.

User avatar
RealBadAngel
Member
Posts: 557
Joined: Wed Jul 18, 2012 16:30

Re: [MOD] Aligned Bricks [alignedbricks]

by RealBadAngel » Post

my point is that modifiers do not reduce number of textures in any way. theyre responsible for generating shitload of textures client side...
its way better to provide already modified textures than use modifiers
best example are ores: you have stone, ore and are using overlay to make ore in stone, right?
so you end up with 3 textures in memory: stone, overlay and ore in stone.
but you could use just stone and premade ore in stone: that would be just 2 textures...
Anyway, those bricks looks cool.

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [MOD] Aligned Bricks [alignedbricks]

by Napiophelios » Post

okay I understand what you mean now

but in this mod I only use [transform to reposition/align the textures,
so creates six textures from three so whats the drawback to that?

I mean I would have to create six physical textures to have them look right.
As it is now, I have three actual textures plus three new textures in memory:
seems the same to me.

But I will have to trust what you say cause I dont know enough about it,
thanks for the explanation :)

User avatar
jp
Banned
Posts: 947
Joined: Wed Dec 18, 2013 09:03
GitHub: kilbith
Location: France

Re: [MOD] Aligned Bricks [alignedbricks]

by jp » Post

Good job. I might open or suggest a pull-request on the minetest_game repository for using your tiles.

The *stone bricks on the sides need to be bigger like the original ones, though.

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [MOD] Aligned Bricks [alignedbricks]

by Napiophelios » Post

jp wrote:The *stone bricks on the sides need to be bigger like the original ones, though.
I have added an alternate texture pack for "classic" style bricks
however I had to accept some flaws in order to use the default texture unaltered.
The mortar lines on the bottoms do not line up.
Alternate_16px_classicbricks.zip
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
(12.47 KiB) Downloaded 75 times
Image

16pxclassicbricks.png
16pxclassicbricks.png (211.54 KiB) Viewed 1272 times

User avatar
Hybrid Dog
Member
Posts: 2834
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [MOD] Aligned Bricks [alignedbricks]

by Hybrid Dog » Post

RealBadAngel wrote:my point is that modifiers do not reduce number of textures in any way. theyre responsible for generating shitload of textures client side...
its way better to provide already modified textures than use modifiers
l thought loading from hard drive takes more time than calculating it.
best example are ores: you have stone, ore and are using overlay to make ore in stone, right?
so you end up with 3 textures in memory: stone, overlay and ore in stone.
but you could use just stone and premade ore in stone: that would be just 2 textures...
Anyway, those bricks looks cool.
l don't know exactly how the ore texture should look like, you can combine the ore and the overlay texture in one file.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [MOD] Aligned Bricks [alignedbricks]

by Napiophelios » Post

updated mod with some double-stacked block slabs nodes;
Image
stacked_block_slab.png
stacked_block_slab.png (106.21 KiB) Viewed 1272 times

User avatar
TumeniNodes
Member
Posts: 2943
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: [MOD] Aligned Bricks [alignedbricks]

by TumeniNodes » Post

YES! more building options... I like it.
A Wonderful World

User avatar
Stix
Member
Posts: 1385
Joined: Fri Aug 04, 2017 14:19
IRC: nil
In-game: Stix [+alts]
Location: USA

Re: [MOD] Aligned Bricks [alignedbricks]

by Stix » Post

TumeniNodes wrote:YES! more building options... i like it.
agreed
Hey, what can i say? I'm the bad guy.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 21 guests