We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Shared Materials

Home Forums Programming Shared Materials

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #81975
    kvdml
    Customer

    I’m trying some things with shared materials (I have 160 objects, 4 materials, 100 color variationss)

    If two objects in my main scene that have the same material (powdercoat), I can change the rgb of object 2:
    setMaterialColor(getObjectMaterial(‘test2’, undefined, true), ‘RGB’, 0, 0, 0, ‘#b512f6’);

    If I change the material of ‘test2’ first to ‘steel’, I can no longer change the RGB on this object, instead the original ‘steel’ changes its RGB:

    assignMat(‘test2’, ‘steel’)
    setMaterialColor(getObjectMaterial(‘test2’, undefined, true), ‘RGB’, 0, 0, 0, ‘#b512f6’);

    Am I overlooking something? I do need the assignMat(): I’m making 160 clones….

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.