multiple material slots

approxdecapproxdec Posts: 13Member
edited September 2019 in 3D

can we add material slots within Godot itself?
in the inspector for example?



  • TwistedTwiglegTwistedTwigleg Posts: 2,474Admin

    What do you mean by material slots? If it is present in the Godot editor, then in theory it should be possible since the Godot editor runs using Godot. That said, depending on what it is, it might not be easy.

    Do you mean you want to access materials within a script and be able to populate those materials through the Godot editor? If so, you just need to create an exported material. Something like this should work (untested):

    export (Material) var material_slot_one
    # or you can specify what type of material you want
    export (SpatialMaterial) var material_slot_two
  • approxdecapproxdec Posts: 13Member
    edited September 2019

    no, not scripting, just in the /Inspector/Material there is slot 0

    whether we can add another material slot to an object there, in the Inspector.

    not from importing a model with multiple material slots.


  • MegalomaniakMegalomaniak Posts: 2,506Admin

    I think it gets those material slots from the imported object, so if for an example in blender you have added multiple materials to your object, one material on one half of the mesh faces, the other applied to the other half, etc.

    Or if you are creating your own mesh object from code then you should be able to create multiple materials and apply each to a specific set of geometry as you create it.

  • approxdecapproxdec Posts: 13Member

    thanks Megalomaniak for your description of how this works.
    very good. i do get it now.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file