Remove concept of material assets?

Florian

Active Member
Contributor
Architecture
I am not sure if material assets that we currently have make much sense.

  • Material assets are typically just a link to the texture
  • There are some cases of materials that are just a single color
  • Color modification at runtime is not possible in a good way:
    • The normal material assets should not be modified, so you can't change the color at runtime
    • If you create instances of the assets to allow for modification you need to ensure that it gets disposed. Also it is strange to do this.
    • Creating new assets for each color you want to assign to a mesh also leaves you with the task to clean up
    • For current monkey head mesh it is solved by having a redundant color definition in MeshComponent.
We could get rid of material assets and just have MeshComponent and SkeletalMeshComponent reference the texture directly.

Alterantivly we could introduce a MaterialComponent and store the information like color and texture there.
 

vampcat

Bug Hunter Extraordinaire
Contributor
I seem to recall my last conversation about Materials was with Immortius when I started doing Terasology, and he mentioned things like changing the transparency of texture and stuff as potential use. However, I believe most of this can be handled via components, so I second this idea.
 
Top