How do i set the colour of entity?

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

How do i set the colour of entity?

by Drachenbauer32 » Mon Sep 30, 2019 19:10

Hello

how can i make different colored entities by using only a white or greyscaled texture and an overall color value in the entity-defs?

I want no color modifyers in the texture-line, because that makes pastellic colors or covers the texture fully to a single color, because it just puts the color as an overlay with given transparency value ontop of the riginal texture.

I more like the variant, that i use for the nodes, with the color value directly in the object-defs.
that colors the following way (good for using greyscale textures):
White pixels turn into the choosen color, darker grey pixels turn into a darker shade of the color and
pre-colored.pixels turn into a specific mix-color (sometimes it just gives the darker color or black, if one of the two colors is red, green or blue) between the color-value in the code and the original color from the texture.
i heared, it´s called someting like multiply-coloring.

Sample:
Image and yellow r:255, g:255, b:0 -> Image
Attachments
test-pattern yellow.png
(870 Bytes) Not downloaded yet
test-pattern.png
(1.35 KiB) Not downloaded yet
Last edited by Drachenbauer32 on Sat Oct 05, 2019 20:29, edited 1 time in total.
 

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

Re: How do i set the colour of entity?

by Drachenbauer32 » Sat Oct 05, 2019 20:28

For my vehicles i can create the model for the entity as a node with my favorite coloring methode and use:
Code: Select all
textures = { name of a regisered node },
visual = "wielditem",

to set the node as the entity model.

But this is not useful for animal entities, because they use ,an animation-skeleton to move their limbs.

So i´m still looking for a way to color in an entity with a b3d-model, that uses only a greyscale texture and a color value to generate the effect, i told about in the start-post.
 

User avatar
Kimapr
Member
 
Posts: 20
Joined: Fri May 24, 2019 15:53
GitHub: Kimapr
IRC: Kimapr
In-game: Kimapr

Re: How do i set the colour of entity?

by Kimapr » Thu Oct 10, 2019 01:56

You can use <your texturename>^[multiply:<ColorString> for each texture of your ent
Ek59C88tAsaQuRAw6PCPsGFDozj1FuZ4
 

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

Re: How do i set the colour of entity?

by Drachenbauer32 » Sat Oct 19, 2019 17:32

Where can i find a list of valid colorString formats?

edit:

i found this page:
https://minetest.gitlab.io/minetest/colors/
there i found the formats, i looked for.
But id was not easy to find.
It does not appear in search results, if i search for "ColorString".
I had to sarch "minetest colorspec" instead.
 


Return to Modding Discussion



Who is online

Users browsing this forum: MSN [Bot] and 4 guests