is there any way to use a color-value instead of textures?

Post Reply
User avatar
Drachenbauer32
Member
Posts: 105
Joined: Wed Aug 28, 2019 18:11

is there any way to use a color-value instead of textures?

by Drachenbauer32 » Post

Hello

I have mods with multicolored nodes/items (beds, wool, concrete, butterflies, dye; just modifyed copies of existing mods).
Actually they use different textures for each color.
Is there a way to use only white textures and add color-values, wich generate the actual colors ingame?.
Last edited by Drachenbauer32 on Sat Sep 28, 2019 19:35, edited 1 time in total.

User avatar
TumeniNodes
Member
Posts: 2941
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: is there any way to use a color-vanue instead of texture

by TumeniNodes » Post

from here and below you should find what you're looking for
https://rubenwardy.com/minetest_modding ... colorratio
A Wonderful World

User avatar
Drachenbauer32
Member
Posts: 105
Joined: Wed Aug 28, 2019 18:11

Re: is there any way to use a color-vanue instead of texture

by Drachenbauer32 » Post

the beds are a bit more tricky:
they have a wooden frame (should keep original color) and a fabric matress (should be dyable).
How can i manage this?

All other dyable stuff works now.
Last edited by Drachenbauer32 on Sat Aug 31, 2019 20:22, edited 1 time in total.

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: is there any way to use a color-vanue instead of texture

by AiTechEye » Post

1: https://gitlab.com/VanessaE/ilights/blo ... a#L178-184

2: maybe cuz those param2 is set as 0 while constructed
try something like:

Code: Select all

on_construct=function(pos)
	if minetest.get_node(pos).param2 ~= 2 then
 		minetest.swap_node(pos,{name="name",param2=2})
	end
end

User avatar
Drachenbauer32
Member
Posts: 105
Joined: Wed Aug 28, 2019 18:11

Re: is there any way to use a color-vanue instead of texture

by Drachenbauer32 » Post

i made them with a color-string in the list instead of a palette now.
that works (butterflies, concrete, dye and wool are ok now).

But my beds stay white, if i do the same with them.
how can i dye only the fabric mattress, but not the wooden frame of the beds?

User avatar
TumeniNodes
Member
Posts: 2941
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: is there any way to use a color-vanue instead of texture

by TumeniNodes » Post

Drachenbauer32 wrote:But my beds stay white, if i do the same with them.
how can i dye only the fabric mattress, but not the wooden frame of the beds?
viewtopic.php?f=9&t=18910
A Wonderful World

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

Re: is there any way to use a color-vanue instead of texture

by ShadMOrdre » Post

There are some texture modifiers that might help.

You can colorize the texture, and provide an overlay texture that does not get colorized, IIRK.

User avatar
Drachenbauer32
Member
Posts: 105
Joined: Wed Aug 28, 2019 18:11

Re: is there any way to use a color-vanue instead of texture

by Drachenbauer32 » Post

i noticed, if a node-type is not registered with:

Code: Select all

minetest.register_node("blockname", {
})
coloring may not work properly.

for sample beds are registered with

Code: Select all

beds.register_bed("beds:bed_" .. name, {
})
and stay white.

User avatar
Drachenbauer32
Member
Posts: 105
Joined: Wed Aug 28, 2019 18:11

Re: is there any way to use a color-vanue instead of texture

by Drachenbauer32 » Post

now with the help of the linked mod, i found a way to color in the beds right.

With

Code: Select all

overlay_tiles = {
}
i used a set of textures, wich content only the wood-parts, and i was able to use color = "white" inside theese lines to keep them save from changing their color

Is there a way to use an overlay for their item-pictures too?
How do i overlay a testure with color = "white" on the item-testure?

User avatar
Drachenbauer32
Member
Posts: 105
Joined: Wed Aug 28, 2019 18:11

Re: is there any way to use a color-vanue instead of texture

by Drachenbauer32 » Post

after a bit searching i found this:
https://github.com/minetest/minetest/pull/6107
with a link to this:
https://github.com/osjc/minetest/commit ... 7869c9c4cd

But how can i add it to my minetest to make it work (there is something about android, but my one is for windows)?

User avatar
Drachenbauer32
Member
Posts: 105
Joined: Wed Aug 28, 2019 18:11

Re: is there any way to use a color-vanue instead of texture

by Drachenbauer32 » Post

ok, that´s already in the code.

How can i color particles this style?
And the emitted light from nodes?

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests