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

User avatar
Andrey01
Member
 
Posts: 2188
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
DL9Eh7xVBw7DXwLAMX1lStE21bSD2XUQ
 

User avatar
AspireMint
Member
 
Posts: 329
Joined: Mon Jul 09, 2012 12:59
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: 693
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?
Contributor of Minetest and OpenStreetMap, on Ubuntu 16.04. ~ ~ ~ Meet me on MinetestForFun, VanessaE's Basic, Capture the Flag and Inside the Box.
 

User avatar
Hybrid Dog
Member
 
Posts: 2699
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: 2188
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!
DL9Eh7xVBw7DXwLAMX1lStE21bSD2XUQ
 

User avatar
Andrey01
Member
 
Posts: 2188
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?
DL9Eh7xVBw7DXwLAMX1lStE21bSD2XUQ
 

User avatar
AspireMint
Member
 
Posts: 329
Joined: Mon Jul 09, 2012 12:59
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: 2188
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?
DL9Eh7xVBw7DXwLAMX1lStE21bSD2XUQ
 

User avatar
AspireMint
Member
 
Posts: 329
Joined: Mon Jul 09, 2012 12:59
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: 2699
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: 2188
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.
DL9Eh7xVBw7DXwLAMX1lStE21bSD2XUQ
 

User avatar
Andrey01
Member
 
Posts: 2188
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
DL9Eh7xVBw7DXwLAMX1lStE21bSD2XUQ
 

User avatar
Andrey01
Member
 
Posts: 2188
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
DL9Eh7xVBw7DXwLAMX1lStE21bSD2XUQ
 

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

User avatar
Andrey01
Member
 
Posts: 2188
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 » Mon Jan 14, 2019 21:25

Ok, but may anybody help me with previous problems about which i wrote?
DL9Eh7xVBw7DXwLAMX1lStE21bSD2XUQ
 


Return to General Discussion



Who is online

Users browsing this forum: weqqr, WhoAreYou and 4 guests