Allow the server to define what Mercator shaders to use for the terrain

Registered by Erik Ogenvik

Currently both the client and the server uses hardcoded settings for what Mercator Shaders to use for the terrain. It would be better if this was defined as attributes of the world entity, just like the actual terrain is defined in the "terrain" attribute.
As with all attributes, we need to be expressive without being too technical, so that the clients gets some leeway on how to represent this.
The surfaces are defined as layers, with layers with lower "id" being at the bottom (and in a 3d client rendered first). Apart from standard shaders such as the grass and the sand, we also support areas (such as the areas under the oaks and the path). The information sent from the server should therefore contain information both about how to do the "basic" terrain surfaces as well as how to do the areas (although in the latter case it would be sufficient to just specify "layer {id=7, type=area, material=path}" whereas in the grass layer definition we would also need to specify falloff similiar values, to be sent to the Mercator GrassShader).
I'm thinking of a map-type attribute on the world entity named "layers", the keys being the id of the layers themselves, and the corresponding value being another map with information about the layer.
Pseudocode:
layers:
    0:
        type: fill
        material: granite
    1:
        type: grass
        material: grass
        falloff: 7
 and so on

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
None
Started by
Erik Ogenvik
Completed by
Erik Ogenvik

Related branches

Sprints

Whiteboard

 I've just commited code to Ember that handles the "surfaces" data if available. However, this needs to be expanded to also include the areas, if so only by adding
[code]
      name: field
      pattern: area
[/code]

However, since the areas are indexed, I think we need to change the type of the attribute "surfaces" from a list to a map, so that it's possible to say that the layer of index so and so should be of this type.
--erik

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.