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.

Programmaticaly use “ObjectColor” parameter

Home Forums Programming Programmaticaly use “ObjectColor” parameter

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #77899
    David Duperron
    Customer

    Hi!
    I have created some line objects, and created for each of them a “LineBasicMaterial”, with its own color.
    However, I think I could optimize this by creating a single LineBasicMaterial that would use the “ObjectColor” of the object it is applied to as its own color parameter.
    How can I do this when I define my LineBasicMaterial with javascript code??
    Thanks for the help!

    Regards

    David

    #77909

    Hi David,
    Unfortunately, the object color property is used only for MeshNodeMaterial, namely to specify the output of Blender’s “Object Info” node. However, making separate materials won’t affect performance much, since all of them will share the same GPU shader.

    Soft8Soft Tech Chief
    X | FB | LinkedIn

    #77911
    kdv
    Participant

    However, I think I could optimize this by creating a single LineBasicMaterial that would use the “ObjectColor” of the object

    That will be a near-to-zero optimization.

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #77914
    David Duperron
    Customer

    Thanks guys for the update! clear and understood.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.