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.

kvdml

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • in reply to: Is there a way to name children of clones #78617
    kvdml
    Customer

    this is my clone object before and after the rename function

    [‘panel2’, ‘panel_frame’, ‘panel_glass’]
    [‘panel2’, ‘panel_frame2’, ‘panel_glass2’]

    [‘panel3’, ‘panel_frame’, ‘panel_glass’]
    [‘panel3’, ‘panel_frame3’, ‘panel_glass3’]

    in reply to: Is there a way to name children of clones #78616
    kvdml
    Customer

    thx,
    had to rework it a bit, but I got it working like this:

    function renameChildrenOfClone(clonedObjectName) {
    // Retrieve the cloned object from the scene using its name
    const clonedObject = app.scene.getObjectByName(clonedObjectName);

    // Extract the index number from the parent object’s name
    const indexMatch = clonedObjectName.match(/\d+$/);
    const index = indexMatch ? indexMatch[0] : ”;

    for (let i = 0; i < clonedObject.children.length; i++) {
    const child = clonedObject.children;

    if (child.name.startsWith(‘panel_frame’)) {
    child.name = panel_frame${index};
    } else if (child.name.startsWith(‘panel_glass’)) {
    child.name = panel_glass${index};
    }
    }
    }

    • This reply was modified 1 month ago by kvdml.
    in reply to: materials: has this changed in 4.6? #75681
    kvdml
    Customer

    I removed the world shader node of my object in Blender, v3d gltf size dropped to 946kb ‘(from 1.2Mb). xz-compression dropped it to 364 kb, which is not a huge difference with the xz-compression of the object with world-shader node (385 kb).
    It would be nice if in future versions we could decide ourselves what mesh attrs could be optimized: the optimized mesh attr. version is comparable with a plain glb in filesize (696kb uncompressed, 219 kb with xz compression). Too bad it’s not compatible with v3d pbr shaders with maps.
    Thanks for the info though, Alexander.

    kvdml
    Customer

    A lot of our customers don’t really know how many unique products they actually can create and think these configurators are expensive. At that point, we take a calculator and do the math for them: one bed in our configurator costs less than 0.0001 eurocent

    in reply to: materials: has this changed in 4.6? #75635
    kvdml
    Customer

    just did a quick test: the imported object does not get the pbr material assigned when it’s a standard glb. A v3d glb version works.
    This was not a problem in version 4.2
    Also, the Verge .glb is almost double the size in kb 1.2 mb for the Verge version, 680 kb for the standard glb.
    After XZ compression, this goes to 385kb vs 184kb

    in reply to: materials: has this changed in 4.6? #75634
    kvdml
    Customer

    thanks, disabling the ‘optimize mesh attr.’ worked for the cubes in the masterscene. Not for the appended geo that worked in a v3d 4.2 project. I’ll have a look at it this weekend.

    in reply to: materials: has this changed in 4.6? #75627
    kvdml
    Customer

    fixed the errors, no change

    in reply to: materials: has this changed in 4.6? #75626
    kvdml
    Customer

    found the error by logging the xhtml-request:
    Fetch failed loading: GET “http://localhost:8668/applications/Shapeshift_tester/cobblestone_floor_04_diff_1k.ktx2&#8221;.
    Fetch failed loading: GET “http://localhost:8668/applications/Shapeshift_tester/basis_transcoder.wasm
    Both files are there though

    in reply to: Color difference in Chrome vs other browsers #67121
    kvdml
    Customer

    For those with the same problem: it’s ONLY Chrome on MacOS that has this behavior. Probably their webgl metal implementation is not 100% yet, as even MS Edge doesn’t have this problem.
    I fixed it like this (no puzzles, I code directly into the visual_logic.js) : since all our materials are swappable, we’ve made a second albedo map colorcorrected for Chrome

    let userAgent = window.navigator.userAgent;
            let os = "Unknown OS";
    
            if (userAgent.indexOf("Win") != -1) os = "Windows";
            if (userAgent.indexOf("Mac") != -1) os = "MacOS";
            if (userAgent.indexOf("X11") != -1) os = "UNIX";
            if (userAgent.indexOf("Linux") != -1) os = "Linux";
            os = os.toLowerCase()
            // alert(os)
    
            var browser = (function (agent) {
                switch (true) {
                    case agent.indexOf("edge") > -1: return "edge";
                    case agent.indexOf("edg/") > -1: return "chromiumedge"; // Match also / to avoid matching for the older Edge
                    case agent.indexOf("opr") > -1 && !!window.opr: return "opera";
                    case agent.indexOf("chrome") > -1 && !!window.chrome: return "chrome";
                    case agent.indexOf("trident") > -1: return "ie";
                    case agent.indexOf("firefox") > -1: return "firefox";
                    case agent.indexOf("safari") > -1: return "safari";
                    default: return "other";
                }
            })(window.navigator.userAgent.toLowerCase());
            // alert(browser);
    
            var browserextention = ''
            if(os == 'macos' && browser=='chrome'){
                browserextention = '-chrome'
            }

    Materialswapping then goes like this where applicable :

    replaceTexture(
                    "matFabric",
                    "dummie_albedo_fabric.jpg",
                    "assets/3d/maps/fabric_" + myFabric + "_albedo"+browserextention+".jpg",
                    function () {}
                );
    in reply to: Color difference in Chrome vs other browsers #67051
    kvdml
    Customer

    should have been more explicit: the problem is Chrome on macOS (mac M1 chip)

    in reply to: Color difference in Chrome vs other browsers #67047
    kvdml
    Customer
    in reply to: shadows on appended scenes #65135
    kvdml
    Customer

    found it right before you posted this. Thanks though.

    in reply to: disable keybindings on arrow-key and a/d/s/w keys #64657
    kvdml
    Customer

    Thanks, that’s way more elegant

    in reply to: disable keybindings on arrow-key and a/d/s/w keys #64654
    kvdml
    Customer

    Found it in v3d.js:
    Ap,_p,xp,yp={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE_BREAK:19,CAPS_LOCK:20,ESCAPE:27,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,LEFT_WINDOW_KEY:91,RIGHT_WINDOW_KEY:92,SELECT_KEY:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,MULTIPLY:106,ADD:107,SUBTRACT:109,DECIMAL_POINT:110,DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUM_LOCK:144,SCROLL_LOCK:145,SEMI_COLON:186,EQUAL_SIGN:187,COMMA:188,DASH:189,PERIOD:190,FORWARD_SLASH:191,GRAVE_ACCENT:192,OPEN_BRACKET:219,BACK_SLASH:220,CLOSE_BRAKET:221,SINGLE_QUOTE:222}

    in reply to: material bug with object copies #62005
    kvdml
    Customer

    thanks, that explains a lot

Viewing 15 posts - 1 through 15 (of 16 total)