How to make a transparent block like leaves with images on 2 sides?
- Neuromancer
- Member
- Posts: 958
- Joined: Tue Jun 12, 2012 22:28
- GitHub: Neuromancer56
How to make a transparent block like leaves with images on 2 sides?
I'm trying to make a block that looks like leaves(you can see through empty spaces) but only has images on 2 sides of the block.
The problem with my first attempt below is that it allows you to see through the ground when placing the node.
minetest.register_node("bushes:BushQuarterBranches", {
description = "BushQuarterBranches",
tiles = {
"blank.png",
"blank.png",
"BlockBranch1Lsm.png",
"BlockBranch1Rsm.png",
"blank.png",
"blank.png",},
inventory_image = "BlockBranch1Lsm.png",
is_ground_content = true,
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
})
The problem with this block is that all the images are invisible, (good news is you can't see through the ground)
minetest.register_node("bushes:BushQuarterBranches2", {
description = "BushQuarterBranches2",
drawtype = "allfaces_optional",
tiles = {
"blank.png",
"blank.png",
"BlockBranch1Lsm.png",
"BlockBranch1Rsm.png",
"blank.png",
"blank.png",},
paramtype = "light",
groups = {snappy=3, flammable=2, leaves=1},
sounds = default.node_sound_leaves_defaults(),
})
What can I do so I can see my images on 2 sides without seeing through the ground?
Here's the whole very-simple mod if it helps (just registers 3 nodes and some textures)
https://www.dropbox.com/s/f0lmbaz4njscajf/bushes.zip
The problem with my first attempt below is that it allows you to see through the ground when placing the node.
minetest.register_node("bushes:BushQuarterBranches", {
description = "BushQuarterBranches",
tiles = {
"blank.png",
"blank.png",
"BlockBranch1Lsm.png",
"BlockBranch1Rsm.png",
"blank.png",
"blank.png",},
inventory_image = "BlockBranch1Lsm.png",
is_ground_content = true,
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
})
The problem with this block is that all the images are invisible, (good news is you can't see through the ground)
minetest.register_node("bushes:BushQuarterBranches2", {
description = "BushQuarterBranches2",
drawtype = "allfaces_optional",
tiles = {
"blank.png",
"blank.png",
"BlockBranch1Lsm.png",
"BlockBranch1Rsm.png",
"blank.png",
"blank.png",},
paramtype = "light",
groups = {snappy=3, flammable=2, leaves=1},
sounds = default.node_sound_leaves_defaults(),
})
What can I do so I can see my images on 2 sides without seeing through the ground?
Here's the whole very-simple mod if it helps (just registers 3 nodes and some textures)
https://www.dropbox.com/s/f0lmbaz4njscajf/bushes.zip
Last edited by Neuromancer on Sat Sep 14, 2013 13:22, edited 1 time in total.
Mods:Immersive Sounds
Phonics
Eden Game Natural Beauty Textures
Try out dropbox and get me free space: https://db.tt/JjjTr7fl
Phonics
Eden Game Natural Beauty Textures
Try out dropbox and get me free space: https://db.tt/JjjTr7fl
- Mossmanikin
- Member
- Posts: 599
- Joined: Sun May 19, 2013 16:26
- Location: where we don't speak english.
How about something like this
The panes are two-sided, but maybe it's even cooler like that.
EDIT: gramma
Code: Select all
minetest.register_node("bushes:BushQuarterBranches2", {
description = "BushQuarterBranches2",
drawtype = "nodebox",
tiles = {
"blank.png",
"blank.png",
"BlockBranch1Lsm.png",
"BlockBranch1Rsm.png",
"blank.png",
"blank.png"
},
node_box = {
type = "fixed",
fixed = {
{-1/2, -1/2, -1/2, -1/2, 1/2, 1/2},
{1/2, -1/2, -1/2, 1/2, 1/2, 1/2}
},
},
selection_box = {
type = "fixed",
fixed = {-1/2, -1/2, -1/2, 1/2, 1/2, 1/2},
},
inventory_image = "BlockBranch1Rsm.png",
paramtype = "light",
groups = {tree=1, snappy=3, flammable=2, leaves=1},
sounds = default.node_sound_leaves_defaults(),
})
EDIT: gramma
Last edited by Mossmanikin on Sat Sep 14, 2013 16:07, edited 1 time in total.
- Neuromancer
- Member
- Posts: 958
- Joined: Tue Jun 12, 2012 22:28
- GitHub: Neuromancer56
I gave it a try. All sides still invisible. It gave me an idea to use signlike and just have 1 image per node, but the image shows up only on top of the block when I do thisak399g wrote:drawtype = glasslike?
minetest.register_node("bushes:BushQuarterBranches3", {
description = "BushQuarterBranches3",
drawtype = "signlike",
tile_images = {
"BlockBranch1Rsm.png" },
inventory_image = "BlockBranch1Lsm.png",
paramtype = "light",
groups = {snappy=3, flammable=2, leaves=1},
sounds = default.node_sound_leaves_defaults(),
})
And all sides invisible when I do this:
minetest.register_node("bushes:BushQuarterBranches2", {
description = "BushQuarterBranches2",
drawtype = "signlike",
tile_images = {
"blank.png",
"BlockBranch1Rsm.png",
"BlockBranch1Lsm.png",
"BlockBranch1Rsm.png",
"BlockBranch1Lsm.png",
"BlockBranch1Rsm.png",},
inventory_image = "BlockBranch1Lsm.png",
paramtype = "light",
groups = {snappy=3, flammable=2, leaves=1},
sounds = default.node_sound_leaves_defaults(),
})
Last edited by Neuromancer on Sat Sep 14, 2013 16:08, edited 1 time in total.
Mods:Immersive Sounds
Phonics
Eden Game Natural Beauty Textures
Try out dropbox and get me free space: https://db.tt/JjjTr7fl
Phonics
Eden Game Natural Beauty Textures
Try out dropbox and get me free space: https://db.tt/JjjTr7fl
- Neuromancer
- Member
- Posts: 958
- Joined: Tue Jun 12, 2012 22:28
- GitHub: Neuromancer56
That's better, but don't nodeboxes hurt performance? I'm hoping I can get signlike to work, then place 4 blocks so the branches radiate outward in 4 directions, If I could just get it to stop displaying the image on the top of the block and instead do it on the side.Mossmanikin wrote:How about something like this
The panes are two-sided, but maybe it's even cooler like that.Code: Select all
minetest.register_node("bushes:BushQuarterBranches2", { description = "BushQuarterBranches2", drawtype = "nodebox", tiles = { "blank.png", "blank.png", "BlockBranch1Lsm.png", "BlockBranch1Rsm.png", "blank.png", "blank.png" }, node_box = { type = "fixed", fixed = { {-1/2, -1/2, -1/2, -1/2, 1/2, 1/2}, {1/2, -1/2, -1/2, 1/2, 1/2, 1/2} }, }, selection_box = { type = "fixed", fixed = {-1/2, -1/2, -1/2, 1/2, 1/2, 1/2}, }, inventory_image = "BlockBranch1Rsm.png", paramtype = "light", groups = {tree=1, snappy=3, flammable=2, leaves=1}, sounds = default.node_sound_leaves_defaults(), })
EDIT: gramma
Mods:Immersive Sounds
Phonics
Eden Game Natural Beauty Textures
Try out dropbox and get me free space: https://db.tt/JjjTr7fl
Phonics
Eden Game Natural Beauty Textures
Try out dropbox and get me free space: https://db.tt/JjjTr7fl
- Mossmanikin
- Member
- Posts: 599
- Joined: Sun May 19, 2013 16:26
- Location: where we don't speak english.
- Neuromancer
- Member
- Posts: 958
- Joined: Tue Jun 12, 2012 22:28
- GitHub: Neuromancer56
Is there any way to get them at a right angle to each other instead of parallel?Mossmanikin wrote:Complex nodeboxes hurt performance. I'm not sure about something as simple as this.Neuromancer wrote:That's better, but don't nodeboxes hurt performance?
Mods:Immersive Sounds
Phonics
Eden Game Natural Beauty Textures
Try out dropbox and get me free space: https://db.tt/JjjTr7fl
Phonics
Eden Game Natural Beauty Textures
Try out dropbox and get me free space: https://db.tt/JjjTr7fl
- Mossmanikin
- Member
- Posts: 599
- Joined: Sun May 19, 2013 16:26
- Location: where we don't speak english.
If you mean a "+" shape (seen from above):Neuromancer wrote:Is there any way to get them at a right angle to each other instead of parallel?
Code: Select all
node_box = {
type = "fixed",
fixed = {
-- {left,bottom,front,right,top,back}
{0, -1/2, -1/2, 0, 1/2, 1/2},
{-1/2, -1/2, 0, 1/2, 1/2, 0}
},
},
- wtfsamcrap
- Member
- Posts: 25
- Joined: Mon Dec 09, 2013 21:23
- Location: Look behind you :)
- Contact:
look, for example in defautl mod, for glass, it is used:
You should have those 2 tiles and 1 png transparent image.
and replace this:
With the tiles name(those 2 with the png image, and 4 with the transparent image)
Code: Select all
minetest.register_node("default:glass", {
description = "Glass",
drawtype = "glasslike",
tiles = {"default_glass.png"},
inventory_image = minetest.inventorycube("default_glass.png"),
paramtype = "light",
sunlight_propagates = true,
groups = {cracky=3,oddly_breakable_by_hand=3},
sounds = default.node_sound_glass_defaults(),
})
and replace this:
Code: Select all
tiles = {"default_glass.png"},
Last edited by artur99 on Fri Mar 14, 2014 08:48, edited 1 time in total.
Mods: Secret Mod
Contact: PM here or skype: artur1999skype
Contact: PM here or skype: artur1999skype
Who is online
Users browsing this forum: YaCy [Bot] and 15 guests