Doesn`t display opacity value from Gimp on the vase model.

User avatar
Andrey01
Member
 
Posts: 2308
Joined: Wed Oct 19, 2016 15:18
Location: Russia, Moscow
GitHub: Andrey2470T
In-game: Andrey01

Doesn`t display opacity value from Gimp on the vase model.

by Andrey01 » Sat Jan 05, 2019 18:35

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:
Image

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
 

User avatar
AspireMint
Member
 
Posts: 332
Joined: Mon Jul 09, 2012 12:59
Location: Stuck at spawn
GitHub: AspireMint
IRC: AspireMint
In-game: AspireMint

Re: Doesn`t display opacity value from Gimp on the vase mode

by AspireMint » Sat Jan 05, 2019 20:16

For me it works:
Image

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
})


( https://dev.minetest.net/minetest.regis ... ha_Channel )
 

User avatar
Gael de Sailly
Member
 
Posts: 731
Joined: Sun Jan 26, 2014 17:01
Location: Lyon, France
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly Ginkgoo

Re: Doesn`t display opacity value from Gimp on the vase mode

by Gael de Sailly » Sat Jan 05, 2019 21:36

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?
Just realize how bored we would be if the world was perfect.
 

User avatar
Hybrid Dog
Member
 
Posts: 2718
Joined: Thu Nov 01, 2012 12:46

Re: Doesn`t display opacity value from Gimp on the vase mode

by Hybrid Dog » Sun Jan 06, 2019 11:19

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?

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

User avatar
Andrey01
Member
 
Posts: 2308
Joined: Wed Oct 19, 2016 15:18
Location: Russia, Moscow
GitHub: Andrey2470T
In-game: Andrey01

Re: Doesn`t display opacity value from Gimp on the vase mode

by Andrey01 » Tue Jan 08, 2019 16:13

AspireMint wrote:For me it works:
Image

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
})


( https://dev.minetest.net/minetest.regis ... ha_Channel )

Ok, i`ll try that model exporter!

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?

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?

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?

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: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


To each: thanks for your replies!
 

User avatar
Andrey01
Member
 
Posts: 2308
Joined: Wed Oct 19, 2016 15:18
Location: Russia, Moscow
GitHub: Andrey2470T
In-game: Andrey01

Re: Doesn`t display opacity value from Gimp on the vase mode

by Andrey01 » Tue Jan 08, 2019 16:38

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?
 

User avatar
AspireMint
Member
 
Posts: 332
Joined: Mon Jul 09, 2012 12:59
Location: Stuck at spawn
GitHub: AspireMint
IRC: AspireMint
In-game: AspireMint

Re: Doesn`t display opacity value from Gimp on the vase mode

by AspireMint » Tue Jan 08, 2019 23:33

"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...
 

User avatar
Andrey01
Member
 
Posts: 2308
Joined: Wed Oct 19, 2016 15:18
Location: Russia, Moscow
GitHub: Andrey2470T
In-game: Andrey01

Re: Doesn`t display opacity value from Gimp on the vase mode

by Andrey01 » Thu Jan 10, 2019 16:53

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...

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?
 

User avatar
AspireMint
Member
 
Posts: 332
Joined: Mon Jul 09, 2012 12:59
Location: Stuck at spawn
GitHub: AspireMint
IRC: AspireMint
In-game: AspireMint

Re: Doesn`t display opacity value from Gimp on the vase mode

by AspireMint » Thu Jan 10, 2019 18:56

Yup, unpack and try again. Blender requires .py files (addons are just Python scripts)
 

User avatar
Hybrid Dog
Member
 
Posts: 2718
Joined: Thu Nov 01, 2012 12:46

Re: Doesn`t display opacity value from Gimp on the vase mode

by Hybrid Dog » Fri Jan 11, 2019 15:00

This is how it looks to me:
Image
Attachments
vases.png
(779.62 KiB) Not downloaded yet

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

User avatar
Andrey01
Member
 
Posts: 2308
Joined: Wed Oct 19, 2016 15:18
Location: Russia, Moscow
GitHub: Andrey2470T
In-game: Andrey01

Re: Doesn`t display opacity value from Gimp on the vase mode

by Andrey01 » Fri Jan 11, 2019 17:49

Hybrid Dog wrote:This is how it looks to me:
Image

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).

AspireMint, thanks for explaining, i`ll try so. I thought i can install the addon that is not unpacked.
 

User avatar
Andrey01
Member
 
Posts: 2308
Joined: Wed Oct 19, 2016 15:18
Location: Russia, Moscow
GitHub: Andrey2470T
In-game: Andrey01

Re: Doesn`t display opacity value from Gimp on the vase mode

by Andrey01 » Sat Jan 12, 2019 18:16

AspireMint, it nothing changed when i exported it in b3d:
Image

And also: why is texture on the mesh model not displayed correctly (in my case, on the chair, it has purely brown color):
Image

The texture that i laid on it:
Image
 

User avatar
Andrey01
Member
 
Posts: 2308
Joined: Wed Oct 19, 2016 15:18
Location: Russia, Moscow
GitHub: Andrey2470T
In-game: Andrey01

Re: Doesn`t display opacity value from Gimp on the vase mode

by Andrey01 » Sat Jan 12, 2019 18:27

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:
Image

In Rendered:
Image

Model:
https://ufile.io/6txun

Texture:
https://ufile.io/nzlbg
 

Kippiis
New member
 
Posts: 1
Joined: Sun Dec 30, 2018 16:31
 

User avatar
Andrey01
Member
 
Posts: 2308
Joined: Wed Oct 19, 2016 15:18
Location: Russia, Moscow
GitHub: Andrey2470T
In-game: Andrey01
 

User avatar
Andrey01
Member
 
Posts: 2308
Joined: Wed Oct 19, 2016 15:18
Location: Russia, Moscow
GitHub: Andrey2470T
In-game: Andrey01

Re: Doesn`t display opacity value from Gimp on the vase mode

by Andrey01 » Thu Feb 21, 2019 21:33

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:
Image

But in minetest no:
Image

Question: why does a texture not lay out on this? I tried to include in my code
Code: Select all
use_texture_alpha = true
, 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
 

User avatar
bosapara
Member
 
Posts: 528
Joined: Fri Apr 07, 2017 08:49
GitHub: bosapara

Re: Doesn`t display opacity value from Gimp on the vase mode

by bosapara » Fri Feb 22, 2019 10:30

Problem can be only by the reason of wrong code of your node

All works perfect, in attach an example

Image
Attachments
node.zip
(31.48 KiB) Downloaded 8 times
 

User avatar
Andrey01
Member
 
Posts: 2308
Joined: Wed Oct 19, 2016 15:18
Location: Russia, Moscow
GitHub: Andrey2470T
In-game: Andrey01

Re: Doesn`t display opacity value from Gimp on the vase mode

by Andrey01 » Fri Feb 22, 2019 19:20

bosapara wrote:Problem can be only by the reason of wrong code of your node

All works perfect, in attach an example

Image

But what could i write incorrectly in my code? Here`s a code that registers the vase node:
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
})


