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

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

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

by Drachenbauer32 » Wed Aug 28, 2019 19:03

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: 2838
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

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

by TumeniNodes » Wed Aug 28, 2019 21:56

from here and below you should find what you're looking for
https://rubenwardy.com/minetest_modding ... colorratio
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am
 

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

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

by Drachenbauer32 » Fri Aug 30, 2019 20:22

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: 747
Joined: Fri May 29, 2015 21:14
Location: ¯\_(ツ)_/¯
GitHub: AiTechEye

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

by AiTechEye » Sat Aug 31, 2019 14:39

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: 106
Joined: Wed Aug 28, 2019 18:11

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

by Drachenbauer32 » Sat Aug 31, 2019 20:49

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: 2838
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

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

by TumeniNodes » Sun Sep 01, 2019 00:03

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
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am
 

ShadMOrdre
Member
 
Posts: 570
Joined: Mon Dec 29, 2014 08:07
Location: USA
GitHub: ShadMOrdre
In-game: shadmordre

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

by ShadMOrdre » Sun Sep 01, 2019 03:23

There are some texture modifiers that might help.

You can colorize the texture, and provide an overlay texture that does not get colorized, IIRK.
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.
 

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

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

by Drachenbauer32 » Sun Sep 01, 2019 10:43

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: 106
Joined: Wed Aug 28, 2019 18:11

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

by Drachenbauer32 » Sun Sep 01, 2019 12:24

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: 106
Joined: Wed Aug 28, 2019 18:11
 

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

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

by Drachenbauer32 » Sat Sep 28, 2019 19:34

ok, that´s already in the code.

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


Return to Modding Discussion



Who is online

Users browsing this forum: No registered users and 2 guests