Home › Forums › Programming › how to clone material with unique textures for multiple meshes
- This topic has 4 replies, 3 voices, and was last updated 1 year, 8 months ago by kdv.
-
AuthorPosts
-
2023-03-10 at 12:25 am #60971Victor VallejoCustomer
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_idxand nodeTextures
seems to be propietary from verge 3d since is the only result in the webhere 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.2023-03-10 at 1:31 am #60974bigmike814CustomerI’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”?
2023-03-10 at 2:55 am #60975kdvParticipantIt works fine with standard materials.
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.
2023-03-12 at 12:54 am #61002bigmike814CustomerJust came across this. Don’t know if it will help you or not.
https://gliftek.gumroad.com/l/objects_plugins?layout=profile
2023-03-12 at 12:32 pm #61004kdvParticipanti 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.
-
AuthorPosts
- You must be logged in to reply to this topic.