Page 1 of 1

[MOD] Aligned Bricks [alignedbricks]

PostPosted: Sun Feb 08, 2015 12:06
by Napiophelios
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:obsidian brick
default:sandstone brick
default:stone brick

added support for:
nether mod
mud bricks mod
xdecor (partial)

+ Screenshots

+ Credits / Licenses

Re: [MOD] Aligned Bricks [alignedbricks]

PostPosted: Sun Feb 08, 2015 12:10
by ExeterDad
Whatever flaws you claim look awesome from where I'm sitting. Excellent!

Re: [MOD] Aligned Bricks [alignedbricks]

PostPosted: Sat Feb 14, 2015 20:40
by Hybrid Dog
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

Re: [MOD] Aligned Bricks [alignedbricks]

PostPosted: Sat Feb 14, 2015 23:31
by Napiophelios
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.

Re: [MOD] Aligned Bricks [alignedbricks]

PostPosted: Sun Feb 15, 2015 09:07
by Hybrid Dog
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

Re: [MOD] Aligned Bricks [alignedbricks]

PostPosted: Sun Feb 15, 2015 09:10
by Bas080
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.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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
   })

Re: [MOD] Aligned Bricks [alignedbricks]

PostPosted: Sun Feb 15, 2015 22:15
by Napiophelios
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.

Re: [MOD] Aligned Bricks [alignedbricks]

PostPosted: Fri Mar 06, 2015 05:56
by Sokomine
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!

Re: [MOD] Aligned Bricks [alignedbricks]

PostPosted: Sun Mar 08, 2015 03:20
by Napiophelios
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 :)

Re: [MOD] Aligned Bricks [alignedbricks]

PostPosted: Sun Apr 19, 2015 05:34
by Napiophelios
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

Re: [MOD] Aligned Bricks [alignedbricks]

PostPosted: Sun Apr 19, 2015 08:49
by Hybrid Dog
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?

Re: [MOD] Aligned Bricks [alignedbricks]

PostPosted: Sun Apr 19, 2015 08:57
by Napiophelios
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 :(

Re: [MOD] Aligned Bricks [alignedbricks]

PostPosted: Sun Apr 19, 2015 09:04
by Hybrid Dog
Napiophelios wrote:
Hybrid Dog wrote:Where can l find the download link?
you caught me in the middle of uploading :(

sorry

Re: [MOD] Aligned Bricks [alignedbricks]

PostPosted: Sun Apr 19, 2015 09:11
by Napiophelios
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!!

Re: [MOD] Aligned Bricks [alignedbricks]

PostPosted: Tue Sep 29, 2015 15:13
by Napiophelios
Update
-all textures remade, based on Mintest 0413 default images
-mod now uses default sized 16px textures
-includes alternate 32px textures
-removed expanded drops

Re: [MOD] Aligned Bricks [alignedbricks]

PostPosted: Wed Sep 30, 2015 19:51
by RealBadAngel
Using a modifier means producing new texture... You start with original texture, end with 2 textures: source and modified, both stored in memory.

Re: [MOD] Aligned Bricks [alignedbricks]

PostPosted: Wed Sep 30, 2015 20:00
by Napiophelios
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.

Re: [MOD] Aligned Bricks [alignedbricks]

PostPosted: Thu Oct 01, 2015 06:09
by RealBadAngel
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.

Re: [MOD] Aligned Bricks [alignedbricks]

PostPosted: Thu Oct 01, 2015 07:59
by Napiophelios
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 :)

Re: [MOD] Aligned Bricks [alignedbricks]

PostPosted: Thu Oct 01, 2015 08:55
by jp
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.

Re: [MOD] Aligned Bricks [alignedbricks]

PostPosted: Thu Oct 01, 2015 14:14
by Napiophelios
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 220 times


Image


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

Re: [MOD] Aligned Bricks [alignedbricks]

PostPosted: Thu Oct 01, 2015 16:54
by Hybrid Dog
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.