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.

Append scene with offset?

Home Forums Puzzles Append scene with offset?

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #23246
    vklein
    Customer

    Being able to append GLTF files with an position/scale/rotation offset on load on all content would be a very useful feature.
    Because this open the imported GLTFs to be able to contain a lot of objects in whatever hierarchy. No need to know their names or group-names for post-load positioning (rotation/scale on hierarchies without knowing the master object is very tricky) inside the programming, making every bodies lifes so much easier.

    Simply load the file and then offset /rotate /scale it’s content from 0,0,0 (take it as origin).

    Maybe create a new selector type for the whole content of added scene files additional to objects/groups/materials?

    #23261

    Hi,

    a possible solution to this problem may be parenting everything in a scene to an empty/dummy object, which you can move after the scene is loaded.

    Chief 3D Verger | LinkedIn | Twitter

    #23407
    vklein
    Customer

    Yes, but the hierarchy must exist and the name of the object must be known. Both work almost entirely only with hand crafted glbt/glb files. I will have files incoming from CAD converts passed on by a CM system with arbitrary names and hierarchy. I’m developing a visualization tool for industrial machines based on about 3-6 modules stuck together to represent the actual custom machine from the bazillion combinations possible. Everything is in place, performance with multiple loaded modules (the customer converts them himself, we gave him tools for this) is very good (kudos to Verge3D) only append of the modules is still a logistical problem.

    Could we have an option on the “append scene” to automatically create a group including all the new files hierarchy? named like the file.

    Also I have a problem with duplicate modules, till the same .glb file can’t be loaded multiple times I need to clone the content of the first import and here the same problem occurs: I need a clear selection of the content.

    #23414

    Hi vklein,

    Could we have an option on the “append scene” to automatically create a group including all the new files hierarchy? named like the file.

    The engine actually does that by creating a special object which serves as a parent for all objects appended from the loaded scene. Unfortunately, you cannot manipulate such parent objects through puzzles right now. The only available solution is to write a custom javascript function for that and then call it via the “call JS function” puzzle.

    But we also think that such feature will be useful, thanks for the suggestion!

    Also I have a problem with duplicate modules, till the same .glb file can’t be loaded multiple times I need to clone the content of the first import and here the same problem occurs: I need a clear selection of the content.

    I think we can add an optional “alias” into the “append scene” puzzle in order to provide different names for those group objects. So a user would be able to use a certain naming pattern, e.g. myScene0, myScene1, myScene2, etc…

    Co-founder and lead developer at Soft8Soft.

    #24428

    Hi vklein,

    We supported aliases for loaded/appended scenes. Also, now scenes can be used in various puzzles the same way as regualar objects can be used. These features will be available in the next verge3d update.

    You will be able to load the same .gltf scene several times providing a unique name for each loaded copy. This name can be used later to manipulate the whole scene, e.g. translating, rotating, etc…

    Here’s a puzzles setup demonstrating how both of these features can be used:
    append_scene_alias.png

    Scene alias is an optional feature which has to be enabled in the puzzle:
    enable_alias.png

    Attachments:
    You must be logged in to view attached files.

    Co-founder and lead developer at Soft8Soft.

    #31739
    vklein
    Customer

    Glorious, thanks a lot. Please document this features more, everybody needs to know about it. Two very useful features for any modular project.

    #32383
    vklein
    Customer

    Is there a way to access sub-objects of the imported scene? like using the text “Scene2/Object13” or something else?

    Bonus thoughts:
    Importing puzzle code together with the appended scene would be awesome too. With a checkbox to ignore the code on purpose. I know the puzzles aren’t bound to the gltf scene specifically, perhaps the ability to import an additional code file.

    #32401

    Hi,

    After a new scene is appended, it becomes possible to select objects from it by using the standard selector puzzle.

    perhaps the ability to import an additional code file.

    This is surely possible. For example, you can create a script tag and set the src attribute to your new .js file (all with the Puzzles).

    Another to achieve this is to use the new Script puzzle (check out v. 3.4 preview). You can place your code in this puzzle directly, or load your JS file first with file load puzzle and then plug its contents into Script puzzle.

    Chief 3D Verger | LinkedIn | Twitter

    #32419
    vklein
    Customer

    Hi,

    After a new scene is appended, it becomes possible to select objects from it by using the standard selector puzzle.

    Yes, but after appending multiple scenes I may have multiple instances of the file loaded so simply using the object name will give me multiple selections from different files.

    #32424

    I see. There is a code-based approach to this problem which we can share if you’d like us to.

    Chief 3D Verger | LinkedIn | Twitter

    #32437
    GLiFTeK
    Customer

    I see. There is a code-based approach to this problem which we can share if you’d like us to.

    Don’t do it, Yuri.
    I think the ‘eruption of awesomeness” would be too much for us to handle!
    ;-)

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