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.

how to clone material with unique textures for multiple meshes

Home Forums Programming how to clone material with unique textures for multiple meshes

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #60971
    Victor Vallejo
    Customer

    hi we are trying to make a dynamic material for our configurator , our 3d models have multiple slots of the same material(this are copies in blender spheres image) , currently our approach is declaring the material from blender we are able to change the material programmatically using the same functions that are in the visuallogic file

    but now we want to have a single material of each type instead of copies and dynamically add as many unique clones we need for our models

    i cant find any documentation on how to assign the “tex_image_bl_par_tex_idx0” index ,i believe this happens in the exporter

    but when we change the material names , texture names and the “tex_image_bl_par_tex_idx0” property index it doesnt work
    is there some additional documantation related to this? nothing pops in google when you search
    tex_image_bl_par_tex_idx

    and nodeTextures
    seems to be propietary from verge 3d since is the only result in the web

    here nodeTextures

    it states this

    You can use it to dynamically assign new textures to a material.

    have someone have a solution for this ?

    Attachments:
    You must be logged in to view attached files.
    #60974
    bigmike814
    Customer

    I’m not sure I can help much, but something that has worked for me is looking at the tutorials to see if I can gather anything. Have you tried looking at the drink shop tutorial for any clues?

    Also, when cloning, the name becomes “name1” then “name2” and so on. Maybe you can make a rule using the count with “i”?

    #60975
    kdv
    Participant

    It works fine with standard materials.

    Custom texture on cloned object

    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.

    #61002
    bigmike814
    Customer

    Just came across this. Don’t know if it will help you or not.

    https://gliftek.gumroad.com/l/objects_plugins?layout=profile

    #61004
    kdv
    Participant

    i cant find any documentation on how to assign the “tex_image_bl_par_tex_idx0” index ,i believe this happens in the exporter

    there is no need to assign new index. Moreover, I suppose it will break the material. Just use clonedMaterial.nodeTextures = {}; and add cloned textures with the same names.

    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.

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