Home › Forums › Programming › material morph issue
- This topic has 5 replies, 3 voices, and was last updated 3 years, 11 months ago by
Alexander Kovelenov.
-
AuthorPosts
-
2021-11-10 at 4:34 pm #46887
dragosburian
CustomerHello,
We are having difficulties with appending a scene with placeholder materials, then replacing the placeholder materials with textured materials from the main scene. The model(a gate) morphs vertically and horizontally, the frame is a separate element, and each plank is taken separately. Planks do get the proper material change and work without problems, the frame(multimaterial) turns black as if there were no texture.
In order to do the switch I modified the assignMat function from Verge to pick the right material from the object to switch:
var firstSubmesh = obj.resolveMultiMaterial()[pos]; <-pos is the proper material slot that I calculate.Also, I noticed for the gate frame itself that without cloning the material, morphing sometimes does not work as intended.
Any ways we can circumvent these issues?
Dragos
Attachments:
2021-11-10 at 5:52 pm #46891
xeonCustomerI am not sure how best to answer this. Could you describe what you are trying to accomplish? Are you trying to morph the gate planks but not stretch the texture? Is the gate frame texture needing to morph as well? Just trying to understand what you are trying to do vs standard material swaps. Then I might be able to give some input.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2021-11-11 at 3:37 pm #46913dragosburian
CustomerThe models have morph targets and get loaded in pieces, depending on user input(so as not to load all geometry whether needed or not). Because we don’t want to load the same texture maps multiple times(appending scene makes new materials even if the same material was loaded from another appended scene), I use one scene that always gets appended to load materials, the other scenes have placeholder materials and the intention is to change those materials with the intended one from the main scene. This works with single-material objects, object with multiple materials fail to load them and turn black.
2021-11-11 at 6:05 pm #46914
xeonCustomerWhat 3D package are you using?
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2021-11-12 at 6:51 am #46919dragosburian
CustomerBlender
2021-11-12 at 8:20 am #46920
Alexander KovelenovStaff -
AuthorPosts
- You must be logged in to reply to this topic.

