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.

Help with the Append Puzzle please!

Home Forums Puzzles Help with the Append Puzzle please!

Viewing 11 posts - 16 through 26 (of 26 total)
  • Author
    Posts
  • #56031
    kdv77kdv
    Participant

    Well, it’s hardly possible to detect the problem without app files )))

    Try to replace v3d.js in the app folder by the attached file. It will show the error with more details…

    Attachments:
    You must be logged in to view attached files.
    #56033
    David Yanez
    Customer

    Thank you kdv77kdv,

    I replaced the v3d.js and still with no luck. Screenshot attached.

    I’m sending you the app files in the following link but with access request in order to not leave the files open if thats ok.
    https://tinyurl.com/my-v3d-ap

    Many thanks for all your help!

    Attachments:
    You must be logged in to view attached files.
    #56035
    kdv77kdv
    Participant

    I replaced the v3d.js

    No, you didn’t. The attached v3d.js is non-obfuscated and the error won’t be in the line 1. You should unpack it and replace v3d.js in the app folder by this file. And remove all batch geometry puzzles…

    #56036
    David Yanez
    Customer

    Sorry about that.

    Ok. So I replaced the v3d.js with the new one, but if I just refresh the app browser window I get the following error in the browser console:

    Uncaught SyntaxError: Unexpected token ‘export’ (at visual_logic.js:4571:1)

    Then after refreshing the App Manager browser window I saw that I had to update the application, which I did.

    After that I deleted all the batched geometry inside of puzzles including the one I had in the append scene / when loaded do puzzle.

    Still, after testing it out I get the following browser console error with endless count loading:

    v3d.js:1 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘morphAttributes’)

    Still in a pickle… :wacko:

    Attachments:
    You must be logged in to view attached files.
    #56040
    kdv77kdv
    Participant

    Uncaught SyntaxError: Unexpected token ‘export’ (at visual_logic.js:4571:1)

    Well, that was nearly expected ))) No ideas any more. Requested an access to the files from kdv.info…

    #56041
    David Yanez
    Customer

    Ok.Giving you access. Thank you

    #56043
    kdv77kdv
    Participant

    First conclusion: the problem is in your logic, not in geometry…

    #56044
    kdv77kdv
    Participant

    Here is your problem: you assign a material to all objects in a group, but this group contains not only meshes, it also contains empty objects that are not supposed to have a material.

    And you can add this script somewhere in the begining

    It will remove this effect

    And you’d better not use geometry batching at all. It increases tris count significantly. A dubious optimization…
    before

    after

    • This reply was modified 1 week ago by kdv77kdv.
    #56063
    David Yanez
    Customer

    Awesome! I would have taken even more time to solve this if it wasn’t for your help. Thank you so much kdv77kdv!

    Indeed I had 2 meshes that were not sharing the same shader in the group I had assigned for the material replacement in puzzles.

    One last question though… Do you know which puzzle I could use in order to update the material of certain objects in the appended gltf scene, so they can appear after loading with the latest color selection in the master scene configuration?

    I was thinking maybe to add some puzzle in the “when loaded do” of the append scene puzzle that would indicate the following logic:

    –when loaded, assign material from mesh (any object of the master scene that has the required color or pattern).–

    But I’m not sure how to configure this with the materials puzzles, maybe a script?.. Or a variable setup (which I still dont understand how to use them)…any ideas?

    Thanks again! You rock!

    #56065
    kdv77kdv
    Participant

    Indeed I had 2 meshes that were not sharing the same shader in the group

    The problem was not in meshes and their shaiders, the problem was in empty objects in this group. Assign materials to meshes only, the function assignMat() doesn’t check if an object has a material or not )))

    I was thinking maybe to add some puzzle in the “when loaded do” of the append scene

    You were thinking in the right direction. Place the assign material puzzle there. To see all names of objects in the appended scene just append it in the viewport of the puzzles editor.

    #56074
    David Yanez
    Customer

    Thank you so much Denis,
    Yo definitely rock!

    I managed to set the color update with variables and procedures, where I first made a list of procedures with a variables for each color that stated if was on or off. I also created an initial state of variables for this.

    Then I added these status procedures to the prior color configuration procedures I already had which were linked to the on event of click puzzles.

    Finally I created a procedure with conditional that referenced the state of the active color status. I then used this last procedure which I named “addons color update” in the “when loaded do” section of the append puzzle.

    And voila! PROBLEM SOLVED! … All working smoothly now.

    Again thanks for the amazing support. It’s great being able to continue learning awesome people as yourself. Hopefully I can be able to share some wisdom some time soon as well.

    Cheers!

    Attachments:
    You must be logged in to view attached files.
Viewing 11 posts - 16 through 26 (of 26 total)
  • You must be logged in to reply to this topic.