Why not use hardware coloring? Here's the answer.

Post Reply
LC Creations
Member
Posts: 159
Joined: Mon Feb 18, 2019 02:53
GitHub: LandonAConway

Why not use hardware coloring? Here's the answer.

by LC Creations » Post

I just finished creating a mod that can create between 9-289 nodes per 19 colors as baked clay (based on user preference).

If you look in the comments section of the mod, there is a comment asking why I didn't use hardware coloring. Here's my answer. Prove me wrong.

Click here to see the mod
Sokomine wrote:
Thu Aug 27, 2020 19:01
Looks like the mod registers a new node for each color? That's a bit much. I think hardware coloring would be a better solution here.
Yes I know hardware coloring exists. I want each item to be in the inventory which cannot happen with hardware coloring. Also, the way these items would need to be colored with harware coloring would require an hsv code. I have experimented with MANY lua hsv functions. NONE of them fully work properly. I have tried creating my own and it still does not work. This mod uses the overlaying of images which archives exactly what I want. Using "coloration" cannot really create dark or light colors unless the texture it is coloring is at a perfect level of brightness.

The final result may include less code for the game to run, and take less amount of nodes, but..
It would take many blue moons to get perfect. The time it would take to perfect the code is more than it is worth and I'm not up for it. If you want to prove me wrong, write me some code and maybe we get get somewhere but honestly I'm good with what is here. If your up for this challenge, the code must be able to create ANY color that is the EXACT color that the rgb value suggests. Not lighter or darker.
cdb_ac3a146dcafb

User avatar
rubenwardy
Moderator
Posts: 6978
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: Why not use hardware coloring? Here's the answer.

by rubenwardy » Post

LC Creations wrote:
Fri Aug 28, 2020 03:23
Yes I know hardware coloring exists. I want each item to be in the inventory which cannot happen with hardware coloring.
This is not true - if you're referring to the creative inventory, you can use its API to add items to it

Also, I don't understand why you made this a separate topic
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

LC Creations
Member
Posts: 159
Joined: Mon Feb 18, 2019 02:53
GitHub: LandonAConway

Re: Why not use hardware coloring? Here's the answer.

by LC Creations » Post

rubenwardy wrote:
Fri Aug 28, 2020 11:03
Also, I don't understand why you made this a separate topic
Well, because I'm respecting that topics must be "on topic". This relates to modding discussion.
cdb_ac3a146dcafb

Sokomine
Member
Posts: 4290
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: Why not use hardware coloring? Here's the answer.

by Sokomine » Post

LC Creations wrote: I want each item to be in the inventory which cannot happen with hardware coloring.
That's no problem with hardware coloring. It does get complicated when you want to cut those blocks with the circular saw - because full blocks can support up to 256 colors while facedir nodes from the saw can support only 8. But that's not the issue here. Having those blocks in the inventory worked very fine last time I tried.
LC Creations wrote: Using "coloration" cannot really create dark or light colors unless the texture it is coloring is at a perfect level of brightness.
What I meant was using a palette. Maybe you can create that particular texture file with some code or with a graphics editor. The palette ought to be able to display all common colors. With such a single small texture file, only one node instead of 256 need to be registered. That's often important for servers where there are already many mods which define a lot of nodes.
LC Creations wrote: Well, because I'm respecting that topics must be "on topic". This relates to modding discussion.
Don't worry! We're usually not that strict here. You can find quite a lot of technical discussion in many modding topics. Sorry that it took me so long to reply.
A list of my mods can be found here.

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests