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.

web

Forum Replies Created

Viewing 15 posts - 61 through 75 (of 213 total)
  • Author
    Posts
  • in reply to: Replace all textures on runtime #34976
    web
    Customer

    :good:
    Nice works now for me too.
    Thanks mate :rose:

    One step closer to a more efficient preload.

    in reply to: Change textures before loading? #34975
    web
    Customer

    Okay, so no way for a quick change via javascript.

    in reply to: Automatic UV and baking possible? #34961
    web
    Customer

    Thx for the addition :good:

    in reply to: Replace all textures on runtime #34926
    web
    Customer

    I wanted to bring this thread up again.

    I would really like to implement a replace all textures function to my apps. This is what I currently got:

    app.scene.traverse(function(obj){
        if(obj.material && obj.material.type == 'MeshNodeMaterial'){
            var mat = obj.material;
            
            for (var i_index in mat.nodeTextures){
                var imageSrc = mat.nodeTextures[i_index].image.src;
                var imageFilename = imageSrc.split('\\').pop().split('/').pop();
        
                var loader = new v3d.TextureLoader();
                loader.setCrossOrigin('Anonymous');
    
                loader.load('./assets/512/' + imageFilename, function(texture) { 
                    mat.nodeTextures[i_index].image = texture;
                    mat.nodeTextures[i_index].format = v3d.RGBFormat;
                    mat.nodeTextures[i_index].needsUpdate = true;
                })
    
            }
        }
    });

    The images seems to get loaded correctly regarding the source/url but I see no update in the webGL. For some maps I get an error in the browser console:
    v3d.WebGLState: TypeError: Failed to execute 'texImage2D' on 'WebGL2RenderingContext': Overload resolution failed.
    Could anyone give a hint what could be the issue?
    I tried to compare my functions to the replaceTexture puzzle but couldnt see any issues. Except that my function is purely for jpg based textures.

    in reply to: Automatic UV and baking possible? #34922
    web
    Customer

    Okay, thx for the explanation.
    So if you want fastest loading glTF is the way to go. Only drawbacks could be lower graphic quality.

    in reply to: Automatic UV and baking possible? #34868
    web
    Customer

    Sorry to hijack this thread. But could explain the glTF compatible thing a little bit more?

    I’ve looked at the documentation but it wasnt clear for me how this leads to faster loading. For example, would loading time decrease when you change a material with single diffuse texture to glTF compatible?

    Or is this only applicable for more complex shader?

    in reply to: Change Depth Test / Rendering order on hover? #34587
    web
    Customer

    Just did some testing. You can easily the depthTest attribute for a material via javascript.

    I was just wondering if you could alter material settings on runtime instead of “recreating” a material, which I’m doing at the moment.

    At the moment I running a function on hover for specified objects at creating a material like this:

    function initial(objectname, depth){
        
        var object = getObjectByName(objectname);
        var colorHighlight = new v3d.Color('#004380');
    
        object.material = new v3d.MeshLambertMaterial({
            color: '#000',
            emissive: colorHighlight,
            emissiveIntensity: 1,
            opacity: 0.5,
            transparent: true,
            depthTest: depth 
        });
    }
    in reply to: Verge3D 3.5 pre2 available! #34583
    web
    Customer

    I had some code for detection like mentioned in one of the post. It was working so far, but later in the project I got heavy slowdowns/performance drops and I could track the issue down to that function. So I had to delete it…

    in reply to: Verge3D 3.5 pre2 available! #34515
    web
    Customer

    Maybe, but its also a click. I had this issue with one project. A big part of the geometry was clickable which executes a particular animation. But when you just clicked and dragged to navigate the camera, the function was executed as soon as I released the mouse. There needs to be somekind of detection if the mouse have been moved in the past 200ms or so and If not its a click. When it has moved its just a drag/rotate.

    I just see now that you responed to the thread I wanted to refer to:

    Clicking vs Dragging

    in reply to: Clip/Cutout objects by geometry #34514
    web
    Customer

    Hey GlifTek,
    unfortunately not. Didn’t had the time and found another way for the current project.

    But I will set me a reminder to have a look.

    in reply to: Verge3D 3.5 pre2 available! #34470
    web
    Customer

    Great additions :good:
    Does the new/updated onclick function also takes a “real click” into account?
    I mean that navigating the camera with the mouse doesnt accidentally trigger an object click event.

    in reply to: optimize texture loading #34340
    web
    Customer

    Great thanks :good:

    in reply to: optimize texture loading #34303
    web
    Customer

    Hey Yuri,

    thx for your response. I know that this would even now be possible with the mentioned replace texture puzzle.

    This was just an idea for future versions, to optimize verge3d even more in regards of file size. And instead of having a own implementation of that function an official one from your side would be great.

    I think that you guys also would be quite quicker in implementing such a function than me :yes:

    in reply to: Clip/Cutout objects by geometry #33984
    web
    Customer

    Great, thank you. Will have a look at that.

    in reply to: Overlay webGL – pointer-events #33915
    web
    Customer

    Sorry, dont get it. I dont need scrolling and I already know how to setAnimatedFrames. I think its to advanced stuff, which would need some serious reworks. Will try to get this solved on my own.

Viewing 15 posts - 61 through 75 (of 213 total)