More lights from Mel (and other modelling stuff)

Sure :slight_smile: (I’m still far away from releasing an update to Candyland).

You have to use color maps. The structure should be like this:

> -your_mod
>     -data
>         -materials
>             -color_maps
>                 -translucent_color_map.json
>             -material_maps
>                 -translucent_material_map.json

translucent_color_map.json should include something like this (these hex colors are the ones you want to make semi-transparent, this way you can have even entities with a mix of solid and translucent voxels):

> {
> 	"#F0B758" : "your_mod:translucent",
> 	"#E5AF54" : "your_mod:translucent",
> 	"#FEC467" : "your_mod:translucent"
> }

translucent_material_map.json should include this:

> {
>    "your_mod:translucent" : {
>       "render_material" : "/your_mod/data/horde/materials/translucent.material.json"
>    }
> }

translucent.material.json should be a copy of the transparent_with_depth.material.json (this way you can fiddle with the values inside). You can also try to create your own material by looking at the other materials on the stonehearth/data/horde/materials folder, and copying or mixing things (be careful with the values, all the renderer things can easily make the game crash).

Lastly, you have to apply the maps to the entity you want to make transparent (make sure to add the alias your_mod:color_map:translucent to your manifest, pointing to translucent_color_map.json ):

> "components" : {
>     "render_info" : {
>         "color_map": "your_mod:color_map:translucent",
>          "material_maps": [	    
> 	    "/your_mod/data/materials/material_maps/translucent_material_map.json",
>         ]
>     }
> }

I hope this works for you :smiley:

I directly copied it. I guess it was sealed as a personal message.

6 Likes