Doesn`t display opacity value from Gimp on the vase model.
- Andrey01
- Member
- Posts: 2577
- Joined: Wed Oct 19, 2016 15:18
- GitHub: Andrey2470T
- In-game: Andrey01
- Location: Russia, Moscow
Doesn`t display opacity value from Gimp on the vase model.
I made vase model and made for this a texture used alpha channel and opacity at 10 value in Gimp. In registration code of this node i set "use_texture_alpha = true". It doesn`t work and nothing changes:
And other like problem: a texture should not touch to faces for flowers where they should be displayed on the top. How do i fix all these issues "use_texture_alpha=true" value to work and not to display texture on flowers faces on the top?
Blender model:
https://ufile.io/nxj3x
Texture:
https://ufile.io/d3j0h
And other like problem: a texture should not touch to faces for flowers where they should be displayed on the top. How do i fix all these issues "use_texture_alpha=true" value to work and not to display texture on flowers faces on the top?
Blender model:
https://ufile.io/nxj3x
Texture:
https://ufile.io/d3j0h
- AspireMint
- Member
- Posts: 415
- Joined: Mon Jul 09, 2012 12:59
- GitHub: AspireMint
- IRC: AspireMint
- In-game: AspireMint
- Location: Stuck at spawn
Re: Doesn`t display opacity value from Gimp on the vase mode
For me it works:
Try to export it as .b3d model and in code put use_texture_alpha = true.
You will need b3dexport script: https://github.com/minetest/B3DExport
Installing: https://blender.stackexchange.com/quest ... nswer-1689
Code for my test node:
( https://dev.minetest.net/minetest.regis ... ha_Channel )
Try to export it as .b3d model and in code put use_texture_alpha = true.
You will need b3dexport script: https://github.com/minetest/B3DExport
Installing: https://blender.stackexchange.com/quest ... nswer-1689
Code for my test node:
Code: Select all
minetest.register_node("vase:vase", {
description = "glass_vase",
drawtype = "mesh",
mesh = "glass_vase.b3d",
tiles = { "glass_vase.png" },
groups = {snappy=3},
use_texture_alpha = true
})
- Gael de Sailly
- Member
- Posts: 845
- Joined: Sun Jan 26, 2014 17:01
- GitHub: gaelysam
- IRC: Gael-de-Sailly
- In-game: Gael-de-Sailly gaelysam
- Location: Voiron, France
Re: Doesn`t display opacity value from Gimp on the vase mode
You have error messages: invalid color: "#COCOCO". I guess you mean #C0C0C0 (with zeros instead of the letter O).
For flowers I don't really see your exact problem, could you show a screenshot?
For flowers I don't really see your exact problem, could you show a screenshot?
Just realize how bored we would be if the world was perfect.
- Hybrid Dog
- Member
- Posts: 2834
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Re: Doesn`t display opacity value from Gimp on the vase mode
To me it looks like you try to create vase nodes for many colours for many flowers.
Maybe you add the flower texture to an invisible part of the vase texture and then colorize the result.
https://github.com/minetest/minetest/bl ... 1573-L1600
If so, I'd recommend you to use the node colouring (https://github.com/minetest/minetest/bl ... i.txt#L589) instead of creating many nodes for different colours, and only create an empty vase node and put the flower node one position above it so that you can take and put the flower to and from the vase.
How exactly do you implement the vase?
Maybe you add the flower texture to an invisible part of the vase texture and then colorize the result.
https://github.com/minetest/minetest/bl ... 1573-L1600
If so, I'd recommend you to use the node colouring (https://github.com/minetest/minetest/bl ... i.txt#L589) instead of creating many nodes for different colours, and only create an empty vase node and put the flower node one position above it so that you can take and put the flower to and from the vase.
How exactly do you implement the vase?
- Andrey01
- Member
- Posts: 2577
- Joined: Wed Oct 19, 2016 15:18
- GitHub: Andrey2470T
- In-game: Andrey01
- Location: Russia, Moscow
Re: Doesn`t display opacity value from Gimp on the vase mode
Ok, i`ll try that model exporter!AspireMint wrote:For me it works:
Try to export it as .b3d model and in code put use_texture_alpha = true.
You will need b3dexport script: https://github.com/minetest/B3DExport
Installing: https://blender.stackexchange.com/quest ... nswer-1689
Code for my test node:( https://dev.minetest.net/minetest.regis ... ha_Channel )Code: Select all
minetest.register_node("vase:vase", { description = "glass_vase", drawtype = "mesh", mesh = "glass_vase.b3d", tiles = { "glass_vase.png" }, groups = {snappy=3}, use_texture_alpha = true })
Problem consists of what i need to lay flowers textures (from mt_game) on the vase texture, but i don`t understand why edges of faces on which i need to lay flowers textures don`t look like transparent, although that part of vase texture is transparent. Why do faces on the top look like opaque on my screenshot above?Gael de Sailly wrote:You have error messages: invalid color: "#COCOCO". I guess you mean #C0C0C0 (with zeros instead of the letter O).
For flowers I don't really see your exact problem, could you show a screenshot?
i don`t try to create vase nodes for many colours, i just try to make a few vase nodes with different flowers inside them.Hybrid Dog wrote:To me it looks like you try to create vase nodes for many colours for many flowers.
Maybe you add the flower texture to an invisible part of the vase texture and then colorize the result.
https://github.com/minetest/minetest/bl ... 1573-L1600
If so, I'd recommend you to use the node colouring (https://github.com/minetest/minetest/bl ... i.txt#L589) instead of creating many nodes for different colours, and only create an empty vase node and put the flower node one position above it so that you can take and put the flower to and from the vase.
How exactly do you implement the vase?
Hybrid Dog wrote:How exactly do you implement the vase?
Code: Select all
local flowers_list = {
name = {"rose", "tulip_black", "tulip", "geranium"},
desc = {"Rose", "Tulip Black", "Tulip", "Geranium"}
}
minetest.register_node("luxury_decor:glass_vase", {
description = "Glass Vase",
visual_scale = 0.5,
mesh = "glass_vase.obj",
tiles = {"glass_vase.png"},
use_texture_alpha = true,
paramtype = "light",
paramtype2 = "facedir",
groups = {choppy = 1.5},
drawtype = "mesh",
collision_box = {
type = "fixed",
fixed = {
{-0.2, -0.5, -0.2, 0.2, 0.5, 0.2},
--[[{-0.65, -0.3, -1.46, 0.65, 1.4, -1.66},
{-0.65, -0.3, 0.46, 0.65, 1.4, 0.66}]]
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.2, -0.5, -0.2, 0.2, 0.5, 0.2}
}
},
sounds = default.node_sound_glass_defaults(),
on_rightclick = function (pos, node, clicker, itemstack, pointed_thing)
for _, flower in ipairs(flowers_list.name) do
if "flowers:" .. flower == itemstack:get_name() then
minetest.remove_node(pos)
minetest.set_node(pos, {name="luxury_decor:glass_vase_with_"..flower})
end
end
end
})
for ind, f in pairs(flowers_list.name) do
minetest.register_node("luxury_decor:glass_vase_with_"..f, {
description = "Glass Vase With " .. flowers_list.desc[ind],
visual_scale = 0.5,
mesh = "glass_vase.obj",
tiles = {"glass_vase.png^flowers_"..f..".png"},
use_texture_alpha = true,
paramtype = "light",
paramtype2 = "facedir",
drop = {"luxury_decor:glass_vase", "luxury_decor:glass_vase_with_"..f},
groups = {choppy = 1.5},
drawtype = "mesh",
collision_box = {
type = "fixed",
fixed = {
{-0.2, -0.5, -0.2, 0.2, 0.5, 0.2},
--[[{-0.65, -0.3, -1.46, 0.65, 1.4, -1.66},
{-0.65, -0.3, 0.46, 0.65, 1.4, 0.66}]]
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.2, -0.5, -0.2, 0.2, 0.5, 0.2}
}
},
sounds = default.node_sound_glass_defaults(),
on_rightclick = function (pos, node, clicker, itemstack, pointed_thing)
for _, flower in ipairs(flowers_list.name) do
if "flowers:" .. flower == itemstack:get_name() then
minetest.remove_node(pos)
minetest.set_node(pos, {name="luxury_decor:glass_vase_with_"..flower})
itemstack:add_item("luxury_decor:glass_vase")
itemstack:add_item("flowers:" .. string.sub(node.name, 29))
return itemstack
end
end
minetest.remove_node(pos)
minetest.set_node(pos, {name="luxury_decor:glass_vase"})
itemstack:add_item("flowers:" .. string.sub(node.name, 29))
end
})
end
- Andrey01
- Member
- Posts: 2577
- Joined: Wed Oct 19, 2016 15:18
- GitHub: Andrey2470T
- In-game: Andrey01
- Location: Russia, Moscow
Re: Doesn`t display opacity value from Gimp on the vase mode
AspireMint: i installed B3DExporter, but i can not find it in "Add-ons" tab. As i understand in the addons list it should be named "Import-Export: B3DExport", but there`s no that. So is it named?
- AspireMint
- Member
- Posts: 415
- Joined: Mon Jul 09, 2012 12:59
- GitHub: AspireMint
- IRC: AspireMint
- In-game: AspireMint
- Location: Stuck at spawn
Re: Doesn`t display opacity value from Gimp on the vase mode
"Import-Export: B3D (BLITZEN3D) Model Exporter"
In Add-on tab there is search box, type "b3d". If it is installed you should see it.
Check it and dont forget to Save User Settings. No need to restart blender, you will find it in File>Export...
In Add-on tab there is search box, type "b3d". If it is installed you should see it.
Check it and dont forget to Save User Settings. No need to restart blender, you will find it in File>Export...
- Andrey01
- Member
- Posts: 2577
- Joined: Wed Oct 19, 2016 15:18
- GitHub: Andrey2470T
- In-game: Andrey01
- Location: Russia, Moscow
Re: Doesn`t display opacity value from Gimp on the vase mode
It doesn`t work for me. I downloaded the file from your source and stayed it unpacked. Then i clicked "Install Add-on from file..." and it did not install anything because i tried to search it in that box. Is this needed to be unpacked?AspireMint wrote:"Import-Export: B3D (BLITZEN3D) Model Exporter"
In Add-on tab there is search box, type "b3d". If it is installed you should see it.
Check it and dont forget to Save User Settings. No need to restart blender, you will find it in File>Export...
- AspireMint
- Member
- Posts: 415
- Joined: Mon Jul 09, 2012 12:59
- GitHub: AspireMint
- IRC: AspireMint
- In-game: AspireMint
- Location: Stuck at spawn
Re: Doesn`t display opacity value from Gimp on the vase mode
Yup, unpack and try again. Blender requires .py files (addons are just Python scripts)
- Hybrid Dog
- Member
- Posts: 2834
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Re: Doesn`t display opacity value from Gimp on the vase mode
This is how it looks to me:
- Attachments
-
- vases.png (779.62 KiB) Viewed 795 times
- Andrey01
- Member
- Posts: 2577
- Joined: Wed Oct 19, 2016 15:18
- GitHub: Andrey2470T
- In-game: Andrey01
- Location: Russia, Moscow
Re: Doesn`t display opacity value from Gimp on the vase mode
So it looked for me, too before, but after i exported the blend file to obj in Object Mode it looked properly (in first case i exported it in Edit mode).Hybrid Dog wrote:This is how it looks to me:
AspireMint, thanks for explaining, i`ll try so. I thought i can install the addon that is not unpacked.
- Andrey01
- Member
- Posts: 2577
- Joined: Wed Oct 19, 2016 15:18
- GitHub: Andrey2470T
- In-game: Andrey01
- Location: Russia, Moscow
Re: Doesn`t display opacity value from Gimp on the vase mode
- Andrey01
- Member
- Posts: 2577
- Joined: Wed Oct 19, 2016 15:18
- GitHub: Andrey2470T
- In-game: Andrey01
- Location: Russia, Moscow
Re: Doesn`t display opacity value from Gimp on the vase mode
Other question: why does my texture look like on the model in Solid mode correctly, but in Rendered one it looks like just ugly?
In Solid:
In Rendered:
Model:
https://ufile.io/6txun
Texture:
https://ufile.io/nzlbg
In Solid:
In Rendered:
Model:
https://ufile.io/6txun
Texture:
https://ufile.io/nzlbg
Re: Doesn`t display opacity value from Gimp on the vase mode
I had the same issue, thanks to Andrey01 it got solved!
- Andrey01
- Member
- Posts: 2577
- Joined: Wed Oct 19, 2016 15:18
- GitHub: Andrey2470T
- In-game: Andrey01
- Location: Russia, Moscow
Re: Doesn`t display opacity value from Gimp on the vase mode
Ok, but may anybody help me with previous problems about which i wrote?
- Andrey01
- Member
- Posts: 2577
- Joined: Wed Oct 19, 2016 15:18
- GitHub: Andrey2470T
- In-game: Andrey01
- Location: Russia, Moscow
Re: Doesn`t display opacity value from Gimp on the vase mode
Can anybody help me and find out why transparency doesn`t apply in minetest? In my case it happens with vase model. In blender it looks like correctly:
But in minetest no:
Question: why does a texture not lay out on this? I tried to include in my code, but it doesn`t work! It behaves the same way as without.
Again model and texture downloads:
https://ufile.io/x430u
https://ufile.io/5pyp7
But in minetest no:
Question: why does a texture not lay out on this? I tried to include in my code
Code: Select all
use_texture_alpha = true
Again model and texture downloads:
https://ufile.io/x430u
https://ufile.io/5pyp7
Re: Doesn`t display opacity value from Gimp on the vase mode
Problem can be only by the reason of wrong code of your node
All works perfect, in attach an example
All works perfect, in attach an example
- Attachments
-
- node.zip
- (31.48 KiB) Downloaded 53 times
- Andrey01
- Member
- Posts: 2577
- Joined: Wed Oct 19, 2016 15:18
- GitHub: Andrey2470T
- In-game: Andrey01
- Location: Russia, Moscow
Re: Doesn`t display opacity value from Gimp on the vase mode
But what could i write incorrectly in my code? Here`s a code that registers the vase node:bosapara wrote:Problem can be only by the reason of wrong code of your node
All works perfect, in attach an example
Code: Select all
minetest.register_node("luxury_decor:glass_vase", {
description = "Glass Vase",
visual_scale = 0.5,
mesh = "glass_vase.b3d",
tiles = {"glass_vase.png"},
inventory_image = "glass_vase_inv.png",
use_texture_alpha = true,
paramtype = "light",
paramtype2 = "facedir",
groups = {choppy = 1.5},
drawtype = "mesh",
collision_box = {
type = "fixed",
fixed = {
{-0.2, -0.5, -0.2, 0.2, 0.5, 0.2},
--[[{-0.65, -0.3, -1.46, 0.65, 1.4, -1.66},
{-0.65, -0.3, 0.46, 0.65, 1.4, 0.66}]]
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.2, -0.5, -0.2, 0.2, 0.5, 0.2}
}
},
sounds = default.node_sound_glass_defaults(),
on_rightclick = function (pos, node, clicker, itemstack, pointed_thing)
for _, flower in ipairs(flowers_list.name) do
if "flowers:" .. flower == itemstack:get_name() then
minetest.remove_node(pos)
minetest.set_node(pos, {name="luxury_decor:glass_vase_with_"..flower})
end
end
end
})
- Andrey01
- Member
- Posts: 2577
- Joined: Wed Oct 19, 2016 15:18
- GitHub: Andrey2470T
- In-game: Andrey01
- Location: Russia, Moscow
Re: Doesn`t display opacity value from Gimp on the vase mode
- Andrey01
- Member
- Posts: 2577
- Joined: Wed Oct 19, 2016 15:18
- GitHub: Andrey2470T
- In-game: Andrey01
- Location: Russia, Moscow
Re: Doesn`t display opacity value from Gimp on the vase mode
I tried the vase node in 5.0.0-rc2 and it also changed anything : / Really is this bug in minetest?
- v-rob
- Developer
- Posts: 971
- Joined: Thu Mar 24, 2016 03:19
- GitHub: v-rob
- IRC: v-rob
- Location: Right behind you.
Re: Doesn`t display opacity value from Gimp on the vase mode
Well, I know that transparent nodes in 5.0 (like my glass_stained mod) seem to work perfectly fine. Strange.
Re: Doesn`t display opacity value from Gimp on the vase mode
Ive publicated my version of node above "node.zip (31.48 KiB)"Andrey01 wrote: May you expose here your code please for comparing?
Im not sure its good time to use 5.0.0 version.
About 99.9% of players using =< 4.17.1 (for multiplayer)
So in result if we using 5.0.0 for our server - we have empty online.
- Andrey01
- Member
- Posts: 2577
- Joined: Wed Oct 19, 2016 15:18
- GitHub: Andrey2470T
- In-game: Andrey01
- Location: Russia, Moscow
Re: Doesn`t display opacity value from Gimp on the vase mode
I need to use 5.0.0 because i use Player Meta in my mod that is new feature in minetest. I consider this is a bug in 5.0.0.bosapara wrote:Ive publicated my version of node above "node.zip (31.48 KiB)"Andrey01 wrote: May you expose here your code please for comparing?
Im not sure its good time to use 5.0.0 version.
About 99.9% of players using =< 4.17.1 (for multiplayer)
So in result if we using 5.0.0 for our server - we have empty online.
Who is online
Users browsing this forum: No registered users and 9 guests