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.

material morph issue

Home Forums Programming material morph issue

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #46887
    dragosburian
    Customer

    Hello,
    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:
    You must be logged in to view attached files.
    #46891
    xeon
    Customer

    I 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

    #46913
    dragosburian
    Customer

    The 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.

    #46914
    xeon
    Customer

    What 3D package are you using?

    Xeon
    Route 66 Digital
    Interactive Solutions

    #46919
    dragosburian
    Customer

    Blender

    #46920

    Hi,
    can you please share some minimal project via our support email?

    Verge3D’s Tech Chief
    FB | Twitter | VK

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