minetest-mapserver / mapserver

Minetest realtime mapserver, written in go
Other
101 stars 22 forks source link

can you add Color palette support? #369

Open Ranko-Saotome opened 6 months ago

Ranko-Saotome commented 6 months ago

I'd like to ask if it's possible to incorporate biome support for nodes that rely on color palettes to texture. For instance, in games such as MineClone2 and mineclonia, the same node is utilized but with varying colors. The maintainer of MineClone2 mentions this is related to a param2 palette.

BuckarooBanzay commented 6 months ago

this is already a thing (i know it under the name "param2 coloring") and is supported by the colormapping package already (which the mapserver uses):

https://github.com/minetest-go/colormapping/blob/a89b82db025cd41b4b74f228a2e96cb619c14392/colormapping.go#L179-L195

I think you are just missing an entry in this file: https://github.com/minetest-go/colormapping/blob/main/colors/extended_palette.txt

You can also just post the names of the nodes and point me to the palette-png here if you want :+1:

(fyi: i'm planning to implement some kind of autoconfiguration which also would include palette and such things into a future release but i'm nowhere with that yet)

OgelGames commented 6 months ago
All the nodes with palettes in Mineclone2: (mcl_core:vine uses a cropped palette because it's colorwallmounted) Node Palette
mcl_beacons:beacon_beam beacon_beam_palette.png
mcl_core:acacialeaves mcl_core_palette_foliage.png
mcl_core:acacialeaves_orphan mcl_core_palette_foliage.png
mcl_core:darkleaves mcl_core_palette_foliage.png
mcl_core:darkleaves_orphan mcl_core_palette_foliage.png
mcl_core:jungleleaves mcl_core_palette_foliage.png
mcl_core:jungleleaves_orphan mcl_core_palette_foliage.png
mcl_core:leaves mcl_core_palette_foliage.png
mcl_core:leaves_orphan mcl_core_palette_foliage.png
mcl_mangrove:mangroveleaves mcl_core_palette_foliage.png
mcl_mangrove:mangroveleaves_orphan mcl_core_palette_foliage.png
mcl_core:vine [combine:16x2:0,0=mcl_core_palette_foliage.png
mcl_core:dirt_with_grass mcl_core_palette_grass.png
mcl_core:reeds mcl_core_palette_grass.png
mcl_flowers:clover mcl_core_palette_grass.png
mcl_flowers:double_fern mcl_core_palette_grass.png
mcl_flowers:double_fern_top mcl_core_palette_grass.png
mcl_flowers:double_grass mcl_core_palette_grass.png
mcl_flowers:double_grass_top mcl_core_palette_grass.png
mcl_flowers:fern mcl_core_palette_grass.png
mcl_flowers:fourleaf_clover mcl_core_palette_grass.png
mcl_flowers:tallgrass mcl_core_palette_grass.png
mcl_core:water_source mcl_core_palette_water.png
Ranko-Saotome commented 6 months ago

You might check mineclonia as well