May you expose here your code please for comparing?
 

User avatar
Andrey01
Member
 
Posts: 2308
Joined: Wed Oct 19, 2016 15:18
Location: Russia, Moscow
GitHub: Andrey2470T
In-game: Andrey01

Re: Doesn`t display opacity value from Gimp on the vase mode

by Andrey01 » Fri Feb 22, 2019 19:33

Huh, when i had switched to 0.4.17.1 stable version, it got worked for me (before i used unstable 5.0.0-dev):
Image

Then i will try to compile 5.0.0-rc2 and check whether it will get worked.
 

User avatar
Andrey01
Member
 
Posts: 2308
Joined: Wed Oct 19, 2016 15:18
Location: Russia, Moscow
GitHub: Andrey2470T
In-game: Andrey01

Re: Doesn`t display opacity value from Gimp on the vase mode

by Andrey01 » Fri Feb 22, 2019 20:51

I tried the vase node in 5.0.0-rc2 and it also changed anything : / Really is this bug in minetest?
 

User avatar
v-rob
Member
 
Posts: 684
Joined: Thu Mar 24, 2016 03:19
Location: Right behind you.
GitHub: v-rob

Re: Doesn`t display opacity value from Gimp on the vase mode

by v-rob » Sat Feb 23, 2019 00:42

Well, I know that transparent nodes in 5.0 (like my glass_stained mod) seem to work perfectly fine. Strange.
 

User avatar
bosapara
Member
 
Posts: 528
Joined: Fri Apr 07, 2017 08:49
GitHub: bosapara

Re: Doesn`t display opacity value from Gimp on the vase mode

by bosapara » Sat Feb 23, 2019 08:53

Andrey01 wrote: May you expose here your code please for comparing?


Ive publicated my version of node above "node.zip (31.48 KiB)"

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.
 

User avatar
Andrey01
Member
 
Posts: 2308
Joined: Wed Oct 19, 2016 15:18
Location: Russia, Moscow
GitHub: Andrey2470T
In-game: Andrey01

Re: Doesn`t display opacity value from Gimp on the vase mode

by Andrey01 » Sat Feb 23, 2019 11:41

bosapara wrote:
Andrey01 wrote: May you expose here your code please for comparing?


Ive publicated my version of node above "node.zip (31.48 KiB)"

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.

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.
 


Return to General Discussion



Who is online

Users browsing this forum: WhoAreYou and 3 guests