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.

GLTF from local host to server

Home Forums Programming GLTF from local host to server

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #37408
    rzr87
    Participant

    Hi there.

    This might be answered before but I have an app similar to the Ring demo.

    it only launches the GLTF file using logic and its perfect for what I need.

    So my question it how so I get this link to work on my server in URL format instead of Localhost format?

    http://localhost:8668/player/player.html?load=../applications/ring/ring.gltf&logic=../applications/ring/visual_logic.js

    So I can iframe it or have it open on a new tab

    #37411

    you must first upload the verge3d_package/player folder to your server, to the directory where your web server stores static files. Then you’ll be able to access it using URL

    https://yourdomain/player/player.html

    plus the relative path to your glTF file as URL parameter.

    Chief 3D Verger | LinkedIn | Twitter

    #37452
    rzr87
    Participant

    Thanks.

    This works. I am getting “You don’t have permission to access this resource” Forbidden error but that must be on the server side.

    Another problem that popped up is that my assign Texture puzzle isnt working.
    If i open the app with the normal HTML file the replace texture puzzle works but when I open it with link in the above post it doesnt work. the material puzzle works fine in both cases but the textures do not seem to register.

    I built the app in version 3.3.1 and updated to 3.5 but this didnt resolve it.
    any idea on how to fix it?

    #37453

    This is a limitation of this way to deploy Verge3D apps. The puzzle replace texture (also load/append scene, sounds, videos) assumes that the specified path is relative to the html file. As a result, when using the player app rather than application html, the path appears to be wrong.
    You can try to change all your relative paths to absolute paths just before uploading to your web server.

    Chief 3D Verger | LinkedIn | Twitter

    #37458
    rzr87
    Participant

    Thanks Yuri, this makes perfect sense. Thanks for all your help

    #48837
    hoanghaxd
    Customer

    Dear Yuri.

    Can you please explain to me why the files do not show?
    https://digitrans.vn/player/player.html?load=../applications/nhan/ring.gltf&logic=../applications/nhan/visual_logic.js
    http://localhost:8668/player/player.html?load=../applications/nhan/ring.gltf&logic=../applications/nhan/visual_logic.js
    I created and uploaded player folder and upload gltf files follow your guides.

    Thank you.

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